@azure-tools/communication-alpha-ids 1.0.0-beta.1 → 1.0.0-beta.2

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 (314) hide show
  1. package/README.md +29 -17
  2. package/dist/browser/alphaIdsClient.d.ts +24 -0
  3. package/dist/browser/alphaIdsClient.d.ts.map +1 -0
  4. package/dist/browser/alphaIdsClient.js +98 -0
  5. package/dist/browser/alphaIdsClient.js.map +1 -0
  6. package/dist/browser/generated/src/alphaIDsClient.d.ts +17 -0
  7. package/dist/browser/generated/src/alphaIDsClient.d.ts.map +1 -0
  8. package/{dist-esm/src → dist/browser}/generated/src/alphaIDsClient.js +13 -23
  9. package/dist/browser/generated/src/alphaIDsClient.js.map +1 -0
  10. package/dist/browser/generated/src/index.d.ts +5 -0
  11. package/dist/browser/generated/src/index.d.ts.map +1 -0
  12. package/dist/browser/generated/src/index.js +13 -0
  13. package/dist/browser/generated/src/index.js.map +1 -0
  14. package/dist/browser/generated/src/models/index.d.ts +101 -0
  15. package/dist/browser/generated/src/models/index.d.ts.map +1 -0
  16. package/dist/browser/generated/src/models/index.js.map +1 -0
  17. package/dist/browser/generated/src/models/mappers.d.ts +8 -0
  18. package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
  19. package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js +77 -6
  20. package/dist/browser/generated/src/models/mappers.js.map +1 -0
  21. package/dist/browser/generated/src/models/parameters.d.ts +10 -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 +34 -3
  24. package/dist/browser/generated/src/models/parameters.js.map +1 -0
  25. package/dist/browser/generated/src/operations/alphaIds.d.ts +53 -0
  26. package/dist/browser/generated/src/operations/alphaIds.d.ts.map +1 -0
  27. package/dist/browser/generated/src/operations/alphaIds.js +227 -0
  28. package/dist/browser/generated/src/operations/alphaIds.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/browser/generated/src/operations/index.js +9 -0
  32. package/{dist-esm/src → dist/browser}/generated/src/operations/index.js.map +1 -1
  33. package/dist/browser/generated/src/operationsInterfaces/alphaIds.d.ts +32 -0
  34. package/dist/browser/generated/src/operationsInterfaces/alphaIds.d.ts.map +1 -0
  35. package/dist/browser/generated/src/operationsInterfaces/alphaIds.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/pagingHelper.d.ts +13 -0
  41. package/dist/browser/generated/src/pagingHelper.d.ts.map +1 -0
  42. package/dist/browser/generated/src/pagingHelper.js +30 -0
  43. package/dist/browser/generated/src/pagingHelper.js.map +1 -0
  44. package/dist/browser/generated/src/tracing.d.ts +2 -0
  45. package/dist/browser/generated/src/tracing.d.ts.map +1 -0
  46. package/{dist-esm/src → dist/browser}/generated/src/tracing.js +1 -1
  47. package/{dist-esm/src → dist/browser}/generated/src/tracing.js.map +1 -1
  48. package/dist/browser/index.d.ts +3 -0
  49. package/dist/browser/index.d.ts.map +1 -0
  50. package/dist/browser/index.js +5 -0
  51. package/{dist-esm/src → dist/browser}/index.js.map +1 -1
  52. package/dist/browser/models.d.ts +29 -0
  53. package/dist/browser/models.d.ts.map +1 -0
  54. package/dist/browser/models.js +4 -0
  55. package/dist/browser/models.js.map +1 -0
  56. package/dist/browser/package.json +3 -0
  57. package/dist/browser/utils/constants.d.ts +2 -0
  58. package/dist/browser/utils/constants.d.ts.map +1 -0
  59. package/dist/browser/utils/constants.js +4 -0
  60. package/{dist-esm/src → dist/browser}/utils/constants.js.map +1 -1
  61. package/dist/browser/utils/customPipelinePolicies.d.ts +11 -0
  62. package/dist/browser/utils/customPipelinePolicies.d.ts.map +1 -0
  63. package/dist/browser/utils/customPipelinePolicies.js +26 -0
  64. package/dist/browser/utils/customPipelinePolicies.js.map +1 -0
  65. package/dist/browser/utils/index.d.ts +3 -0
  66. package/dist/browser/utils/index.d.ts.map +1 -0
  67. package/dist/browser/utils/index.js +5 -0
  68. package/dist/browser/utils/index.js.map +1 -0
  69. package/dist/browser/utils/logger.d.ts +5 -0
  70. package/dist/browser/utils/logger.d.ts.map +1 -0
  71. package/{dist-esm/src → dist/browser}/utils/logger.js +1 -1
  72. package/{dist-esm/src → dist/browser}/utils/logger.js.map +1 -1
  73. package/dist/commonjs/alphaIdsClient.d.ts +24 -0
  74. package/dist/commonjs/alphaIdsClient.d.ts.map +1 -0
  75. package/dist/commonjs/alphaIdsClient.js +102 -0
  76. package/dist/commonjs/alphaIdsClient.js.map +1 -0
  77. package/dist/commonjs/generated/src/alphaIDsClient.d.ts +17 -0
  78. package/dist/commonjs/generated/src/alphaIDsClient.d.ts.map +1 -0
  79. package/dist/commonjs/generated/src/alphaIDsClient.js +81 -0
  80. package/dist/commonjs/generated/src/alphaIDsClient.js.map +1 -0
  81. package/dist/commonjs/generated/src/index.d.ts +5 -0
  82. package/dist/commonjs/generated/src/index.d.ts.map +1 -0
  83. package/dist/commonjs/generated/src/index.js +19 -0
  84. package/dist/commonjs/generated/src/index.js.map +1 -0
  85. package/dist/commonjs/generated/src/models/index.d.ts +101 -0
  86. package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
  87. package/dist/commonjs/generated/src/models/index.js +10 -0
  88. package/dist/commonjs/generated/src/models/index.js.map +1 -0
  89. package/dist/commonjs/generated/src/models/mappers.d.ts +8 -0
  90. package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
  91. package/dist/commonjs/generated/src/models/mappers.js +161 -0
  92. package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
  93. package/dist/commonjs/generated/src/models/parameters.d.ts +10 -0
  94. package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
  95. package/dist/commonjs/generated/src/models/parameters.js +91 -0
  96. package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
  97. package/dist/commonjs/generated/src/operations/alphaIds.d.ts +53 -0
  98. package/dist/commonjs/generated/src/operations/alphaIds.d.ts.map +1 -0
  99. package/dist/commonjs/generated/src/operations/alphaIds.js +232 -0
  100. package/dist/commonjs/generated/src/operations/alphaIds.js.map +1 -0
  101. package/dist/commonjs/generated/src/operations/index.d.ts +2 -0
  102. package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
  103. package/{dist-esm/src/generated/src → dist/commonjs/generated/src/operations}/index.js +4 -3
  104. package/dist/commonjs/generated/src/operations/index.js.map +1 -0
  105. package/dist/commonjs/generated/src/operationsInterfaces/alphaIds.d.ts +32 -0
  106. package/dist/commonjs/generated/src/operationsInterfaces/alphaIds.d.ts.map +1 -0
  107. package/dist/commonjs/generated/src/operationsInterfaces/alphaIds.js +10 -0
  108. package/dist/commonjs/generated/src/operationsInterfaces/alphaIds.js.map +1 -0
  109. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +2 -0
  110. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
  111. package/dist/commonjs/generated/src/operationsInterfaces/index.js +12 -0
  112. package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
  113. package/dist/commonjs/generated/src/pagingHelper.d.ts +13 -0
  114. package/dist/commonjs/generated/src/pagingHelper.d.ts.map +1 -0
  115. package/dist/commonjs/generated/src/pagingHelper.js +34 -0
  116. package/dist/commonjs/generated/src/pagingHelper.js.map +1 -0
  117. package/dist/commonjs/generated/src/tracing.d.ts +2 -0
  118. package/dist/commonjs/generated/src/tracing.d.ts.map +1 -0
  119. package/dist/commonjs/generated/src/tracing.js +17 -0
  120. package/dist/commonjs/generated/src/tracing.js.map +1 -0
  121. package/dist/commonjs/index.d.ts +3 -0
  122. package/dist/commonjs/index.d.ts.map +1 -0
  123. package/dist/commonjs/index.js +8 -0
  124. package/dist/commonjs/index.js.map +1 -0
  125. package/dist/commonjs/models.d.ts +29 -0
  126. package/dist/commonjs/models.d.ts.map +1 -0
  127. package/dist/commonjs/models.js +5 -0
  128. package/dist/commonjs/models.js.map +1 -0
  129. package/dist/commonjs/package.json +3 -0
  130. package/dist/commonjs/tsdoc-metadata.json +11 -0
  131. package/dist/commonjs/utils/constants.d.ts +2 -0
  132. package/dist/commonjs/utils/constants.d.ts.map +1 -0
  133. package/dist/commonjs/utils/constants.js +7 -0
  134. package/dist/commonjs/utils/constants.js.map +1 -0
  135. package/dist/commonjs/utils/customPipelinePolicies.d.ts +11 -0
  136. package/dist/commonjs/utils/customPipelinePolicies.d.ts.map +1 -0
  137. package/dist/commonjs/utils/customPipelinePolicies.js +29 -0
  138. package/dist/commonjs/utils/customPipelinePolicies.js.map +1 -0
  139. package/dist/commonjs/utils/index.d.ts +3 -0
  140. package/dist/commonjs/utils/index.d.ts.map +1 -0
  141. package/dist/commonjs/utils/index.js +8 -0
  142. package/dist/commonjs/utils/index.js.map +1 -0
  143. package/dist/commonjs/utils/logger.d.ts +5 -0
  144. package/dist/commonjs/utils/logger.d.ts.map +1 -0
  145. package/dist/commonjs/utils/logger.js +11 -0
  146. package/dist/commonjs/utils/logger.js.map +1 -0
  147. package/dist/esm/alphaIdsClient.d.ts +24 -0
  148. package/dist/esm/alphaIdsClient.d.ts.map +1 -0
  149. package/dist/esm/alphaIdsClient.js +98 -0
  150. package/dist/esm/alphaIdsClient.js.map +1 -0
  151. package/dist/esm/generated/src/alphaIDsClient.d.ts +17 -0
  152. package/dist/esm/generated/src/alphaIDsClient.d.ts.map +1 -0
  153. package/dist/esm/generated/src/alphaIDsClient.js +76 -0
  154. package/dist/esm/generated/src/alphaIDsClient.js.map +1 -0
  155. package/dist/esm/generated/src/index.d.ts +5 -0
  156. package/dist/esm/generated/src/index.d.ts.map +1 -0
  157. package/dist/esm/generated/src/index.js +13 -0
  158. package/dist/esm/generated/src/index.js.map +1 -0
  159. package/dist/esm/generated/src/models/index.d.ts +101 -0
  160. package/dist/esm/generated/src/models/index.d.ts.map +1 -0
  161. package/{dist-esm/src/generated/src/operationsInterfaces → dist/esm/generated/src/models}/index.js +1 -1
  162. package/dist/esm/generated/src/models/index.js.map +1 -0
  163. package/dist/esm/generated/src/models/mappers.d.ts +8 -0
  164. package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
  165. package/dist/esm/generated/src/models/mappers.js +158 -0
  166. package/dist/esm/generated/src/models/mappers.js.map +1 -0
  167. package/dist/esm/generated/src/models/parameters.d.ts +10 -0
  168. package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
  169. package/dist/esm/generated/src/models/parameters.js +88 -0
  170. package/dist/esm/generated/src/models/parameters.js.map +1 -0
  171. package/dist/esm/generated/src/operations/alphaIds.d.ts +53 -0
  172. package/dist/esm/generated/src/operations/alphaIds.d.ts.map +1 -0
  173. package/dist/esm/generated/src/operations/alphaIds.js +227 -0
  174. package/dist/esm/generated/src/operations/alphaIds.js.map +1 -0
  175. package/dist/esm/generated/src/operations/index.d.ts +2 -0
  176. package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
  177. package/dist/esm/generated/src/operations/index.js +9 -0
  178. package/dist/esm/generated/src/operations/index.js.map +1 -0
  179. package/dist/esm/generated/src/operationsInterfaces/alphaIds.d.ts +32 -0
  180. package/dist/esm/generated/src/operationsInterfaces/alphaIds.d.ts.map +1 -0
  181. package/dist/esm/generated/src/operationsInterfaces/alphaIds.js +9 -0
  182. package/dist/esm/generated/src/operationsInterfaces/alphaIds.js.map +1 -0
  183. package/dist/esm/generated/src/operationsInterfaces/index.d.ts +2 -0
  184. package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
  185. package/dist/esm/generated/src/operationsInterfaces/index.js +9 -0
  186. package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
  187. package/dist/esm/generated/src/pagingHelper.d.ts +13 -0
  188. package/dist/esm/generated/src/pagingHelper.d.ts.map +1 -0
  189. package/dist/esm/generated/src/pagingHelper.js +30 -0
  190. package/dist/esm/generated/src/pagingHelper.js.map +1 -0
  191. package/dist/esm/generated/src/tracing.d.ts +2 -0
  192. package/dist/esm/generated/src/tracing.d.ts.map +1 -0
  193. package/dist/esm/generated/src/tracing.js +14 -0
  194. package/dist/esm/generated/src/tracing.js.map +1 -0
  195. package/dist/esm/index.d.ts +3 -0
  196. package/dist/esm/index.d.ts.map +1 -0
  197. package/dist/esm/index.js +5 -0
  198. package/dist/esm/index.js.map +1 -0
  199. package/dist/esm/models.d.ts +29 -0
  200. package/dist/esm/models.d.ts.map +1 -0
  201. package/dist/esm/models.js +4 -0
  202. package/dist/esm/models.js.map +1 -0
  203. package/dist/esm/package.json +3 -0
  204. package/dist/esm/utils/constants.d.ts +2 -0
  205. package/dist/esm/utils/constants.d.ts.map +1 -0
  206. package/dist/esm/utils/constants.js +4 -0
  207. package/dist/esm/utils/constants.js.map +1 -0
  208. package/dist/esm/utils/customPipelinePolicies.d.ts +11 -0
  209. package/dist/esm/utils/customPipelinePolicies.d.ts.map +1 -0
  210. package/dist/esm/utils/customPipelinePolicies.js +26 -0
  211. package/dist/esm/utils/customPipelinePolicies.js.map +1 -0
  212. package/dist/esm/utils/index.d.ts +3 -0
  213. package/dist/esm/utils/index.d.ts.map +1 -0
  214. package/dist/esm/utils/index.js +5 -0
  215. package/dist/esm/utils/index.js.map +1 -0
  216. package/dist/esm/utils/logger.d.ts +5 -0
  217. package/dist/esm/utils/logger.d.ts.map +1 -0
  218. package/dist/esm/utils/logger.js +8 -0
  219. package/dist/esm/utils/logger.js.map +1 -0
  220. package/dist/react-native/alphaIdsClient.d.ts +24 -0
  221. package/dist/react-native/alphaIdsClient.d.ts.map +1 -0
  222. package/dist/react-native/alphaIdsClient.js +98 -0
  223. package/dist/react-native/alphaIdsClient.js.map +1 -0
  224. package/dist/react-native/generated/src/alphaIDsClient.d.ts +17 -0
  225. package/dist/react-native/generated/src/alphaIDsClient.d.ts.map +1 -0
  226. package/dist/react-native/generated/src/alphaIDsClient.js +76 -0
  227. package/dist/react-native/generated/src/alphaIDsClient.js.map +1 -0
  228. package/dist/react-native/generated/src/index.d.ts +5 -0
  229. package/dist/react-native/generated/src/index.d.ts.map +1 -0
  230. package/dist/react-native/generated/src/index.js +13 -0
  231. package/dist/react-native/generated/src/index.js.map +1 -0
  232. package/dist/react-native/generated/src/models/index.d.ts +101 -0
  233. package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
  234. package/{dist-esm/src/generated/src/operations → dist/react-native/generated/src/models}/index.js +1 -1
  235. package/dist/react-native/generated/src/models/index.js.map +1 -0
  236. package/dist/react-native/generated/src/models/mappers.d.ts +8 -0
  237. package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
  238. package/dist/react-native/generated/src/models/mappers.js +158 -0
  239. package/dist/react-native/generated/src/models/mappers.js.map +1 -0
  240. package/dist/react-native/generated/src/models/parameters.d.ts +10 -0
  241. package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
  242. package/dist/react-native/generated/src/models/parameters.js +88 -0
  243. package/dist/react-native/generated/src/models/parameters.js.map +1 -0
  244. package/dist/react-native/generated/src/operations/alphaIds.d.ts +53 -0
  245. package/dist/react-native/generated/src/operations/alphaIds.d.ts.map +1 -0
  246. package/dist/react-native/generated/src/operations/alphaIds.js +227 -0
  247. package/dist/react-native/generated/src/operations/alphaIds.js.map +1 -0
  248. package/dist/react-native/generated/src/operations/index.d.ts +2 -0
  249. package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
  250. package/dist/react-native/generated/src/operations/index.js +9 -0
  251. package/dist/react-native/generated/src/operations/index.js.map +1 -0
  252. package/dist/react-native/generated/src/operationsInterfaces/alphaIds.d.ts +32 -0
  253. package/dist/react-native/generated/src/operationsInterfaces/alphaIds.d.ts.map +1 -0
  254. package/dist/react-native/generated/src/operationsInterfaces/alphaIds.js +9 -0
  255. package/dist/react-native/generated/src/operationsInterfaces/alphaIds.js.map +1 -0
  256. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +2 -0
  257. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
  258. package/dist/react-native/generated/src/operationsInterfaces/index.js +9 -0
  259. package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
  260. package/dist/react-native/generated/src/pagingHelper.d.ts +13 -0
  261. package/dist/react-native/generated/src/pagingHelper.d.ts.map +1 -0
  262. package/dist/react-native/generated/src/pagingHelper.js +30 -0
  263. package/dist/react-native/generated/src/pagingHelper.js.map +1 -0
  264. package/dist/react-native/generated/src/tracing.d.ts +2 -0
  265. package/dist/react-native/generated/src/tracing.d.ts.map +1 -0
  266. package/dist/react-native/generated/src/tracing.js +14 -0
  267. package/dist/react-native/generated/src/tracing.js.map +1 -0
  268. package/dist/react-native/index.d.ts +3 -0
  269. package/dist/react-native/index.d.ts.map +1 -0
  270. package/dist/react-native/index.js +5 -0
  271. package/dist/react-native/index.js.map +1 -0
  272. package/dist/react-native/models.d.ts +29 -0
  273. package/dist/react-native/models.d.ts.map +1 -0
  274. package/dist/react-native/models.js +4 -0
  275. package/dist/react-native/models.js.map +1 -0
  276. package/dist/react-native/package.json +3 -0
  277. package/dist/react-native/utils/constants.d.ts +2 -0
  278. package/dist/react-native/utils/constants.d.ts.map +1 -0
  279. package/dist/react-native/utils/constants.js +4 -0
  280. package/dist/react-native/utils/constants.js.map +1 -0
  281. package/dist/react-native/utils/customPipelinePolicies.d.ts +11 -0
  282. package/dist/react-native/utils/customPipelinePolicies.d.ts.map +1 -0
  283. package/dist/react-native/utils/customPipelinePolicies.js +26 -0
  284. package/dist/react-native/utils/customPipelinePolicies.js.map +1 -0
  285. package/dist/react-native/utils/index.d.ts +3 -0
  286. package/dist/react-native/utils/index.d.ts.map +1 -0
  287. package/dist/react-native/utils/index.js +5 -0
  288. package/dist/react-native/utils/index.js.map +1 -0
  289. package/dist/react-native/utils/logger.d.ts +5 -0
  290. package/dist/react-native/utils/logger.d.ts.map +1 -0
  291. package/dist/react-native/utils/logger.js +8 -0
  292. package/dist/react-native/utils/logger.js.map +1 -0
  293. package/package.json +83 -70
  294. package/dist/index.js +0 -386
  295. package/dist/index.js.map +0 -1
  296. package/dist-esm/src/alphaIdsClient.js +0 -34
  297. package/dist-esm/src/alphaIdsClient.js.map +0 -1
  298. package/dist-esm/src/generated/src/alphaIDsClient.js.map +0 -1
  299. package/dist-esm/src/generated/src/index.js.map +0 -1
  300. package/dist-esm/src/generated/src/models/index.js.map +0 -1
  301. package/dist-esm/src/generated/src/models/mappers.js.map +0 -1
  302. package/dist-esm/src/generated/src/models/parameters.js.map +0 -1
  303. package/dist-esm/src/generated/src/operations/alphaIds.js +0 -80
  304. package/dist-esm/src/generated/src/operations/alphaIds.js.map +0 -1
  305. package/dist-esm/src/generated/src/operationsInterfaces/alphaIds.js.map +0 -1
  306. package/dist-esm/src/index.js +0 -5
  307. package/dist-esm/src/models.js +0 -4
  308. package/dist-esm/src/models.js.map +0 -1
  309. package/dist-esm/src/utils/constants.js +0 -4
  310. package/dist-esm/src/utils/index.js +0 -5
  311. package/dist-esm/src/utils/index.js.map +0 -1
  312. package/types/communication-alpha-ids.d.ts +0 -49
  313. /package/{dist-esm/src → dist/browser}/generated/src/models/index.js +0 -0
  314. /package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/alphaIds.js +0 -0
