@azure/communication-phone-numbers 1.5.0-beta.1 → 1.5.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 (186) hide show
  1. package/README.md +20 -1
  2. package/dist/browser/generated/src/phoneNumbersClient.js +1 -1
  3. package/dist/browser/generated/src/phoneNumbersClient.js.map +1 -1
  4. package/dist/browser/generated/src/siprouting/index.d.ts +0 -1
  5. package/dist/browser/generated/src/siprouting/index.d.ts.map +1 -1
  6. package/dist/browser/generated/src/siprouting/index.js +0 -1
  7. package/dist/browser/generated/src/siprouting/index.js.map +1 -1
  8. package/dist/browser/generated/src/siprouting/models/index.d.ts +141 -2
  9. package/dist/browser/generated/src/siprouting/models/index.d.ts.map +1 -1
  10. package/dist/browser/generated/src/siprouting/models/index.js +6 -1
  11. package/dist/browser/generated/src/siprouting/models/index.js.map +1 -1
  12. package/dist/browser/generated/src/siprouting/models/mappers.d.ts +7 -0
  13. package/dist/browser/generated/src/siprouting/models/mappers.d.ts.map +1 -1
  14. package/dist/browser/generated/src/siprouting/models/mappers.js +284 -77
  15. package/dist/browser/generated/src/siprouting/models/mappers.js.map +1 -1
  16. package/dist/browser/generated/src/siprouting/models/parameters.d.ts +7 -0
  17. package/dist/browser/generated/src/siprouting/models/parameters.d.ts.map +1 -1
  18. package/dist/browser/generated/src/siprouting/models/parameters.js +62 -16
  19. package/dist/browser/generated/src/siprouting/models/parameters.js.map +1 -1
  20. package/dist/browser/generated/src/siprouting/operations/sipRouting.d.ts +9 -3
  21. package/dist/browser/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -1
  22. package/dist/browser/generated/src/siprouting/operations/sipRouting.js +45 -11
  23. package/dist/browser/generated/src/siprouting/operations/sipRouting.js.map +1 -1
  24. package/dist/browser/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +7 -1
  25. package/dist/browser/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -1
  26. package/dist/browser/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -1
  27. package/dist/browser/generated/src/siprouting/sipRoutingClient.d.ts +6 -2
  28. package/dist/browser/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -1
  29. package/dist/browser/generated/src/siprouting/sipRoutingClient.js +51 -3
  30. package/dist/browser/generated/src/siprouting/sipRoutingClient.js.map +1 -1
  31. package/dist/browser/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  32. package/dist/browser/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  33. package/dist/browser/generated/src/tracing.js +1 -1
  34. package/dist/browser/generated/src/tracing.js.map +1 -1
  35. package/dist/browser/mappers.d.ts +17 -3
  36. package/dist/browser/mappers.d.ts.map +1 -1
  37. package/dist/browser/mappers.js +51 -2
  38. package/dist/browser/mappers.js.map +1 -1
  39. package/dist/browser/models.d.ts +60 -1
  40. package/dist/browser/models.d.ts.map +1 -1
  41. package/dist/browser/models.js.map +1 -1
  42. package/dist/browser/sipRoutingClient.d.ts +41 -1
  43. package/dist/browser/sipRoutingClient.d.ts.map +1 -1
  44. package/dist/browser/sipRoutingClient.js +158 -2
  45. package/dist/browser/sipRoutingClient.js.map +1 -1
  46. package/dist/browser/utils/constants.js +1 -1
  47. package/dist/browser/utils/constants.js.map +1 -1
  48. package/dist/commonjs/generated/src/phoneNumbersClient.js +1 -1
  49. package/dist/commonjs/generated/src/phoneNumbersClient.js.map +1 -1
  50. package/dist/commonjs/generated/src/siprouting/index.d.ts +0 -1
  51. package/dist/commonjs/generated/src/siprouting/index.d.ts.map +1 -1
  52. package/dist/commonjs/generated/src/siprouting/index.js +1 -3
  53. package/dist/commonjs/generated/src/siprouting/index.js.map +1 -1
  54. package/dist/commonjs/generated/src/siprouting/models/index.d.ts +141 -2
  55. package/dist/commonjs/generated/src/siprouting/models/index.d.ts.map +1 -1
  56. package/dist/commonjs/generated/src/siprouting/models/index.js +7 -0
  57. package/dist/commonjs/generated/src/siprouting/models/index.js.map +1 -1
  58. package/dist/commonjs/generated/src/siprouting/models/mappers.d.ts +7 -0
  59. package/dist/commonjs/generated/src/siprouting/models/mappers.d.ts.map +1 -1
  60. package/dist/commonjs/generated/src/siprouting/models/mappers.js +285 -78
  61. package/dist/commonjs/generated/src/siprouting/models/mappers.js.map +1 -1
  62. package/dist/commonjs/generated/src/siprouting/models/parameters.d.ts +7 -0
  63. package/dist/commonjs/generated/src/siprouting/models/parameters.d.ts.map +1 -1
  64. package/dist/commonjs/generated/src/siprouting/models/parameters.js +62 -16
  65. package/dist/commonjs/generated/src/siprouting/models/parameters.js.map +1 -1
  66. package/dist/commonjs/generated/src/siprouting/operations/sipRouting.d.ts +9 -3
  67. package/dist/commonjs/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -1
  68. package/dist/commonjs/generated/src/siprouting/operations/sipRouting.js +45 -11
  69. package/dist/commonjs/generated/src/siprouting/operations/sipRouting.js.map +1 -1
  70. package/dist/commonjs/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +7 -1
  71. package/dist/commonjs/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -1
  72. package/dist/commonjs/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -1
  73. package/dist/commonjs/generated/src/siprouting/sipRoutingClient.d.ts +6 -2
  74. package/dist/commonjs/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -1
  75. package/dist/commonjs/generated/src/siprouting/sipRoutingClient.js +52 -3
  76. package/dist/commonjs/generated/src/siprouting/sipRoutingClient.js.map +1 -1
  77. package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  78. package/dist/commonjs/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  79. package/dist/commonjs/generated/src/tracing.js +1 -1
  80. package/dist/commonjs/generated/src/tracing.js.map +1 -1
  81. package/dist/commonjs/mappers.d.ts +17 -3
  82. package/dist/commonjs/mappers.d.ts.map +1 -1
  83. package/dist/commonjs/mappers.js +53 -2
  84. package/dist/commonjs/mappers.js.map +1 -1
  85. package/dist/commonjs/models.d.ts +60 -1
  86. package/dist/commonjs/models.d.ts.map +1 -1
  87. package/dist/commonjs/models.js.map +1 -1
  88. package/dist/commonjs/sipRoutingClient.d.ts +41 -1
  89. package/dist/commonjs/sipRoutingClient.d.ts.map +1 -1
  90. package/dist/commonjs/sipRoutingClient.js +157 -1
  91. package/dist/commonjs/sipRoutingClient.js.map +1 -1
  92. package/dist/commonjs/utils/constants.js +1 -1
  93. package/dist/commonjs/utils/constants.js.map +1 -1
  94. package/dist/esm/generated/src/phoneNumbersClient.js +1 -1
  95. package/dist/esm/generated/src/phoneNumbersClient.js.map +1 -1
  96. package/dist/esm/generated/src/siprouting/index.d.ts +0 -1
  97. package/dist/esm/generated/src/siprouting/index.d.ts.map +1 -1
  98. package/dist/esm/generated/src/siprouting/index.js +0 -1
  99. package/dist/esm/generated/src/siprouting/index.js.map +1 -1
  100. package/dist/esm/generated/src/siprouting/models/index.d.ts +141 -2
  101. package/dist/esm/generated/src/siprouting/models/index.d.ts.map +1 -1
  102. package/dist/esm/generated/src/siprouting/models/index.js +6 -1
  103. package/dist/esm/generated/src/siprouting/models/index.js.map +1 -1
  104. package/dist/esm/generated/src/siprouting/models/mappers.d.ts +7 -0
  105. package/dist/esm/generated/src/siprouting/models/mappers.d.ts.map +1 -1
  106. package/dist/esm/generated/src/siprouting/models/mappers.js +284 -77
  107. package/dist/esm/generated/src/siprouting/models/mappers.js.map +1 -1
  108. package/dist/esm/generated/src/siprouting/models/parameters.d.ts +7 -0
  109. package/dist/esm/generated/src/siprouting/models/parameters.d.ts.map +1 -1
  110. package/dist/esm/generated/src/siprouting/models/parameters.js +62 -16
  111. package/dist/esm/generated/src/siprouting/models/parameters.js.map +1 -1
  112. package/dist/esm/generated/src/siprouting/operations/sipRouting.d.ts +9 -3
  113. package/dist/esm/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -1
  114. package/dist/esm/generated/src/siprouting/operations/sipRouting.js +45 -11
  115. package/dist/esm/generated/src/siprouting/operations/sipRouting.js.map +1 -1
  116. package/dist/esm/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +7 -1
  117. package/dist/esm/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -1
  118. package/dist/esm/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -1
  119. package/dist/esm/generated/src/siprouting/sipRoutingClient.d.ts +6 -2
  120. package/dist/esm/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -1
  121. package/dist/esm/generated/src/siprouting/sipRoutingClient.js +51 -3
  122. package/dist/esm/generated/src/siprouting/sipRoutingClient.js.map +1 -1
  123. package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  124. package/dist/esm/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  125. package/dist/esm/generated/src/tracing.js +1 -1
  126. package/dist/esm/generated/src/tracing.js.map +1 -1
  127. package/dist/esm/mappers.d.ts +17 -3
  128. package/dist/esm/mappers.d.ts.map +1 -1
  129. package/dist/esm/mappers.js +51 -2
  130. package/dist/esm/mappers.js.map +1 -1
  131. package/dist/esm/models.d.ts +60 -1
  132. package/dist/esm/models.d.ts.map +1 -1
  133. package/dist/esm/models.js.map +1 -1
  134. package/dist/esm/sipRoutingClient.d.ts +41 -1
  135. package/dist/esm/sipRoutingClient.d.ts.map +1 -1
  136. package/dist/esm/sipRoutingClient.js +158 -2
  137. package/dist/esm/sipRoutingClient.js.map +1 -1
  138. package/dist/esm/utils/constants.js +1 -1
  139. package/dist/esm/utils/constants.js.map +1 -1
  140. package/dist/react-native/generated/src/phoneNumbersClient.js +1 -1
  141. package/dist/react-native/generated/src/phoneNumbersClient.js.map +1 -1
  142. package/dist/react-native/generated/src/siprouting/index.d.ts +0 -1
  143. package/dist/react-native/generated/src/siprouting/index.d.ts.map +1 -1
  144. package/dist/react-native/generated/src/siprouting/index.js +0 -1
  145. package/dist/react-native/generated/src/siprouting/index.js.map +1 -1
  146. package/dist/react-native/generated/src/siprouting/models/index.d.ts +141 -2
  147. package/dist/react-native/generated/src/siprouting/models/index.d.ts.map +1 -1
  148. package/dist/react-native/generated/src/siprouting/models/index.js +6 -1
  149. package/dist/react-native/generated/src/siprouting/models/index.js.map +1 -1
  150. package/dist/react-native/generated/src/siprouting/models/mappers.d.ts +7 -0
  151. package/dist/react-native/generated/src/siprouting/models/mappers.d.ts.map +1 -1
  152. package/dist/react-native/generated/src/siprouting/models/mappers.js +284 -77
  153. package/dist/react-native/generated/src/siprouting/models/mappers.js.map +1 -1
  154. package/dist/react-native/generated/src/siprouting/models/parameters.d.ts +7 -0
  155. package/dist/react-native/generated/src/siprouting/models/parameters.d.ts.map +1 -1
  156. package/dist/react-native/generated/src/siprouting/models/parameters.js +62 -16
  157. package/dist/react-native/generated/src/siprouting/models/parameters.js.map +1 -1
  158. package/dist/react-native/generated/src/siprouting/operations/sipRouting.d.ts +9 -3
  159. package/dist/react-native/generated/src/siprouting/operations/sipRouting.d.ts.map +1 -1
  160. package/dist/react-native/generated/src/siprouting/operations/sipRouting.js +45 -11
  161. package/dist/react-native/generated/src/siprouting/operations/sipRouting.js.map +1 -1
  162. package/dist/react-native/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts +7 -1
  163. package/dist/react-native/generated/src/siprouting/operationsInterfaces/sipRouting.d.ts.map +1 -1
  164. package/dist/react-native/generated/src/siprouting/operationsInterfaces/sipRouting.js.map +1 -1
  165. package/dist/react-native/generated/src/siprouting/sipRoutingClient.d.ts +6 -2
  166. package/dist/react-native/generated/src/siprouting/sipRoutingClient.d.ts.map +1 -1
  167. package/dist/react-native/generated/src/siprouting/sipRoutingClient.js +51 -3
  168. package/dist/react-native/generated/src/siprouting/sipRoutingClient.js.map +1 -1
  169. package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js +1 -1
  170. package/dist/react-native/generated/src/siprouting/sipRoutingClientContext.js.map +1 -1
  171. package/dist/react-native/generated/src/tracing.js +1 -1
  172. package/dist/react-native/generated/src/tracing.js.map +1 -1
  173. package/dist/react-native/mappers.d.ts +17 -3
  174. package/dist/react-native/mappers.d.ts.map +1 -1
  175. package/dist/react-native/mappers.js +51 -2
  176. package/dist/react-native/mappers.js.map +1 -1
  177. package/dist/react-native/models.d.ts +60 -1
  178. package/dist/react-native/models.d.ts.map +1 -1
  179. package/dist/react-native/models.js.map +1 -1
  180. package/dist/react-native/sipRoutingClient.d.ts +41 -1
  181. package/dist/react-native/sipRoutingClient.d.ts.map +1 -1
  182. package/dist/react-native/sipRoutingClient.js +158 -2
  183. package/dist/react-native/sipRoutingClient.js.map +1 -1
  184. package/dist/react-native/utils/constants.js +1 -1
  185. package/dist/react-native/utils/constants.js.map +1 -1
  186. package/package.json +2 -1
