@azure-tools/communication-toll-free-verification 1.0.0-alpha.20241114.1 → 1.0.0-alpha.20241122.8

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 (307) hide show
  1. package/dist/index.js +1617 -0
  2. package/dist/index.js.map +1 -0
  3. package/{dist/esm → dist-esm/src}/generated/src/index.js +4 -4
  4. package/dist-esm/src/generated/src/index.js.map +1 -0
  5. package/{dist/browser → dist-esm/src}/generated/src/models/parameters.js +1 -1
  6. package/dist-esm/src/generated/src/models/parameters.js.map +1 -0
  7. package/{dist/esm/generated/src/models → dist-esm/src/generated/src/operations}/index.js +1 -1
  8. package/{dist/esm → dist-esm/src}/generated/src/operations/index.js.map +1 -1
  9. package/{dist/esm → dist-esm/src}/generated/src/operations/tollFreeVerification.js +4 -4
  10. package/dist-esm/src/generated/src/operations/tollFreeVerification.js.map +1 -0
  11. package/{dist/react-native/generated/src/models → dist-esm/src/generated/src/operationsInterfaces}/index.js +1 -1
  12. package/{dist/react-native → dist-esm/src}/generated/src/operationsInterfaces/index.js.map +1 -1
  13. package/dist-esm/src/generated/src/operationsInterfaces/tollFreeVerification.js.map +1 -0
  14. package/{dist/esm → dist-esm/src}/generated/src/tollFreeVerificationClient.js +1 -1
  15. package/dist-esm/src/generated/src/tollFreeVerificationClient.js.map +1 -0
  16. package/dist-esm/src/index.js +6 -0
  17. package/dist-esm/src/index.js.map +1 -0
  18. package/{dist/esm → dist-esm/src}/mappers.js +1 -1
  19. package/{dist/esm → dist-esm/src}/mappers.js.map +1 -1
  20. package/{dist/browser → dist-esm/src}/models.js.map +1 -1
  21. package/{dist/browser → dist-esm/src}/tollFreeVerificationClient.js +3 -3
  22. package/dist-esm/src/tollFreeVerificationClient.js.map +1 -0
  23. package/dist-esm/src/utils/index.js +5 -0
  24. package/dist-esm/src/utils/index.js.map +1 -0
  25. package/package.json +35 -58
  26. package/dist/browser/generated/src/index.d.ts +0 -5
  27. package/dist/browser/generated/src/index.d.ts.map +0 -1
  28. package/dist/browser/generated/src/index.js +0 -13
  29. package/dist/browser/generated/src/index.js.map +0 -1
  30. package/dist/browser/generated/src/models/index.d.ts +0 -283
  31. package/dist/browser/generated/src/models/index.d.ts.map +0 -1
  32. package/dist/browser/generated/src/models/mappers.d.ts +0 -18
  33. package/dist/browser/generated/src/models/mappers.d.ts.map +0 -1
  34. package/dist/browser/generated/src/models/parameters.d.ts +0 -20
  35. package/dist/browser/generated/src/models/parameters.d.ts.map +0 -1
  36. package/dist/browser/generated/src/models/parameters.js.map +0 -1
  37. package/dist/browser/generated/src/operations/index.d.ts +0 -2
  38. package/dist/browser/generated/src/operations/index.d.ts.map +0 -1
  39. package/dist/browser/generated/src/operations/index.js +0 -9
  40. package/dist/browser/generated/src/operations/index.js.map +0 -1
  41. package/dist/browser/generated/src/operations/tollFreeVerification.d.ts +0 -140
  42. package/dist/browser/generated/src/operations/tollFreeVerification.d.ts.map +0 -1
  43. package/dist/browser/generated/src/operations/tollFreeVerification.js +0 -642
  44. package/dist/browser/generated/src/operations/tollFreeVerification.js.map +0 -1
  45. package/dist/browser/generated/src/operationsInterfaces/index.d.ts +0 -2
  46. package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  47. package/dist/browser/generated/src/operationsInterfaces/index.js +0 -9
  48. package/dist/browser/generated/src/operationsInterfaces/index.js.map +0 -1
  49. package/dist/browser/generated/src/operationsInterfaces/tollFreeVerification.d.ts +0 -84
  50. package/dist/browser/generated/src/operationsInterfaces/tollFreeVerification.d.ts.map +0 -1
  51. package/dist/browser/generated/src/operationsInterfaces/tollFreeVerification.js.map +0 -1
  52. package/dist/browser/generated/src/pagingHelper.d.ts +0 -13
  53. package/dist/browser/generated/src/pagingHelper.d.ts.map +0 -1
  54. package/dist/browser/generated/src/tollFreeVerificationClient.d.ts +0 -17
  55. package/dist/browser/generated/src/tollFreeVerificationClient.d.ts.map +0 -1
  56. package/dist/browser/generated/src/tollFreeVerificationClient.js +0 -69
  57. package/dist/browser/generated/src/tollFreeVerificationClient.js.map +0 -1
  58. package/dist/browser/generated/src/tracing.d.ts +0 -2
  59. package/dist/browser/generated/src/tracing.d.ts.map +0 -1
  60. package/dist/browser/index.d.ts +0 -4
  61. package/dist/browser/index.d.ts.map +0 -1
  62. package/dist/browser/index.js +0 -6
  63. package/dist/browser/index.js.map +0 -1
  64. package/dist/browser/mappers.d.ts +0 -2
  65. package/dist/browser/mappers.d.ts.map +0 -1
  66. package/dist/browser/mappers.js +0 -4
  67. package/dist/browser/mappers.js.map +0 -1
  68. package/dist/browser/models.d.ts +0 -2
  69. package/dist/browser/models.d.ts.map +0 -1
  70. package/dist/browser/package.json +0 -3
  71. package/dist/browser/tollFreeVerificationClient.d.ts +0 -29
  72. package/dist/browser/tollFreeVerificationClient.d.ts.map +0 -1
  73. package/dist/browser/tollFreeVerificationClient.js.map +0 -1
  74. package/dist/browser/utils/constants.d.ts +0 -2
  75. package/dist/browser/utils/constants.d.ts.map +0 -1
  76. package/dist/browser/utils/index.d.ts +0 -3
  77. package/dist/browser/utils/index.d.ts.map +0 -1
  78. package/dist/browser/utils/index.js +0 -5
  79. package/dist/browser/utils/index.js.map +0 -1
  80. package/dist/browser/utils/logger.d.ts +0 -5
  81. package/dist/browser/utils/logger.d.ts.map +0 -1
  82. package/dist/commonjs/generated/src/index.d.ts +0 -5
  83. package/dist/commonjs/generated/src/index.d.ts.map +0 -1
  84. package/dist/commonjs/generated/src/index.js +0 -19
  85. package/dist/commonjs/generated/src/index.js.map +0 -1
  86. package/dist/commonjs/generated/src/models/index.d.ts +0 -283
  87. package/dist/commonjs/generated/src/models/index.d.ts.map +0 -1
  88. package/dist/commonjs/generated/src/models/index.js +0 -10
  89. package/dist/commonjs/generated/src/models/index.js.map +0 -1
  90. package/dist/commonjs/generated/src/models/mappers.d.ts +0 -18
  91. package/dist/commonjs/generated/src/models/mappers.d.ts.map +0 -1
  92. package/dist/commonjs/generated/src/models/mappers.js +0 -612
  93. package/dist/commonjs/generated/src/models/mappers.js.map +0 -1
  94. package/dist/commonjs/generated/src/models/parameters.d.ts +0 -20
  95. package/dist/commonjs/generated/src/models/parameters.d.ts.map +0 -1
  96. package/dist/commonjs/generated/src/models/parameters.js +0 -156
  97. package/dist/commonjs/generated/src/models/parameters.js.map +0 -1
  98. package/dist/commonjs/generated/src/operations/index.d.ts +0 -2
  99. package/dist/commonjs/generated/src/operations/index.d.ts.map +0 -1
  100. package/dist/commonjs/generated/src/operations/index.js +0 -12
  101. package/dist/commonjs/generated/src/operations/index.js.map +0 -1
  102. package/dist/commonjs/generated/src/operations/tollFreeVerification.d.ts +0 -140
  103. package/dist/commonjs/generated/src/operations/tollFreeVerification.d.ts.map +0 -1
  104. package/dist/commonjs/generated/src/operations/tollFreeVerification.js +0 -646
  105. package/dist/commonjs/generated/src/operations/tollFreeVerification.js.map +0 -1
  106. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +0 -2
  107. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  108. package/dist/commonjs/generated/src/operationsInterfaces/index.js +0 -12
  109. package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +0 -1
  110. package/dist/commonjs/generated/src/operationsInterfaces/tollFreeVerification.d.ts +0 -84
  111. package/dist/commonjs/generated/src/operationsInterfaces/tollFreeVerification.d.ts.map +0 -1
  112. package/dist/commonjs/generated/src/operationsInterfaces/tollFreeVerification.js +0 -10
  113. package/dist/commonjs/generated/src/operationsInterfaces/tollFreeVerification.js.map +0 -1
  114. package/dist/commonjs/generated/src/pagingHelper.d.ts +0 -13
  115. package/dist/commonjs/generated/src/pagingHelper.d.ts.map +0 -1
  116. package/dist/commonjs/generated/src/pagingHelper.js +0 -36
  117. package/dist/commonjs/generated/src/pagingHelper.js.map +0 -1
  118. package/dist/commonjs/generated/src/tollFreeVerificationClient.d.ts +0 -17
  119. package/dist/commonjs/generated/src/tollFreeVerificationClient.d.ts.map +0 -1
  120. package/dist/commonjs/generated/src/tollFreeVerificationClient.js +0 -74
  121. package/dist/commonjs/generated/src/tollFreeVerificationClient.js.map +0 -1
  122. package/dist/commonjs/generated/src/tracing.d.ts +0 -2
  123. package/dist/commonjs/generated/src/tracing.d.ts.map +0 -1
  124. package/dist/commonjs/generated/src/tracing.js +0 -17
  125. package/dist/commonjs/generated/src/tracing.js.map +0 -1
  126. package/dist/commonjs/index.d.ts +0 -4
  127. package/dist/commonjs/index.d.ts.map +0 -1
  128. package/dist/commonjs/index.js +0 -9
  129. package/dist/commonjs/index.js.map +0 -1
  130. package/dist/commonjs/mappers.d.ts +0 -2
  131. package/dist/commonjs/mappers.d.ts.map +0 -1
  132. package/dist/commonjs/mappers.js +0 -9
  133. package/dist/commonjs/mappers.js.map +0 -1
  134. package/dist/commonjs/models.d.ts +0 -2
  135. package/dist/commonjs/models.d.ts.map +0 -1
  136. package/dist/commonjs/models.js +0 -5
  137. package/dist/commonjs/models.js.map +0 -1
  138. package/dist/commonjs/package.json +0 -3
  139. package/dist/commonjs/tollFreeVerificationClient.d.ts +0 -29
  140. package/dist/commonjs/tollFreeVerificationClient.d.ts.map +0 -1
  141. package/dist/commonjs/tollFreeVerificationClient.js +0 -95
  142. package/dist/commonjs/tollFreeVerificationClient.js.map +0 -1
  143. package/dist/commonjs/tsdoc-metadata.json +0 -11
  144. package/dist/commonjs/utils/constants.d.ts +0 -2
  145. package/dist/commonjs/utils/constants.d.ts.map +0 -1
  146. package/dist/commonjs/utils/constants.js +0 -7
  147. package/dist/commonjs/utils/constants.js.map +0 -1
  148. package/dist/commonjs/utils/index.d.ts +0 -3
  149. package/dist/commonjs/utils/index.d.ts.map +0 -1
  150. package/dist/commonjs/utils/index.js +0 -8
  151. package/dist/commonjs/utils/index.js.map +0 -1
  152. package/dist/commonjs/utils/logger.d.ts +0 -5
  153. package/dist/commonjs/utils/logger.d.ts.map +0 -1
  154. package/dist/commonjs/utils/logger.js +0 -11
  155. package/dist/commonjs/utils/logger.js.map +0 -1
  156. package/dist/esm/generated/src/index.d.ts +0 -5
  157. package/dist/esm/generated/src/index.d.ts.map +0 -1
  158. package/dist/esm/generated/src/index.js.map +0 -1
  159. package/dist/esm/generated/src/models/index.d.ts +0 -283
  160. package/dist/esm/generated/src/models/index.d.ts.map +0 -1
  161. package/dist/esm/generated/src/models/index.js.map +0 -1
  162. package/dist/esm/generated/src/models/mappers.d.ts +0 -18
  163. package/dist/esm/generated/src/models/mappers.d.ts.map +0 -1
  164. package/dist/esm/generated/src/models/mappers.js +0 -609
  165. package/dist/esm/generated/src/models/mappers.js.map +0 -1
  166. package/dist/esm/generated/src/models/parameters.d.ts +0 -20
  167. package/dist/esm/generated/src/models/parameters.d.ts.map +0 -1
  168. package/dist/esm/generated/src/models/parameters.js +0 -153
  169. package/dist/esm/generated/src/models/parameters.js.map +0 -1
  170. package/dist/esm/generated/src/operations/index.d.ts +0 -2
  171. package/dist/esm/generated/src/operations/index.d.ts.map +0 -1
  172. package/dist/esm/generated/src/operations/index.js +0 -9
  173. package/dist/esm/generated/src/operations/tollFreeVerification.d.ts +0 -140
  174. package/dist/esm/generated/src/operations/tollFreeVerification.d.ts.map +0 -1
  175. package/dist/esm/generated/src/operations/tollFreeVerification.js.map +0 -1
  176. package/dist/esm/generated/src/operationsInterfaces/index.d.ts +0 -2
  177. package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  178. package/dist/esm/generated/src/operationsInterfaces/index.js +0 -9
  179. package/dist/esm/generated/src/operationsInterfaces/index.js.map +0 -1
  180. package/dist/esm/generated/src/operationsInterfaces/tollFreeVerification.d.ts +0 -84
  181. package/dist/esm/generated/src/operationsInterfaces/tollFreeVerification.d.ts.map +0 -1
  182. package/dist/esm/generated/src/operationsInterfaces/tollFreeVerification.js +0 -9
  183. package/dist/esm/generated/src/operationsInterfaces/tollFreeVerification.js.map +0 -1
  184. package/dist/esm/generated/src/pagingHelper.d.ts +0 -13
  185. package/dist/esm/generated/src/pagingHelper.d.ts.map +0 -1
  186. package/dist/esm/generated/src/pagingHelper.js +0 -32
  187. package/dist/esm/generated/src/pagingHelper.js.map +0 -1
  188. package/dist/esm/generated/src/tollFreeVerificationClient.d.ts +0 -17
  189. package/dist/esm/generated/src/tollFreeVerificationClient.d.ts.map +0 -1
  190. package/dist/esm/generated/src/tollFreeVerificationClient.js.map +0 -1
  191. package/dist/esm/generated/src/tracing.d.ts +0 -2
  192. package/dist/esm/generated/src/tracing.d.ts.map +0 -1
  193. package/dist/esm/generated/src/tracing.js +0 -14
  194. package/dist/esm/generated/src/tracing.js.map +0 -1
  195. package/dist/esm/index.d.ts +0 -4
  196. package/dist/esm/index.d.ts.map +0 -1
  197. package/dist/esm/index.js +0 -6
  198. package/dist/esm/index.js.map +0 -1
  199. package/dist/esm/mappers.d.ts +0 -2
  200. package/dist/esm/mappers.d.ts.map +0 -1
  201. package/dist/esm/models.d.ts +0 -2
  202. package/dist/esm/models.d.ts.map +0 -1
  203. package/dist/esm/models.js +0 -4
  204. package/dist/esm/models.js.map +0 -1
  205. package/dist/esm/package.json +0 -3
  206. package/dist/esm/tollFreeVerificationClient.d.ts +0 -29
  207. package/dist/esm/tollFreeVerificationClient.d.ts.map +0 -1
  208. package/dist/esm/tollFreeVerificationClient.js +0 -91
  209. package/dist/esm/tollFreeVerificationClient.js.map +0 -1
  210. package/dist/esm/utils/constants.d.ts +0 -2
  211. package/dist/esm/utils/constants.d.ts.map +0 -1
  212. package/dist/esm/utils/constants.js +0 -4
  213. package/dist/esm/utils/constants.js.map +0 -1
  214. package/dist/esm/utils/index.d.ts +0 -3
  215. package/dist/esm/utils/index.d.ts.map +0 -1
  216. package/dist/esm/utils/index.js +0 -5
  217. package/dist/esm/utils/index.js.map +0 -1
  218. package/dist/esm/utils/logger.d.ts +0 -5
  219. package/dist/esm/utils/logger.d.ts.map +0 -1
  220. package/dist/esm/utils/logger.js +0 -8
  221. package/dist/esm/utils/logger.js.map +0 -1
  222. package/dist/react-native/generated/src/index.d.ts +0 -5
  223. package/dist/react-native/generated/src/index.d.ts.map +0 -1
  224. package/dist/react-native/generated/src/index.js +0 -13
  225. package/dist/react-native/generated/src/index.js.map +0 -1
  226. package/dist/react-native/generated/src/models/index.d.ts +0 -283
  227. package/dist/react-native/generated/src/models/index.d.ts.map +0 -1
  228. package/dist/react-native/generated/src/models/index.js.map +0 -1
  229. package/dist/react-native/generated/src/models/mappers.d.ts +0 -18
  230. package/dist/react-native/generated/src/models/mappers.d.ts.map +0 -1
  231. package/dist/react-native/generated/src/models/mappers.js +0 -609
  232. package/dist/react-native/generated/src/models/mappers.js.map +0 -1
  233. package/dist/react-native/generated/src/models/parameters.d.ts +0 -20
  234. package/dist/react-native/generated/src/models/parameters.d.ts.map +0 -1
  235. package/dist/react-native/generated/src/models/parameters.js +0 -153
  236. package/dist/react-native/generated/src/models/parameters.js.map +0 -1
  237. package/dist/react-native/generated/src/operations/index.d.ts +0 -2
  238. package/dist/react-native/generated/src/operations/index.d.ts.map +0 -1
  239. package/dist/react-native/generated/src/operations/index.js +0 -9
  240. package/dist/react-native/generated/src/operations/index.js.map +0 -1
  241. package/dist/react-native/generated/src/operations/tollFreeVerification.d.ts +0 -140
  242. package/dist/react-native/generated/src/operations/tollFreeVerification.d.ts.map +0 -1
  243. package/dist/react-native/generated/src/operations/tollFreeVerification.js +0 -642
  244. package/dist/react-native/generated/src/operations/tollFreeVerification.js.map +0 -1
  245. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +0 -2
  246. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  247. package/dist/react-native/generated/src/operationsInterfaces/index.js +0 -9
  248. package/dist/react-native/generated/src/operationsInterfaces/tollFreeVerification.d.ts +0 -84
  249. package/dist/react-native/generated/src/operationsInterfaces/tollFreeVerification.d.ts.map +0 -1
  250. package/dist/react-native/generated/src/operationsInterfaces/tollFreeVerification.js +0 -9
  251. package/dist/react-native/generated/src/operationsInterfaces/tollFreeVerification.js.map +0 -1
  252. package/dist/react-native/generated/src/pagingHelper.d.ts +0 -13
  253. package/dist/react-native/generated/src/pagingHelper.d.ts.map +0 -1
  254. package/dist/react-native/generated/src/pagingHelper.js +0 -32
  255. package/dist/react-native/generated/src/pagingHelper.js.map +0 -1
  256. package/dist/react-native/generated/src/tollFreeVerificationClient.d.ts +0 -17
  257. package/dist/react-native/generated/src/tollFreeVerificationClient.d.ts.map +0 -1
  258. package/dist/react-native/generated/src/tollFreeVerificationClient.js +0 -69
  259. package/dist/react-native/generated/src/tollFreeVerificationClient.js.map +0 -1
  260. package/dist/react-native/generated/src/tracing.d.ts +0 -2
  261. package/dist/react-native/generated/src/tracing.d.ts.map +0 -1
  262. package/dist/react-native/generated/src/tracing.js +0 -14
  263. package/dist/react-native/generated/src/tracing.js.map +0 -1
  264. package/dist/react-native/index.d.ts +0 -4
  265. package/dist/react-native/index.d.ts.map +0 -1
  266. package/dist/react-native/index.js +0 -6
  267. package/dist/react-native/index.js.map +0 -1
  268. package/dist/react-native/mappers.d.ts +0 -2
  269. package/dist/react-native/mappers.d.ts.map +0 -1
  270. package/dist/react-native/mappers.js +0 -4
  271. package/dist/react-native/mappers.js.map +0 -1
  272. package/dist/react-native/models.d.ts +0 -2
  273. package/dist/react-native/models.d.ts.map +0 -1
  274. package/dist/react-native/models.js +0 -4
  275. package/dist/react-native/models.js.map +0 -1
  276. package/dist/react-native/package.json +0 -3
  277. package/dist/react-native/tollFreeVerificationClient.d.ts +0 -29
  278. package/dist/react-native/tollFreeVerificationClient.d.ts.map +0 -1
  279. package/dist/react-native/tollFreeVerificationClient.js +0 -91
  280. package/dist/react-native/tollFreeVerificationClient.js.map +0 -1
  281. package/dist/react-native/utils/constants.d.ts +0 -2
  282. package/dist/react-native/utils/constants.d.ts.map +0 -1
  283. package/dist/react-native/utils/constants.js +0 -4
  284. package/dist/react-native/utils/constants.js.map +0 -1
  285. package/dist/react-native/utils/index.d.ts +0 -3
  286. package/dist/react-native/utils/index.d.ts.map +0 -1
  287. package/dist/react-native/utils/index.js +0 -5
  288. package/dist/react-native/utils/index.js.map +0 -1
  289. package/dist/react-native/utils/logger.d.ts +0 -5
  290. package/dist/react-native/utils/logger.d.ts.map +0 -1
  291. package/dist/react-native/utils/logger.js +0 -8
  292. package/dist/react-native/utils/logger.js.map +0 -1
  293. /package/{dist/browser → dist-esm/src}/generated/src/models/index.js +0 -0
  294. /package/{dist/browser → dist-esm/src}/generated/src/models/index.js.map +0 -0
  295. /package/{dist/browser → dist-esm/src}/generated/src/models/mappers.js +0 -0
  296. /package/{dist/browser → dist-esm/src}/generated/src/models/mappers.js.map +0 -0
  297. /package/{dist/browser → dist-esm/src}/generated/src/operationsInterfaces/tollFreeVerification.js +0 -0
  298. /package/{dist/browser → dist-esm/src}/generated/src/pagingHelper.js +0 -0
  299. /package/{dist/browser → dist-esm/src}/generated/src/pagingHelper.js.map +0 -0
  300. /package/{dist/browser → dist-esm/src}/generated/src/tracing.js +0 -0
  301. /package/{dist/browser → dist-esm/src}/generated/src/tracing.js.map +0 -0
  302. /package/{dist/browser → dist-esm/src}/models.js +0 -0
  303. /package/{dist/browser → dist-esm/src}/utils/constants.js +0 -0
  304. /package/{dist/browser → dist-esm/src}/utils/constants.js.map +0 -0
  305. /package/{dist/browser → dist-esm/src}/utils/logger.js +0 -0
  306. /package/{dist/browser → dist-esm/src}/utils/logger.js.map +0 -0
  307. /package/{dist → types}/communication-toll-free-verification.d.ts +0 -0
