@azure/communication-identity 1.3.2-alpha.20241122.8 → 1.3.2-alpha.20241203.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (255) hide show
  1. package/dist/browser/common/logger.d.ts +5 -0
  2. package/dist/browser/common/logger.d.ts.map +1 -0
  3. package/{types/communication-identity.d.ts → dist/browser/communicationIdentityClient.d.ts} +76 -148
  4. package/dist/browser/communicationIdentityClient.d.ts.map +1 -0
  5. package/{dist-esm/src → dist/browser}/communicationIdentityClient.js +3 -3
  6. package/dist/browser/communicationIdentityClient.js.map +1 -0
  7. package/dist/browser/constants.d.ts +2 -0
  8. package/dist/browser/constants.d.ts.map +1 -0
  9. package/dist/browser/generated/src/identityRestClient.d.ts +17 -0
  10. package/dist/browser/generated/src/identityRestClient.d.ts.map +1 -0
  11. package/{dist-esm/src → dist/browser}/generated/src/identityRestClient.js +1 -1
  12. package/dist/browser/generated/src/identityRestClient.js.map +1 -0
  13. package/dist/browser/generated/src/index.d.ts +4 -0
  14. package/dist/browser/generated/src/index.d.ts.map +1 -0
  15. package/dist/browser/generated/src/index.js +11 -0
  16. package/dist/browser/generated/src/index.js.map +1 -0
  17. package/dist/browser/generated/src/models/index.d.ts +127 -0
  18. package/dist/browser/generated/src/models/index.d.ts.map +1 -0
  19. package/dist/browser/generated/src/models/mappers.d.ts +10 -0
  20. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
  21. package/dist/browser/generated/src/models/parameters.d.ts +14 -0
  22. package/dist/browser/generated/src/models/parameters.d.ts.map +1 -0
  23. package/{dist-esm/src → dist/browser}/generated/src/models/parameters.js +1 -1
  24. package/dist/browser/generated/src/models/parameters.js.map +1 -0
  25. package/dist/browser/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
  26. package/dist/browser/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
  27. package/{dist-esm/src → dist/browser}/generated/src/operations/communicationIdentityOperations.js +3 -3
  28. package/dist/browser/generated/src/operations/communicationIdentityOperations.js.map +1 -0
  29. package/dist/browser/generated/src/operations/index.d.ts +2 -0
  30. package/dist/browser/generated/src/operations/index.d.ts.map +1 -0
  31. package/{dist-esm/src/generated/src → dist/browser/generated/src/operations}/index.js +1 -3
  32. package/{dist-esm/src → dist/browser}/generated/src/operations/index.js.map +1 -1
  33. package/dist/browser/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
  34. package/dist/browser/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
  35. package/dist/browser/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
  36. package/dist/browser/generated/src/operationsInterfaces/index.d.ts +2 -0
  37. package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -0
  38. package/dist/browser/generated/src/operationsInterfaces/index.js +9 -0
  39. package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/index.js.map +1 -1
  40. package/dist/browser/generated/src/tracing.d.ts +2 -0
  41. package/dist/browser/generated/src/tracing.d.ts.map +1 -0
  42. package/dist/browser/index.d.ts +3 -0
  43. package/dist/browser/index.d.ts.map +1 -0
  44. package/dist/browser/index.js +5 -0
  45. package/{dist-esm/src → dist/browser}/index.js.map +1 -1
  46. package/dist/browser/models.d.ts +65 -0
  47. package/dist/browser/models.d.ts.map +1 -0
  48. package/dist/browser/package.json +3 -0
  49. package/dist/commonjs/common/logger.d.ts +5 -0
  50. package/dist/commonjs/common/logger.d.ts.map +1 -0
  51. package/dist/commonjs/common/logger.js +11 -0
  52. package/dist/commonjs/common/logger.js.map +1 -0
  53. package/dist/commonjs/communicationIdentityClient.d.ts +76 -0
  54. package/dist/commonjs/communicationIdentityClient.d.ts.map +1 -0
  55. package/dist/commonjs/communicationIdentityClient.js +107 -0
  56. package/dist/commonjs/communicationIdentityClient.js.map +1 -0
  57. package/dist/commonjs/constants.d.ts +2 -0
  58. package/dist/commonjs/constants.d.ts.map +1 -0
  59. package/dist/commonjs/constants.js +7 -0
  60. package/dist/commonjs/constants.js.map +1 -0
  61. package/dist/commonjs/generated/src/identityRestClient.d.ts +17 -0
  62. package/dist/commonjs/generated/src/identityRestClient.d.ts.map +1 -0
  63. package/dist/commonjs/generated/src/identityRestClient.js +74 -0
  64. package/dist/commonjs/generated/src/identityRestClient.js.map +1 -0
  65. package/dist/commonjs/generated/src/index.d.ts +4 -0
  66. package/dist/commonjs/generated/src/index.d.ts.map +1 -0
  67. package/dist/commonjs/generated/src/index.js +16 -0
  68. package/dist/commonjs/generated/src/index.js.map +1 -0
  69. package/dist/commonjs/generated/src/models/index.d.ts +127 -0
  70. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
  71. package/dist/commonjs/generated/src/models/index.js +25 -0
  72. package/dist/commonjs/generated/src/models/index.js.map +1 -0
  73. package/dist/commonjs/generated/src/models/mappers.d.ts +10 -0
  74. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
  75. package/dist/commonjs/generated/src/models/mappers.js +224 -0
  76. package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
  77. package/dist/commonjs/generated/src/models/parameters.d.ts +14 -0
  78. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
  79. package/dist/commonjs/generated/src/models/parameters.js +94 -0
  80. package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
  81. package/dist/commonjs/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
  82. package/dist/commonjs/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
  83. package/dist/commonjs/generated/src/operations/communicationIdentityOperations.js +182 -0
  84. package/dist/commonjs/generated/src/operations/communicationIdentityOperations.js.map +1 -0
  85. package/dist/commonjs/generated/src/operations/index.d.ts +2 -0
  86. package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
  87. package/dist/commonjs/generated/src/operations/index.js +12 -0
  88. package/dist/commonjs/generated/src/operations/index.js.map +1 -0
  89. package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
  90. package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
  91. package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.js +10 -0
  92. package/dist/commonjs/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
  93. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +2 -0
  94. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
  95. package/dist/commonjs/generated/src/operationsInterfaces/index.js +12 -0
  96. package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
  97. package/dist/commonjs/generated/src/tracing.d.ts +2 -0
  98. package/dist/commonjs/generated/src/tracing.d.ts.map +1 -0
  99. package/dist/commonjs/generated/src/tracing.js +17 -0
  100. package/dist/commonjs/generated/src/tracing.js.map +1 -0
  101. package/dist/commonjs/index.d.ts +3 -0
  102. package/dist/commonjs/index.d.ts.map +1 -0
  103. package/dist/commonjs/index.js +8 -0
  104. package/dist/commonjs/index.js.map +1 -0
  105. package/dist/commonjs/models.d.ts +65 -0
  106. package/dist/commonjs/models.d.ts.map +1 -0
  107. package/dist/commonjs/models.js +5 -0
  108. package/dist/commonjs/models.js.map +1 -0
  109. package/dist/commonjs/package.json +3 -0
  110. package/dist/commonjs/tsdoc-metadata.json +11 -0
  111. package/dist/esm/common/logger.d.ts +5 -0
  112. package/dist/esm/common/logger.d.ts.map +1 -0
  113. package/dist/esm/common/logger.js +8 -0
  114. package/dist/esm/common/logger.js.map +1 -0
  115. package/dist/esm/communicationIdentityClient.d.ts +76 -0
  116. package/dist/esm/communicationIdentityClient.d.ts.map +1 -0
  117. package/dist/esm/communicationIdentityClient.js +103 -0
  118. package/dist/esm/communicationIdentityClient.js.map +1 -0
  119. package/dist/esm/constants.d.ts +2 -0
  120. package/dist/esm/constants.d.ts.map +1 -0
  121. package/dist/esm/constants.js +4 -0
  122. package/dist/esm/constants.js.map +1 -0
  123. package/dist/esm/generated/src/identityRestClient.d.ts +17 -0
  124. package/dist/esm/generated/src/identityRestClient.d.ts.map +1 -0
  125. package/dist/esm/generated/src/identityRestClient.js +69 -0
  126. package/dist/esm/generated/src/identityRestClient.js.map +1 -0
  127. package/dist/esm/generated/src/index.d.ts +4 -0
  128. package/dist/esm/generated/src/index.d.ts.map +1 -0
  129. package/dist/esm/generated/src/index.js +11 -0
  130. package/dist/esm/generated/src/index.js.map +1 -0
  131. package/dist/esm/generated/src/models/index.d.ts +127 -0
  132. package/dist/esm/generated/src/models/index.d.ts.map +1 -0
  133. package/dist/esm/generated/src/models/index.js +22 -0
  134. package/dist/esm/generated/src/models/index.js.map +1 -0
  135. package/dist/esm/generated/src/models/mappers.d.ts +10 -0
  136. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
  137. package/dist/esm/generated/src/models/mappers.js +221 -0
  138. package/dist/esm/generated/src/models/mappers.js.map +1 -0
  139. package/dist/esm/generated/src/models/parameters.d.ts +14 -0
  140. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
  141. package/dist/esm/generated/src/models/parameters.js +91 -0
  142. package/dist/esm/generated/src/models/parameters.js.map +1 -0
  143. package/dist/esm/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
  144. package/dist/esm/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
  145. package/dist/esm/generated/src/operations/communicationIdentityOperations.js +177 -0
  146. package/dist/esm/generated/src/operations/communicationIdentityOperations.js.map +1 -0
  147. package/dist/esm/generated/src/operations/index.d.ts +2 -0
  148. package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
  149. package/dist/esm/generated/src/operations/index.js +9 -0
  150. package/dist/esm/generated/src/operations/index.js.map +1 -0
  151. package/dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
  152. package/dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
  153. package/{dist-esm/src/generated/src/operationsInterfaces/index.js → dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.js} +2 -2
  154. package/dist/esm/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
  155. package/dist/esm/generated/src/operationsInterfaces/index.d.ts +2 -0
  156. package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
  157. package/dist/esm/generated/src/operationsInterfaces/index.js +9 -0
  158. package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
  159. package/dist/esm/generated/src/tracing.d.ts +2 -0
  160. package/dist/esm/generated/src/tracing.d.ts.map +1 -0
  161. package/dist/esm/generated/src/tracing.js +14 -0
  162. package/dist/esm/generated/src/tracing.js.map +1 -0
  163. package/dist/esm/index.d.ts +3 -0
  164. package/dist/esm/index.d.ts.map +1 -0
  165. package/dist/esm/index.js +5 -0
  166. package/dist/esm/index.js.map +1 -0
  167. package/dist/esm/models.d.ts +65 -0
  168. package/dist/esm/models.d.ts.map +1 -0
  169. package/dist/esm/models.js +4 -0
  170. package/dist/esm/models.js.map +1 -0
  171. package/dist/esm/package.json +3 -0
  172. package/dist/react-native/common/logger.d.ts +5 -0
  173. package/dist/react-native/common/logger.d.ts.map +1 -0
  174. package/dist/react-native/common/logger.js +8 -0
  175. package/dist/react-native/common/logger.js.map +1 -0
  176. package/dist/react-native/communicationIdentityClient.d.ts +76 -0
  177. package/dist/react-native/communicationIdentityClient.d.ts.map +1 -0
  178. package/dist/react-native/communicationIdentityClient.js +103 -0
  179. package/dist/react-native/communicationIdentityClient.js.map +1 -0
  180. package/dist/react-native/constants.d.ts +2 -0
  181. package/dist/react-native/constants.d.ts.map +1 -0
  182. package/dist/react-native/constants.js +4 -0
  183. package/dist/react-native/constants.js.map +1 -0
  184. package/dist/react-native/generated/src/identityRestClient.d.ts +17 -0
  185. package/dist/react-native/generated/src/identityRestClient.d.ts.map +1 -0
  186. package/dist/react-native/generated/src/identityRestClient.js +69 -0
  187. package/dist/react-native/generated/src/identityRestClient.js.map +1 -0
  188. package/dist/react-native/generated/src/index.d.ts +4 -0
  189. package/dist/react-native/generated/src/index.d.ts.map +1 -0
  190. package/dist/react-native/generated/src/index.js +11 -0
  191. package/dist/react-native/generated/src/index.js.map +1 -0
  192. package/dist/react-native/generated/src/models/index.d.ts +127 -0
  193. package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
  194. package/dist/react-native/generated/src/models/index.js +22 -0
  195. package/dist/react-native/generated/src/models/index.js.map +1 -0
  196. package/dist/react-native/generated/src/models/mappers.d.ts +10 -0
  197. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
  198. package/dist/react-native/generated/src/models/mappers.js +221 -0
  199. package/dist/react-native/generated/src/models/mappers.js.map +1 -0
  200. package/dist/react-native/generated/src/models/parameters.d.ts +14 -0
  201. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
  202. package/dist/react-native/generated/src/models/parameters.js +91 -0
  203. package/dist/react-native/generated/src/models/parameters.js.map +1 -0
  204. package/dist/react-native/generated/src/operations/communicationIdentityOperations.d.ts +49 -0
  205. package/dist/react-native/generated/src/operations/communicationIdentityOperations.d.ts.map +1 -0
  206. package/dist/react-native/generated/src/operations/communicationIdentityOperations.js +177 -0
  207. package/dist/react-native/generated/src/operations/communicationIdentityOperations.js.map +1 -0
  208. package/dist/react-native/generated/src/operations/index.d.ts +2 -0
  209. package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
  210. package/dist/react-native/generated/src/operations/index.js +9 -0
  211. package/dist/react-native/generated/src/operations/index.js.map +1 -0
  212. package/dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts +41 -0
  213. package/dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.d.ts.map +1 -0
  214. package/{dist-esm/src/generated/src/operations/index.js → dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.js} +2 -2
  215. package/dist/react-native/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +1 -0
  216. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +2 -0
  217. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
  218. package/dist/react-native/generated/src/operationsInterfaces/index.js +9 -0
  219. package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
  220. package/dist/react-native/generated/src/tracing.d.ts +2 -0
  221. package/dist/react-native/generated/src/tracing.d.ts.map +1 -0
  222. package/dist/react-native/generated/src/tracing.js +14 -0
  223. package/dist/react-native/generated/src/tracing.js.map +1 -0
  224. package/dist/react-native/index.d.ts +3 -0
  225. package/dist/react-native/index.d.ts.map +1 -0
  226. package/dist/react-native/index.js +5 -0
  227. package/dist/react-native/index.js.map +1 -0
  228. package/dist/react-native/models.d.ts +65 -0
  229. package/dist/react-native/models.d.ts.map +1 -0
  230. package/dist/react-native/models.js +4 -0
  231. package/dist/react-native/models.js.map +1 -0
  232. package/dist/react-native/package.json +3 -0
  233. package/package.json +68 -48
  234. package/dist/index.js +0 -684
  235. package/dist/index.js.map +0 -1
  236. package/dist-esm/src/communicationIdentityClient.js.map +0 -1
  237. package/dist-esm/src/generated/src/identityRestClient.js.map +0 -1
  238. package/dist-esm/src/generated/src/index.js.map +0 -1
  239. package/dist-esm/src/generated/src/models/parameters.js.map +0 -1
  240. package/dist-esm/src/generated/src/operations/communicationIdentityOperations.js.map +0 -1
  241. package/dist-esm/src/generated/src/operationsInterfaces/communicationIdentityOperations.js.map +0 -1
  242. package/dist-esm/src/index.js +0 -5
  243. /package/{dist-esm/src → dist/browser}/common/logger.js +0 -0
  244. /package/{dist-esm/src → dist/browser}/common/logger.js.map +0 -0
  245. /package/{dist-esm/src → dist/browser}/constants.js +0 -0
  246. /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
  247. /package/{dist-esm/src → dist/browser}/generated/src/models/index.js +0 -0
  248. /package/{dist-esm/src → dist/browser}/generated/src/models/index.js.map +0 -0
  249. /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js +0 -0
  250. /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js.map +0 -0
  251. /package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/communicationIdentityOperations.js +0 -0
  252. /package/{dist-esm/src → dist/browser}/generated/src/tracing.js +0 -0
  253. /package/{dist-esm/src → dist/browser}/generated/src/tracing.js.map +0 -0
  254. /package/{dist-esm/src → dist/browser}/models.js +0 -0
  255. /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communicationIdentityOperations.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operations/communicationIdentityOperations.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AAInF,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EACL,yCAAyC,EACzC,mCAAmC,EACnC,yCAAyC,EACzC,qDAAqD,EACrD,+DAA+D,EAC/D,yDAAyD,EACzD,+BAA+B,EAC/B,mDAAmD,EACnD,6CAA6C,EAC9C,MAAM,oBAAoB,CAAC;AAE5B,mEAAmE;AACnE,qBAAa,mCACX,YAAW,+BAA+B;IAC1C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;OAGG;IACG,MAAM,CACV,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC;IAa/C;;;;OAIG;IACG,MAAM,CACV,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,IAAI,CAAC;IAahB;;;;OAIG;IACG,kBAAkB,CACtB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,qDAAqD,GAC9D,OAAO,CAAC,IAAI,CAAC;IAahB;;;;;;;;;;OAUG;IACG,4BAA4B,CAChC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,+DAA+D,GACxE,OAAO,CAAC,yDAAyD,CAAC;IAarE;;;;;OAKG;IACG,gBAAgB,CACpB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,+BAA+B,EAAE,EACzC,OAAO,CAAC,EAAE,mDAAmD,GAC5D,OAAO,CAAC,6CAA6C,CAAC;CAY1D"}