@@ -7,7 +7,7 @@
7
7
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.routes = exports.trunks = exports.contentType = exports.apiVersion = exports.endpoint = exports.accept = void 0;
10
+ exports.targetPhoneNumber = exports.routes1 = exports.trunks1 = exports.domains1 = exports.contentType1 = exports.routes = exports.trunks = exports.domains = exports.contentType = exports.expand = exports.apiVersion = exports.endpoint = exports.accept = void 0;
11
11
  const mappers_js_1 = require("../models/mappers.js");
12
12
  exports.accept = {
13
13
  parameterPath: "accept",
@@ -16,9 +16,9 @@ exports.accept = {
16
16
  isConstant: true,
17
17
  serializedName: "Accept",
18
18
  type: {
19
- name: "String"
20
- }
21
- }
19
+ name: "String",
20
+ },
21
+ },
22
22
  };
23
23
  exports.endpoint = {
24
24
  parameterPath: "endpoint",
@@ -26,21 +26,30 @@ exports.endpoint = {
26
26
  serializedName: "endpoint",
27
27
  required: true,
28
28
  type: {
29
- name: "String"
30
- }
29
+ name: "String",
30
+ },
31
31
  },
32
- skipEncoding: true
32
+ skipEncoding: true,
33
33
  };
34
34
  exports.apiVersion = {
35
35
  parameterPath: "apiVersion",
36
36
  mapper: {
37
- defaultValue: "2023-03-01",
37
+ defaultValue: "2024-11-15-preview",
38
38
  isConstant: true,
39
39
  serializedName: "api-version",
40
40
  type: {
41
- name: "String"
42
- }
43
- }
41
+ name: "String",
42
+ },
43
+ },
44
+ };
45
+ exports.expand = {
46
+ parameterPath: ["options", "expand"],
47
+ mapper: {
48
+ serializedName: "expand",
49
+ type: {
50
+ name: "String",
51
+ },
52
+ },
44
53
  };