package/dist/index.js DELETED
@@ -1,386 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var communicationCommon = require('@azure/communication-common');
6
- var coreAuth = require('@azure/core-auth');
7
- var coreTracing = require('@azure/core-tracing');
8
- var logger$1 = require('@azure/logger');
9
- var coreClient = require('@azure/core-client');
10
- var coreRestPipeline = require('@azure/core-rest-pipeline');
11
-
12
- function _interopNamespace(e) {
13
- if (e && e.__esModule) return e;
14
- var n = Object.create(null);
15
- if (e) {
16
- Object.keys(e).forEach(function (k) {
17
- if (k !== 'default') {
18
- var d = Object.getOwnPropertyDescriptor(e, k);
19
- Object.defineProperty(n, k, d.get ? d : {
20
- enumerable: true,
21
- get: function () { return e[k]; }
22
- });
23
- }
24
- });
25
- }
26
- n["default"] = e;
27
- return Object.freeze(n);
28
- }
29
-
30
- var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
31
- var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
32
-
33
- /*
34
- * Copyright (c) Microsoft Corporation.
35
- * Licensed under the MIT License.
36
- *
37
- * Code generated by Microsoft (R) AutoRest Code Generator.
38
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
39
- */
40
- const tracingClient = coreTracing.createTracingClient({
41
- namespace: "Microsoft.Communication",
42
- packageName: "@azure/communication-alpha-ids",
43
- packageVersion: "1.0.0-beta.1"
44
- });
45
-
46
- /*
47
- * Copyright (c) Microsoft Corporation.
48
- * Licensed under the MIT License.
49
- *
50
- * Code generated by Microsoft (R) AutoRest Code Generator.
51
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
52
- */
53
- const AlphaIdConfiguration = {
54
- type: {
55
- name: "Composite",
56
- className: "AlphaIdConfiguration",
57
- modelProperties: {
58
- enabled: {
59
- serializedName: "enabled",
60
- required: true,
61
- type: {
62
- name: "Boolean"
63
- }
64
- }
65
- }
66
- }
67
- };
68
- const CommunicationErrorResponse = {
69
- type: {
70
- name: "Composite",
71
- className: "CommunicationErrorResponse",
72
- modelProperties: {
73
- error: {
74
- serializedName: "error",
75
- type: {
76
- name: "Composite",
77
- className: "CommunicationError"
78
- }
79
- }
80
- }
81
- }
82
- };
83
- const CommunicationError = {
84
- type: {
85
- name: "Composite",
86
- className: "CommunicationError",
87
- modelProperties: {
88
- code: {
89
- serializedName: "code",
90
- required: true,
91
- type: {
92
- name: "String"
93
- }
94
- },
95
- message: {
96
- serializedName: "message",
97
- required: true,
98
- type: {
99
- name: "String"
100
- }
101
- },
102
- target: {
103
- serializedName: "target",
104
- readOnly: true,
105
- type: {
106
- name: "String"
107
- }
108
- },
109
- details: {
110
- serializedName: "details",
111
- readOnly: true,
112
- type: {
113
- name: "Sequence",
114
- element: {
115
- type: {
116
- name: "Composite",
117
- className: "CommunicationError"
118
- }
119
- }
120
- }
121
- },
122
- innerError: {
123
- serializedName: "innererror",
124
- type: {
125
- name: "Composite",
126
- className: "CommunicationError"
127
- }
128
- }
129
- }
130
- }
131
- };
132
-
133
- var Mappers = /*#__PURE__*/Object.freeze({
134
- __proto__: null,
135
- AlphaIdConfiguration: AlphaIdConfiguration,
136
- CommunicationErrorResponse: CommunicationErrorResponse,
137
- CommunicationError: CommunicationError
138
- });
139
-
140
- /*
141
- * Copyright (c) Microsoft Corporation.
142
- * Licensed under the MIT License.
143
- *
144
- * Code generated by Microsoft (R) AutoRest Code Generator.
145
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
146
- */
147
- const accept = {
148
- parameterPath: "accept",
149
- mapper: {
150
- defaultValue: "application/json",
151
- isConstant: true,
152
- serializedName: "Accept",
153
- type: {
154
- name: "String"
155
- }
156
- }
157
- };
158
- const endpoint = {
159
- parameterPath: "endpoint",
160
- mapper: {
161
- serializedName: "endpoint",
162
- required: true,
163
- type: {
164
- name: "String"
165
- }
166
- },
167
- skipEncoding: true
168
- };
169
- const apiVersion = {
170
- parameterPath: "apiVersion",
171
- mapper: {
172
- defaultValue: "2022-09-26-preview",
173
- isConstant: true,
174
- serializedName: "api-version",
175
- type: {
176
- name: "String"
177
- }
178
- }
179
- };
180
- const contentType = {
181
- parameterPath: ["options", "contentType"],
182
- mapper: {
183
- defaultValue: "application/merge-patch+json",
184
- isConstant: true,
185
- serializedName: "Content-Type",
186
- type: {
187
- name: "String"
188
- }
189
- }
190
- };
191
-
192
- /*
193
- * Copyright (c) Microsoft Corporation.
194
- * Licensed under the MIT License.
195
- *
196
- * Code generated by Microsoft (R) AutoRest Code Generator.
197
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
198
- */
199
- /** Class containing AlphaIds operations. */
200
- class AlphaIdsImpl {
201
- /**
202
- * Initialize a new instance of the class AlphaIds class.
203
- * @param client Reference to the service client
204
- */
205
- constructor(client) {
206
- this.client = client;
207
- }
208
- /**
209
- * Get the Alpha IDs configuration that's applied for the current resource.
210
- * @param options The options parameters.
211
- */
212
- async getConfiguration(options) {
213
- return tracingClient.withSpan("AlphaIDsClient.getConfiguration", options !== null && options !== void 0 ? options : {}, async (options) => {
214
- return this.client.sendOperationRequest({ options }, getConfigurationOperationSpec);
215
- });
216
- }
217
- /**
218
- * Creates or updates Alpha ID Configuration for the current resource.
219
- * @param enabled Indicates whether the use of Alpha IDs is supported for a specific resource.
220
- * @param options The options parameters.
221
- */
222
- async upsertConfiguration(enabled, options) {
223
- return tracingClient.withSpan("AlphaIDsClient.upsertConfiguration", options !== null && options !== void 0 ? options : {}, async (options) => {
224
- return this.client.sendOperationRequest({ enabled, options }, upsertConfigurationOperationSpec);
225
- });
226
- }
227
- }
228
- // Operation Specifications
229
- const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
230
- const getConfigurationOperationSpec = {
231
- path: "/alphaIds/configuration",
232
- httpMethod: "GET",
233
- responses: {
234
- 200: {
235
- bodyMapper: AlphaIdConfiguration
236
- },
237
- default: {
238
- bodyMapper: CommunicationErrorResponse
239
- }
240
- },
241
- queryParameters: [apiVersion],
242
- urlParameters: [endpoint],
243
- headerParameters: [accept],
244
- serializer
245
- };
246
- const upsertConfigurationOperationSpec = {
247
- path: "/alphaIds/configuration",
248
- httpMethod: "PATCH",
249
- responses: {
250
- 200: {
251
- bodyMapper: AlphaIdConfiguration
252
- },
253
- default: {
254
- bodyMapper: CommunicationErrorResponse
255
- }
256
- },
257
- requestBody: {
258
- parameterPath: { enabled: ["enabled"] },
259
- mapper: Object.assign(Object.assign({}, AlphaIdConfiguration), { required: true })
260
- },
261
- queryParameters: [apiVersion],
262
- urlParameters: [endpoint],
263
- headerParameters: [accept, contentType],
264
- mediaType: "json",
265
- serializer
266
- };
267
-
268
- /*
269
- * Copyright (c) Microsoft Corporation.
270
- * Licensed under the MIT License.
271
- *
272
- * Code generated by Microsoft (R) AutoRest Code Generator.
273
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
274
- */
275
- class AlphaIDsClient extends coreClient__namespace.ServiceClient {
276
- /**
277
- * Initializes a new instance of the AlphaIDsClient class.
278
- * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
279
- * @param options The parameter options
280
- */
281
- constructor(endpoint, options) {
282
- var _a, _b;
283
- if (endpoint === undefined) {
284
- throw new Error("'endpoint' cannot be null");
285
- }
286
- // Initializing default values for options
287
- if (!options) {
288
- options = {};
289
- }
290
- const defaults = {
291
- requestContentType: "application/json; charset=utf-8"
292
- };
293
- const packageDetails = `azsdk-js-communication-alpha-ids/1.0.0-beta.1`;
294
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
295
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
296
- : `${packageDetails}`;
297
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
298
- userAgentPrefix
299
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
300
- super(optionsWithDefaults);
301
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
302
- const pipelinePolicies = options.pipeline.getOrderedPolicies();
303
- const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
304
- coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
305
- if (!bearerTokenAuthenticationPolicyFound) {
306
- this.pipeline.removePolicy({
307
- name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
308
- });
309
- this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
310
- scopes: `${optionsWithDefaults.baseUri}/.default`,
311
- challengeCallbacks: {
312
- authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
313
- }
314
- }));
315
- }
316
- }
317
- // Parameter assignments
318
- this.endpoint = endpoint;
319
- // Assigning values to Constant parameters
320
- this.apiVersion = options.apiVersion || "2022-09-26-preview";
321
- this.alphaIds = new AlphaIdsImpl(this);
322
- this.addCustomApiVersionPolicy(options.apiVersion);
323
- }
324
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
325
- addCustomApiVersionPolicy(apiVersion) {
326
- if (!apiVersion) {
327
- return;
328
- }
329
- const apiVersionPolicy = {
330
- name: "CustomApiVersionPolicy",
331
- async sendRequest(request, next) {
332
- const param = request.url.split("?");
333
- if (param.length > 1) {
334
- const newParams = param[1].split("&").map((item) => {
335
- if (item.indexOf("api-version") > -1) {
336
- return "api-version=" + apiVersion;
337
- }
338
- else {
339
- return item;
340
- }
341
- });
342
- request.url = param[0] + "?" + newParams.join("&");
343
- }
344
- return next(request);
345
- }
346
- };
347
- this.pipeline.addPolicy(apiVersionPolicy);
348
- }
349
- }
350
-
351
- // Copyright (c) Microsoft Corporation.
352
- /**
353
- * The \@azure\/logger configuration for this package.
354
- */
355
- const logger = logger$1.createClientLogger("communication-alpha-ids");
356
-
357
- const isAlphaIdsClientOptions = (options) => options && !communicationCommon.isKeyCredential(options) && !coreAuth.isTokenCredential(options);
358
- class AlphaIdsClient {
359
- constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
360
- const { url, credential } = communicationCommon.parseClientArguments(connectionStringOrUrl, credentialOrOptions);
361
- const options = isAlphaIdsClientOptions(credentialOrOptions)
362
- ? credentialOrOptions
363
- : maybeOptions;
364
- const internalPipelineOptions = Object.assign(Object.assign({}, options), {
365
- loggingOptions: {
366
- logger: logger.info,
367
- },
368
- });
369
- this.client = new AlphaIDsClient(url, internalPipelineOptions);
370
- const authPolicy = communicationCommon.createCommunicationAuthPolicy(credential);
371
- this.client.pipeline.addPolicy(authPolicy);
372
- }
373
- getConfiguration(options = {}) {
374
- return tracingClient.withSpan("AlphaIdsClient-getConfiguration", options, async (updatedOptions) => {
375
- return this.client.alphaIds.getConfiguration(updatedOptions);
376
- });
377
- }
378
- upsertConfiguration(enabled, options = {}) {
379
- return tracingClient.withSpan("AlphaIdsClient-upsertConfiguration", options, async (updatedOptions) => {
380
- return this.client.alphaIds.upsertConfiguration(enabled, updatedOptions);
381
- });
382
- }
383
- }
384
-
385
- exports.AlphaIdsClient = AlphaIdsClient;
386
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":["../src/generated/src/tracing.ts","../src/generated/src/models/mappers.ts","../src/generated/src/models/parameters.ts","../src/generated/src/operations/alphaIds.ts","../src/generated/src/alphaIDsClient.ts","../src/utils/logger.ts","../src/alphaIdsClient.ts"],"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 { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-alpha-ids\",\n packageVersion: \"1.0.0-beta.1\"\n});\n","/*\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 * as coreClient from \"@azure/core-client\";\n\nexport const AlphaIdConfiguration: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AlphaIdConfiguration\",\n modelProperties: {\n enabled: {\n serializedName: \"enabled\",\n required: true,\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const CommunicationErrorResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CommunicationErrorResponse\",\n modelProperties: {\n error: {\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"CommunicationError\"\n }\n }\n }\n }\n};\n\nexport const CommunicationError: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CommunicationError\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n target: {\n serializedName: \"target\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n details: {\n serializedName: \"details\",\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CommunicationError\"\n }\n }\n }\n },\n innerError: {\n serializedName: \"innererror\",\n type: {\n name: \"Composite\",\n className: \"CommunicationError\"\n }\n }\n }\n }\n};\n","/*\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 OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport { AlphaIdConfiguration as AlphaIdConfigurationMapper } from \"../models/mappers\";\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2022-09-26-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/merge-patch+json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const enabled: OperationParameter = {\n parameterPath: \"enabled\",\n mapper: AlphaIdConfigurationMapper\n};\n","/*\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\";\nimport { AlphaIds } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { AlphaIDsClient } from \"../alphaIDsClient\";\nimport {\n AlphaIdsGetConfigurationOptionalParams,\n AlphaIdsGetConfigurationResponse,\n AlphaIdsUpsertConfigurationOptionalParams,\n AlphaIdsUpsertConfigurationResponse\n} from \"../models\";\n\n/** Class containing AlphaIds operations. */\nexport class AlphaIdsImpl implements AlphaIds {\n private readonly client: AlphaIDsClient;\n\n /**\n * Initialize a new instance of the class AlphaIds class.\n * @param client Reference to the service client\n */\n constructor(client: AlphaIDsClient) {\n this.client = client;\n }\n\n /**\n * Get the Alpha IDs configuration that's applied for the current resource.\n * @param options The options parameters.\n */\n async getConfiguration(\n options?: AlphaIdsGetConfigurationOptionalParams\n ): Promise<AlphaIdsGetConfigurationResponse> {\n return tracingClient.withSpan(\n \"AlphaIDsClient.getConfiguration\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getConfigurationOperationSpec\n ) as Promise<AlphaIdsGetConfigurationResponse>;\n }\n );\n }\n\n /**\n * Creates or updates Alpha ID Configuration for the current resource.\n * @param enabled Indicates whether the use of Alpha IDs is supported for a specific resource.\n * @param options The options parameters.\n */\n async upsertConfiguration(\n enabled: boolean,\n options?: AlphaIdsUpsertConfigurationOptionalParams\n ): Promise<AlphaIdsUpsertConfigurationResponse> {\n return tracingClient.withSpan(\n \"AlphaIDsClient.upsertConfiguration\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { enabled, options },\n upsertConfigurationOperationSpec\n ) as Promise<AlphaIdsUpsertConfigurationResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/alphaIds/configuration\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlphaIdConfiguration\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst upsertConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/alphaIds/configuration\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlphaIdConfiguration\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: { enabled: [\"enabled\"] },\n mapper: { ...Mappers.AlphaIdConfiguration, required: true }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n","/*\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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { AlphaIdsImpl } from \"./operations\";\nimport { AlphaIds } from \"./operationsInterfaces\";\nimport { AlphaIDsClientOptionalParams } from \"./models\";\n\nexport class AlphaIDsClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the AlphaIDsClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: AlphaIDsClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AlphaIDsClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-alpha-ids/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n if (!bearerTokenAuthenticationPolicyFound) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n scopes: `${optionsWithDefaults.baseUri}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n }\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2022-09-26-preview\";\n this.alphaIds = new AlphaIdsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n alphaIds: AlphaIds;\n}\n","// 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-alpha-ids\");\n","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// <reference lib=\"esnext.asynciterable\" />\nimport {\n AlphaIdConfiguration,\n GetConfigurationOptions,\n UpsertConfigurationOptions,\n} from \"./models\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport { AlphaIDsClient as AlphaIDsGeneratedClient } from \"./generated/src\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { logger } from \"./utils\";\nimport { tracingClient } from \"./generated/src/tracing\";\n/**\n * Client options used to configure the AlphaIdsClient API requests.\n */\nexport interface AlphaIdsClientOptions extends CommonClientOptions {}\n\nconst isAlphaIdsClientOptions = (options: any): options is AlphaIdsClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\nexport class AlphaIdsClient {\n /**\n * A reference to the auto-generated AlphaIDs HTTP client.\n */\n private readonly client: AlphaIDsGeneratedClient;\n\n public constructor(connectionString: string, options?: AlphaIdsClientOptions);\n\n public constructor(endpoint: string, credential: KeyCredential, options?: AlphaIdsClientOptions);\n\n public constructor(\n endpoint: string,\n credential: TokenCredential,\n options?: AlphaIdsClientOptions\n );\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | AlphaIdsClientOptions,\n maybeOptions: AlphaIdsClientOptions = {}\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isAlphaIdsClientOptions(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 AlphaIDsGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n public getConfiguration(options: GetConfigurationOptions = {}): Promise<AlphaIdConfiguration> {\n return tracingClient.withSpan(\n \"AlphaIdsClient-getConfiguration\",\n options,\n async (updatedOptions) => {\n return this.client.alphaIds.getConfiguration(updatedOptions);\n }\n );\n }\n\n public upsertConfiguration(\n enabled: boolean,\n options: UpsertConfigurationOptions = {}\n ): Promise<AlphaIdConfiguration> {\n return tracingClient.withSpan(\n \"AlphaIdsClient-upsertConfiguration\",\n options,\n async (updatedOptions) => {\n return this.client.alphaIds.upsertConfiguration(enabled, updatedOptions);\n }\n );\n }\n}\n"],"names":["createTracingClient","coreClient","Mappers.AlphaIdConfiguration","Mappers.CommunicationErrorResponse","Parameters.apiVersion","Parameters.endpoint","Parameters.accept","Parameters.contentType","coreRestPipeline","createClientLogger","isKeyCredential","isTokenCredential","parseClientArguments","AlphaIDsGeneratedClient","createCommunicationAuthPolicy"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAMG;AAII,MAAM,aAAa,GAAGA,+BAAmB,CAAC;AAC/C,IAAA,SAAS,EAAE,yBAAyB;AACpC,IAAA,WAAW,EAAE,gCAAgC;AAC7C,IAAA,cAAc,EAAE,cAAc;AAC/B,CAAA,CAAC;;ACdF;;;;;;AAMG;AAII,MAAM,oBAAoB,GAA+B;AAC9D,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,WAA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AA;AACD,YAAA,cAAc,EAAE;gBACd,MAAM,EAAE,MAAM,CAAC,IAAI;AACpB,aAAA;AACF,SAAA,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAIC,cAAuB,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;AACxE,QAAA,MAAM,UAAU,GAAGC,iDAA6B,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;KAC5C;IAEM,gBAAgB,CAAC,UAAmC,EAAE,EAAA;AAC3D,QAAA,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,EACjC,OAAO,EACP,OAAO,cAAc,KAAI;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;AAC/D,SAAC,CACF,CAAC;KACH;AAEM,IAAA,mBAAmB,CACxB,OAAgB,EAChB,OAAA,GAAsC,EAAE,EAAA;AAExC,QAAA,OAAO,aAAa,CAAC,QAAQ,CAC3B,oCAAoC,EACpC,OAAO,EACP,OAAO,cAAc,KAAI;AACvB,YAAA,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;AAC3E,SAAC,CACF,CAAC;KACH;AACF;;;;"}
@@ -1,34 +0,0 @@
1
- import { isKeyCredential, parseClientArguments } from "@azure/communication-common";
2
- import { isTokenCredential } from "@azure/core-auth";
3
- import { AlphaIDsClient as AlphaIDsGeneratedClient } from "./generated/src";
4
- import { createCommunicationAuthPolicy } from "@azure/communication-common";
5
- import { logger } from "./utils";
6
- import { tracingClient } from "./generated/src/tracing";
7
- const isAlphaIdsClientOptions = (options) => options && !isKeyCredential(options) && !isTokenCredential(options);
8
- export class AlphaIdsClient {
9
- constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
10
- const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);
11
- const options = isAlphaIdsClientOptions(credentialOrOptions)
12
- ? credentialOrOptions
13
- : maybeOptions;
14
- const internalPipelineOptions = Object.assign(Object.assign({}, options), {
15
- loggingOptions: {
16
- logger: logger.info,
17
- },
18
- });
19
- this.client = new AlphaIDsGeneratedClient(url, internalPipelineOptions);
20
- const authPolicy = createCommunicationAuthPolicy(credential);
21
- this.client.pipeline.addPolicy(authPolicy);
22
- }
23
- getConfiguration(options = {}) {
24
- return tracingClient.withSpan("AlphaIdsClient-getConfiguration", options, async (updatedOptions) => {
25
- return this.client.alphaIds.getConfiguration(updatedOptions);
26
- });
27
- }
28
- upsertConfiguration(enabled, options = {}) {
29
- return tracingClient.withSpan("AlphaIdsClient-upsertConfiguration", options, async (updatedOptions) => {
30
- return this.client.alphaIds.upsertConfiguration(enabled, updatedOptions);
31
- });
32
- }
33
- }
34
- //# sourceMappingURL=alphaIdsClient.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alphaIdsClient.js","sourceRoot":"","sources":["../../src/alphaIdsClient.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAkC,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErF,OAAO,EAAE,cAAc,IAAI,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAMxD,MAAM,uBAAuB,GAAG,CAAC,OAAY,EAAoC,EAAE,CACjF,OAAO,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEtE,MAAM,OAAO,cAAc;IAgBzB,YACE,qBAA6B,EAC7B,mBAA6E,EAC7E,eAAsC,EAAE;QAExC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,uBAAuB,CAAC,mBAAmB,CAAC;YAC1D,CAAC,CAAC,mBAAmB;YACrB,CAAC,CAAC,YAAY,CAAC;QAEjB,MAAM,uBAAuB,mCACxB,OAAO,GACP;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,MAAM,CAAC,IAAI;aACpB;SACF,CACF,CAAC;QAEF,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAuB,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;QACxE,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAEM,gBAAgB,CAAC,UAAmC,EAAE;QAC3D,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,EACjC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QAC/D,CAAC,CACF,CAAC;IACJ,CAAC;IAEM,mBAAmB,CACxB,OAAgB,EAChB,UAAsC,EAAE;QAExC,OAAO,aAAa,CAAC,QAAQ,CAC3B,oCAAoC,EACpC,OAAO,EACP,KAAK,EAAE,cAAc,EAAE,EAAE;YACvB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QAC3E,CAAC,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// <reference lib=\"esnext.asynciterable\" />\nimport {\n AlphaIdConfiguration,\n GetConfigurationOptions,\n UpsertConfigurationOptions,\n} from \"./models\";\nimport { isKeyCredential, parseClientArguments } from \"@azure/communication-common\";\nimport { KeyCredential, TokenCredential, isTokenCredential } from \"@azure/core-auth\";\nimport { CommonClientOptions, InternalClientPipelineOptions } from \"@azure/core-client\";\nimport { AlphaIDsClient as AlphaIDsGeneratedClient } from \"./generated/src\";\nimport { createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport { logger } from \"./utils\";\nimport { tracingClient } from \"./generated/src/tracing\";\n/**\n * Client options used to configure the AlphaIdsClient API requests.\n */\nexport interface AlphaIdsClientOptions extends CommonClientOptions {}\n\nconst isAlphaIdsClientOptions = (options: any): options is AlphaIdsClientOptions =>\n options && !isKeyCredential(options) && !isTokenCredential(options);\n\nexport class AlphaIdsClient {\n /**\n * A reference to the auto-generated AlphaIDs HTTP client.\n */\n private readonly client: AlphaIDsGeneratedClient;\n\n public constructor(connectionString: string, options?: AlphaIdsClientOptions);\n\n public constructor(endpoint: string, credential: KeyCredential, options?: AlphaIdsClientOptions);\n\n public constructor(\n endpoint: string,\n credential: TokenCredential,\n options?: AlphaIdsClientOptions\n );\n\n public constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | AlphaIdsClientOptions,\n maybeOptions: AlphaIdsClientOptions = {}\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isAlphaIdsClientOptions(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 AlphaIDsGeneratedClient(url, internalPipelineOptions);\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.client.pipeline.addPolicy(authPolicy);\n }\n\n public getConfiguration(options: GetConfigurationOptions = {}): Promise<AlphaIdConfiguration> {\n return tracingClient.withSpan(\n \"AlphaIdsClient-getConfiguration\",\n options,\n async (updatedOptions) => {\n return this.client.alphaIds.getConfiguration(updatedOptions);\n }\n );\n }\n\n public upsertConfiguration(\n enabled: boolean,\n options: UpsertConfigurationOptions = {}\n ): Promise<AlphaIdConfiguration> {\n return tracingClient.withSpan(\n \"AlphaIdsClient-upsertConfiguration\",\n options,\n async (updatedOptions) => {\n return this.client.alphaIds.upsertConfiguration(enabled, updatedOptions);\n }\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"alphaIDsClient.js","sourceRoot":"","sources":["../../../../src/generated/src/alphaIDsClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAM9D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C,MAAM,OAAO,cAAe,SAAQ,UAAU,CAAC,aAAa;IAI1D;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAsC;;QAClE,IAAI,QAAQ,KAAK,SAAS,EAAE;YAC1B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAC9C;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAiC;YAC7C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,+CAA+C,CAAC;QACvE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,OAAO,EAAE,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,YAAY,GAC7D,CAAC;QACF,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gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE;oBACpB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE;4BACpC,OAAO,cAAc,GAAG,UAAU,CAAC;yBACpC;6BAAM;4BACL,OAAO,IAAI,CAAC;yBACb;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBACpD;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAGF","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 * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { AlphaIdsImpl } from \"./operations\";\nimport { AlphaIds } from \"./operationsInterfaces\";\nimport { AlphaIDsClientOptionalParams } from \"./models\";\n\nexport class AlphaIDsClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the AlphaIDsClient class.\n * @param endpoint The communication resource, for example https://resourcename.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: AlphaIDsClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: AlphaIDsClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-alpha-ids/1.0.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n if (!bearerTokenAuthenticationPolicyFound) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n scopes: `${optionsWithDefaults.baseUri}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n }\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2022-09-26-preview\";\n this.alphaIds = new AlphaIdsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n alphaIds: AlphaIds;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,cAAc,wBAAwB,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 \"./models\";\nexport { AlphaIDsClient } from \"./alphaIDsClient\";\nexport * from \"./operationsInterfaces\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/index.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 * as coreClient from \"@azure/core-client\";\n\n/**\n * <br>Represents a collection of settings for configuring Alpha ID support for a specific resource.\n * <br>\n * Initially, Alpha IDs were restricted to customers that had valid use cases for them, so this configuration could be leveraged to enable its usage.\n *\n */\nexport interface AlphaIdConfiguration {\n /** Indicates whether the use of Alpha IDs is supported for a specific resource. */\n enabled: boolean;\n}\n\n/** The Communication Services error. */\nexport interface CommunicationErrorResponse {\n /** The Communication Services error. */\n error: CommunicationError;\n}\n\n/** The Communication Services error. */\nexport interface CommunicationError {\n /** The error code. */\n code: string;\n /** The error message. */\n message: string;\n /**\n * The error target.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly target?: string;\n /**\n * Further details about specific errors that led to this error.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly details?: CommunicationError[];\n /**\n * The inner error if any.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly innerError?: CommunicationError;\n}\n\n/** Optional parameters. */\nexport interface AlphaIdsGetConfigurationOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the getConfiguration operation. */\nexport type AlphaIdsGetConfigurationResponse = AlphaIdConfiguration;\n\n/** Optional parameters. */\nexport interface AlphaIdsUpsertConfigurationOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the upsertConfiguration operation. */\nexport type AlphaIdsUpsertConfigurationResponse = AlphaIdConfiguration;\n\n/** Optional parameters. */\nexport interface AlphaIDsClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** Api Version */\n apiVersion?: string;\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/mappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,oBAAoB,GAA+B;IAC9D,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,sBAAsB;QACjC,eAAe,EAAE;YACf,OAAO,EAAE;gBACP,cAAc,EAAE,SAAS;gBACzB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;iBAChB;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAA+B;IACpE,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,4BAA4B;QACvC,eAAe,EAAE;YACf,KAAK,EAAE;gBACL,cAAc,EAAE,OAAO;gBACvB,IAAI,EAAE;oBACJ,IAAI,EAAE,WAAW;oBACjB,SAAS,EAAE,oBAAoB;iBAChC;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,oBAAoB;QAC/B,eAAe,EAAE;YACf,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,OAAO,EAAE;gBACP,cAAc,EAAE,SAAS;gBACzB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,MAAM,EAAE;gBACN,cAAc,EAAE,QAAQ;gBACxB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,OAAO,EAAE;gBACP,cAAc,EAAE,SAAS;gBACzB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE;wBACP,IAAI,EAAE;4BACJ,IAAI,EAAE,WAAW;4BACjB,SAAS,EAAE,oBAAoB;yBAChC;qBACF;iBACF;aACF;YACD,UAAU,EAAE;gBACV,cAAc,EAAE,YAAY;gBAC5B,IAAI,EAAE;oBACJ,IAAI,EAAE,WAAW;oBACjB,SAAS,EAAE,oBAAoB;iBAChC;aACF;SACF;KACF;CACF,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 * as coreClient from \"@azure/core-client\";\n\nexport const AlphaIdConfiguration: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"AlphaIdConfiguration\",\n modelProperties: {\n enabled: {\n serializedName: \"enabled\",\n required: true,\n type: {\n name: \"Boolean\"\n }\n }\n }\n }\n};\n\nexport const CommunicationErrorResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CommunicationErrorResponse\",\n modelProperties: {\n error: {\n serializedName: \"error\",\n type: {\n name: \"Composite\",\n className: \"CommunicationError\"\n }\n }\n }\n }\n};\n\nexport const CommunicationError: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"CommunicationError\",\n modelProperties: {\n code: {\n serializedName: \"code\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n message: {\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n target: {\n serializedName: \"target\",\n readOnly: true,\n type: {\n name: \"String\"\n }\n },\n details: {\n serializedName: \"details\",\n readOnly: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"CommunicationError\"\n }\n }\n }\n },\n innerError: {\n serializedName: \"innererror\",\n type: {\n name: \"Composite\",\n className: \"CommunicationError\"\n }\n }\n }\n }\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAAE,oBAAoB,IAAI,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEvF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE;QACN,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA4B;IACjD,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE;QACN,YAAY,EAAE,oBAAoB;QAClC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,aAAa;QAC7B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,8BAA8B;QAC5C,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAuB;IACzC,aAAa,EAAE,SAAS;IACxB,MAAM,EAAE,0BAA0B;CACnC,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 {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport { AlphaIdConfiguration as AlphaIdConfigurationMapper } from \"../models/mappers\";\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2022-09-26-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/merge-patch+json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const enabled: OperationParameter = {\n parameterPath: \"enabled\",\n mapper: AlphaIdConfigurationMapper\n};\n"]}
@@ -1,80 +0,0 @@
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
- import { tracingClient } from "../tracing";
9
- import * as coreClient from "@azure/core-client";
10
- import * as Mappers from "../models/mappers";
11
- import * as Parameters from "../models/parameters";
12
- /** Class containing AlphaIds operations. */
13
- export class AlphaIdsImpl {
14
- /**
15
- * Initialize a new instance of the class AlphaIds class.
16
- * @param client Reference to the service client
17
- */
18
- constructor(client) {
19
- this.client = client;
20
- }
21
- /**
22
- * Get the Alpha IDs configuration that's applied for the current resource.
23
- * @param options The options parameters.
24
- */
25
- async getConfiguration(options) {
26
- return tracingClient.withSpan("AlphaIDsClient.getConfiguration", options !== null && options !== void 0 ? options : {}, async (options) => {
27
- return this.client.sendOperationRequest({ options }, getConfigurationOperationSpec);
28
- });
29
- }
30
- /**
31
- * Creates or updates Alpha ID Configuration for the current resource.
32
- * @param enabled Indicates whether the use of Alpha IDs is supported for a specific resource.
33
- * @param options The options parameters.
34
- */
35
- async upsertConfiguration(enabled, options) {
36
- return tracingClient.withSpan("AlphaIDsClient.upsertConfiguration", options !== null && options !== void 0 ? options : {}, async (options) => {
37
- return this.client.sendOperationRequest({ enabled, options }, upsertConfigurationOperationSpec);
38
- });
39
- }
40
- }
41
- // Operation Specifications
42
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
43
- const getConfigurationOperationSpec = {
44
- path: "/alphaIds/configuration",
45
- httpMethod: "GET",
46
- responses: {
47
- 200: {
48
- bodyMapper: Mappers.AlphaIdConfiguration
49
- },
50
- default: {
51
- bodyMapper: Mappers.CommunicationErrorResponse
52
- }
53
- },
54
- queryParameters: [Parameters.apiVersion],
55
- urlParameters: [Parameters.endpoint],
56
- headerParameters: [Parameters.accept],
57
- serializer
58
- };
59
- const upsertConfigurationOperationSpec = {
60
- path: "/alphaIds/configuration",
61
- httpMethod: "PATCH",
62
- responses: {
63
- 200: {
64
- bodyMapper: Mappers.AlphaIdConfiguration
65
- },
66
- default: {
67
- bodyMapper: Mappers.CommunicationErrorResponse
68
- }
69
- },
70
- requestBody: {
71
- parameterPath: { enabled: ["enabled"] },
72
- mapper: Object.assign(Object.assign({}, Mappers.AlphaIdConfiguration), { required: true })
73
- },
74
- queryParameters: [Parameters.apiVersion],
75
- urlParameters: [Parameters.endpoint],
76
- headerParameters: [Parameters.accept, Parameters.contentType],
77
- mediaType: "json",
78
- serializer
79
- };
80
- //# sourceMappingURL=alphaIds.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alphaIds.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/alphaIds.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AASnD,4CAA4C;AAC5C,MAAM,OAAO,YAAY;IAGvB;;;OAGG;IACH,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAAgD;QAEhD,OAAO,aAAa,CAAC,QAAQ,CAC3B,iCAAiC,EACjC,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,EAAE,EACb,KAAK,EAAE,OAAO,EAAE,EAAE;YAChB,OAAO,IAAI,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AC,SAAS,CAAC,EAAE;QACvC,MAAM,kCAAO,OAAO,CAAC,oBAAoB,KAAE,QAAQ,EAAE,IAAI,GAAE;KAC5D;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,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\";\nimport { AlphaIds } from \"../operationsInterfaces\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers\";\nimport * as Parameters from \"../models/parameters\";\nimport { AlphaIDsClient } from \"../alphaIDsClient\";\nimport {\n AlphaIdsGetConfigurationOptionalParams,\n AlphaIdsGetConfigurationResponse,\n AlphaIdsUpsertConfigurationOptionalParams,\n AlphaIdsUpsertConfigurationResponse\n} from \"../models\";\n\n/** Class containing AlphaIds operations. */\nexport class AlphaIdsImpl implements AlphaIds {\n private readonly client: AlphaIDsClient;\n\n /**\n * Initialize a new instance of the class AlphaIds class.\n * @param client Reference to the service client\n */\n constructor(client: AlphaIDsClient) {\n this.client = client;\n }\n\n /**\n * Get the Alpha IDs configuration that's applied for the current resource.\n * @param options The options parameters.\n */\n async getConfiguration(\n options?: AlphaIdsGetConfigurationOptionalParams\n ): Promise<AlphaIdsGetConfigurationResponse> {\n return tracingClient.withSpan(\n \"AlphaIDsClient.getConfiguration\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { options },\n getConfigurationOperationSpec\n ) as Promise<AlphaIdsGetConfigurationResponse>;\n }\n );\n }\n\n /**\n * Creates or updates Alpha ID Configuration for the current resource.\n * @param enabled Indicates whether the use of Alpha IDs is supported for a specific resource.\n * @param options The options parameters.\n */\n async upsertConfiguration(\n enabled: boolean,\n options?: AlphaIdsUpsertConfigurationOptionalParams\n ): Promise<AlphaIdsUpsertConfigurationResponse> {\n return tracingClient.withSpan(\n \"AlphaIDsClient.upsertConfiguration\",\n options ?? {},\n async (options) => {\n return this.client.sendOperationRequest(\n { enabled, options },\n upsertConfigurationOperationSpec\n ) as Promise<AlphaIdsUpsertConfigurationResponse>;\n }\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/alphaIds/configuration\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlphaIdConfiguration\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst upsertConfigurationOperationSpec: coreClient.OperationSpec = {\n path: \"/alphaIds/configuration\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.AlphaIdConfiguration\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse\n }\n },\n requestBody: {\n parameterPath: { enabled: [\"enabled\"] },\n mapper: { ...Mappers.AlphaIdConfiguration, required: true }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"alphaIds.js","sourceRoot":"","sources":["../../../../../src/generated/src/operationsInterfaces/alphaIds.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 AlphaIdsGetConfigurationOptionalParams,\n AlphaIdsGetConfigurationResponse,\n AlphaIdsUpsertConfigurationOptionalParams,\n AlphaIdsUpsertConfigurationResponse\n} from \"../models\";\n\n/** Interface representing a AlphaIds. */\nexport interface AlphaIds {\n /**\n * Get the Alpha IDs configuration that's applied for the current resource.\n * @param options The options parameters.\n */\n getConfiguration(\n options?: AlphaIdsGetConfigurationOptionalParams\n ): Promise<AlphaIdsGetConfigurationResponse>;\n /**\n * Creates or updates Alpha ID Configuration for the current resource.\n * @param enabled Indicates whether the use of Alpha IDs is supported for a specific resource.\n * @param options The options parameters.\n */\n upsertConfiguration(\n enabled: boolean,\n options?: AlphaIdsUpsertConfigurationOptionalParams\n ): Promise<AlphaIdsUpsertConfigurationResponse>;\n}\n"]}
@@ -1,5 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT license.
3
- export * from "./models";
4
- export * from "./alphaIdsClient";
5
- //# sourceMappingURL=index.js.map