@@ -5,10 +5,10 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { tracingClient } from "../tracing";
8
+ import { tracingClient } from "../tracing.js";
9
9
  import * as coreClient from "@azure/core-client";
10
- import * as Mappers from "../models/mappers";
11
- import * as Parameters from "../models/parameters";
10
+ import * as Mappers from "../models/mappers.js";
11
+ import * as Parameters from "../models/parameters.js";
12
12
  /** Class containing CommunicationIdentityOperations operations. */
13
13
  export class CommunicationIdentityOperationsImpl {
14
14
  /**
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communicationIdentityOperations.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/communicationIdentityOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AActD,mEAAmE;AACnE,MAAM,OAAO,mCAAmC;IAI9C;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CACV,OAAmD;QAEnD,OAAO,aAAa,CAAC,QAAQ,CAC3B,2BAA2B,EAC3B,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,OAAO,EAAE,EACX,mBAAmB,CAC4B,CAAC;QACpD,CAAC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,MAAM,CACV,EAAU,EACV,OAA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D,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,MAAM,EAAE,CAAC,QAAQ,CAAC;YAClB,gBAAgB,EAAE,CAAC,SAAS,EAAE,kBAAkB,CAAC;SAClD;QACD,MAAM,kCACD,OAAO,CAAC,uCAAuC,KAClD,QAAQ,EAAE,IAAI,GACf;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC;IACnD,gBAAgB,EAAE,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { tracingClient } from \"../tracing.js\";\nimport { CommunicationIdentityOperations } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { IdentityRestClient } from \"../identityRestClient.js\";\nimport {\n CommunicationIdentityCreateOptionalParams,\n CommunicationIdentityCreateResponse,\n CommunicationIdentityDeleteOptionalParams,\n CommunicationIdentityRevokeAccessTokensOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenResponse,\n CommunicationIdentityTokenScope,\n CommunicationIdentityIssueAccessTokenOptionalParams,\n CommunicationIdentityIssueAccessTokenResponse\n} from \"../models/index.js\";\n\n/** Class containing CommunicationIdentityOperations operations. */\nexport class CommunicationIdentityOperationsImpl\n implements CommunicationIdentityOperations {\n private readonly client: IdentityRestClient;\n\n /**\n * Initialize a new instance of the class CommunicationIdentityOperations class.\n * @param client Reference to the service client\n */\n constructor(client: IdentityRestClient) {\n this.client = client;\n }\n\n /**\n * Create a new identity, and optionally, an access token.\n * @param options The options parameters.\n */\n async create(\n options?: CommunicationIdentityCreateOptionalParams\n ): Promise<CommunicationIdentityCreateResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.create\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n createOperationSpec\n ) as Promise<CommunicationIdentityCreateResponse>;\n }\n );\n }\n\n /**\n * Delete the identity, revoke all tokens for the identity and delete all associated data.\n * @param id Identifier of the identity to be deleted.\n * @param options The options parameters.\n */\n async delete(\n id: string,\n options?: CommunicationIdentityDeleteOptionalParams\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.delete\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n deleteOperationSpec\n ) as Promise<void>;\n }\n );\n }\n\n /**\n * Revoke all access tokens for the specific identity.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n async revokeAccessTokens(\n id: string,\n options?: CommunicationIdentityRevokeAccessTokensOptionalParams\n ): Promise<void> {\n return tracingClient.withSpan(\n \"IdentityRestClient.revokeAccessTokens\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, options },\n revokeAccessTokensOperationSpec\n ) as Promise<void>;\n }\n );\n }\n\n /**\n * Exchange an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication\n * Identity access token with a matching expiration time.\n * @param token Azure AD access token of a Teams User to acquire a new Communication Identity access\n * token.\n * @param appId Client ID of an Azure AD application to be verified against the appid claim in the\n * Azure AD access token.\n * @param userId Object ID of an Azure AD user (Teams User) to be verified against the oid claim in the\n * Azure AD access token.\n * @param options The options parameters.\n */\n async exchangeTeamsUserAccessToken(\n token: string,\n appId: string,\n userId: string,\n options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams\n ): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.exchangeTeamsUserAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { token, appId, userId, options },\n exchangeTeamsUserAccessTokenOperationSpec\n ) as Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;\n }\n );\n }\n\n /**\n * Issue a new token for an identity.\n * @param id Identifier of the identity to issue token for.\n * @param scopes List of scopes attached to the token.\n * @param options The options parameters.\n */\n async issueAccessToken(\n id: string,\n scopes: CommunicationIdentityTokenScope[],\n options?: CommunicationIdentityIssueAccessTokenOptionalParams\n ): Promise<CommunicationIdentityIssueAccessTokenResponse> {\n return tracingClient.withSpan(\n \"IdentityRestClient.issueAccessToken\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { id, scopes, options },\n issueAccessTokenOperationSpec\n ) as Promise<CommunicationIdentityIssueAccessTokenResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOperationSpec: coreClient.OperationSpec = {\n path: \"/identities\",\n httpMethod: \"POST\",\n responses: {\n 201: {\n bodyMapper: Mappers.CommunicationIdentityAccessTokenResult\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: {\n createTokenWithScopes: [\"options\", \"createTokenWithScopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"]\n },\n mapper: Mappers.CommunicationIdentityCreateRequest\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}\",\n httpMethod: \"DELETE\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst revokeAccessTokensOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:revokeAccessTokens\",\n httpMethod: \"POST\",\n responses: {\n 204: {},\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst exchangeTeamsUserAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/teamsUser/:exchangeAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: { token: [\"token\"], appId: [\"appId\"], userId: [\"userId\"] },\n mapper: { ...Mappers.TeamsUserExchangeTokenRequest, required: true }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\nconst issueAccessTokenOperationSpec: coreClient.OperationSpec = {\n path: \"/identities/{id}/:issueAccessToken\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.CommunicationIdentityAccessToken\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: {\n scopes: [\"scopes\"],\n expiresInMinutes: [\"options\", \"expiresInMinutes\"]\n },\n mapper: {\n ...Mappers.CommunicationIdentityAccessTokenRequest,\n required: true\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.id],\n headerParameters: [Parameters.contentType, Parameters.accept],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./communicationIdentityOperations.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAQA,cAAc,sCAAsC,CAAC"}
@@ -5,7 +5,5 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- export * from "./models";
9
- export { IdentityRestClient } from "./identityRestClient";
10
- export * from "./operationsInterfaces";
8
+ export * from "./communicationIdentityOperations.js";
11
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,mCAAmC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./communicationIdentityOperations\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sCAAsC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./communicationIdentityOperations.js\";\n"]}
@@ -0,0 +1,41 @@
1
+ import { CommunicationIdentityCreateOptionalParams, CommunicationIdentityCreateResponse, CommunicationIdentityDeleteOptionalParams, CommunicationIdentityRevokeAccessTokensOptionalParams, CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams, CommunicationIdentityExchangeTeamsUserAccessTokenResponse, CommunicationIdentityTokenScope, CommunicationIdentityIssueAccessTokenOptionalParams, CommunicationIdentityIssueAccessTokenResponse } from "../models/index.js";
2
+ /** Interface representing a CommunicationIdentityOperations. */
3
+ export interface CommunicationIdentityOperations {
4
+ /**
5
+ * Create a new identity, and optionally, an access token.
6
+ * @param options The options parameters.
7
+ */
8
+ create(options?: CommunicationIdentityCreateOptionalParams): Promise<CommunicationIdentityCreateResponse>;
9
+ /**
10
+ * Delete the identity, revoke all tokens for the identity and delete all associated data.
11
+ * @param id Identifier of the identity to be deleted.
12
+ * @param options The options parameters.
13
+ */
14
+ delete(id: string, options?: CommunicationIdentityDeleteOptionalParams): Promise<void>;
15
+ /**
16
+ * Revoke all access tokens for the specific identity.
17
+ * @param id Identifier of the identity.
18
+ * @param options The options parameters.
19
+ */
20
+ revokeAccessTokens(id: string, options?: CommunicationIdentityRevokeAccessTokensOptionalParams): Promise<void>;
21
+ /**
22
+ * Exchange an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication
23
+ * Identity access token with a matching expiration time.
24
+ * @param token Azure AD access token of a Teams User to acquire a new Communication Identity access
25
+ * token.
26
+ * @param appId Client ID of an Azure AD application to be verified against the appid claim in the
27
+ * Azure AD access token.
28
+ * @param userId Object ID of an Azure AD user (Teams User) to be verified against the oid claim in the
29
+ * Azure AD access token.
30
+ * @param options The options parameters.
31
+ */
32
+ exchangeTeamsUserAccessToken(token: string, appId: string, userId: string, options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;
33
+ /**
34
+ * Issue a new token for an identity.
35
+ * @param id Identifier of the identity to issue token for.
36
+ * @param scopes List of scopes attached to the token.
37
+ * @param options The options parameters.
38
+ */
39
+ issueAccessToken(id: string, scopes: CommunicationIdentityTokenScope[], options?: CommunicationIdentityIssueAccessTokenOptionalParams): Promise<CommunicationIdentityIssueAccessTokenResponse>;
40
+ }
41
+ //# sourceMappingURL=communicationIdentityOperations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communicationIdentityOperations.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/communicationIdentityOperations.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,yCAAyC,EACzC,mCAAmC,EACnC,yCAAyC,EACzC,qDAAqD,EACrD,+DAA+D,EAC/D,yDAAyD,EACzD,+BAA+B,EAC/B,mDAAmD,EACnD,6CAA6C,EAC9C,MAAM,oBAAoB,CAAC;AAE5B,gEAAgE;AAChE,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,MAAM,CACJ,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAChD;;;;OAIG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;OAIG;IACH,kBAAkB,CAChB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,qDAAqD,GAC9D,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB;;;;;;;;;;OAUG;IACH,4BAA4B,CAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,+DAA+D,GACxE,OAAO,CAAC,yDAAyD,CAAC,CAAC;IACtE;;;;;OAKG;IACH,gBAAgB,CACd,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,+BAA+B,EAAE,EACzC,OAAO,CAAC,EAAE,mDAAmD,GAC5D,OAAO,CAAC,6CAA6C,CAAC,CAAC;CAC3D"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communicationIdentityOperations.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/communicationIdentityOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n CommunicationIdentityCreateOptionalParams,\n CommunicationIdentityCreateResponse,\n CommunicationIdentityDeleteOptionalParams,\n CommunicationIdentityRevokeAccessTokensOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams,\n CommunicationIdentityExchangeTeamsUserAccessTokenResponse,\n CommunicationIdentityTokenScope,\n CommunicationIdentityIssueAccessTokenOptionalParams,\n CommunicationIdentityIssueAccessTokenResponse\n} from \"../models/index.js\";\n\n/** Interface representing a CommunicationIdentityOperations. */\nexport interface CommunicationIdentityOperations {\n /**\n * Create a new identity, and optionally, an access token.\n * @param options The options parameters.\n */\n create(\n options?: CommunicationIdentityCreateOptionalParams\n ): Promise<CommunicationIdentityCreateResponse>;\n /**\n * Delete the identity, revoke all tokens for the identity and delete all associated data.\n * @param id Identifier of the identity to be deleted.\n * @param options The options parameters.\n */\n delete(\n id: string,\n options?: CommunicationIdentityDeleteOptionalParams\n ): Promise<void>;\n /**\n * Revoke all access tokens for the specific identity.\n * @param id Identifier of the identity.\n * @param options The options parameters.\n */\n revokeAccessTokens(\n id: string,\n options?: CommunicationIdentityRevokeAccessTokensOptionalParams\n ): Promise<void>;\n /**\n * Exchange an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication\n * Identity access token with a matching expiration time.\n * @param token Azure AD access token of a Teams User to acquire a new Communication Identity access\n * token.\n * @param appId Client ID of an Azure AD application to be verified against the appid claim in the\n * Azure AD access token.\n * @param userId Object ID of an Azure AD user (Teams User) to be verified against the oid claim in the\n * Azure AD access token.\n * @param options The options parameters.\n */\n exchangeTeamsUserAccessToken(\n token: string,\n appId: string,\n userId: string,\n options?: CommunicationIdentityExchangeTeamsUserAccessTokenOptionalParams\n ): Promise<CommunicationIdentityExchangeTeamsUserAccessTokenResponse>;\n /**\n * Issue a new token for an identity.\n * @param id Identifier of the identity to issue token for.\n * @param scopes List of scopes attached to the token.\n * @param options The options parameters.\n */\n issueAccessToken(\n id: string,\n scopes: CommunicationIdentityTokenScope[],\n options?: CommunicationIdentityIssueAccessTokenOptionalParams\n ): Promise<CommunicationIdentityIssueAccessTokenResponse>;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from "./communicationIdentityOperations.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAQA,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ export * from "./communicationIdentityOperations.js";
9
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,mCAAmC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./communicationIdentityOperations\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,sCAAsC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./communicationIdentityOperations.js\";\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const tracingClient: import("@azure/core-tracing").TracingClient;
2
+ //# sourceMappingURL=tracing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,aAAa,6CAIxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./communicationIdentityClient.js";
2
+ export * from "./models.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export * from "./communicationIdentityClient.js";
4
+ export * from "./models.js";
5
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,UAAU,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./communicationIdentityClient\";\nexport * from \"./models\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport * from \"./communicationIdentityClient.js\";\nexport * from \"./models.js\";\n"]}
@@ -0,0 +1,65 @@
1
+ import type { CommonClientOptions, OperationOptions } from "@azure/core-client";
2
+ import type { CommunicationUserIdentifier } from "@azure/communication-common";
3
+ /**
4
+ * Represents the scope of the token.
5
+ */
6
+ export type TokenScope = "chat" | "voip" | "chat.join" | "chat.join.limited" | "voip.join";
7
+ /**
8
+ * Client options used to configure the CommunicationIdentity API requests.
9
+ */
10
+ export interface CommunicationIdentityClientOptions extends CommonClientOptions {
11
+ }
12
+ /**
13
+ * The access token for a user.
14
+ */
15
+ export interface CommunicationAccessToken {
16
+ /**
17
+ * The access token issued for the user.
18
+ */
19
+ token: string;
20
+ /**
21
+ * The expiry time of the token.
22
+ */
23
+ expiresOn: Date;
24
+ }
25
+ /**
26
+ * The issued token and the user it was issued for.
27
+ */
28
+ export interface CommunicationUserToken extends CommunicationAccessToken {
29
+ /**
30
+ * Represents the user the token was issued for
31
+ */
32
+ user: CommunicationUserIdentifier;
33
+ }
34
+ /**
35
+ * Options used to exchange an AAD access token of a Teams user for a new Communication Identity access token.
36
+ */
37
+ export interface GetTokenForTeamsUserOptions extends OperationOptions {
38
+ /**
39
+ * Azure Active Directory access token of a Teams user.
40
+ */
41
+ teamsUserAadToken: string;
42
+ /**
43
+ * Client ID of an Azure AD application to be verified against the appId claim in the Azure AD access token.
44
+ */
45
+ clientId: string;
46
+ /**
47
+ * Object ID of an Azure AD user (Teams User) to be verified against the OID claim in the Azure AD access token.
48
+ */
49
+ userObjectId: string;
50
+ }
51
+ /**
52
+ * Options to create a single user and a token simultaneously.
53
+ */
54
+ export declare interface CreateUserAndTokenOptions extends OperationOptions {
55
+ /** Optional custom validity period of the token within [60,1440] minutes range. If not provided, the default value of 1440 minutes (24 hours) will be used. */
56
+ tokenExpiresInMinutes?: number;
57
+ }
58
+ /**
59
+ * Options to create a scoped user token.
60
+ */
61
+ export declare interface GetTokenOptions extends OperationOptions {
62
+ /** Optional custom validity period of the token within [60,1440] minutes range. If not provided, the default value of 1440 minutes (24 hours) will be used. */
63
+ tokenExpiresInMinutes?: number;
64
+ }
65
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,GAAG,mBAAmB,GAAG,WAAW,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,mBAAmB;CAAG;AAElF;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAuB,SAAQ,wBAAwB;IACtE;;OAEG;IACH,IAAI,EAAE,2BAA2B,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,yBAA0B,SAAQ,gBAAgB;IACzE,+JAA+J;IAC/J,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,WAAW,eAAgB,SAAQ,gBAAgB;IAC/D,+JAA+J;IAC/J,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * The \@azure/logger configuration for this package.
3
+ */
4
+ export declare const logger: import("@azure/logger").AzureLogger;
5
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,MAAM,qCAA+C,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.logger = void 0;
6
+ const logger_1 = require("@azure/logger");
7
+ /**
8
+ * The \@azure/logger configuration for this package.
9
+ */
10
+ exports.logger = (0, logger_1.createClientLogger)("communication-identity");
11
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/common/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AAEnD;;GAEG;AACU,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\n\n/**\n * The \\@azure/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"communication-identity\");\n"]}
@@ -0,0 +1,76 @@
1
+ import type { CommunicationAccessToken, CommunicationIdentityClientOptions, CommunicationUserToken, GetTokenForTeamsUserOptions, CreateUserAndTokenOptions, GetTokenOptions, TokenScope } from "./models.js";
2
+ import type { CommunicationUserIdentifier } from "@azure/communication-common";
3
+ import type { OperationOptions } from "@azure/core-client";
4
+ import type { KeyCredential, TokenCredential } from "@azure/core-auth";
5
+ /**
6
+ * Client class for interacting with Azure Communication Services User Token Management.
7
+ */
8
+ export declare class CommunicationIdentityClient {
9
+ /**
10
+ * A reference to the auto-generated UserToken HTTP client.
11
+ */
12
+ private readonly client;
13
+ /**
14
+ * Initializes a new instance of the CommunicationIdentity class.
15
+ * @param connectionString - Connection string to connect to an Azure Communication Service resource.
16
+ * Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";
17
+ * @param options - Optional. Options to configure the HTTP pipeline.
18
+ */
19
+ constructor(connectionString: string, options?: CommunicationIdentityClientOptions);
20
+ /**
21
+ * Initializes a new instance of the CommunicationIdentity class using an Azure KeyCredential.
22
+ * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
23
+ * @param credential - An object that is used to authenticate requests to the service. Use the AzureKeyCredential or `@azure/identity` to create a credential.
24
+ * @param options - Optional. Options to configure the HTTP pipeline.
25
+ */
26
+ constructor(endpoint: string, credential: KeyCredential, options?: CommunicationIdentityClientOptions);
27
+ /**
28
+ * Initializes a new instance of the CommunicationIdentity class using a TokenCredential.
29
+ * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net)
30
+ * @param credential - TokenCredential that is used to authenticate requests to the service.
31
+ * @param options - Optional. Options to configure the HTTP pipeline.
32
+ */
33
+ constructor(endpoint: string, credential: TokenCredential, options?: CommunicationIdentityClientOptions);
34
+ /**
35
+ * Creates a scoped user token.
36
+ *
37
+ * @param user - The user whose tokens are being issued.
38
+ * @param scopes - Scopes to include in the token.
39
+ * @param options - Additional options for the request.
40
+ */
41
+ getToken(user: CommunicationUserIdentifier, scopes: TokenScope[], options?: GetTokenOptions): Promise<CommunicationAccessToken>;
42
+ /**
43
+ * Revokes all data and tokens created for a user.
44
+ *
45
+ * @param user - The user whose tokens are being revoked.
46
+ * @param options - Additional options for the request.
47
+ */
48
+ revokeTokens(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>;
49
+ /**
50
+ * Creates a single user.
51
+ *
52
+ * @param options - Additional options for the request.
53
+ */
54
+ createUser(options?: OperationOptions): Promise<CommunicationUserIdentifier>;
55
+ /**
56
+ * Creates a single user and a token simultaneously.
57
+ *
58
+ * @param scopes - Scopes to include in the token.
59
+ * @param options - Additional options for the request.
60
+ */
61
+ createUserAndToken(scopes: TokenScope[], options?: CreateUserAndTokenOptions): Promise<CommunicationUserToken>;
62
+ /**
63
+ * Triggers revocation event for user and deletes all its data.
64
+ *
65
+ * @param user - The user being deleted.
66
+ * @param options - Additional options for the request.
67
+ */
68
+ deleteUser(user: CommunicationUserIdentifier, options?: OperationOptions): Promise<void>;
69
+ /**
70
+ * Exchanges an Azure AD access token of a Teams user for a new Communication Identity access token with a matching expiration time.
71
+ *
72
+ * @param options - Options used to exchange an Azure AD access token of a Teams user for a new Communication Identity access token.
73
+ */
74
+ getTokenForTeamsUser(options: GetTokenForTeamsUserOptions): Promise<CommunicationAccessToken>;
75
+ }
76
+ //# sourceMappingURL=communicationIdentityClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communicationIdentityClient.d.ts","sourceRoot":"","sources":["../../src/communicationIdentityClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,wBAAwB,EACxB,kCAAkC,EAClC,sBAAsB,EACtB,2BAA2B,EAC3B,yBAAyB,EACzB,eAAe,EACf,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAM/E,OAAO,KAAK,EAAiC,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAWvE;;GAEG;AACH,qBAAa,2BAA2B;IACtC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;;;OAKG;gBACgB,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kCAAkC;IAEzF;;;;;OAKG;gBAED,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,aAAa,EACzB,OAAO,CAAC,EAAE,kCAAkC;IAE9C;;;;;OAKG;gBAED,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,eAAe,EAC3B,OAAO,CAAC,EAAE,kCAAkC;IA+B9C;;;;;;OAMG;IACI,QAAQ,CACb,IAAI,EAAE,2BAA2B,EACjC,MAAM,EAAE,UAAU,EAAE,EACpB,OAAO,GAAE,eAAoB,GAC5B,OAAO,CAAC,wBAAwB,CAAC;IAUpC;;;;;OAKG;IACI,YAAY,CACjB,IAAI,EAAE,2BAA2B,EAEjC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC;IAahB;;;;OAIG;IAEI,UAAU,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IAgBvF;;;;;OAKG;IACI,kBAAkB,CACvB,MAAM,EAAE,UAAU,EAAE,EACpB,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,sBAAsB,CAAC;IAkBlC;;;;;OAKG;IACI,UAAU,CACf,IAAI,EAAE,2BAA2B,EAEjC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,IAAI,CAAC;IAahB;;;;OAIG;IACI,oBAAoB,CACzB,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,wBAAwB,CAAC;CAerC"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.CommunicationIdentityClient = void 0;
6
+ const communication_common_1 = require("@azure/communication-common");
7
+ const core_auth_1 = require("@azure/core-auth");
8
+ const identityRestClient_js_1 = require("./generated/src/identityRestClient.js");
9
+ const logger_js_1 = require("./common/logger.js");
10
+ const tracing_js_1 = require("./generated/src/tracing.js");
11
+ const isCommunicationIdentityClientOptions = (options) => options && !(0, core_auth_1.isTokenCredential)(options) && !(0, communication_common_1.isKeyCredential)(options);
12
+ /**
13
+ * Client class for interacting with Azure Communication Services User Token Management.
14
+ */
15
+ class CommunicationIdentityClient {
16
+ constructor(connectionStringOrEndpoint, credentialOrOptions, maybeOptions = {}) {
17
+ const { url, credential } = (0, communication_common_1.parseClientArguments)(connectionStringOrEndpoint, credentialOrOptions);
18
+ const options = isCommunicationIdentityClientOptions(credentialOrOptions)
19
+ ? credentialOrOptions
20
+ : maybeOptions;
21
+ const internalPipelineOptions = Object.assign(Object.assign({}, options), {
22
+ loggingOptions: {
23
+ logger: logger_js_1.logger.info,
24
+ },
25
+ });
26
+ this.client = new identityRestClient_js_1.IdentityRestClient(url, Object.assign({ endpoint: url }, internalPipelineOptions));
27
+ const authPolicy = (0, communication_common_1.createCommunicationAuthPolicy)(credential);
28
+ this.client.pipeline.addPolicy(authPolicy);
29
+ }
30
+ /**
31
+ * Creates a scoped user token.
32
+ *
33
+ * @param user - The user whose tokens are being issued.
34
+ * @param scopes - Scopes to include in the token.
35
+ * @param options - Additional options for the request.
36
+ */
37
+ getToken(user, scopes, options = {}) {
38
+ return tracing_js_1.tracingClient.withSpan("CommunicationIdentity-issueToken", options, (updatedOptions) => {
39
+ return this.client.communicationIdentityOperations.issueAccessToken(user.communicationUserId, scopes, Object.assign({ expiresInMinutes: options.tokenExpiresInMinutes }, updatedOptions));
40
+ });
41
+ }
42
+ /**
43
+ * Revokes all data and tokens created for a user.
44
+ *
45
+ * @param user - The user whose tokens are being revoked.
46
+ * @param options - Additional options for the request.
47
+ */
48
+ revokeTokens(user,
49
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
50
+ options = {}) {
51
+ return tracing_js_1.tracingClient.withSpan("CommunicationIdentity-revokeTokens", options, async (updatedOptions) => {
52
+ await this.client.communicationIdentityOperations.revokeAccessTokens(user.communicationUserId, updatedOptions);
53
+ });
54
+ }
55
+ /**
56
+ * Creates a single user.
57
+ *
58
+ * @param options - Additional options for the request.
59
+ */
60
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
61
+ createUser(options = {}) {
62
+ return tracing_js_1.tracingClient.withSpan("CommunicationIdentity-createUser", options, async (updatedOptions) => {
63
+ const result = await this.client.communicationIdentityOperations.create(Object.assign({ expiresInMinutes: undefined }, updatedOptions));
64
+ return {
65
+ communicationUserId: result.identity.id,
66
+ };
67
+ });
68
+ }
69
+ /**
70
+ * Creates a single user and a token simultaneously.
71
+ *
72
+ * @param scopes - Scopes to include in the token.
73
+ * @param options - Additional options for the request.
74
+ */
75
+ createUserAndToken(scopes, options = {}) {
76
+ return tracing_js_1.tracingClient.withSpan("CommunicationIdentity-createUserAndToken", options, async (updatedOptions) => {
77
+ const { identity, accessToken } = await this.client.communicationIdentityOperations.create(Object.assign({ createTokenWithScopes: scopes, expiresInMinutes: options.tokenExpiresInMinutes }, updatedOptions));
78
+ return Object.assign(Object.assign({}, accessToken), { user: { communicationUserId: identity.id } });
79
+ });
80
+ }
81
+ /**
82
+ * Triggers revocation event for user and deletes all its data.
83
+ *
84
+ * @param user - The user being deleted.
85
+ * @param options - Additional options for the request.
86
+ */
87
+ deleteUser(user,
88
+ // eslint-disable-next-line @azure/azure-sdk/ts-naming-options
89
+ options = {}) {
90
+ return tracing_js_1.tracingClient.withSpan("CommunicationIdentity-deleteUser", options, async (updatedOptions) => {
91
+ await this.client.communicationIdentityOperations.delete(user.communicationUserId, updatedOptions);
92
+ });
93
+ }
94
+ /**
95
+ * Exchanges an Azure AD access token of a Teams user for a new Communication Identity access token with a matching expiration time.
96
+ *
97
+ * @param options - Options used to exchange an Azure AD access token of a Teams user for a new Communication Identity access token.
98
+ */
99
+ getTokenForTeamsUser(options) {
100
+ return tracing_js_1.tracingClient.withSpan("CommunicationIdentity-getTokenForTeamsUser", options, (updatedOptions) => {
101
+ const { teamsUserAadToken, clientId, userObjectId } = updatedOptions;
102
+ return this.client.communicationIdentityOperations.exchangeTeamsUserAccessToken(teamsUserAadToken, clientId, userObjectId, updatedOptions);
103
+ });
104
+ }
105
+ }
106
+ exports.CommunicationIdentityClient = CommunicationIdentityClient;
107
+ //# sourceMappingURL=communicationIdentityClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communicationIdentityClient.js","sourceRoot":"","sources":["../../src/communicationIdentityClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAYlC,sEAIqC;AAGrC,gDAAqD;AACrD,iFAA2E;AAC3E,kDAA4C;AAC5C,2DAA2D;AAE3D,MAAM,oCAAoC,GAAG,CAC3C,OAAY,EACmC,EAAE,CACjD,OAAO,IAAI,CAAC,IAAA,6BAAiB,EAAC,OAAO,CAAC,IAAI,CAAC,IAAA,sCAAe,EAAC,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAa,2BAA2B;IAqCtC,YACE,0BAAkC,EAClC,mBAA0F,EAC1F,eAAmD,EAAE;QAErD,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE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,CAAC,QAAQ,CAC3B,4CAA4C,EAC5C,OAAO,EACP,CAAC,cAAc,EAAE,EAAE;YACjB,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,cAAc,CAAC;YACrE,OAAO,IAAI,CAAC,MAAM,CAAC,+BAA+B,CAAC,4BAA4B,CAC7E,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,cAAc,CACf,CAAC;QACJ,CAAC,CACF,CAAC;IACJ,CAAC;CACF;AA3MD,kEA2MC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n CommunicationAccessToken,\n CommunicationIdentityClientOptions,\n CommunicationUserToken,\n GetTokenForTeamsUserOptions,\n CreateUserAndTokenOptions,\n GetTokenOptions,\n TokenScope,\n} from \"./models.js\";\nimport type { CommunicationUserIdentifier } from \"@azure/communication-common\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\nimport type { InternalClientPipelineOptions, OperationOptions } from \"@azure/core-client\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport { IdentityRestClient } from \"./generated/src/identityRestClient.js\";\nimport { logger } from \"./common/logger.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\n\nconst isCommunicationIdentityClientOptions = (\n options: any,\n): options is CommunicationIdentityClientOptions =>\n options && !isTokenCredential(options) && !isKeyCredential(options);\n\n/**\n * Client class for interacting with Azure Communication Services User Token Management.\n */\nexport class CommunicationIdentityClient {\n /**\n * A reference to the auto-generated UserToken HTTP client.\n */\n private readonly client: IdentityRestClient;\n\n /**\n * Initializes a new instance of the CommunicationIdentity class.\n * @param connectionString - Connection string to connect to an Azure Communication Service resource.\n * Example: \"endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret\";\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(connectionString: string, options?: CommunicationIdentityClientOptions);\n\n /**\n * Initializes a new instance of the CommunicationIdentity class using an Azure KeyCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - An object that is used to authenticate requests to the service. Use the AzureKeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(\n endpoint: string,\n credential: KeyCredential,\n options?: CommunicationIdentityClientOptions,\n );\n /**\n * Initializes a new instance of the CommunicationIdentity class using a TokenCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net)\n * @param credential - TokenCredential that is used to authenticate requests to the service.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n public constructor(\n endpoint: string,\n credential: TokenCredential,\n options?: CommunicationIdentityClientOptions,\n );\n\n public constructor(\n connectionStringOrEndpoint: string,\n credentialOrOptions?: KeyCredential | CommunicationIdentityClientOptions | TokenCredential,\n maybeOptions: CommunicationIdentityClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(\n connectionStringOrEndpoint,\n credentialOrOptions,\n );\n const options = isCommunicationIdentityClientOptions(credentialOrOptions)\n ? credentialOrOptions\n : maybeOptions;\n\n const internalPipelineOptions: InternalClientPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n this.client = new IdentityRestClient(url, { endpoint: url, ...internalPipelineOptions });\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n /**\n * Creates a scoped user token.\n *\n * @param user - The user whose tokens are being issued.\n * @param scopes - Scopes to include in the token.\n * @param options - Additional options for the request.\n */\n public getToken(\n user: CommunicationUserIdentifier,\n scopes: TokenScope[],\n options: GetTokenOptions = {},\n ): Promise<CommunicationAccessToken> {\n return tracingClient.withSpan(\"CommunicationIdentity-issueToken\", options, (updatedOptions) => {\n return this.client.communicationIdentityOperations.issueAccessToken(\n user.communicationUserId,\n scopes,\n { expiresInMinutes: options.tokenExpiresInMinutes, ...updatedOptions },\n );\n });\n }\n\n /**\n * Revokes all data and tokens created for a user.\n *\n * @param user - The user whose tokens are being revoked.\n * @param options - Additional options for the request.\n */\n public revokeTokens(\n user: CommunicationUserIdentifier,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: OperationOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"CommunicationIdentity-revokeTokens\",\n options,\n async (updatedOptions) => {\n await this.client.communicationIdentityOperations.revokeAccessTokens(\n user.communicationUserId,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Creates a single user.\n *\n * @param options - Additional options for the request.\n */\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n public createUser(options: OperationOptions = {}): Promise<CommunicationUserIdentifier> {\n return tracingClient.withSpan(\n \"CommunicationIdentity-createUser\",\n options,\n async (updatedOptions) => {\n const result = await this.client.communicationIdentityOperations.create({\n expiresInMinutes: undefined,\n ...updatedOptions,\n });\n return {\n communicationUserId: result.identity.id,\n };\n },\n );\n }\n\n /**\n * Creates a single user and a token simultaneously.\n *\n * @param scopes - Scopes to include in the token.\n * @param options - Additional options for the request.\n */\n public createUserAndToken(\n scopes: TokenScope[],\n options: CreateUserAndTokenOptions = {},\n ): Promise<CommunicationUserToken> {\n return tracingClient.withSpan(\n \"CommunicationIdentity-createUserAndToken\",\n options,\n async (updatedOptions) => {\n const { identity, accessToken } = await this.client.communicationIdentityOperations.create({\n createTokenWithScopes: scopes,\n expiresInMinutes: options.tokenExpiresInMinutes,\n ...updatedOptions,\n });\n return {\n ...accessToken!,\n user: { communicationUserId: identity.id },\n };\n },\n );\n }\n\n /**\n * Triggers revocation event for user and deletes all its data.\n *\n * @param user - The user being deleted.\n * @param options - Additional options for the request.\n */\n public deleteUser(\n user: CommunicationUserIdentifier,\n // eslint-disable-next-line @azure/azure-sdk/ts-naming-options\n options: OperationOptions = {},\n ): Promise<void> {\n return tracingClient.withSpan(\n \"CommunicationIdentity-deleteUser\",\n options,\n async (updatedOptions) => {\n await this.client.communicationIdentityOperations.delete(\n user.communicationUserId,\n updatedOptions,\n );\n },\n );\n }\n\n /**\n * Exchanges an Azure AD access token of a Teams user for a new Communication Identity access token with a matching expiration time.\n *\n * @param options - Options used to exchange an Azure AD access token of a Teams user for a new Communication Identity access token.\n */\n public getTokenForTeamsUser(\n options: GetTokenForTeamsUserOptions,\n ): Promise<CommunicationAccessToken> {\n return tracingClient.withSpan(\n \"CommunicationIdentity-getTokenForTeamsUser\",\n options,\n (updatedOptions) => {\n const { teamsUserAadToken, clientId, userObjectId } = updatedOptions;\n return this.client.communicationIdentityOperations.exchangeTeamsUserAccessToken(\n teamsUserAadToken,\n clientId,\n userObjectId,\n updatedOptions,\n );\n },\n );\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const SDK_VERSION: string;
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,EAAE,MAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.SDK_VERSION = void 0;
6
+ exports.SDK_VERSION = "1.3.2";
7
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,WAAW,GAAW,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const SDK_VERSION: string = \"1.3.2\";\n"]}
@@ -0,0 +1,17 @@
1
+ import * as coreClient from "@azure/core-client";
2
+ import { CommunicationIdentityOperations } from "./operationsInterfaces/index.js";
3
+ import { IdentityRestClientOptionalParams } from "./models/index.js";
4
+ export declare class IdentityRestClient extends coreClient.ServiceClient {
5
+ endpoint: string;
6
+ apiVersion: string;
7
+ /**
8
+ * Initializes a new instance of the IdentityRestClient class.
9
+ * @param endpoint The communication resource, for example https://my-resource.communication.azure.com
10
+ * @param options The parameter options
11
+ */
12
+ constructor(endpoint: string, options?: IdentityRestClientOptionalParams);
13
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
14
+ private addCustomApiVersionPolicy;
15
+ communicationIdentityOperations: CommunicationIdentityOperations;
16
+ }
17
+ //# sourceMappingURL=identityRestClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identityRestClient.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/identityRestClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAErE,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;gBACS,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gCAAgC;IAuCxE,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,+BAA+B,EAAE,+BAA+B,CAAC;CAClE"}