45
54
  exports.contentType = {
46
55
  parameterPath: ["options", "contentType"],
@@ -49,16 +58,53 @@ exports.contentType = {
49
58
  isConstant: true,
50
59
  serializedName: "Content-Type",
51
60
  type: {
52
- name: "String"
53
- }
54
- }
61
+ name: "String",
62
+ },
63
+ },
64
+ };
65
+ exports.domains = {
66
+ parameterPath: ["options", "domains"],
67
+ mapper: mappers_js_1.SipConfigurationUpdate,
55
68
  };
56
69
  exports.trunks = {
57
70
  parameterPath: ["options", "trunks"],
58
- mapper: mappers_js_1.SipConfigurationUpdate
71
+ mapper: mappers_js_1.SipConfigurationUpdate,
59
72
  };
60
73
  exports.routes = {
61
74
  parameterPath: ["options", "routes"],
62
- mapper: mappers_js_1.SipConfigurationUpdate
75
+ mapper: mappers_js_1.SipConfigurationUpdate,
76
+ };
77
+ exports.contentType1 = {
78
+ parameterPath: ["options", "contentType"],
79
+ mapper: {
80
+ defaultValue: "application/json",
81
+ isConstant: true,
82
+ serializedName: "Content-Type",
83
+ type: {
84
+ name: "String",
85
+ },
86
+ },
87
+ };
88
+ exports.domains1 = {
89
+ parameterPath: ["options", "domains"],
90
+ mapper: mappers_js_1.SipConfiguration,
91
+ };
92
+ exports.trunks1 = {
93
+ parameterPath: ["options", "trunks"],
94
+ mapper: mappers_js_1.SipConfiguration,
95
+ };
96
+ exports.routes1 = {
97
+ parameterPath: ["options", "routes"],
98
+ mapper: mappers_js_1.SipConfiguration,
99
+ };
100
+ exports.targetPhoneNumber = {
101
+ parameterPath: "targetPhoneNumber",
102
+ mapper: {
103
+ serializedName: "targetPhoneNumber",
104
+ required: true,
105
+ type: {
106
+ name: "String",
107
+ },
108
+ },
63
109
  };
64
110
  //# sourceMappingURL=parameters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/models/parameters.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAOH,qDAA8F;AAEjF,QAAA,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;AAEW,QAAA,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;AAEW,QAAA,UAAU,GAA4B;IACjD,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE;QACN,YAAY,EAAE,YAAY;QAC1B,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,aAAa;QAC7B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEW,QAAA,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;AAEW,QAAA,MAAM,GAAuB;IACxC,aAAa,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpC,MAAM,EAAE,mCAA4B;CACrC,CAAC;AAEW,QAAA,MAAM,GAAuB;IACxC,aAAa,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpC,MAAM,EAAE,mCAA4B;CACrC,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 { SipConfigurationUpdate as SipConfigurationUpdateMapper } from \"../models/mappers.js\";\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: \"2023-03-01\",\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 trunks: OperationParameter = {\n parameterPath: [\"options\", \"trunks\"],\n mapper: SipConfigurationUpdateMapper\n};\n\nexport const routes: OperationParameter = {\n parameterPath: [\"options\", \"routes\"],\n mapper: SipConfigurationUpdateMapper\n};\n"]}
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/models/parameters.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAOH,qDAG8B;AAEjB,QAAA,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;AAEW,QAAA,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;AAEW,QAAA,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;AAEW,QAAA,MAAM,GAA4B;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpC,MAAM,EAAE;QACN,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEW,QAAA,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;AAEW,QAAA,OAAO,GAAuB;IACzC,aAAa,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACrC,MAAM,EAAE,mCAA4B;CACrC,CAAC;AAEW,QAAA,MAAM,GAAuB;IACxC,aAAa,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpC,MAAM,EAAE,mCAA4B;CACrC,CAAC;AAEW,QAAA,MAAM,GAAuB;IACxC,aAAa,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpC,MAAM,EAAE,mCAA4B;CACrC,CAAC;AAEW,QAAA,YAAY,GAAuB;IAC9C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEW,QAAA,QAAQ,GAAuB;IAC1C,aAAa,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACrC,MAAM,EAAE,6BAAsB;CAC/B,CAAC;AAEW,QAAA,OAAO,GAAuB;IACzC,aAAa,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpC,MAAM,EAAE,6BAAsB;CAC/B,CAAC;AAEW,QAAA,OAAO,GAAuB;IACzC,aAAa,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACpC,MAAM,EAAE,6BAAsB;CAC/B,CAAC;AAEW,QAAA,iBAAiB,GAA4B;IACxD,aAAa,EAAE,mBAAmB;IAClC,MAAM,EAAE;QACN,cAAc,EAAE,mBAAmB;QACnC,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;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 {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter,\n} from \"@azure/core-client\";\nimport {\n SipConfigurationUpdate as SipConfigurationUpdateMapper,\n SipConfiguration as SipConfigurationMapper,\n} from \"../models/mappers.js\";\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: \"2024-11-15-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\",\n },\n },\n};\n\nexport const expand: OperationQueryParameter = {\n parameterPath: [\"options\", \"expand\"],\n mapper: {\n serializedName: \"expand\",\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 domains: OperationParameter = {\n parameterPath: [\"options\", \"domains\"],\n mapper: SipConfigurationUpdateMapper,\n};\n\nexport const trunks: OperationParameter = {\n parameterPath: [\"options\", \"trunks\"],\n mapper: SipConfigurationUpdateMapper,\n};\n\nexport const routes: OperationParameter = {\n parameterPath: [\"options\", \"routes\"],\n mapper: SipConfigurationUpdateMapper,\n};\n\nexport const contentType1: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\",\n },\n },\n};\n\nexport const domains1: OperationParameter = {\n parameterPath: [\"options\", \"domains\"],\n mapper: SipConfigurationMapper,\n};\n\nexport const trunks1: OperationParameter = {\n parameterPath: [\"options\", \"trunks\"],\n mapper: SipConfigurationMapper,\n};\n\nexport const routes1: OperationParameter = {\n parameterPath: [\"options\", \"routes\"],\n mapper: SipConfigurationMapper,\n};\n\nexport const targetPhoneNumber: OperationQueryParameter = {\n parameterPath: \"targetPhoneNumber\",\n mapper: {\n serializedName: \"targetPhoneNumber\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n};\n"]}
@@ -1,6 +1,6 @@
1
1
  import { SipRouting } from "../operationsInterfaces/index.js";