package/dist/index.js ADDED
@@ -0,0 +1,1617 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var coreAuth = require('@azure/core-auth');
6
+ var communicationCommon = require('@azure/communication-common');
7
+ var coreTracing = require('@azure/core-tracing');
8
+ var logger$1 = require('@azure/logger');
9
+ var coreClient = require('@azure/core-client');
10
+ var tslib = require('tslib');
11
+
12
+ function _interopNamespaceDefault(e) {
13
+ var n = Object.create(null);
14
+ if (e) {
15
+ Object.keys(e).forEach(function (k) {
16
+ if (k !== 'default') {
17
+ var d = Object.getOwnPropertyDescriptor(e, k);
18
+ Object.defineProperty(n, k, d.get ? d : {
19
+ enumerable: true,
20
+ get: function () { return e[k]; }
21
+ });
22
+ }
23
+ });
24
+ }
25
+ n.default = e;
26
+ return Object.freeze(n);
27
+ }
28
+
29
+ var coreClient__namespace = /*#__PURE__*/_interopNamespaceDefault(coreClient);
30
+
31
+ /*
32
+ * Copyright (c) Microsoft Corporation.
33
+ * Licensed under the MIT License.
34
+ *
35
+ * Code generated by Microsoft (R) AutoRest Code Generator.
36
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
37
+ */
38
+ const pageMap = new WeakMap();
39
+ function setContinuationToken(page, continuationToken) {
40
+ var _a;
41
+ if (typeof page !== "object" || page === null || !continuationToken) {
42
+ return;
43
+ }
44
+ const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
45
+ pageInfo.continuationToken = continuationToken;
46
+ pageMap.set(page, pageInfo);
47
+ }
48
+
49
+ /*
50
+ * Copyright (c) Microsoft Corporation.
51
+ * Licensed under the MIT License.
52
+ *
53
+ * Code generated by Microsoft (R) AutoRest Code Generator.
54
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
55
+ */
56
+ const tracingClient = coreTracing.createTracingClient({
57
+ namespace: "Microsoft.Communication",
58
+ packageName: "@azure-tools/communication-toll-free-verification",
59
+ packageVersion: "1.0.0-beta.1",
60
+ });
61
+
62
+ /*
63
+ * Copyright (c) Microsoft Corporation.
64
+ * Licensed under the MIT License.
65
+ *
66
+ * Code generated by Microsoft (R) AutoRest Code Generator.
67
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
68
+ */
69
+ const CampaignBrief = {
70
+ type: {
71
+ name: "Composite",
72
+ className: "CampaignBrief",
73
+ modelProperties: {
74
+ id: {
75
+ serializedName: "id",
76
+ required: true,
77
+ type: {
78
+ name: "Uuid",
79
+ },
80
+ },
81
+ status: {
82
+ serializedName: "status",
83
+ type: {
84
+ name: "String",
85
+ },
86
+ },
87
+ reviewNotes: {
88
+ serializedName: "reviewNotes",
89
+ type: {
90
+ name: "Sequence",
91
+ element: {
92
+ type: {
93
+ name: "Composite",
94
+ className: "ReviewNote",
95
+ },
96
+ },
97
+ },
98
+ },
99
+ submissionDate: {
100
+ serializedName: "submissionDate",
101
+ type: {
102
+ name: "DateTime",
103
+ },
104
+ },
105
+ statusUpdatedDate: {
106
+ serializedName: "statusUpdatedDate",
107
+ type: {
108
+ name: "DateTime",
109
+ },
110
+ },
111
+ countryCode: {
112
+ serializedName: "countryCode",
113
+ type: {
114
+ name: "String",
115
+ },
116
+ },
117
+ businessPointOfContact: {
118
+ serializedName: "businessPointOfContact",
119
+ type: {
120
+ name: "Composite",
121
+ className: "BusinessPointOfContact",
122
+ },
123
+ },
124
+ businessInformation: {
125
+ serializedName: "businessInformation",
126
+ type: {
127
+ name: "Composite",
128
+ className: "BusinessInformation",
129
+ },
130
+ },
131
+ useCaseInfo: {
132
+ serializedName: "useCaseInfo",
133
+ type: {
134
+ name: "Composite",
135
+ className: "UseCaseInfo",
136
+ },
137
+ },
138
+ phoneNumbers: {
139
+ serializedName: "phoneNumbers",
140
+ type: {
141
+ name: "Sequence",
142
+ element: {
143
+ type: {
144
+ name: "String",
145
+ },
146
+ },
147
+ },
148
+ },
149
+ estimatedMonthlyVolume: {
150
+ serializedName: "estimatedMonthlyVolume",
151
+ type: {
152
+ name: "String",
153
+ },
154
+ },
155
+ additionalInformation: {
156
+ serializedName: "additionalInformation",
157
+ type: {
158
+ name: "String",
159
+ },
160
+ },
161
+ attachments: {
162
+ serializedName: "attachments",
163
+ type: {
164
+ name: "Sequence",
165
+ element: {
166
+ type: {
167
+ name: "Composite",
168
+ className: "CampaignBriefAttachmentSummary",
169
+ },
170
+ },
171
+ },
172
+ },
173
+ optInDetails: {
174
+ serializedName: "optInDetails",
175
+ type: {
176
+ name: "Composite",
177
+ className: "OptInDetails",
178
+ },
179
+ },
180
+ multipleNumbersJustification: {
181
+ serializedName: "multipleNumbersJustification",
182
+ type: {
183
+ name: "String",
184
+ },
185
+ },
186
+ },
187
+ },
188
+ };
189
+ const ReviewNote = {
190
+ type: {
191
+ name: "Composite",
192
+ className: "ReviewNote",
193
+ modelProperties: {
194
+ message: {
195
+ serializedName: "message",
196
+ type: {
197
+ name: "String",
198
+ },
199
+ },
200
+ date: {
201
+ serializedName: "date",
202
+ type: {
203
+ name: "DateTime",
204
+ },
205
+ },
206
+ },
207
+ },
208
+ };
209
+ const BusinessPointOfContact = {
210
+ type: {
211
+ name: "Composite",
212
+ className: "BusinessPointOfContact",
213
+ modelProperties: {
214
+ firstName: {
215
+ serializedName: "firstName",
216
+ type: {
217
+ name: "String",
218
+ },
219
+ },
220
+ lastName: {
221
+ serializedName: "lastName",
222
+ type: {
223
+ name: "String",
224
+ },
225
+ },
226
+ phone: {
227
+ serializedName: "phone",
228
+ type: {
229
+ name: "String",
230
+ },
231
+ },
232
+ email: {
233
+ serializedName: "email",
234
+ type: {
235
+ name: "String",
236
+ },
237
+ },
238
+ address: {
239
+ serializedName: "address",
240
+ type: {
241
+ name: "Composite",
242
+ className: "Address",
243
+ },
244
+ },
245
+ },
246
+ },
247
+ };
248
+ const Address = {
249
+ type: {
250
+ name: "Composite",
251
+ className: "Address",
252
+ modelProperties: {
253
+ addressLine1: {
254
+ serializedName: "addressLine1",
255
+ type: {
256
+ name: "String",
257
+ },
258
+ },
259
+ addressLine2: {
260
+ serializedName: "addressLine2",
261
+ type: {
262
+ name: "String",
263
+ },
264
+ },
265
+ locality: {
266
+ serializedName: "locality",
267
+ type: {
268
+ name: "String",
269
+ },
270
+ },
271
+ administrativeDivision: {
272
+ serializedName: "administrativeDivision",
273
+ type: {
274
+ name: "String",
275
+ },
276
+ },
277
+ postalCode: {
278
+ serializedName: "postalCode",
279
+ type: {
280
+ name: "String",
281
+ },
282
+ },
283
+ country: {
284
+ serializedName: "country",
285
+ type: {
286
+ name: "String",
287
+ },
288
+ },
289
+ },
290
+ },
291
+ };
292
+ const BusinessInformation = {
293
+ type: {
294
+ name: "Composite",
295
+ className: "BusinessInformation",
296
+ modelProperties: {
297
+ companyName: {
298
+ serializedName: "companyName",
299
+ type: {
300
+ name: "String",
301
+ },
302
+ },
303
+ companyUrl: {
304
+ serializedName: "companyUrl",
305
+ type: {
306
+ name: "String",
307
+ },
308
+ },
309
+ address: {
310
+ serializedName: "address",
311
+ type: {
312
+ name: "Composite",
313
+ className: "Address",
314
+ },
315
+ },
316
+ },
317
+ },
318
+ };
319
+ const UseCaseInfo = {
320
+ type: {
321
+ name: "Composite",
322
+ className: "UseCaseInfo",
323
+ modelProperties: {
324
+ sampleMessages: {
325
+ serializedName: "sampleMessages",
326
+ type: {
327
+ name: "Sequence",
328
+ element: {
329
+ type: {
330
+ name: "String",
331
+ },
332
+ },
333
+ },
334
+ },
335
+ useCase: {
336
+ serializedName: "useCase",
337
+ type: {
338
+ name: "String",
339
+ },
340
+ },
341
+ useCaseSummary: {
342
+ serializedName: "useCaseSummary",
343
+ type: {
344
+ name: "String",
345
+ },
346
+ },
347
+ },
348
+ },
349
+ };
350
+ const CampaignBriefAttachmentSummary = {
351
+ type: {
352
+ name: "Composite",
353
+ className: "CampaignBriefAttachmentSummary",
354
+ modelProperties: {
355
+ id: {
356
+ serializedName: "id",
357
+ type: {
358
+ name: "Uuid",
359
+ },
360
+ },
361
+ type: {
362
+ serializedName: "type",
363
+ type: {
364
+ name: "String",
365
+ },
366
+ },
367
+ fileName: {
368
+ serializedName: "fileName",
369
+ type: {
370
+ name: "String",
371
+ },
372
+ },
373
+ },
374
+ },
375
+ };
376
+ const OptInDetails = {
377
+ type: {
378
+ name: "Composite",
379
+ className: "OptInDetails",
380
+ modelProperties: {
381
+ description: {
382
+ serializedName: "description",
383
+ type: {
384
+ name: "String",
385
+ },
386
+ },
387
+ options: {
388
+ serializedName: "options",
389
+ type: {
390
+ name: "Sequence",
391
+ element: {
392
+ type: {
393
+ name: "Composite",
394
+ className: "Option",
395
+ },
396
+ },
397
+ },
398
+ },
399
+ },
400
+ },
401
+ };
402
+ const Option = {
403
+ type: {
404
+ name: "Composite",
405
+ className: "Option",
406
+ modelProperties: {
407
+ type: {
408
+ serializedName: "type",
409
+ required: true,
410
+ type: {
411
+ name: "String",
412
+ },
413
+ },
414
+ imageUrls: {
415
+ serializedName: "imageUrls",
416
+ type: {
417
+ name: "Sequence",
418
+ element: {
419
+ type: {
420
+ name: "String",
421
+ },
422
+ },
423
+ },
424
+ },
425
+ },
426
+ },
427
+ };
428
+ const CommunicationErrorResponse = {
429
+ type: {
430
+ name: "Composite",
431
+ className: "CommunicationErrorResponse",
432
+ modelProperties: {
433
+ error: {
434
+ serializedName: "error",
435
+ type: {
436
+ name: "Composite",
437
+ className: "CommunicationError",
438
+ },
439
+ },
440
+ },
441
+ },
442
+ };
443
+ const CommunicationError = {
444
+ type: {
445
+ name: "Composite",
446
+ className: "CommunicationError",
447
+ modelProperties: {
448
+ code: {
449
+ serializedName: "code",
450
+ required: true,
451
+ type: {
452
+ name: "String",
453
+ },
454
+ },
455
+ message: {
456
+ serializedName: "message",
457
+ required: true,
458
+ type: {
459
+ name: "String",
460
+ },
461
+ },
462
+ target: {
463
+ serializedName: "target",
464
+ readOnly: true,
465
+ type: {
466
+ name: "String",
467
+ },
468
+ },
469
+ details: {
470
+ serializedName: "details",
471
+ readOnly: true,
472
+ type: {
473
+ name: "Sequence",
474
+ element: {
475
+ type: {
476
+ name: "Composite",
477
+ className: "CommunicationError",
478
+ },
479
+ },
480
+ },
481
+ },
482
+ innerError: {
483
+ serializedName: "innererror",
484
+ type: {
485
+ name: "Composite",
486
+ className: "CommunicationError",
487
+ },
488
+ },
489
+ },
490
+ },
491
+ };
492
+ const CampaignBriefs = {
493
+ type: {
494
+ name: "Composite",
495
+ className: "CampaignBriefs",
496
+ modelProperties: {
497
+ campaignBriefs: {
498
+ serializedName: "campaignBriefs",
499
+ type: {
500
+ name: "Sequence",
501
+ element: {
502
+ type: {
503
+ name: "Composite",
504
+ className: "CampaignBrief",
505
+ },
506
+ },
507
+ },
508
+ },
509
+ nextLink: {
510
+ serializedName: "nextLink",
511
+ type: {
512
+ name: "String",
513
+ },
514
+ },
515
+ },
516
+ },
517
+ };
518
+ const CampaignBriefSummaries = {
519
+ type: {
520
+ name: "Composite",
521
+ className: "CampaignBriefSummaries",
522
+ modelProperties: {
523
+ campaignBriefSummaries: {
524
+ serializedName: "campaignBriefSummaries",
525
+ type: {
526
+ name: "Sequence",
527
+ element: {
528
+ type: {
529
+ name: "Composite",
530
+ className: "CampaignBriefSummary",
531
+ },
532
+ },
533
+ },
534
+ },
535
+ nextLink: {
536
+ serializedName: "nextLink",
537
+ type: {
538
+ name: "String",
539
+ },
540
+ },
541
+ },
542
+ },
543
+ };
544
+ const CampaignBriefSummary = {
545
+ type: {
546
+ name: "Composite",
547
+ className: "CampaignBriefSummary",
548
+ modelProperties: {
549
+ id: {
550
+ serializedName: "id",
551
+ type: {
552
+ name: "Uuid",
553
+ },
554
+ },
555
+ countryCode: {
556
+ serializedName: "countryCode",
557
+ type: {
558
+ name: "String",
559
+ },
560
+ },
561
+ briefType: {
562
+ defaultValue: "tollfreeVerification",
563
+ isConstant: true,
564
+ serializedName: "briefType",
565
+ type: {
566
+ name: "String",
567
+ },
568
+ },
569
+ status: {
570
+ serializedName: "status",
571
+ type: {
572
+ name: "String",
573
+ },
574
+ },
575
+ phoneNumbers: {
576
+ serializedName: "phoneNumbers",
577
+ type: {
578
+ name: "Sequence",
579
+ element: {
580
+ type: {
581
+ name: "String",
582
+ },
583
+ },
584
+ },
585
+ },
586
+ },
587
+ },
588
+ };
589
+ const CampaignBriefAttachment = {
590
+ type: {
591
+ name: "Composite",
592
+ className: "CampaignBriefAttachment",
593
+ modelProperties: {
594
+ id: {
595
+ serializedName: "id",
596
+ required: true,
597
+ type: {
598
+ name: "Uuid",
599
+ },
600
+ },
601
+ typeParam: {
602
+ serializedName: "type",
603
+ required: true,
604
+ type: {
605
+ name: "String",
606
+ },
607
+ },
608
+ fileName: {
609
+ constraints: {
610
+ MinLength: 1,
611
+ },
612
+ serializedName: "fileName",
613
+ required: true,
614
+ type: {
615
+ name: "String",
616
+ },
617
+ },
618
+ fileSizeInBytes: {
619
+ serializedName: "fileSizeInBytes",
620
+ type: {
621
+ name: "Number",
622
+ },
623
+ },
624
+ fileType: {
625
+ serializedName: "fileType",
626
+ required: true,
627
+ type: {
628
+ name: "String",
629
+ },
630
+ },
631
+ fileContentBase64: {
632
+ constraints: {
633
+ MinLength: 1,
634
+ },
635
+ serializedName: "fileContentBase64",
636
+ required: true,
637
+ type: {
638
+ name: "String",
639
+ },
640
+ },
641
+ },
642
+ },
643
+ };
644
+ const CampaignBriefAttachments = {
645
+ type: {
646
+ name: "Composite",
647
+ className: "CampaignBriefAttachments",
648
+ modelProperties: {
649
+ attachments: {
650
+ serializedName: "attachments",
651
+ type: {
652
+ name: "Sequence",
653
+ element: {
654
+ type: {
655
+ name: "Composite",
656
+ className: "CampaignBriefAttachment",
657
+ },
658
+ },
659
+ },
660
+ },
661
+ nextLink: {
662
+ serializedName: "nextLink",
663
+ type: {
664
+ name: "String",
665
+ },
666
+ },
667
+ },
668
+ },
669
+ };
670
+
671
+ var Mappers = /*#__PURE__*/Object.freeze({
672
+ __proto__: null,
673
+ Address: Address,
674
+ BusinessInformation: BusinessInformation,
675
+ BusinessPointOfContact: BusinessPointOfContact,
676
+ CampaignBrief: CampaignBrief,
677
+ CampaignBriefAttachment: CampaignBriefAttachment,
678
+ CampaignBriefAttachmentSummary: CampaignBriefAttachmentSummary,
679
+ CampaignBriefAttachments: CampaignBriefAttachments,
680
+ CampaignBriefSummaries: CampaignBriefSummaries,
681
+ CampaignBriefSummary: CampaignBriefSummary,
682
+ CampaignBriefs: CampaignBriefs,
683
+ CommunicationError: CommunicationError,
684
+ CommunicationErrorResponse: CommunicationErrorResponse,
685
+ OptInDetails: OptInDetails,
686
+ Option: Option,
687
+ ReviewNote: ReviewNote,
688
+ UseCaseInfo: UseCaseInfo
689
+ });
690
+
691
+ /*
692
+ * Copyright (c) Microsoft Corporation.
693
+ * Licensed under the MIT License.
694
+ *
695
+ * Code generated by Microsoft (R) AutoRest Code Generator.
696
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
697
+ */
698
+ const contentType = {
699
+ parameterPath: ["options", "contentType"],
700
+ mapper: {
701
+ defaultValue: "application/merge-patch+json",
702
+ isConstant: true,
703
+ serializedName: "Content-Type",
704
+ type: {
705
+ name: "String",
706
+ },
707
+ },
708
+ };
709
+ const body = {
710
+ parameterPath: ["options", "body"],
711
+ mapper: CampaignBrief,
712
+ };
713
+ const accept = {
714
+ parameterPath: "accept",
715
+ mapper: {
716
+ defaultValue: "application/json",
717
+ isConstant: true,
718
+ serializedName: "Accept",
719
+ type: {
720
+ name: "String",
721
+ },
722
+ },
723
+ };
724
+ const endpoint = {
725
+ parameterPath: "endpoint",
726
+ mapper: {
727
+ serializedName: "endpoint",
728
+ required: true,
729
+ type: {
730
+ name: "String",
731
+ },
732
+ },
733
+ skipEncoding: true,
734
+ };
735
+ const countryCode = {
736
+ parameterPath: "countryCode",
737
+ mapper: {
738
+ serializedName: "countryCode",
739
+ required: true,
740
+ type: {
741
+ name: "String",
742
+ },
743
+ },
744
+ };
745
+ const campaignBriefId = {
746
+ parameterPath: "campaignBriefId",
747
+ mapper: {
748
+ serializedName: "campaignBriefId",
749
+ required: true,
750
+ type: {
751
+ name: "Uuid",
752
+ },
753
+ },
754
+ };
755
+ const apiVersion = {
756
+ parameterPath: "apiVersion",
757
+ mapper: {
758
+ defaultValue: "2023-01-10-preview1",
759
+ isConstant: true,
760
+ serializedName: "api-version",
761
+ type: {
762
+ name: "String",
763
+ },
764
+ },
765
+ };
766
+ const skip = {
767
+ parameterPath: ["options", "skip"],
768
+ mapper: {
769
+ defaultValue: 0,
770
+ serializedName: "skip",
771
+ type: {
772
+ name: "Number",
773
+ },
774
+ },
775
+ };
776
+ const top = {
777
+ parameterPath: ["options", "top"],
778
+ mapper: {
779
+ defaultValue: 100,
780
+ serializedName: "top",
781
+ type: {
782
+ name: "Number",
783
+ },
784
+ },
785
+ };
786
+ const contentType1 = {
787
+ parameterPath: ["options", "contentType"],
788
+ mapper: {
789
+ defaultValue: "application/json",
790
+ isConstant: true,
791
+ serializedName: "Content-Type",
792
+ type: {
793
+ name: "String",
794
+ },
795
+ },
796
+ };
797
+ const attachmentId = {
798
+ parameterPath: "attachmentId",
799
+ mapper: {
800
+ serializedName: "attachmentId",
801
+ required: true,
802
+ type: {
803
+ name: "Uuid",
804
+ },
805
+ },
806
+ };
807
+ const nextLink = {
808
+ parameterPath: "nextLink",
809
+ mapper: {
810
+ serializedName: "nextLink",
811
+ required: true,
812
+ type: {
813
+ name: "String",
814
+ },
815
+ },
816
+ skipEncoding: true,
817
+ };
818
+
819
+ /*
820
+ * Copyright (c) Microsoft Corporation.
821
+ * Licensed under the MIT License.
822
+ *
823
+ * Code generated by Microsoft (R) AutoRest Code Generator.
824
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
825
+ */
826
+ /// <reference lib="esnext.asynciterable" />
827
+ /** Class containing TollFreeVerification operations. */
828
+ class TollFreeVerificationImpl {
829
+ /**
830
+ * Initialize a new instance of the class TollFreeVerification class.
831
+ * @param client Reference to the service client
832
+ */
833
+ constructor(client) {
834
+ this.client = client;
835
+ }
836
+ /**
837
+ * Get a list of campaign briefs by country code for the current resource.
838
+ * @param countryCode
839
+ * @param options The options parameters.
840
+ */
841
+ listAllCampaignBriefsByCountryCode(countryCode, options) {
842
+ const iter = this.getAllCampaignBriefsByCountryCodePagingAll(countryCode, options);
843
+ return {
844
+ next() {
845
+ return iter.next();
846
+ },
847
+ [Symbol.asyncIterator]() {
848
+ return this;
849
+ },
850
+ byPage: (settings) => {
851
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
852
+ throw new Error("maxPageSize is not supported by this operation.");
853
+ }
854
+ return this.getAllCampaignBriefsByCountryCodePagingPage(countryCode, options, settings);
855
+ },
856
+ };
857
+ }
858
+ getAllCampaignBriefsByCountryCodePagingPage(countryCode, options, settings) {
859
+ return tslib.__asyncGenerator(this, arguments, function* getAllCampaignBriefsByCountryCodePagingPage_1() {
860
+ let result;
861
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
862
+ if (!continuationToken) {
863
+ result = yield tslib.__await(this._getAllCampaignBriefsByCountryCode(countryCode, options));
864
+ let page = result.campaignBriefs || [];
865
+ continuationToken = result.nextLink;
866
+ setContinuationToken(page, continuationToken);
867
+ yield yield tslib.__await(page);
868
+ }
869
+ while (continuationToken) {
870
+ result = yield tslib.__await(this._getAllCampaignBriefsByCountryCodeNext(countryCode, continuationToken, options));
871
+ continuationToken = result.nextLink;
872
+ let page = result.campaignBriefs || [];
873
+ setContinuationToken(page, continuationToken);
874
+ yield yield tslib.__await(page);
875
+ }
876
+ });
877
+ }
878
+ getAllCampaignBriefsByCountryCodePagingAll(countryCode, options) {
879
+ return tslib.__asyncGenerator(this, arguments, function* getAllCampaignBriefsByCountryCodePagingAll_1() {
880
+ var _a, e_1, _b, _c;
881
+ try {
882
+ for (var _d = true, _e = tslib.__asyncValues(this.getAllCampaignBriefsByCountryCodePagingPage(countryCode, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
883
+ _c = _f.value;
884
+ _d = false;
885
+ const page = _c;
886
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
887
+ }
888
+ }
889
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
890
+ finally {
891
+ try {
892
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
893
+ }
894
+ finally { if (e_1) throw e_1.error; }
895
+ }
896
+ });
897
+ }
898
+ /**
899
+ * Get a list of Campaign Brief Summaries for the current resource.
900
+ * @param options The options parameters.
901
+ */
902
+ listAllCampaignBriefSummaries(options) {
903
+ const iter = this.getAllCampaignBriefSummariesPagingAll(options);
904
+ return {
905
+ next() {
906
+ return iter.next();
907
+ },
908
+ [Symbol.asyncIterator]() {
909
+ return this;
910
+ },
911
+ byPage: (settings) => {
912
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
913
+ throw new Error("maxPageSize is not supported by this operation.");
914
+ }
915
+ return this.getAllCampaignBriefSummariesPagingPage(options, settings);
916
+ },
917
+ };
918
+ }
919
+ getAllCampaignBriefSummariesPagingPage(options, settings) {
920
+ return tslib.__asyncGenerator(this, arguments, function* getAllCampaignBriefSummariesPagingPage_1() {
921
+ let result;
922
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
923
+ if (!continuationToken) {
924
+ result = yield tslib.__await(this._getAllCampaignBriefSummaries(options));
925
+ let page = result.campaignBriefSummaries || [];
926
+ continuationToken = result.nextLink;
927
+ setContinuationToken(page, continuationToken);
928
+ yield yield tslib.__await(page);
929
+ }
930
+ while (continuationToken) {
931
+ result = yield tslib.__await(this._getAllCampaignBriefSummariesNext(continuationToken, options));
932
+ continuationToken = result.nextLink;
933
+ let page = result.campaignBriefSummaries || [];
934
+ setContinuationToken(page, continuationToken);
935
+ yield yield tslib.__await(page);
936
+ }
937
+ });
938
+ }
939
+ getAllCampaignBriefSummariesPagingAll(options) {
940
+ return tslib.__asyncGenerator(this, arguments, function* getAllCampaignBriefSummariesPagingAll_1() {
941
+ var _a, e_2, _b, _c;
942
+ try {
943
+ for (var _d = true, _e = tslib.__asyncValues(this.getAllCampaignBriefSummariesPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
944
+ _c = _f.value;
945
+ _d = false;
946
+ const page = _c;
947
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
948
+ }
949
+ }
950
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
951
+ finally {
952
+ try {
953
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
954
+ }
955
+ finally { if (e_2) throw e_2.error; }
956
+ }
957
+ });
958
+ }
959
+ /**
960
+ * Gets a list of attachments from a Campaign Brief.
961
+ * @param countryCode
962
+ * @param campaignBriefId
963
+ * @param options The options parameters.
964
+ */
965
+ listCampaignBriefAttachments(countryCode, campaignBriefId, options) {
966
+ const iter = this.getCampaignBriefAttachmentsPagingAll(countryCode, campaignBriefId, options);
967
+ return {
968
+ next() {
969
+ return iter.next();
970
+ },
971
+ [Symbol.asyncIterator]() {
972
+ return this;
973
+ },
974
+ byPage: (settings) => {
975
+ if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
976
+ throw new Error("maxPageSize is not supported by this operation.");
977
+ }
978
+ return this.getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options, settings);
979
+ },
980
+ };
981
+ }
982
+ getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options, settings) {
983
+ return tslib.__asyncGenerator(this, arguments, function* getCampaignBriefAttachmentsPagingPage_1() {
984
+ let result;
985
+ let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
986
+ if (!continuationToken) {
987
+ result = yield tslib.__await(this._getCampaignBriefAttachments(countryCode, campaignBriefId, options));
988
+ let page = result.attachments || [];
989
+ continuationToken = result.nextLink;
990
+ setContinuationToken(page, continuationToken);
991
+ yield yield tslib.__await(page);
992
+ }
993
+ while (continuationToken) {
994
+ result = yield tslib.__await(this._getCampaignBriefAttachmentsNext(countryCode, campaignBriefId, continuationToken, options));
995
+ continuationToken = result.nextLink;
996
+ let page = result.attachments || [];
997
+ setContinuationToken(page, continuationToken);
998
+ yield yield tslib.__await(page);
999
+ }
1000
+ });
1001
+ }
1002
+ getCampaignBriefAttachmentsPagingAll(countryCode, campaignBriefId, options) {
1003
+ return tslib.__asyncGenerator(this, arguments, function* getCampaignBriefAttachmentsPagingAll_1() {
1004
+ var _a, e_3, _b, _c;
1005
+ try {
1006
+ for (var _d = true, _e = tslib.__asyncValues(this.getCampaignBriefAttachmentsPagingPage(countryCode, campaignBriefId, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a; _d = true) {
1007
+ _c = _f.value;
1008
+ _d = false;
1009
+ const page = _c;
1010
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1011
+ }
1012
+ }
1013
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
1014
+ finally {
1015
+ try {
1016
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1017
+ }
1018
+ finally { if (e_3) throw e_3.error; }
1019
+ }
1020
+ });
1021
+ }
1022
+ /**
1023
+ * Creates or updates a Campaign Brief.
1024
+ * @param countryCode Country Code Id. Must be a valid country code
1025
+ * @param campaignBriefId Campaign Brief Id. Must be a valid GUID
1026
+ * @param options The options parameters.
1027
+ */
1028
+ async upsertCampaignBrief(countryCode, campaignBriefId, options) {
1029
+ return tracingClient.withSpan("TollFreeVerificationClient.upsertCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
1030
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, upsertCampaignBriefOperationSpec);
1031
+ });
1032
+ }
1033
+ /**
1034
+ * Deletes a Campaign Brief.
1035
+ * @param countryCode Country Code Id. Must be a valid country code
1036
+ * @param campaignBriefId Campaign Brief Id of brief to be deleted. Must be a valid GUID
1037
+ * @param options The options parameters.
1038
+ */
1039
+ async deleteCampaignBrief(countryCode, campaignBriefId, options) {
1040
+ return tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
1041
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, deleteCampaignBriefOperationSpec);
1042
+ });
1043
+ }
1044
+ /**
1045
+ * Get a Campaign Brief by id.
1046
+ * @param countryCode Country Code Id. Must be a valid country code
1047
+ * @param campaignBriefId Campaign Brief Id. Must be a valid GUID
1048
+ * @param options The options parameters.
1049
+ */
1050
+ async getCampaignBrief(countryCode, campaignBriefId, options) {
1051
+ return tracingClient.withSpan("TollFreeVerificationClient.getCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
1052
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, getCampaignBriefOperationSpec);
1053
+ });
1054
+ }
1055
+ /**
1056
+ * Submits a Campaign Brief.
1057
+ * @param countryCode Country Code Id. Must be a valid country code
1058
+ * @param campaignBriefId Campaign Brief Id of brief to be submitted. Must be a valid GUID
1059
+ * @param options The options parameters.
1060
+ */
1061
+ async submitCampaignBrief(countryCode, campaignBriefId, options) {
1062
+ return tracingClient.withSpan("TollFreeVerificationClient.submitCampaignBrief", options !== null && options !== void 0 ? options : {}, async (options) => {
1063
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, submitCampaignBriefOperationSpec);
1064
+ });
1065
+ }
1066
+ /**
1067
+ * Get a list of campaign briefs by country code for the current resource.
1068
+ * @param countryCode
1069
+ * @param options The options parameters.
1070
+ */
1071
+ async _getAllCampaignBriefsByCountryCode(countryCode, options) {
1072
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCode", options !== null && options !== void 0 ? options : {}, async (options) => {
1073
+ return this.client.sendOperationRequest({ countryCode, options }, getAllCampaignBriefsByCountryCodeOperationSpec);
1074
+ });
1075
+ }
1076
+ /**
1077
+ * Get a list of Campaign Brief Summaries for the current resource.
1078
+ * @param options The options parameters.
1079
+ */
1080
+ async _getAllCampaignBriefSummaries(options) {
1081
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummaries", options !== null && options !== void 0 ? options : {}, async (options) => {
1082
+ return this.client.sendOperationRequest({ options }, getAllCampaignBriefSummariesOperationSpec);
1083
+ });
1084
+ }
1085
+ /**
1086
+ * Creates or updates an attachment on a Campaign Brief.
1087
+ * @param countryCode Country Code Id. Must be a valid country code
1088
+ * @param campaignBriefId Campaign Brief Id. Must be a valid GUID
1089
+ * @param attachmentId Attachment Id. Must be a valid GUID
1090
+ * @param id Campaign Brief Attachment Id.
1091
+ * @param typeParam Attachment type describing the purpose of the attachment
1092
+ * e.g. 'callToAction', 'termsOfService'
1093
+ * @param fileName The name of the file being attached
1094
+ * e.g. 'myFile01'
1095
+ * @param fileType The type of file being attached
1096
+ * e.g. 'pdf', 'jpg', 'png'
1097
+ * @param fileContentBase64 File content as base 64 encoded string
1098
+ * @param options The options parameters.
1099
+ */
1100
+ async createOrReplaceCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, id, typeParam, fileName, fileType, fileContentBase64, options) {
1101
+ return tracingClient.withSpan("TollFreeVerificationClient.createOrReplaceCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
1102
+ return this.client.sendOperationRequest({
1103
+ countryCode,
1104
+ campaignBriefId,
1105
+ attachmentId,
1106
+ id,
1107
+ typeParam,
1108
+ fileName,
1109
+ fileType,
1110
+ fileContentBase64,
1111
+ options,
1112
+ }, createOrReplaceCampaignBriefAttachmentOperationSpec);
1113
+ });
1114
+ }
1115
+ /**
1116
+ * Deletes a specific attachment from a Campaign Brief.
1117
+ * @param countryCode
1118
+ * @param campaignBriefId Campaign Brief Id. Must be a valid GUID
1119
+ * @param attachmentId Attachment Id. Must be a valid GUID
1120
+ * @param options The options parameters.
1121
+ */
1122
+ async deleteCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, options) {
1123
+ return tracingClient.withSpan("TollFreeVerificationClient.deleteCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
1124
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, attachmentId, options }, deleteCampaignBriefAttachmentOperationSpec);
1125
+ });
1126
+ }
1127
+ /**
1128
+ * Gets a specific attachment from a Campaign Brief.
1129
+ * @param countryCode
1130
+ * @param campaignBriefId Campaign Brief Id. Must be a valid GUID
1131
+ * @param attachmentId Attachment Id. Must be a valid GUID
1132
+ * @param options The options parameters.
1133
+ */
1134
+ async getCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, options) {
1135
+ return tracingClient.withSpan("TollFreeVerificationClient.getCampaignBriefAttachment", options !== null && options !== void 0 ? options : {}, async (options) => {
1136
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, attachmentId, options }, getCampaignBriefAttachmentOperationSpec);
1137
+ });
1138
+ }
1139
+ /**
1140
+ * Gets a list of attachments from a Campaign Brief.
1141
+ * @param countryCode
1142
+ * @param campaignBriefId
1143
+ * @param options The options parameters.
1144
+ */
1145
+ async _getCampaignBriefAttachments(countryCode, campaignBriefId, options) {
1146
+ return tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachments", options !== null && options !== void 0 ? options : {}, async (options) => {
1147
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, options }, getCampaignBriefAttachmentsOperationSpec);
1148
+ });
1149
+ }
1150
+ /**
1151
+ * GetAllCampaignBriefsByCountryCodeNext
1152
+ * @param countryCode
1153
+ * @param nextLink The nextLink from the previous successful call to the
1154
+ * GetAllCampaignBriefsByCountryCode method.
1155
+ * @param options The options parameters.
1156
+ */
1157
+ async _getAllCampaignBriefsByCountryCodeNext(countryCode, nextLink, options) {
1158
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefsByCountryCodeNext", options !== null && options !== void 0 ? options : {}, async (options) => {
1159
+ return this.client.sendOperationRequest({ countryCode, nextLink, options }, getAllCampaignBriefsByCountryCodeNextOperationSpec);
1160
+ });
1161
+ }
1162
+ /**
1163
+ * GetAllCampaignBriefSummariesNext
1164
+ * @param nextLink The nextLink from the previous successful call to the GetAllCampaignBriefSummaries
1165
+ * method.
1166
+ * @param options The options parameters.
1167
+ */
1168
+ async _getAllCampaignBriefSummariesNext(nextLink, options) {
1169
+ return tracingClient.withSpan("TollFreeVerificationClient._getAllCampaignBriefSummariesNext", options !== null && options !== void 0 ? options : {}, async (options) => {
1170
+ return this.client.sendOperationRequest({ nextLink, options }, getAllCampaignBriefSummariesNextOperationSpec);
1171
+ });
1172
+ }
1173
+ /**
1174
+ * GetCampaignBriefAttachmentsNext
1175
+ * @param countryCode
1176
+ * @param campaignBriefId
1177
+ * @param nextLink The nextLink from the previous successful call to the GetCampaignBriefAttachments
1178
+ * method.
1179
+ * @param options The options parameters.
1180
+ */
1181
+ async _getCampaignBriefAttachmentsNext(countryCode, campaignBriefId, nextLink, options) {
1182
+ return tracingClient.withSpan("TollFreeVerificationClient._getCampaignBriefAttachmentsNext", options !== null && options !== void 0 ? options : {}, async (options) => {
1183
+ return this.client.sendOperationRequest({ countryCode, campaignBriefId, nextLink, options }, getCampaignBriefAttachmentsNextOperationSpec);
1184
+ });
1185
+ }
1186
+ }
1187
+ // Operation Specifications
1188
+ const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
1189
+ const upsertCampaignBriefOperationSpec = {
1190
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}",
1191
+ httpMethod: "PATCH",
1192
+ responses: {
1193
+ 200: {
1194
+ bodyMapper: CampaignBrief,
1195
+ },
1196
+ 201: {
1197
+ bodyMapper: CampaignBrief,
1198
+ },
1199
+ default: {
1200
+ bodyMapper: CommunicationErrorResponse,
1201
+ },
1202
+ },
1203
+ requestBody: body,
1204
+ queryParameters: [apiVersion],
1205
+ urlParameters: [
1206
+ endpoint,
1207
+ countryCode,
1208
+ campaignBriefId,
1209
+ ],
1210
+ headerParameters: [contentType, accept],
1211
+ mediaType: "json",
1212
+ serializer,
1213
+ };
1214
+ const deleteCampaignBriefOperationSpec = {
1215
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}",
1216
+ httpMethod: "DELETE",
1217
+ responses: {
1218
+ 204: {},
1219
+ default: {
1220
+ bodyMapper: CommunicationErrorResponse,
1221
+ },
1222
+ },
1223
+ queryParameters: [apiVersion],
1224
+ urlParameters: [
1225
+ endpoint,
1226
+ countryCode,
1227
+ campaignBriefId,
1228
+ ],
1229
+ headerParameters: [accept],
1230
+ serializer,
1231
+ };
1232
+ const getCampaignBriefOperationSpec = {
1233
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}",
1234
+ httpMethod: "GET",
1235
+ responses: {
1236
+ 200: {
1237
+ bodyMapper: CampaignBrief,
1238
+ },
1239
+ default: {
1240
+ bodyMapper: CommunicationErrorResponse,
1241
+ },
1242
+ },
1243
+ queryParameters: [apiVersion],
1244
+ urlParameters: [
1245
+ endpoint,
1246
+ countryCode,
1247
+ campaignBriefId,
1248
+ ],
1249
+ headerParameters: [accept],
1250
+ serializer,
1251
+ };
1252
+ const submitCampaignBriefOperationSpec = {
1253
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}/:submit",
1254
+ httpMethod: "POST",
1255
+ responses: {
1256
+ 200: {
1257
+ bodyMapper: CampaignBrief,
1258
+ },
1259
+ default: {
1260
+ bodyMapper: CommunicationErrorResponse,
1261
+ },
1262
+ },
1263
+ queryParameters: [apiVersion],
1264
+ urlParameters: [
1265
+ endpoint,
1266
+ countryCode,
1267
+ campaignBriefId,
1268
+ ],
1269
+ headerParameters: [accept],
1270
+ serializer,
1271
+ };
1272
+ const getAllCampaignBriefsByCountryCodeOperationSpec = {
1273
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs",
1274
+ httpMethod: "GET",
1275
+ responses: {
1276
+ 200: {
1277
+ bodyMapper: CampaignBriefs,
1278
+ },
1279
+ default: {
1280
+ bodyMapper: CommunicationErrorResponse,
1281
+ },
1282
+ },
1283
+ queryParameters: [apiVersion, skip, top],
1284
+ urlParameters: [endpoint, countryCode],
1285
+ headerParameters: [accept],
1286
+ serializer,
1287
+ };
1288
+ const getAllCampaignBriefSummariesOperationSpec = {
1289
+ path: "/tollfreeVerification/campaignBriefs",
1290
+ httpMethod: "GET",
1291
+ responses: {
1292
+ 200: {
1293
+ bodyMapper: CampaignBriefSummaries,
1294
+ },
1295
+ default: {
1296
+ bodyMapper: CommunicationErrorResponse,
1297
+ },
1298
+ },
1299
+ queryParameters: [apiVersion, skip, top],
1300
+ urlParameters: [endpoint],
1301
+ headerParameters: [accept],
1302
+ serializer,
1303
+ };
1304
+ const createOrReplaceCampaignBriefAttachmentOperationSpec = {
1305
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}/attachments/{attachmentId}",
1306
+ httpMethod: "PUT",
1307
+ responses: {
1308
+ 200: {
1309
+ bodyMapper: CampaignBriefAttachment,
1310
+ },
1311
+ 201: {
1312
+ bodyMapper: CampaignBriefAttachment,
1313
+ },
1314
+ default: {
1315
+ bodyMapper: CommunicationErrorResponse,
1316
+ },
1317
+ },
1318
+ requestBody: {
1319
+ parameterPath: {
1320
+ id: ["id"],
1321
+ typeParam: ["typeParam"],
1322
+ fileName: ["fileName"],
1323
+ fileSizeInBytes: ["options", "fileSizeInBytes"],
1324
+ fileType: ["fileType"],
1325
+ fileContentBase64: ["fileContentBase64"],
1326
+ },
1327
+ mapper: Object.assign(Object.assign({}, CampaignBriefAttachment), { required: true }),
1328
+ },
1329
+ queryParameters: [apiVersion],
1330
+ urlParameters: [
1331
+ endpoint,
1332
+ countryCode,
1333
+ campaignBriefId,
1334
+ attachmentId,
1335
+ ],
1336
+ headerParameters: [accept, contentType1],
1337
+ mediaType: "json",
1338
+ serializer,
1339
+ };
1340
+ const deleteCampaignBriefAttachmentOperationSpec = {
1341
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}/attachments/{attachmentId}",
1342
+ httpMethod: "DELETE",
1343
+ responses: {
1344
+ 204: {},
1345
+ default: {
1346
+ bodyMapper: CommunicationErrorResponse,
1347
+ },
1348
+ },
1349
+ queryParameters: [apiVersion],
1350
+ urlParameters: [
1351
+ endpoint,
1352
+ countryCode,
1353
+ campaignBriefId,
1354
+ attachmentId,
1355
+ ],
1356
+ headerParameters: [accept],
1357
+ serializer,
1358
+ };
1359
+ const getCampaignBriefAttachmentOperationSpec = {
1360
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}/attachments/{attachmentId}",
1361
+ httpMethod: "GET",
1362
+ responses: {
1363
+ 200: {
1364
+ bodyMapper: CampaignBriefAttachment,
1365
+ },
1366
+ default: {
1367
+ bodyMapper: CommunicationErrorResponse,
1368
+ },
1369
+ },
1370
+ queryParameters: [apiVersion],
1371
+ urlParameters: [
1372
+ endpoint,
1373
+ countryCode,
1374
+ campaignBriefId,
1375
+ attachmentId,
1376
+ ],
1377
+ headerParameters: [accept],
1378
+ serializer,
1379
+ };
1380
+ const getCampaignBriefAttachmentsOperationSpec = {
1381
+ path: "/tollfreeVerification/countries/{countryCode}/campaignBriefs/{campaignBriefId}/attachments",
1382
+ httpMethod: "GET",
1383
+ responses: {
1384
+ 200: {
1385
+ bodyMapper: CampaignBriefAttachments,
1386
+ },
1387
+ default: {
1388
+ bodyMapper: CommunicationErrorResponse,
1389
+ },
1390
+ },
1391
+ queryParameters: [apiVersion, skip, top],
1392
+ urlParameters: [
1393
+ endpoint,
1394
+ countryCode,
1395
+ campaignBriefId,
1396
+ ],
1397
+ headerParameters: [accept],
1398
+ serializer,
1399
+ };
1400
+ const getAllCampaignBriefsByCountryCodeNextOperationSpec = {
1401
+ path: "{nextLink}",
1402
+ httpMethod: "GET",
1403
+ responses: {
1404
+ 200: {
1405
+ bodyMapper: CampaignBriefs,
1406
+ },
1407
+ default: {
1408
+ bodyMapper: CommunicationErrorResponse,
1409
+ },
1410
+ },
1411
+ urlParameters: [
1412
+ endpoint,
1413
+ countryCode,
1414
+ nextLink,
1415
+ ],
1416
+ headerParameters: [accept],
1417
+ serializer,
1418
+ };
1419
+ const getAllCampaignBriefSummariesNextOperationSpec = {
1420
+ path: "{nextLink}",
1421
+ httpMethod: "GET",
1422
+ responses: {
1423
+ 200: {
1424
+ bodyMapper: CampaignBriefSummaries,
1425
+ },
1426
+ default: {
1427
+ bodyMapper: CommunicationErrorResponse,
1428
+ },
1429
+ },
1430
+ urlParameters: [endpoint, nextLink],
1431
+ headerParameters: [accept],
1432
+ serializer,
1433
+ };
1434
+ const getCampaignBriefAttachmentsNextOperationSpec = {
1435
+ path: "{nextLink}",
1436
+ httpMethod: "GET",
1437
+ responses: {
1438
+ 200: {
1439
+ bodyMapper: CampaignBriefAttachments,
1440
+ },
1441
+ default: {
1442
+ bodyMapper: CommunicationErrorResponse,
1443
+ },
1444
+ },
1445
+ urlParameters: [
1446
+ endpoint,
1447
+ countryCode,
1448
+ campaignBriefId,
1449
+ nextLink,
1450
+ ],
1451
+ headerParameters: [accept],
1452
+ serializer,
1453
+ };
1454
+
1455
+ /*
1456
+ * Copyright (c) Microsoft Corporation.
1457
+ * Licensed under the MIT License.
1458
+ *
1459
+ * Code generated by Microsoft (R) AutoRest Code Generator.
1460
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
1461
+ */
1462
+ let TollFreeVerificationClient$1 = class TollFreeVerificationClient extends coreClient__namespace.ServiceClient {
1463
+ /**
1464
+ * Initializes a new instance of the TollFreeVerificationClient class.
1465
+ * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
1466
+ * @param options The parameter options
1467
+ */
1468
+ constructor(endpoint, options) {
1469
+ var _a, _b;
1470
+ if (endpoint === undefined) {
1471
+ throw new Error("'endpoint' cannot be null");
1472
+ }
1473
+ // Initializing default values for options
1474
+ if (!options) {
1475
+ options = {};
1476
+ }
1477
+ const defaults = {
1478
+ requestContentType: "application/json; charset=utf-8",
1479
+ };
1480
+ const packageDetails = `azsdk-js-communication-toll-free-verification/1.0.0-beta.1`;
1481
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1482
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1483
+ : `${packageDetails}`;
1484
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1485
+ userAgentPrefix,
1486
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
1487
+ super(optionsWithDefaults);
1488
+ // Parameter assignments
1489
+ this.endpoint = endpoint;
1490
+ // Assigning values to Constant parameters
1491
+ this.apiVersion = options.apiVersion || "2023-01-10-preview1";
1492
+ this.tollFreeVerification = new TollFreeVerificationImpl(this);
1493
+ this.addCustomApiVersionPolicy(options.apiVersion);
1494
+ }
1495
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
1496
+ addCustomApiVersionPolicy(apiVersion) {
1497
+ if (!apiVersion) {
1498
+ return;
1499
+ }
1500
+ const apiVersionPolicy = {
1501
+ name: "CustomApiVersionPolicy",
1502
+ async sendRequest(request, next) {
1503
+ const param = request.url.split("?");
1504
+ if (param.length > 1) {
1505
+ const newParams = param[1].split("&").map((item) => {
1506
+ if (item.indexOf("api-version") > -1) {
1507
+ return "api-version=" + apiVersion;
1508
+ }
1509
+ else {
1510
+ return item;
1511
+ }
1512
+ });
1513
+ request.url = param[0] + "?" + newParams.join("&");
1514
+ }
1515
+ return next(request);
1516
+ },
1517
+ };
1518
+ this.pipeline.addPolicy(apiVersionPolicy);
1519
+ }
1520
+ };
1521
+
1522
+ // Copyright (c) Microsoft Corporation.
1523
+ // Licensed under the MIT License.
1524
+ /**
1525
+ * The \@azure\/logger configuration for this package.
1526
+ */
1527
+ const logger = logger$1.createClientLogger("communication-toll-free-verification");
1528
+
1529
+ const isTollFreeVerificationClientOptions = (options) => options && !communicationCommon.isKeyCredential(options) && !coreAuth.isTokenCredential(options);
1530
+ class TollFreeVerificationClient {
1531
+ constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
1532
+ const { url, credential } = communicationCommon.parseClientArguments(connectionStringOrUrl, credentialOrOptions);
1533
+ const options = isTollFreeVerificationClientOptions(credentialOrOptions)
1534
+ ? credentialOrOptions
1535
+ : maybeOptions;
1536
+ const internalPipelineOptions = Object.assign(Object.assign({}, options), {
1537
+ loggingOptions: {
1538
+ logger: logger.info,
1539
+ },
1540
+ });
1541
+ this.client = new TollFreeVerificationClient$1(url, internalPipelineOptions);
1542
+ const authPolicy = communicationCommon.createCommunicationAuthPolicy(credential);
1543
+ this.client.pipeline.addPolicy(authPolicy);
1544
+ }
1545
+ getCampaignBrief(campaignBriefId, countryCode, options = {}) {
1546
+ return tracingClient.withSpan("TollFreeVerificationClient-getCampaignBrief", options, async (updatedOptions) => {
1547
+ return this.client.tollFreeVerification.getCampaignBrief(countryCode, campaignBriefId, updatedOptions);
1548
+ });
1549
+ }
1550
+ listCampaignBriefs(options = {}) {
1551
+ const { span, updatedOptions } = tracingClient.startSpan("TollFreeVerificationClient-listCampaignBriefs", options);
1552
+ try {
1553
+ return this.client.tollFreeVerification.listAllCampaignBriefSummaries(updatedOptions);
1554
+ }
1555
+ catch (e) {
1556
+ span.setStatus({
1557
+ status: "error",
1558
+ error: e,
1559
+ });
1560
+ throw e;
1561
+ }
1562
+ finally {
1563
+ span.end();
1564
+ }
1565
+ }
1566
+ upsertCampaignBrief(campaignBriefId, countryCode, options = {}) {
1567
+ return tracingClient.withSpan("TollFreeVerificationClient-upsertCampaignBrief", options, async (updatedOptions) => {
1568
+ return this.client.tollFreeVerification.upsertCampaignBrief(countryCode, campaignBriefId, updatedOptions);
1569
+ });
1570
+ }
1571
+ deleteCampaignBrief(campaignBriefId, countryCode, options = {}) {
1572
+ return tracingClient.withSpan("TollFreeVerificationClient-deleteCampaignBrief", options, async (updatedOptions) => {
1573
+ return this.client.tollFreeVerification.deleteCampaignBrief(countryCode, campaignBriefId, updatedOptions);
1574
+ });
1575
+ }
1576
+ submitCampaignBrief(campaignBriefId, countryCode, options = {}) {
1577
+ return tracingClient.withSpan("TollFreeVerificationClient-upsertCampaignBrief", options, async (updatedOptions) => {
1578
+ return this.client.tollFreeVerification.submitCampaignBrief(countryCode, campaignBriefId, updatedOptions);
1579
+ });
1580
+ }
1581
+ upsertCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, attachmentType, fileName, fileType, fileContentBase64, options = {}) {
1582
+ return tracingClient.withSpan("TollFreeVerificationClient-upsertCampaignBriefAttachment", options, async (updatedOptions) => {
1583
+ return this.client.tollFreeVerification.createOrReplaceCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, attachmentId, attachmentType, fileName, fileType, fileContentBase64, updatedOptions);
1584
+ });
1585
+ }
1586
+ deleteCampaignBriefAttachment(campaignBriefId, attachmentId, countryCode, options = {}) {
1587
+ return tracingClient.withSpan("TollFreeVerificationClient-deleteCampaignBriefAttachment", options, async (updatedOptions) => {
1588
+ return this.client.tollFreeVerification.deleteCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, updatedOptions);
1589
+ });
1590
+ }
1591
+ listCampaignBriefAttachments(countryCode, campaignBriefId, options = {}) {
1592
+ const { span, updatedOptions } = tracingClient.startSpan("TollFreeVerificationClient-listCampaignBriefAttachments", options);
1593
+ try {
1594
+ return this.client.tollFreeVerification.listCampaignBriefAttachments(countryCode, campaignBriefId, updatedOptions);
1595
+ }
1596
+ catch (e) {
1597
+ span.setStatus({
1598
+ status: "error",
1599
+ error: e,
1600
+ });
1601
+ throw e;
1602
+ }
1603
+ finally {
1604
+ span.end();
1605
+ }
1606
+ }
1607
+ getCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, options = {}) {
1608
+ return tracingClient.withSpan("TollFreeVerificationClient-getCampaignBriefAttachment", options, async (updatedOptions) => {
1609
+ return this.client.tollFreeVerification.getCampaignBriefAttachment(countryCode, campaignBriefId, attachmentId, updatedOptions);
1610
+ });
1611
+ }
1612
+ }
1613
+
1614
+ exports.BusinessInformationMapper = BusinessInformation;
1615
+ exports.BusinessPointOfContactMapper = BusinessPointOfContact;
1616
+ exports.TollFreeVerificationClient = TollFreeVerificationClient;
1617
+ //# sourceMappingURL=index.js.map