2
- import { SipRoutingClientContext } from "../sipRoutingClientContext.js";
3
- import { SipRoutingGetOptionalParams, SipRoutingGetResponse, SipRoutingUpdateOptionalParams, SipRoutingUpdateResponse } from "../models/index.js";
2
+ import { SipRoutingClient } from "../sipRoutingClient.js";
3
+ import { SipRoutingGetOptionalParams, SipRoutingGetResponse, SipRoutingUpdateOptionalParams, SipRoutingUpdateResponse, SipRoutingTestRoutesWithNumberOptionalParams, SipRoutingTestRoutesWithNumberResponse } from "../models/index.js";
4
4
  /** Class containing SipRouting operations. */
5
5
  export declare class SipRoutingImpl implements SipRouting {
6
6
  private readonly client;
@@ -8,7 +8,7 @@ export declare class SipRoutingImpl implements SipRouting {
8
8
  * Initialize a new instance of the class SipRouting class.
9
9
  * @param client Reference to the service client
10
10
  */
11
- constructor(client: SipRoutingClientContext);
11
+ constructor(client: SipRoutingClient);
12
12
  /**
13
13
  * Gets SIP configuration for resource.
14
14
  * @param options The options parameters.
@@ -19,5 +19,11 @@ export declare class SipRoutingImpl implements SipRouting {
19
19
  * @param options The options parameters.
20
20
  */
21
21
  update(options?: SipRoutingUpdateOptionalParams): Promise<SipRoutingUpdateResponse>;
22
+ /**
23
+ * Gets the list of routes matching the target phone number, ordered by priority.
24
+ * @param targetPhoneNumber Phone number to test routing patterns against
25
+ * @param options The options parameters.
26
+ */
27
+ testRoutesWithNumber(targetPhoneNumber: string, options?: SipRoutingTestRoutesWithNumberOptionalParams): Promise<SipRoutingTestRoutesWithNumberResponse>;
22
28
  }
23
29
  //# sourceMappingURL=sipRouting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sipRouting.d.ts","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operations/sipRouting.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAE5B,8CAA8C;AAC9C,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IAEjD;;;OAGG;gBACS,MAAM,EAAE,uBAAuB;IAI3C;;;OAGG;IACH,GAAG,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI1E;;;OAGG;IACH,MAAM,CACJ,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC;CAGrC"}
1
+ {"version":3,"file":"sipRouting.d.ts","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operations/sipRouting.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAI9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,8BAA8B,EAC9B,wBAAwB,EACxB,4CAA4C,EAC5C,sCAAsC,EACvC,MAAM,oBAAoB,CAAC;AAE5B,8CAA8C;AAC9C,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;IAE1C;;;OAGG;gBACS,MAAM,EAAE,gBAAgB;IAIpC;;;OAGG;IACH,GAAG,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAI1E;;;OAGG;IACH,MAAM,CACJ,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC;IAIpC;;;;OAIG;IACH,oBAAoB,CAClB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,4CAA4C,GACrD,OAAO,CAAC,sCAAsC,CAAC;CAMnD"}
@@ -35,6 +35,14 @@ class SipRoutingImpl {
35
35
  update(options) {
36
36
  return this.client.sendOperationRequest({ options }, updateOperationSpec);
37
37
  }
38
+ /**
39
+ * Gets the list of routes matching the target phone number, ordered by priority.
40
+ * @param targetPhoneNumber Phone number to test routing patterns against
41
+ * @param options The options parameters.
42
+ */
43
+ testRoutesWithNumber(targetPhoneNumber, options) {
44
+ return this.client.sendOperationRequest({ targetPhoneNumber, options }, testRoutesWithNumberOperationSpec);
45
+ }
38
46
  }
39
47
  exports.SipRoutingImpl = SipRoutingImpl;
40
48
  // Operation Specifications
@@ -44,41 +52,67 @@ const getOperationSpec = {
44
52
  httpMethod: "GET",
45
53
  responses: {
46
54
  200: {
47
- bodyMapper: Mappers.SipConfiguration
55
+ bodyMapper: Mappers.SipConfiguration,
48
56
  },
49
57
  default: {
50
58
  bodyMapper: Mappers.CommunicationErrorResponse,
51
- headersMapper: Mappers.SipRoutingGetExceptionHeaders
52
- }
59
+ headersMapper: Mappers.SipRoutingGetExceptionHeaders,
60
+ },
53
61
  },
54
- queryParameters: [Parameters.apiVersion],
62
+ queryParameters: [Parameters.apiVersion, Parameters.expand],
55
63
  urlParameters: [Parameters.endpoint],
56
64
  headerParameters: [Parameters.accept],
57
- serializer
65
+ serializer,
58
66
  };
59
67
  const updateOperationSpec = {
60
68
  path: "/sip",
61
69
  httpMethod: "PATCH",
62
70
  responses: {
63
71
  200: {
64
- bodyMapper: Mappers.SipConfiguration
72
+ bodyMapper: Mappers.SipConfiguration,
65
73
  },
66
74
  default: {
67
75
  bodyMapper: Mappers.CommunicationErrorResponse,
68
- headersMapper: Mappers.SipRoutingUpdateExceptionHeaders
69
- }
76
+ headersMapper: Mappers.SipRoutingUpdateExceptionHeaders,
77
+ },
70
78
  },
71
79
  requestBody: {
72
80
  parameterPath: {
81
+ domains: ["options", "domains"],
73
82
  trunks: ["options", "trunks"],
74
- routes: ["options", "routes"]
83
+ routes: ["options", "routes"],
75
84
  },
76
- mapper: Mappers.SipConfigurationUpdate
85
+ mapper: Mappers.SipConfigurationUpdate,
77
86
  },
78
87
  queryParameters: [Parameters.apiVersion],
79
88
  urlParameters: [Parameters.endpoint],
80
89
  headerParameters: [Parameters.accept, Parameters.contentType],
81
90
  mediaType: "json",
82
- serializer
91
+ serializer,
92
+ };
93
+ const testRoutesWithNumberOperationSpec = {
94
+ path: "/sip:testRoutesWithNumber",
95
+ httpMethod: "POST",
96
+ responses: {
97
+ 200: {
98
+ bodyMapper: Mappers.RoutesForNumber,
99
+ },
100
+ default: {
101
+ bodyMapper: Mappers.CommunicationErrorResponse,
102
+ },
103
+ },
104
+ requestBody: {
105
+ parameterPath: {
106
+ domains: ["options", "domains"],
107
+ trunks: ["options", "trunks"],
108
+ routes: ["options", "routes"],
109
+ },
110
+ mapper: Mappers.SipConfiguration,
111
+ },
112
+ queryParameters: [Parameters.apiVersion, Parameters.targetPhoneNumber],
113
+ urlParameters: [Parameters.endpoint],
114
+ headerParameters: [Parameters.accept, Parameters.contentType1],
115
+ mediaType: "json",
116
+ serializer,
83
117
  };
84
118
  //# sourceMappingURL=sipRouting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sipRouting.js","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operations/sipRouting.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAStD,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA+B;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAqC;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,OAAwC;QAExC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC;IAC5E,CAAC;CACF;AA5BD,wCA4BC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;YAC9C,aAAa,EAAE,OAAO,CAAC,6BAA6B;SACrD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;YAC9C,aAAa,EAAE,OAAO,CAAC,gCAAgC;SACxD;KACF;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;YAC7B,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;SAC9B;QACD,MAAM,EAAE,OAAO,CAAC,sBAAsB;KACvC;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 { SipRouting } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SipRoutingClientContext } from \"../sipRoutingClientContext.js\";\nimport {\n SipRoutingGetOptionalParams,\n SipRoutingGetResponse,\n SipRoutingUpdateOptionalParams,\n SipRoutingUpdateResponse\n} from \"../models/index.js\";\n\n/** Class containing SipRouting operations. */\nexport class SipRoutingImpl implements SipRouting {\n private readonly client: SipRoutingClientContext;\n\n /**\n * Initialize a new instance of the class SipRouting class.\n * @param client Reference to the service client\n */\n constructor(client: SipRoutingClientContext) {\n this.client = client;\n }\n\n /**\n * Gets SIP configuration for resource.\n * @param options The options parameters.\n */\n get(options?: SipRoutingGetOptionalParams): Promise<SipRoutingGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n\n /**\n * Updates SIP configuration for resource.\n * @param options The options parameters.\n */\n update(\n options?: SipRoutingUpdateOptionalParams\n ): Promise<SipRoutingUpdateResponse> {\n return this.client.sendOperationRequest({ options }, updateOperationSpec);\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/sip\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SipConfiguration\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n headersMapper: Mappers.SipRoutingGetExceptionHeaders\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/sip\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SipConfiguration\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n headersMapper: Mappers.SipRoutingUpdateExceptionHeaders\n }\n },\n requestBody: {\n parameterPath: {\n trunks: [\"options\", \"trunks\"],\n routes: [\"options\", \"routes\"]\n },\n mapper: Mappers.SipConfigurationUpdate\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\n"]}
1
+ {"version":3,"file":"sipRouting.js","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operations/sipRouting.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAWtD,8CAA8C;AAC9C,MAAa,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACH,GAAG,CAAC,OAAqC;QACvC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;IACzE,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,OAAwC;QAExC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC;IAC5E,CAAC;IAED;;;;OAIG;IACH,oBAAoB,CAClB,iBAAyB,EACzB,OAAsD;QAEtD,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,iBAAiB,EAAE,OAAO,EAAE,EAC9B,iCAAiC,CAClC,CAAC;IACJ,CAAC;CACF;AA3CD,wCA2CC;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;YAC9C,aAAa,EAAE,OAAO,CAAC,6BAA6B;SACrD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,OAAO;IACnB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;YAC9C,aAAa,EAAE,OAAO,CAAC,gCAAgC;SACxD;KACF;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;YAC/B,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;YAC7B,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;SAC9B;QACD,MAAM,EAAE,OAAO,CAAC,sBAAsB;KACvC;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;AACF,MAAM,iCAAiC,GAA6B;IAClE,IAAI,EAAE,2BAA2B;IACjC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,0BAA0B;SAC/C;KACF;IACD,WAAW,EAAE;QACX,aAAa,EAAE;YACb,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;YAC/B,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;YAC7B,MAAM,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;SAC9B;QACD,MAAM,EAAE,OAAO,CAAC,gBAAgB;KACjC;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,iBAAiB,CAAC;IACtE,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;IAC9D,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 { SipRouting } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { SipRoutingClient } from \"../sipRoutingClient.js\";\nimport {\n SipRoutingGetOptionalParams,\n SipRoutingGetResponse,\n SipRoutingUpdateOptionalParams,\n SipRoutingUpdateResponse,\n SipRoutingTestRoutesWithNumberOptionalParams,\n SipRoutingTestRoutesWithNumberResponse,\n} from \"../models/index.js\";\n\n/** Class containing SipRouting operations. */\nexport class SipRoutingImpl implements SipRouting {\n private readonly client: SipRoutingClient;\n\n /**\n * Initialize a new instance of the class SipRouting class.\n * @param client Reference to the service client\n */\n constructor(client: SipRoutingClient) {\n this.client = client;\n }\n\n /**\n * Gets SIP configuration for resource.\n * @param options The options parameters.\n */\n get(options?: SipRoutingGetOptionalParams): Promise<SipRoutingGetResponse> {\n return this.client.sendOperationRequest({ options }, getOperationSpec);\n }\n\n /**\n * Updates SIP configuration for resource.\n * @param options The options parameters.\n */\n update(\n options?: SipRoutingUpdateOptionalParams,\n ): Promise<SipRoutingUpdateResponse> {\n return this.client.sendOperationRequest({ options }, updateOperationSpec);\n }\n\n /**\n * Gets the list of routes matching the target phone number, ordered by priority.\n * @param targetPhoneNumber Phone number to test routing patterns against\n * @param options The options parameters.\n */\n testRoutesWithNumber(\n targetPhoneNumber: string,\n options?: SipRoutingTestRoutesWithNumberOptionalParams,\n ): Promise<SipRoutingTestRoutesWithNumberResponse> {\n return this.client.sendOperationRequest(\n { targetPhoneNumber, options },\n testRoutesWithNumberOperationSpec,\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path: \"/sip\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.SipConfiguration,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n headersMapper: Mappers.SipRoutingGetExceptionHeaders,\n },\n },\n queryParameters: [Parameters.apiVersion, Parameters.expand],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept],\n serializer,\n};\nconst updateOperationSpec: coreClient.OperationSpec = {\n path: \"/sip\",\n httpMethod: \"PATCH\",\n responses: {\n 200: {\n bodyMapper: Mappers.SipConfiguration,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n headersMapper: Mappers.SipRoutingUpdateExceptionHeaders,\n },\n },\n requestBody: {\n parameterPath: {\n domains: [\"options\", \"domains\"],\n trunks: [\"options\", \"trunks\"],\n routes: [\"options\", \"routes\"],\n },\n mapper: Mappers.SipConfigurationUpdate,\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer,\n};\nconst testRoutesWithNumberOperationSpec: coreClient.OperationSpec = {\n path: \"/sip:testRoutesWithNumber\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.RoutesForNumber,\n },\n default: {\n bodyMapper: Mappers.CommunicationErrorResponse,\n },\n },\n requestBody: {\n parameterPath: {\n domains: [\"options\", \"domains\"],\n trunks: [\"options\", \"trunks\"],\n routes: [\"options\", \"routes\"],\n },\n mapper: Mappers.SipConfiguration,\n },\n queryParameters: [Parameters.apiVersion, Parameters.targetPhoneNumber],\n urlParameters: [Parameters.endpoint],\n headerParameters: [Parameters.accept, Parameters.contentType1],\n mediaType: \"json\",\n serializer,\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { SipRoutingGetOptionalParams, SipRoutingGetResponse, SipRoutingUpdateOptionalParams, SipRoutingUpdateResponse } from "../models/index.js";
1
+ import { SipRoutingGetOptionalParams, SipRoutingGetResponse, SipRoutingUpdateOptionalParams, SipRoutingUpdateResponse, SipRoutingTestRoutesWithNumberOptionalParams, SipRoutingTestRoutesWithNumberResponse } from "../models/index.js";
2
2
  /** Interface representing a SipRouting. */
3
3
  export interface SipRouting {
4
4
  /**
@@ -11,5 +11,11 @@ export interface SipRouting {
11
11
  * @param options The options parameters.
12
12
  */
13
13
  update(options?: SipRoutingUpdateOptionalParams): Promise<SipRoutingUpdateResponse>;
14
+ /**
15
+ * Gets the list of routes matching the target phone number, ordered by priority.
16
+ * @param targetPhoneNumber Phone number to test routing patterns against
17
+ * @param options The options parameters.
18
+ */
19
+ testRoutesWithNumber(targetPhoneNumber: string, options?: SipRoutingTestRoutesWithNumberOptionalParams): Promise<SipRoutingTestRoutesWithNumberResponse>;
14
20
  }
15
21
  //# sourceMappingURL=sipRouting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sipRouting.d.ts","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operationsInterfaces/sipRouting.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAE5B,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,GAAG,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3E;;;OAGG;IACH,MAAM,CACJ,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC"}
1
+ {"version":3,"file":"sipRouting.d.ts","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operationsInterfaces/sipRouting.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,8BAA8B,EAC9B,wBAAwB,EACxB,4CAA4C,EAC5C,sCAAsC,EACvC,MAAM,oBAAoB,CAAC;AAE5B,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,GAAG,CAAC,OAAO,CAAC,EAAE,2BAA2B,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3E;;;OAGG;IACH,MAAM,CACJ,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IACrC;;;;OAIG;IACH,oBAAoB,CAClB,iBAAiB,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,4CAA4C,GACrD,OAAO,CAAC,sCAAsC,CAAC,CAAC;CACpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"sipRouting.js","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operationsInterfaces/sipRouting.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 SipRoutingGetOptionalParams,\n SipRoutingGetResponse,\n SipRoutingUpdateOptionalParams,\n SipRoutingUpdateResponse\n} from \"../models/index.js\";\n\n/** Interface representing a SipRouting. */\nexport interface SipRouting {\n /**\n * Gets SIP configuration for resource.\n * @param options The options parameters.\n */\n get(options?: SipRoutingGetOptionalParams): Promise<SipRoutingGetResponse>;\n /**\n * Updates SIP configuration for resource.\n * @param options The options parameters.\n */\n update(\n options?: SipRoutingUpdateOptionalParams\n ): Promise<SipRoutingUpdateResponse>;\n}\n"]}
1
+ {"version":3,"file":"sipRouting.js","sourceRoot":"","sources":["../../../../../../src/generated/src/siprouting/operationsInterfaces/sipRouting.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 SipRoutingGetOptionalParams,\n SipRoutingGetResponse,\n SipRoutingUpdateOptionalParams,\n SipRoutingUpdateResponse,\n SipRoutingTestRoutesWithNumberOptionalParams,\n SipRoutingTestRoutesWithNumberResponse,\n} from \"../models/index.js\";\n\n/** Interface representing a SipRouting. */\nexport interface SipRouting {\n /**\n * Gets SIP configuration for resource.\n * @param options The options parameters.\n */\n get(options?: SipRoutingGetOptionalParams): Promise<SipRoutingGetResponse>;\n /**\n * Updates SIP configuration for resource.\n * @param options The options parameters.\n */\n update(\n options?: SipRoutingUpdateOptionalParams,\n ): Promise<SipRoutingUpdateResponse>;\n /**\n * Gets the list of routes matching the target phone number, ordered by priority.\n * @param targetPhoneNumber Phone number to test routing patterns against\n * @param options The options parameters.\n */\n testRoutesWithNumber(\n targetPhoneNumber: string,\n options?: SipRoutingTestRoutesWithNumberOptionalParams,\n ): Promise<SipRoutingTestRoutesWithNumberResponse>;\n}\n"]}
@@ -1,13 +1,17 @@
1
+ import * as coreClient from "@azure/core-client";
1
2
  import { SipRouting } from "./operationsInterfaces/index.js";
2
- import { SipRoutingClientContext } from "./sipRoutingClientContext.js";
3
3
  import { SipRoutingClientOptionalParams } from "./models/index.js";
4
- export declare class SipRoutingClient extends SipRoutingClientContext {
4
+ export declare class SipRoutingClient extends coreClient.ServiceClient {
5
+ endpoint: string;
6
+ apiVersion: string;
5
7
  /**
6
8
  * Initializes a new instance of the SipRoutingClient class.
7
9
  * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
8
10
  * @param options The parameter options
9
11
  */
10
12
  constructor(endpoint: string, options?: SipRoutingClientOptionalParams);
13
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
14
+ private addCustomApiVersionPolicy;
11
15
  sipRouting: SipRouting;
12
16
  }
13
17
  //# sourceMappingURL=sipRoutingClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sipRoutingClient.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClient.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnE,qBAAa,gBAAiB,SAAQ,uBAAuB;IAC3D;;;;OAIG;gBACS,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B;IAKtE,UAAU,EAAE,UAAU,CAAC;CACxB"}
1
+ {"version":3,"file":"sipRoutingClient.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAEnE,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,aAAa;IAC5D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;gBACS,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,8BAA8B;IAqCtE,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,UAAU,EAAE,UAAU,CAAC;CACxB"}
@@ -8,17 +8,66 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.SipRoutingClient = void 0;
11
+ const tslib_1 = require("tslib");
12
+ const coreClient = tslib_1.__importStar(require("@azure/core-client"));
11
13
  const index_js_1 = require("./operations/index.js");
12
- const sipRoutingClientContext_js_1 = require("./sipRoutingClientContext.js");
13
- class SipRoutingClient extends sipRoutingClientContext_js_1.SipRoutingClientContext {
14
+ class SipRoutingClient extends coreClient.ServiceClient {
14
15
  /**
15
16
  * Initializes a new instance of the SipRoutingClient class.
16
17
  * @param endpoint The communication resource, for example https://resourcename.communication.azure.com
17
18
  * @param options The parameter options
18
19
  */
19
20
  constructor(endpoint, options) {
20
- super(endpoint, options);
21
+ var _a, _b;
22
+ if (endpoint === undefined) {
23
+ throw new Error("'endpoint' cannot be null");
24
+ }
25
+ // Initializing default values for options
26
+ if (!options) {
27
+ options = {};
28
+ }
29
+ const defaults = {
30
+ requestContentType: "application/json; charset=utf-8",
31
+ };
32
+ const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.2`;
33
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
34
+ ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
35
+ : `${packageDetails}`;
36
+ const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
37
+ userAgentPrefix,
38
+ }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
39
+ super(optionsWithDefaults);
40
+ // Parameter assignments
41
+ this.endpoint = endpoint;
42
+ // Assigning values to Constant parameters
43
+ this.apiVersion = options.apiVersion || "2024-11-15-preview";
21
44
  this.sipRouting = new index_js_1.SipRoutingImpl(this);
45
+ this.addCustomApiVersionPolicy(options.apiVersion);
46
+ }
47
+ /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
48
+ addCustomApiVersionPolicy(apiVersion) {
49
+ if (!apiVersion) {
50
+ return;
51
+ }
52
+ const apiVersionPolicy = {
53
+ name: "CustomApiVersionPolicy",
54
+ async sendRequest(request, next) {
55
+ const param = request.url.split("?");
56
+ if (param.length > 1) {
57
+ const newParams = param[1].split("&").map((item) => {
58
+ if (item.indexOf("api-version") > -1) {
59
+ return "api-version=" + apiVersion;
60
+ }
61
+ else {
62
+ return item;
63
+ }
64
+ });
65
+ request.url = param[0] + "?" + newParams.join("&");
66
+ }
67
+ return next(request);
68
+ },
69
+ };
70
+ this.pipeline.addPolicy(apiVersionPolicy);
22
71
  }
23
72
  }
24
73
  exports.SipRoutingClient = SipRoutingClient;
@@ -1 +1 @@
1
- {"version":3,"file":"sipRoutingClient.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,oDAAuD;AAEvD,6EAAuE;AAGvE,MAAa,gBAAiB,SAAQ,oDAAuB;IAC3D;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAwC;QACpE,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACzB,IAAI,CAAC,UAAU,GAAG,IAAI,yBAAc,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;CAGF;AAZD,4CAYC","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 { SipRoutingImpl } from \"./operations/index.js\";\nimport { SipRouting } from \"./operationsInterfaces/index.js\";\nimport { SipRoutingClientContext } from \"./sipRoutingClientContext.js\";\nimport { SipRoutingClientOptionalParams } from \"./models/index.js\";\n\nexport class SipRoutingClient extends SipRoutingClientContext {\n /**\n * Initializes a new instance of the SipRoutingClient 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?: SipRoutingClientOptionalParams) {\n super(endpoint, options);\n this.sipRouting = new SipRoutingImpl(this);\n }\n\n sipRouting: SipRouting;\n}\n"]}
1
+ {"version":3,"file":"sipRoutingClient.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAMjD,oDAAuD;AAIvD,MAAa,gBAAiB,SAAQ,UAAU,CAAC,aAAa;IAI5D;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAwC;;QACpE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmC;YAC/C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mDAAmD,CAAC;QAC3E,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,QAAQ,EAAE,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,YAAY,GAC9D,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,oBAAoB,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,IAAI,yBAAc,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,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,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAGF;AA3ED,4CA2EC","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 {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport { SipRoutingImpl } from \"./operations/index.js\";\nimport { SipRouting } from \"./operationsInterfaces/index.js\";\nimport { SipRoutingClientOptionalParams } from \"./models/index.js\";\n\nexport class SipRoutingClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SipRoutingClient 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?: SipRoutingClientOptionalParams) {\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: SipRoutingClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.2`;\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 endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2024-11-15-preview\";\n this.sipRouting = new SipRoutingImpl(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 sipRouting: SipRouting;\n}\n"]}
@@ -27,7 +27,7 @@ class SipRoutingClientContext extends coreClient.ServiceClient {
27
27
  const defaults = {
28
28
  requestContentType: "application/json; charset=utf-8"
29
29
  };
30
- const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.1`;
30
+ const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.2`;
31
31
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
32
32
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
33
33
  : `${packageDetails}`;
@@ -1 +1 @@
1
- {"version":3,"file":"sipRoutingClientContext.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,MAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAInE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAwC;QACpE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmC;YAC/C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mDAAmD,CAAC;QAC3E,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,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA3CD,0DA2CC","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 { SipRoutingClientOptionalParams } from \"./models/index.js\";\n\nexport class SipRoutingClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SipRoutingClientContext 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?: SipRoutingClientOptionalParams) {\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: SipRoutingClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-phone-numbers/1.5.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 || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-03-01\";\n }\n}\n"]}
1
+ {"version":3,"file":"sipRoutingClientContext.js","sourceRoot":"","sources":["../../../../../src/generated/src/siprouting/sipRoutingClientContext.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AAGjD,MAAa,uBAAwB,SAAQ,UAAU,CAAC,aAAa;IAInE;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAwC;QACpE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmC;YAC/C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,mDAAmD,CAAC;QAC3E,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,OAAO,CAAC,QAAQ,IAAI,YAAY,GAC1C,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAC3B,wBAAwB;QACxB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,0CAA0C;QAC1C,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,YAAY,CAAC;IACvD,CAAC;CACF;AA3CD,0DA2CC","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 { SipRoutingClientOptionalParams } from \"./models/index.js\";\n\nexport class SipRoutingClientContext extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SipRoutingClientContext 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?: SipRoutingClientOptionalParams) {\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: SipRoutingClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-phone-numbers/1.5.0-beta.2`;\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 || \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2023-03-01\";\n }\n}\n"]}
@@ -12,6 +12,6 @@ const core_tracing_1 = require("@azure/core-tracing");
12
12
  exports.tracingClient = (0, core_tracing_1.createTracingClient)({
13
13
  namespace: "Microsoft.Communication",
14
14
  packageName: "@azure/communication-phone-numbers",
15
- packageVersion: "1.5.0-beta.1",
15
+ packageVersion: "1.5.0-beta.2",
16
16
  });
17
17
  //# sourceMappingURL=tracing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sDAA0D;AAE7C,QAAA,aAAa,GAAG,IAAA,kCAAmB,EAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,oCAAoC;IACjD,cAAc,EAAE,cAAc;CAC/B,CAAC,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 { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-phone-numbers\",\n packageVersion: \"1.5.0-beta.1\",\n});\n"]}
1
+ {"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,sDAA0D;AAE7C,QAAA,aAAa,GAAG,IAAA,kCAAmB,EAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,oCAAoC;IACjD,cAAc,EAAE,cAAc;CAC/B,CAAC,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 { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-phone-numbers\",\n packageVersion: \"1.5.0-beta.2\",\n});\n"]}
@@ -1,5 +1,5 @@
1
- import type { SipTrunk } from "./models.js";
2
- import type { TrunkUpdate as RestSipTrunk } from "./generated/src/siprouting/models/index.js";
1
+ import type { SipTrunk, SipDomain } from "./models.js";
2
+ import type { SipTrunk as RestSipTrunk, SipDomain as RestSipDomain, TrunkUpdate as RestTrunkUpdate, DomainPatch as RestDomainUpdate } from "./generated/src/siprouting/models/index.js";
3
3
  /**
4
4
  * @internal
5
5
  * Transforming SIP trunks REST model to SDK model
@@ -7,11 +7,25 @@ import type { TrunkUpdate as RestSipTrunk } from "./generated/src/siprouting/mod
7
7
  export declare function transformFromRestModel(trunks: {
8
8
  [propertyName: string]: RestSipTrunk;
9
9
  } | undefined): SipTrunk[];
10
+ /**
11
+ * @internal
12
+ * Transforming SIP domains REST model to SDK model
13
+ */
14
+ export declare function transformDomainsFromRestModel(domains: {
15
+ [propertyName: string]: RestSipDomain;
16
+ } | undefined): SipDomain[];
10
17
  /**
11
18
  * @internal
12
19
  * Transforming SIP trunks SDK model to REST model
13
20
  */
14
21
  export declare function transformIntoRestModel(trunks: SipTrunk[]): {
15
- [propertyName: string]: RestSipTrunk;
22
+ [propertyName: string]: RestTrunkUpdate;
23
+ };
24
+ /**
25
+ * @internal
26
+ * Transforming SIP domains SDK model to REST model
27
+ */
28
+ export declare function transformDomainsIntoRestModel(domains: SipDomain[]): {
29
+ [propertyName: string]: RestDomainUpdate;
16
30
  };
17
31
  //# sourceMappingURL=mappers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../src/mappers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,IAAI,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAE9F;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE;IAAE,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE,GAAG,SAAS,GAC3D,QAAQ,EAAE,CAWZ;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG;IAC1D,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAC;CACtC,CAQA"}
1
+ {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../src/mappers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EACV,QAAQ,IAAI,YAAY,EACxB,SAAS,IAAI,aAAa,EAC1B,WAAW,IAAI,eAAe,EAC9B,WAAW,IAAI,gBAAgB,EAChC,MAAM,4CAA4C,CAAC;AAEpD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE;IAAE,CAAC,YAAY,EAAE,MAAM,GAAG,YAAY,CAAA;CAAE,GAAG,SAAS,GAC3D,QAAQ,EAAE,CAwBZ;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE;IAAE,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,CAAA;CAAE,GAAG,SAAS,GAC7D,SAAS,EAAE,CAcb;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG;IAC1D,CAAC,YAAY,EAAE,MAAM,GAAG,eAAe,CAAC;CACzC,CAcA;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,SAAS,EAAE,GAAG;IACnE,CAAC,YAAY,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAC1C,CAUA"}
@@ -3,7 +3,9 @@
3
3
  // Licensed under the MIT License.
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.transformFromRestModel = transformFromRestModel;
6
+ exports.transformDomainsFromRestModel = transformDomainsFromRestModel;
6
7
  exports.transformIntoRestModel = transformIntoRestModel;
8
+ exports.transformDomainsIntoRestModel = transformDomainsIntoRestModel;
7
9
  /**
8
10
  * @internal
9
11
  * Transforming SIP trunks REST model to SDK model
@@ -13,7 +15,37 @@ function transformFromRestModel(trunks) {
13
15
  if (trunks) {
14
16
  Object.keys(trunks).forEach((fqdn) => {
15
17
  const port = trunks[fqdn].sipSignalingPort;
16
- result.push({ fqdn: fqdn, sipSignalingPort: port });
18
+ const enabled = trunks[fqdn].enabled;
19
+ const health = trunks[fqdn].health;
20
+ const directTransfer = trunks[fqdn].directTransfer;
21
+ const privacyHeader = trunks[fqdn].privacyHeader;
22
+ const ipAddressVersion = trunks[fqdn].ipAddressVersion;
23
+ result.push({
24
+ fqdn: fqdn,
25
+ sipSignalingPort: port,
26
+ enabled: enabled,
27
+ health: health,
28
+ directTransfer: directTransfer,
29
+ privacyHeader: privacyHeader,
30
+ ipAddressVersion: ipAddressVersion,
31
+ });
32
+ });
33
+ }
34
+ return result;
35
+ }
36
+ /**
37
+ * @internal
38
+ * Transforming SIP domains REST model to SDK model
39
+ */
40
+ function transformDomainsFromRestModel(domains) {
41
+ const result = [];
42
+ if (domains) {
43
+ Object.keys(domains).forEach((fqdn) => {
44
+ const enabled = domains[fqdn].enabled;
45
+ result.push({
46
+ fqdn: fqdn,
47
+ enabled: enabled,
48
+ });
17
49
  });
18
50
  }
19
51
  return result;
@@ -25,7 +57,26 @@ function transformFromRestModel(trunks) {
25
57
  function transformIntoRestModel(trunks) {
26
58
  const result = {};
27
59
  trunks.forEach((trunk) => {
28
- result[trunk.fqdn] = { sipSignalingPort: trunk.sipSignalingPort };
60
+ result[trunk.fqdn] = {
61
+ sipSignalingPort: trunk.sipSignalingPort,
62
+ enabled: trunk.enabled,
63
+ directTransfer: trunk.directTransfer,
64
+ privacyHeader: trunk.privacyHeader,
65
+ ipAddressVersion: trunk.ipAddressVersion,
66
+ };
67
+ });
68
+ return result;
69
+ }
70
+ /**
71
+ * @internal
72
+ * Transforming SIP domains SDK model to REST model
73
+ */
74
+ function transformDomainsIntoRestModel(domains) {
75
+ const result = {};
76
+ domains.forEach((domain) => {
77
+ result[domain.fqdn] = {
78
+ enabled: domain.enabled,
79
+ };
29
80
  });
30
81
  return result;
31
82
  }