@azure-rest/communication-messages 2.0.1-alpha.20241113.1 → 2.0.1-alpha.20241119.1

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 (212) hide show
  1. package/dist/browser/generated/src/clientDefinitions.d.ts +27 -0
  2. package/dist/browser/generated/src/clientDefinitions.d.ts.map +1 -0
  3. package/dist/browser/generated/src/clientDefinitions.js.map +1 -0
  4. package/dist/browser/generated/src/index.d.ts +11 -0
  5. package/dist/browser/generated/src/index.d.ts.map +1 -0
  6. package/dist/browser/generated/src/index.js +13 -0
  7. package/dist/browser/generated/src/index.js.map +1 -0
  8. package/dist/browser/generated/src/isUnexpected.d.ts +5 -0
  9. package/dist/browser/generated/src/isUnexpected.d.ts.map +1 -0
  10. package/dist/browser/generated/src/isUnexpected.js.map +1 -0
  11. package/dist/browser/generated/src/logger.d.ts +2 -0
  12. package/dist/browser/generated/src/logger.d.ts.map +1 -0
  13. package/dist/browser/generated/src/messagesServiceClient.d.ts +16 -0
  14. package/dist/browser/generated/src/messagesServiceClient.d.ts.map +1 -0
  15. package/{dist-esm/src → dist/browser}/generated/src/messagesServiceClient.js +1 -1
  16. package/dist/browser/generated/src/messagesServiceClient.js.map +1 -0
  17. package/dist/browser/generated/src/models.d.ts +194 -0
  18. package/dist/browser/generated/src/models.d.ts.map +1 -0
  19. package/dist/browser/generated/src/outputModels.d.ts +45 -0
  20. package/dist/browser/generated/src/outputModels.d.ts.map +1 -0
  21. package/dist/browser/generated/src/paginateHelper.d.ts +43 -0
  22. package/dist/browser/generated/src/paginateHelper.d.ts.map +1 -0
  23. package/dist/browser/generated/src/parameters.d.ts +43 -0
  24. package/dist/browser/generated/src/parameters.d.ts.map +1 -0
  25. package/dist/browser/generated/src/parameters.js.map +1 -0
  26. package/dist/browser/generated/src/responses.d.ts +66 -0
  27. package/dist/browser/generated/src/responses.d.ts.map +1 -0
  28. package/dist/browser/generated/src/responses.js.map +1 -0
  29. package/dist/browser/index.d.ts +11 -0
  30. package/dist/browser/index.d.ts.map +1 -0
  31. package/dist/browser/index.js +13 -0
  32. package/dist/browser/index.js.map +1 -0
  33. package/dist/browser/messagesServiceClient.d.ts +17 -0
  34. package/dist/browser/messagesServiceClient.d.ts.map +1 -0
  35. package/{dist-esm/src → dist/browser}/messagesServiceClient.js +1 -1
  36. package/dist/browser/messagesServiceClient.js.map +1 -0
  37. package/dist/browser/package.json +3 -0
  38. package/dist/commonjs/generated/src/clientDefinitions.d.ts +27 -0
  39. package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +1 -0
  40. package/dist/commonjs/generated/src/clientDefinitions.js +5 -0
  41. package/dist/commonjs/generated/src/clientDefinitions.js.map +1 -0
  42. package/dist/commonjs/generated/src/index.d.ts +11 -0
  43. package/dist/commonjs/generated/src/index.d.ts.map +1 -0
  44. package/dist/commonjs/generated/src/index.js +16 -0
  45. package/dist/commonjs/generated/src/index.js.map +1 -0
  46. package/dist/commonjs/generated/src/isUnexpected.d.ts +5 -0
  47. package/dist/commonjs/generated/src/isUnexpected.d.ts.map +1 -0
  48. package/dist/commonjs/generated/src/isUnexpected.js +76 -0
  49. package/dist/commonjs/generated/src/isUnexpected.js.map +1 -0
  50. package/dist/commonjs/generated/src/logger.d.ts +2 -0
  51. package/dist/commonjs/generated/src/logger.d.ts.map +1 -0
  52. package/dist/commonjs/generated/src/logger.js +8 -0
  53. package/dist/commonjs/generated/src/logger.js.map +1 -0
  54. package/dist/commonjs/generated/src/messagesServiceClient.d.ts +16 -0
  55. package/dist/commonjs/generated/src/messagesServiceClient.d.ts.map +1 -0
  56. package/dist/commonjs/generated/src/messagesServiceClient.js +49 -0
  57. package/dist/commonjs/generated/src/messagesServiceClient.js.map +1 -0
  58. package/dist/commonjs/generated/src/models.d.ts +194 -0
  59. package/dist/commonjs/generated/src/models.d.ts.map +1 -0
  60. package/dist/commonjs/generated/src/models.js +5 -0
  61. package/dist/commonjs/generated/src/models.js.map +1 -0
  62. package/dist/commonjs/generated/src/outputModels.d.ts +45 -0
  63. package/dist/commonjs/generated/src/outputModels.d.ts.map +1 -0
  64. package/dist/commonjs/generated/src/outputModels.js +5 -0
  65. package/dist/commonjs/generated/src/outputModels.js.map +1 -0
  66. package/dist/commonjs/generated/src/paginateHelper.d.ts +43 -0
  67. package/dist/commonjs/generated/src/paginateHelper.d.ts.map +1 -0
  68. package/dist/commonjs/generated/src/paginateHelper.js +86 -0
  69. package/dist/commonjs/generated/src/paginateHelper.js.map +1 -0
  70. package/dist/commonjs/generated/src/parameters.d.ts +43 -0
  71. package/dist/commonjs/generated/src/parameters.d.ts.map +1 -0
  72. package/dist/commonjs/generated/src/parameters.js +5 -0
  73. package/dist/commonjs/generated/src/parameters.js.map +1 -0
  74. package/dist/commonjs/generated/src/responses.d.ts +66 -0
  75. package/dist/commonjs/generated/src/responses.d.ts.map +1 -0
  76. package/dist/commonjs/generated/src/responses.js +5 -0
  77. package/dist/commonjs/generated/src/responses.js.map +1 -0
  78. package/dist/commonjs/index.d.ts +11 -0
  79. package/dist/commonjs/index.d.ts.map +1 -0
  80. package/dist/commonjs/index.js +16 -0
  81. package/dist/commonjs/index.js.map +1 -0
  82. package/dist/commonjs/messagesServiceClient.d.ts +17 -0
  83. package/dist/commonjs/messagesServiceClient.d.ts.map +1 -0
  84. package/dist/commonjs/messagesServiceClient.js +31 -0
  85. package/dist/commonjs/messagesServiceClient.js.map +1 -0
  86. package/dist/commonjs/package.json +3 -0
  87. package/dist/commonjs/tsdoc-metadata.json +11 -0
  88. package/dist/esm/generated/src/clientDefinitions.d.ts +27 -0
  89. package/dist/esm/generated/src/clientDefinitions.d.ts.map +1 -0
  90. package/dist/esm/generated/src/clientDefinitions.js +4 -0
  91. package/dist/esm/generated/src/clientDefinitions.js.map +1 -0
  92. package/dist/esm/generated/src/index.d.ts +11 -0
  93. package/dist/esm/generated/src/index.d.ts.map +1 -0
  94. package/dist/esm/generated/src/index.js +13 -0
  95. package/dist/esm/generated/src/index.js.map +1 -0
  96. package/dist/esm/generated/src/isUnexpected.d.ts +5 -0
  97. package/dist/esm/generated/src/isUnexpected.d.ts.map +1 -0
  98. package/dist/esm/generated/src/isUnexpected.js +73 -0
  99. package/dist/esm/generated/src/isUnexpected.js.map +1 -0
  100. package/dist/esm/generated/src/logger.d.ts +2 -0
  101. package/dist/esm/generated/src/logger.d.ts.map +1 -0
  102. package/dist/esm/generated/src/logger.js +5 -0
  103. package/dist/esm/generated/src/logger.js.map +1 -0
  104. package/dist/esm/generated/src/messagesServiceClient.d.ts +16 -0
  105. package/dist/esm/generated/src/messagesServiceClient.d.ts.map +1 -0
  106. package/dist/esm/generated/src/messagesServiceClient.js +46 -0
  107. package/dist/esm/generated/src/messagesServiceClient.js.map +1 -0
  108. package/dist/esm/generated/src/models.d.ts +194 -0
  109. package/dist/esm/generated/src/models.d.ts.map +1 -0
  110. package/dist/esm/generated/src/models.js +4 -0
  111. package/dist/esm/generated/src/models.js.map +1 -0
  112. package/dist/esm/generated/src/outputModels.d.ts +45 -0
  113. package/dist/esm/generated/src/outputModels.d.ts.map +1 -0
  114. package/dist/esm/generated/src/outputModels.js +4 -0
  115. package/dist/esm/generated/src/outputModels.js.map +1 -0
  116. package/dist/esm/generated/src/paginateHelper.d.ts +43 -0
  117. package/dist/esm/generated/src/paginateHelper.d.ts.map +1 -0
  118. package/dist/esm/generated/src/paginateHelper.js +83 -0
  119. package/dist/esm/generated/src/paginateHelper.js.map +1 -0
  120. package/dist/esm/generated/src/parameters.d.ts +43 -0
  121. package/dist/esm/generated/src/parameters.d.ts.map +1 -0
  122. package/dist/esm/generated/src/parameters.js +4 -0
  123. package/dist/esm/generated/src/parameters.js.map +1 -0
  124. package/dist/esm/generated/src/responses.d.ts +66 -0
  125. package/dist/esm/generated/src/responses.d.ts.map +1 -0
  126. package/dist/esm/generated/src/responses.js +4 -0
  127. package/dist/esm/generated/src/responses.js.map +1 -0
  128. package/dist/esm/index.d.ts +11 -0
  129. package/dist/esm/index.d.ts.map +1 -0
  130. package/dist/esm/index.js +13 -0
  131. package/dist/esm/index.js.map +1 -0
  132. package/dist/esm/messagesServiceClient.d.ts +17 -0
  133. package/dist/esm/messagesServiceClient.d.ts.map +1 -0
  134. package/dist/esm/messagesServiceClient.js +27 -0
  135. package/dist/esm/messagesServiceClient.js.map +1 -0
  136. package/dist/esm/package.json +3 -0
  137. package/dist/react-native/generated/src/clientDefinitions.d.ts +27 -0
  138. package/dist/react-native/generated/src/clientDefinitions.d.ts.map +1 -0
  139. package/dist/react-native/generated/src/clientDefinitions.js +4 -0
  140. package/dist/react-native/generated/src/clientDefinitions.js.map +1 -0
  141. package/dist/react-native/generated/src/index.d.ts +11 -0
  142. package/dist/react-native/generated/src/index.d.ts.map +1 -0
  143. package/dist/react-native/generated/src/index.js +13 -0
  144. package/dist/react-native/generated/src/index.js.map +1 -0
  145. package/dist/react-native/generated/src/isUnexpected.d.ts +5 -0
  146. package/dist/react-native/generated/src/isUnexpected.d.ts.map +1 -0
  147. package/dist/react-native/generated/src/isUnexpected.js +73 -0
  148. package/dist/react-native/generated/src/isUnexpected.js.map +1 -0
  149. package/dist/react-native/generated/src/logger.d.ts +2 -0
  150. package/dist/react-native/generated/src/logger.d.ts.map +1 -0
  151. package/dist/react-native/generated/src/logger.js +5 -0
  152. package/dist/react-native/generated/src/logger.js.map +1 -0
  153. package/dist/react-native/generated/src/messagesServiceClient.d.ts +16 -0
  154. package/dist/react-native/generated/src/messagesServiceClient.d.ts.map +1 -0
  155. package/dist/react-native/generated/src/messagesServiceClient.js +46 -0
  156. package/dist/react-native/generated/src/messagesServiceClient.js.map +1 -0
  157. package/dist/react-native/generated/src/models.d.ts +194 -0
  158. package/dist/react-native/generated/src/models.d.ts.map +1 -0
  159. package/dist/react-native/generated/src/models.js +4 -0
  160. package/dist/react-native/generated/src/models.js.map +1 -0
  161. package/dist/react-native/generated/src/outputModels.d.ts +45 -0
  162. package/dist/react-native/generated/src/outputModels.d.ts.map +1 -0
  163. package/dist/react-native/generated/src/outputModels.js +4 -0
  164. package/dist/react-native/generated/src/outputModels.js.map +1 -0
  165. package/dist/react-native/generated/src/paginateHelper.d.ts +43 -0
  166. package/dist/react-native/generated/src/paginateHelper.d.ts.map +1 -0
  167. package/dist/react-native/generated/src/paginateHelper.js +83 -0
  168. package/dist/react-native/generated/src/paginateHelper.js.map +1 -0
  169. package/dist/react-native/generated/src/parameters.d.ts +43 -0
  170. package/dist/react-native/generated/src/parameters.d.ts.map +1 -0
  171. package/dist/react-native/generated/src/parameters.js +4 -0
  172. package/dist/react-native/generated/src/parameters.js.map +1 -0
  173. package/dist/react-native/generated/src/responses.d.ts +66 -0
  174. package/dist/react-native/generated/src/responses.d.ts.map +1 -0
  175. package/dist/react-native/generated/src/responses.js +4 -0
  176. package/dist/react-native/generated/src/responses.js.map +1 -0
  177. package/dist/react-native/index.d.ts +11 -0
  178. package/dist/react-native/index.d.ts.map +1 -0
  179. package/dist/react-native/index.js +13 -0
  180. package/dist/react-native/index.js.map +1 -0
  181. package/dist/react-native/messagesServiceClient.d.ts +17 -0
  182. package/dist/react-native/messagesServiceClient.d.ts.map +1 -0
  183. package/dist/react-native/messagesServiceClient.js +27 -0
  184. package/dist/react-native/messagesServiceClient.js.map +1 -0
  185. package/dist/react-native/package.json +3 -0
  186. package/package.json +60 -39
  187. package/dist/index.js +0 -243
  188. package/dist/index.js.map +0 -1
  189. package/dist-esm/src/generated/src/clientDefinitions.js.map +0 -1
  190. package/dist-esm/src/generated/src/index.js +0 -13
  191. package/dist-esm/src/generated/src/index.js.map +0 -1
  192. package/dist-esm/src/generated/src/isUnexpected.js.map +0 -1
  193. package/dist-esm/src/generated/src/messagesServiceClient.js.map +0 -1
  194. package/dist-esm/src/generated/src/parameters.js.map +0 -1
  195. package/dist-esm/src/generated/src/responses.js.map +0 -1
  196. package/dist-esm/src/index.js +0 -13
  197. package/dist-esm/src/index.js.map +0 -1
  198. package/dist-esm/src/messagesServiceClient.js.map +0 -1
  199. package/review/communication-messages.api.md +0 -450
  200. /package/{dist-esm/src → dist/browser}/generated/src/clientDefinitions.js +0 -0
  201. /package/{dist-esm/src → dist/browser}/generated/src/isUnexpected.js +0 -0
  202. /package/{dist-esm/src → dist/browser}/generated/src/logger.js +0 -0
  203. /package/{dist-esm/src → dist/browser}/generated/src/logger.js.map +0 -0
  204. /package/{dist-esm/src → dist/browser}/generated/src/models.js +0 -0
  205. /package/{dist-esm/src → dist/browser}/generated/src/models.js.map +0 -0
  206. /package/{dist-esm/src → dist/browser}/generated/src/outputModels.js +0 -0
  207. /package/{dist-esm/src → dist/browser}/generated/src/outputModels.js.map +0 -0
  208. /package/{dist-esm/src → dist/browser}/generated/src/paginateHelper.js +0 -0
  209. /package/{dist-esm/src → dist/browser}/generated/src/paginateHelper.js.map +0 -0
  210. /package/{dist-esm/src → dist/browser}/generated/src/parameters.js +0 -0
  211. /package/{dist-esm/src → dist/browser}/generated/src/responses.js +0 -0
  212. /package/{types → dist}/communication-messages.d.ts +0 -0
@@ -0,0 +1,13 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import MessagesServiceClient from "./messagesServiceClient.js";
4
+ export * from "./generated/src/messagesServiceClient.js";
5
+ export * from "./generated/src/parameters.js";
6
+ export * from "./generated/src/responses.js";
7
+ export * from "./generated/src/clientDefinitions.js";
8
+ export * from "./generated/src/isUnexpected.js";
9
+ export * from "./generated/src/models.js";
10
+ export * from "./generated/src/outputModels.js";
11
+ export * from "./generated/src/paginateHelper.js";
12
+ export default MessagesServiceClient;
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,eAAe,qBAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MessagesServiceClient from \"./messagesServiceClient.js\";\nexport * from \"./generated/src/messagesServiceClient.js\";\nexport * from \"./generated/src/parameters.js\";\nexport * from \"./generated/src/responses.js\";\nexport * from \"./generated/src/clientDefinitions.js\";\nexport * from \"./generated/src/isUnexpected.js\";\nexport * from \"./generated/src/models.js\";\nexport * from \"./generated/src/outputModels.js\";\nexport * from \"./generated/src/paginateHelper.js\";\nexport default MessagesServiceClient;\n"]}
@@ -0,0 +1,17 @@
1
+ import type { TokenCredential, KeyCredential } from "@azure/core-auth";
2
+ import type { ClientOptions } from "@azure-rest/core-client";
3
+ import type { MessagesServiceClient } from "./generated/src/clientDefinitions.js";
4
+ /**
5
+ * Initialize a new instance of `MessagesServiceClient`
6
+ * @param connectionString - The connectionString or url of your Communication Services resource.
7
+ * @param options - the parameter for all optional parameters
8
+ */
9
+ export default function createClient(connectionString: string, options?: ClientOptions): MessagesServiceClient;
10
+ /**
11
+ * Initialize a new instance of `MessagesServiceClient`
12
+ * @param endpoint - The endpoint of your Communication Services resource.
13
+ * @param credential - The key or token credential.
14
+ * @param options - the parameter for all optional parameters
15
+ */
16
+ export default function createClient(endpoint: string, credential: KeyCredential | TokenCredential, options?: ClientOptions): MessagesServiceClient;
17
+ //# sourceMappingURL=messagesServiceClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messagesServiceClient.d.ts","sourceRoot":"","sources":["../../src/messagesServiceClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAGlF;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,aAAa,GACtB,qBAAqB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,aAAa,GAAG,eAAe,EAC3C,OAAO,CAAC,EAAE,aAAa,GACtB,qBAAqB,CAAC"}
@@ -2,7 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import { isTokenCredential, isKeyCredential } from "@azure/core-auth";
4
4
  import { parseClientArguments, createCommunicationAuthPolicy } from "@azure/communication-common";
5
- import GeneratedAzureCommunicationMessageServiceClient from "./generated/src/messagesServiceClient";
5
+ import GeneratedAzureCommunicationMessageServiceClient from "./generated/src/messagesServiceClient.js";
6
6
  /**
7
7
  * Initialize a new instance of `MessagesServiceClient`
8
8
  * @param endpoint - The communication resource, for example https://my-resource.communication.azure.com
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messagesServiceClient.js","sourceRoot":"","sources":["../../src/messagesServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAElG,OAAO,+CAA+C,MAAM,0CAA0C,CAAC;AAwBvG;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,0BAAkC,EAClC,mBAAuE,EACvE,OAAuB;;IAEvB,IAAI,CAAC,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,IAAI,eAAe,CAAC,mBAAmB,CAAC,CAAC,EAAE,CAAC;QACtF,OAAO,GAAG,mBAAoC,CAAC;IACjD,CAAC;IAED,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC;IACf,CAAC;IAED,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,oBAAoB,CAAC,0BAA0B,EAAE,mBAAmB,CAAC,CAAC;IAClG,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAE5C,MAAM,MAAM,GAAG,+CAA+C,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7F,MAAM,UAAU,GAAG,6BAA6B,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IAEtC,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { isTokenCredential, isKeyCredential } from \"@azure/core-auth\";\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { parseClientArguments, createCommunicationAuthPolicy } from \"@azure/communication-common\";\nimport type { MessagesServiceClient } from \"./generated/src/clientDefinitions.js\";\nimport GeneratedAzureCommunicationMessageServiceClient from \"./generated/src/messagesServiceClient.js\";\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param connectionString - The connectionString or url of your Communication Services resource.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n connectionString: string,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The endpoint of your Communication Services resource.\n * @param credential - The key or token credential.\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: ClientOptions,\n): MessagesServiceClient;\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpoint - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointOrConnectionString: string,\n credentialOrOptions?: ClientOptions | (TokenCredential | KeyCredential),\n options?: ClientOptions,\n): MessagesServiceClient {\n if (!(isTokenCredential(credentialOrOptions) || isKeyCredential(credentialOrOptions))) {\n options = credentialOrOptions as ClientOptions;\n }\n\n if (options === undefined) {\n options = {};\n }\n\n const { url, credential } = parseClientArguments(endpointOrConnectionString, credentialOrOptions);\n const baseUrl = options.baseUrl ?? `${url}`;\n\n const client = GeneratedAzureCommunicationMessageServiceClient(baseUrl, credential, options);\n const authPolicy = createCommunicationAuthPolicy(credential);\n client.pipeline.addPolicy(authPolicy);\n\n return client;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,27 @@
1
+ import { GetMediaParameters, SendParameters, ListTemplatesParameters } from "./parameters.js";
2
+ import { GetMedia200Response, GetMediaDefaultResponse, Send202Response, SendDefaultResponse, ListTemplates200Response, ListTemplatesDefaultResponse } from "./responses.js";
3
+ import { Client, StreamableMethod } from "@azure-rest/core-client";
4
+ export interface GetMedia {
5
+ /** Download the Media payload from a User to Business message. */
6
+ get(options?: GetMediaParameters): StreamableMethod<GetMedia200Response | GetMediaDefaultResponse>;
7
+ }
8
+ export interface Send {
9
+ /** Sends a notification message from Business to User. */
10
+ post(options: SendParameters): StreamableMethod<Send202Response | SendDefaultResponse>;
11
+ }
12
+ export interface ListTemplates {
13
+ /** List all templates for given Azure Communication Services channel */
14
+ get(options?: ListTemplatesParameters): StreamableMethod<ListTemplates200Response | ListTemplatesDefaultResponse>;
15
+ }
16
+ export interface Routes {
17
+ /** Resource for '/messages/streams/\{id\}' has methods for the following verbs: get */
18
+ (path: "/messages/streams/{id}", id: string): GetMedia;
19
+ /** Resource for '/messages/notifications:send' has methods for the following verbs: post */
20
+ (path: "/messages/notifications:send"): Send;
21
+ /** Resource for '/messages/channels/\{channelId\}/templates' has methods for the following verbs: get */
22
+ (path: "/messages/channels/{channelId}/templates", channelId: string): ListTemplates;
23
+ }
24
+ export type MessagesServiceClient = Client & {
25
+ path: Routes;
26
+ };
27
+ //# sourceMappingURL=clientDefinitions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,MAAM,WAAW,QAAQ;IACvB,kEAAkE;IAClE,GAAG,CACD,OAAO,CAAC,EAAE,kBAAkB,GAC3B,gBAAgB,CAAC,mBAAmB,GAAG,uBAAuB,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,IAAI;IACnB,0DAA0D;IAC1D,IAAI,CACF,OAAO,EAAE,cAAc,GACtB,gBAAgB,CAAC,eAAe,GAAG,mBAAmB,CAAC,CAAC;CAC5D;AAED,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,GAAG,CACD,OAAO,CAAC,EAAE,uBAAuB,GAChC,gBAAgB,CAAC,wBAAwB,GAAG,4BAA4B,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,MAAM;IACrB,uFAAuF;IACvF,CAAC,IAAI,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAC;IACvD,4FAA4F;IAC5F,CAAC,IAAI,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAC7C,yGAAyG;IACzG,CACE,IAAI,EAAE,0CAA0C,EAChD,SAAS,EAAE,MAAM,GAChB,aAAa,CAAC;CAClB;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=clientDefinitions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetMediaParameters,\n SendParameters,\n ListTemplatesParameters,\n} from \"./parameters.js\";\nimport {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetMedia {\n /** Download the Media payload from a User to Business message. */\n get(\n options?: GetMediaParameters,\n ): StreamableMethod<GetMedia200Response | GetMediaDefaultResponse>;\n}\n\nexport interface Send {\n /** Sends a notification message from Business to User. */\n post(\n options: SendParameters,\n ): StreamableMethod<Send202Response | SendDefaultResponse>;\n}\n\nexport interface ListTemplates {\n /** List all templates for given Azure Communication Services channel */\n get(\n options?: ListTemplatesParameters,\n ): StreamableMethod<ListTemplates200Response | ListTemplatesDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/messages/streams/\\{id\\}' has methods for the following verbs: get */\n (path: \"/messages/streams/{id}\", id: string): GetMedia;\n /** Resource for '/messages/notifications:send' has methods for the following verbs: post */\n (path: \"/messages/notifications:send\"): Send;\n /** Resource for '/messages/channels/\\{channelId\\}/templates' has methods for the following verbs: get */\n (\n path: \"/messages/channels/{channelId}/templates\",\n channelId: string,\n ): ListTemplates;\n}\n\nexport type MessagesServiceClient = Client & {\n path: Routes;\n};\n"]}
@@ -0,0 +1,11 @@
1
+ import MessagesServiceClient from "./messagesServiceClient.js";
2
+ export * from "./messagesServiceClient.js";
3
+ export * from "./parameters.js";
4
+ export * from "./responses.js";
5
+ export * from "./clientDefinitions.js";
6
+ export * from "./isUnexpected.js";
7
+ export * from "./models.js";
8
+ export * from "./outputModels.js";
9
+ export * from "./paginateHelper.js";
10
+ export default MessagesServiceClient;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":"AAGA,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAE/D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAEpC,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const tslib_1 = require("tslib");
6
+ const messagesServiceClient_js_1 = tslib_1.__importDefault(require("./messagesServiceClient.js"));
7
+ tslib_1.__exportStar(require("./messagesServiceClient.js"), exports);
8
+ tslib_1.__exportStar(require("./parameters.js"), exports);
9
+ tslib_1.__exportStar(require("./responses.js"), exports);
10
+ tslib_1.__exportStar(require("./clientDefinitions.js"), exports);
11
+ tslib_1.__exportStar(require("./isUnexpected.js"), exports);
12
+ tslib_1.__exportStar(require("./models.js"), exports);
13
+ tslib_1.__exportStar(require("./outputModels.js"), exports);
14
+ tslib_1.__exportStar(require("./paginateHelper.js"), exports);
15
+ exports.default = messagesServiceClient_js_1.default;
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,kGAA+D;AAE/D,qEAA2C;AAC3C,0DAAgC;AAChC,yDAA+B;AAC/B,iEAAuC;AACvC,4DAAkC;AAClC,sDAA4B;AAC5B,4DAAkC;AAClC,8DAAoC;AAEpC,kBAAe,kCAAqB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport MessagesServiceClient from \"./messagesServiceClient.js\";\n\nexport * from \"./messagesServiceClient.js\";\nexport * from \"./parameters.js\";\nexport * from \"./responses.js\";\nexport * from \"./clientDefinitions.js\";\nexport * from \"./isUnexpected.js\";\nexport * from \"./models.js\";\nexport * from \"./outputModels.js\";\nexport * from \"./paginateHelper.js\";\n\nexport default MessagesServiceClient;\n"]}
@@ -0,0 +1,5 @@
1
+ import { GetMedia200Response, GetMediaDefaultResponse, Send202Response, SendDefaultResponse, ListTemplates200Response, ListTemplatesDefaultResponse } from "./responses.js";
2
+ export declare function isUnexpected(response: GetMedia200Response | GetMediaDefaultResponse): response is GetMediaDefaultResponse;
3
+ export declare function isUnexpected(response: Send202Response | SendDefaultResponse): response is SendDefaultResponse;
4
+ export declare function isUnexpected(response: ListTemplates200Response | ListTemplatesDefaultResponse): response is ListTemplatesDefaultResponse;
5
+ //# sourceMappingURL=isUnexpected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AAQxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,mBAAmB,GAAG,uBAAuB,GACtD,QAAQ,IAAI,uBAAuB,CAAC;AACvC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,eAAe,GAAG,mBAAmB,GAC9C,QAAQ,IAAI,mBAAmB,CAAC;AACnC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,wBAAwB,GAAG,4BAA4B,GAChE,QAAQ,IAAI,4BAA4B,CAAC"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.isUnexpected = isUnexpected;
6
+ const responseMap = {
7
+ "GET /messages/streams/{id}": ["200"],
8
+ "POST /messages/notifications:send": ["202"],
9
+ "GET /messages/channels/{channelId}/templates": ["200"],
10
+ };
11
+ function isUnexpected(response) {
12
+ const lroOriginal = response.headers["x-ms-original-url"];
13
+ const url = new URL(lroOriginal !== null && lroOriginal !== void 0 ? lroOriginal : response.request.url);
14
+ const method = response.request.method;
15
+ let pathDetails = responseMap[`${method} ${url.pathname}`];
16
+ if (!pathDetails) {
17
+ pathDetails = getParametrizedPathSuccess(method, url.pathname);
18
+ }
19
+ return !pathDetails.includes(response.status);
20
+ }
21
+ function getParametrizedPathSuccess(method, path) {
22
+ var _a, _b, _c, _d;
23
+ const pathParts = path.split("/");
24
+ // Traverse list to match the longest candidate
25
+ // matchedLen: the length of candidate path
26
+ // matchedValue: the matched status code array
27
+ let matchedLen = -1, matchedValue = [];
28
+ // Iterate the responseMap to find a match
29
+ for (const [key, value] of Object.entries(responseMap)) {
30
+ // Extracting the path from the map key which is in format
31
+ // GET /path/foo
32
+ if (!key.startsWith(method)) {
33
+ continue;
34
+ }
35
+ const candidatePath = getPathFromMapKey(key);
36
+ // Get each part of the url path
37
+ const candidateParts = candidatePath.split("/");
38
+ // track if we have found a match to return the values found.
39
+ let found = true;
40
+ for (let i = candidateParts.length - 1, j = pathParts.length - 1; i >= 1 && j >= 1; i--, j--) {
41
+ if (((_a = candidateParts[i]) === null || _a === void 0 ? void 0 : _a.startsWith("{")) &&
42
+ ((_b = candidateParts[i]) === null || _b === void 0 ? void 0 : _b.indexOf("}")) !== -1) {
43
+ const start = candidateParts[i].indexOf("}") + 1, end = (_c = candidateParts[i]) === null || _c === void 0 ? void 0 : _c.length;
44
+ // If the current part of the candidate is a "template" part
45
+ // Try to use the suffix of pattern to match the path
46
+ // {guid} ==> $
47
+ // {guid}:export ==> :export$
48
+ const isMatched = new RegExp(`${(_d = candidateParts[i]) === null || _d === void 0 ? void 0 : _d.slice(start, end)}`).test(pathParts[j] || "");
49
+ if (!isMatched) {
50
+ found = false;
51
+ break;
52
+ }
53
+ continue;
54
+ }
55
+ // If the candidate part is not a template and
56
+ // the parts don't match mark the candidate as not found
57
+ // to move on with the next candidate path.
58
+ if (candidateParts[i] !== pathParts[j]) {
59
+ found = false;
60
+ break;
61
+ }
62
+ }
63
+ // We finished evaluating the current candidate parts
64
+ // Update the matched value if and only if we found the longer pattern
65
+ if (found && candidatePath.length > matchedLen) {
66
+ matchedLen = candidatePath.length;
67
+ matchedValue = value;
68
+ }
69
+ }
70
+ return matchedValue;
71
+ }
72
+ function getPathFromMapKey(mapKey) {
73
+ const pathStart = mapKey.indexOf("/");
74
+ return mapKey.slice(pathStart);
75
+ }
76
+ //# sourceMappingURL=isUnexpected.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA0BlC,oCAoBC;AAnCD,MAAM,WAAW,GAA6B;IAC5C,4BAA4B,EAAE,CAAC,KAAK,CAAC;IACrC,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,8CAA8C,EAAE,CAAC,KAAK,CAAC;CACxD,CAAC;AAWF,SAAgB,YAAY,CAC1B,QAMgC;IAKhC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAA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C,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /messages/streams/{id}\": [\"200\"],\n \"POST /messages/notifications:send\": [\"202\"],\n \"GET /messages/channels/{channelId}/templates\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetMedia200Response | GetMediaDefaultResponse,\n): response is GetMediaDefaultResponse;\nexport function isUnexpected(\n response: Send202Response | SendDefaultResponse,\n): response is SendDefaultResponse;\nexport function isUnexpected(\n response: ListTemplates200Response | ListTemplatesDefaultResponse,\n): response is ListTemplatesDefaultResponse;\nexport function isUnexpected(\n response:\n | GetMedia200Response\n | GetMediaDefaultResponse\n | Send202Response\n | SendDefaultResponse\n | ListTemplates200Response\n | ListTemplatesDefaultResponse,\n): response is\n | GetMediaDefaultResponse\n | SendDefaultResponse\n | ListTemplatesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export declare const logger: import("@azure/logger").AzureLogger;
2
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/logger.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM,qCAA+C,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.logger = void 0;
6
+ const logger_1 = require("@azure/logger");
7
+ exports.logger = (0, logger_1.createClientLogger)("communication-messages");
8
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../src/generated/src/logger.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,0CAAmD;AACtC,QAAA,MAAM,GAAG,IAAA,2BAAkB,EAAC,wBAAwB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createClientLogger } from \"@azure/logger\";\nexport const logger = createClientLogger(\"communication-messages\");\n"]}
@@ -0,0 +1,16 @@
1
+ import { ClientOptions } from "@azure-rest/core-client";
2
+ import { TokenCredential, KeyCredential } from "@azure/core-auth";
3
+ import { MessagesServiceClient } from "./clientDefinitions.js";
4
+ /** The optional parameters for the client */
5
+ export interface MessagesServiceClientOptions extends ClientOptions {
6
+ /** The api version option of the client */
7
+ apiVersion?: string;
8
+ }
9
+ /**
10
+ * Initialize a new instance of `MessagesServiceClient`
11
+ * @param endpointParam - The communication resource, for example https://my-resource.communication.azure.com
12
+ * @param credentials - uniquely identify client credential
13
+ * @param options - the parameter for all optional parameters
14
+ */
15
+ export default function createClient(endpointParam: string, credentials: TokenCredential | KeyCredential, { apiVersion, ...options }?: MessagesServiceClientOptions): MessagesServiceClient;
16
+ //# sourceMappingURL=messagesServiceClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messagesServiceClient.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/messagesServiceClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAAa,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,6CAA6C;AAC7C,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IACjE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,GAAG,aAAa,EAC5C,EAAE,UAAyB,EAAE,GAAG,OAAO,EAAE,GAAE,4BAAiC,GAC3E,qBAAqB,CA+CvB"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.default = createClient;
6
+ const tslib_1 = require("tslib");
7
+ const core_client_1 = require("@azure-rest/core-client");
8
+ const logger_js_1 = require("./logger.js");
9
+ /**
10
+ * Initialize a new instance of `MessagesServiceClient`
11
+ * @param endpointParam - The communication resource, for example https://my-resource.communication.azure.com
12
+ * @param credentials - uniquely identify client credential
13
+ * @param options - the parameter for all optional parameters
14
+ */
15
+ function createClient(endpointParam, credentials, _a = {}) {
16
+ var _b, _c, _d, _e, _f, _g, _h, _j;
17
+ var { apiVersion = "2024-08-30" } = _a, options = tslib_1.__rest(_a, ["apiVersion"]);
18
+ const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `${endpointParam}`;
19
+ const userAgentInfo = `azsdk-js-communication-messages-rest/2.0.0`;
20
+ const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
21
+ ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
22
+ : `${userAgentInfo}`;
23
+ options = Object.assign(Object.assign({}, options), { userAgentOptions: {
24
+ userAgentPrefix,
25
+ }, loggingOptions: {
26
+ logger: (_e = (_d = options.loggingOptions) === null || _d === void 0 ? void 0 : _d.logger) !== null && _e !== void 0 ? _e : logger_js_1.logger.info,
27
+ }, credentials: {
28
+ scopes: (_g = (_f = options.credentials) === null || _f === void 0 ? void 0 : _f.scopes) !== null && _g !== void 0 ? _g : [
29
+ "https://communication.azure.com/.default",
30
+ ],
31
+ apiKeyHeaderName: (_j = (_h = options.credentials) === null || _h === void 0 ? void 0 : _h.apiKeyHeaderName) !== null && _j !== void 0 ? _j : "Authorization",
32
+ } });
33
+ const client = (0, core_client_1.getClient)(endpointUrl, credentials, options);
34
+ client.pipeline.removePolicy({ name: "ApiVersionPolicy" });
35
+ client.pipeline.addPolicy({
36
+ name: "ClientApiVersionPolicy",
37
+ sendRequest: (req, next) => {
38
+ // Use the apiVersion defined in request url directly
39
+ // Append one if there is no apiVersion and we have one at client options
40
+ const url = new URL(req.url);
41
+ if (!url.searchParams.get("api-version") && apiVersion) {
42
+ req.url = `${req.url}${Array.from(url.searchParams.keys()).length > 0 ? "&" : "?"}api-version=${apiVersion}`;
43
+ }
44
+ return next(req);
45
+ },
46
+ });
47
+ return client;
48
+ }
49
+ //# sourceMappingURL=messagesServiceClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messagesServiceClient.js","sourceRoot":"","sources":["../../../../src/generated/src/messagesServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmBlC,+BAmDC;;AApED,yDAAmE;AACnE,2CAAqC;AAUrC;;;;;GAKG;AACH,SAAwB,YAAY,CAClC,aAAqB,EACrB,WAA4C,EAC5C,KAA0E,EAAE;;QAA5E,EAAE,UAAU,GAAG,YAAY,OAAiD,EAA5C,OAAO,sBAAvC,cAAyC,CAAF;IAEvC,MAAM,WAAW,GAAG,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,GAAG,aAAa,EAAE,CAAC;IAC9E,MAAM,aAAa,GAAG,4CAA4C,CAAC;IACnE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;QAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,aAAa,EAAE;QAChE,CAAC,CAAC,GAAG,aAAa,EAAE,CAAC;IACzB,OAAO,mCACF,OAAO,KACV,gBAAgB,EAAE;YAChB,eAAe;SAChB,EACD,cAAc,EAAE;YACd,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,cAAc,0CAAE,MAAM,mCAAI,kBAAM,CAAC,IAAI;SACtD,EACD,WAAW,EAAE;YACX,MAAM,EAAE,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,MAAM,mCAAI;gBACrC,0CAA0C;aAC3C;YACD,gBAAgB,EACd,MAAA,MAAA,OAAO,CAAC,WAAW,0CAAE,gBAAgB,mCAAI,eAAe;SAC3D,GACF,CAAC;IACF,MAAM,MAAM,GAAG,IAAA,uBAAS,EACtB,WAAW,EACX,WAAW,EACX,OAAO,CACiB,CAAC;IAE3B,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC;QACxB,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { getClient, ClientOptions } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport { MessagesServiceClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface MessagesServiceClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpointParam - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential | KeyCredential,\n { apiVersion = \"2024-08-30\", ...options }: MessagesServiceClientOptions = {},\n): MessagesServiceClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n const userAgentInfo = `azsdk-js-communication-messages-rest/2.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\n \"https://communication.azure.com/.default\",\n ],\n apiKeyHeaderName:\n options.credentials?.apiKeyHeaderName ?? \"Authorization\",\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as MessagesServiceClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
@@ -0,0 +1,194 @@
1
+ /** Details of the message to send. */
2
+ export interface NotificationContentParent {
3
+ /** The Channel Registration ID for the Business Identifier. */
4
+ channelRegistrationId: string;
5
+ /** The native external platform user identifiers of the recipient. */
6
+ to: string[];
7
+ kind: CommunicationMessageKind;
8
+ }
9
+ /** A request to send a text notification. */
10
+ export interface TextNotificationContent extends NotificationContentParent {
11
+ /** Message notification type is text. */
12
+ kind: "text";
13
+ /** Message content. */
14
+ content: string;
15
+ }
16
+ /** @deprecated A request to send an image notification. */
17
+ export interface MediaNotificationContent extends NotificationContentParent {
18
+ /** Message notification type is image. */
19
+ kind: "image_v0";
20
+ /** Optional text content. */
21
+ content?: string;
22
+ /** A media url for the file. Required if the type is one of the supported media types, e.g. image */
23
+ mediaUri: string;
24
+ }
25
+ /** A request to send an image notification. */
26
+ export interface ImageNotificationContent extends NotificationContentParent {
27
+ /** Message notification type is image. */
28
+ kind: "image";
29
+ /** Optional text content. */
30
+ caption?: string;
31
+ /** A media url for the file. Required if the type is one of the supported media types, e.g. image */
32
+ mediaUri: string;
33
+ }
34
+ /** A request to send a document notification. */
35
+ export interface DocumentNotificationContent extends NotificationContentParent {
36
+ /** Message notification type is image. */
37
+ kind: "document";
38
+ /** Optional text content. */
39
+ caption?: string;
40
+ /** Optional name for the file. */
41
+ fileName?: string;
42
+ /** A media url for the file. Required if the type is one of the supported media types, e.g. image */
43
+ mediaUri: string;
44
+ }
45
+ /** A request to send a video notification. */
46
+ export interface VideoNotificationContent extends NotificationContentParent {
47
+ /** Message notification type is image. */
48
+ kind: "video";
49
+ /** Optional text content. */
50
+ caption?: string;
51
+ /** A media url for the file. Required if the type is one of the supported media types, e.g. image */
52
+ mediaUri: string;
53
+ }
54
+ /** A request to send an audio notification. */
55
+ export interface AudioNotificationContent extends NotificationContentParent {
56
+ /** Message notification type is audio. */
57
+ kind: "audio";
58
+ /** A media url for the file. Required if the type is one of the supported media types, e.g. image */
59
+ mediaUri: string;
60
+ }
61
+ /** A request to send a template notification. */
62
+ export interface TemplateNotificationContent extends NotificationContentParent {
63
+ /** Message notification type is template. */
64
+ kind: "template";
65
+ /** The template object used to create templates. */
66
+ template: MessageTemplate;
67
+ }
68
+ /** The template object used to create templates. */
69
+ export interface MessageTemplate {
70
+ /** Name of the template. */
71
+ name: string;
72
+ /** The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. */
73
+ language: string;
74
+ /** The template values. */
75
+ values?: Array<MessageTemplateValue>;
76
+ /** The binding object to link values to the template specific locations */
77
+ bindings?: MessageTemplateBindings;
78
+ }
79
+ /** The class describes a parameter of a template. */
80
+ export interface MessageTemplateValueParent {
81
+ /** Template binding reference name */
82
+ name: string;
83
+ kind: MessageTemplateValueKind;
84
+ }
85
+ /** The message template's text value information. */
86
+ export interface MessageTemplateText extends MessageTemplateValueParent {
87
+ /** Message parameter type is text. */
88
+ kind: "text";
89
+ /** The text value. */
90
+ text: string;
91
+ }
92
+ /** The message template's image value information. */
93
+ export interface MessageTemplateImage extends MessageTemplateValueParent {
94
+ /** Message parameter type is image. */
95
+ kind: "image";
96
+ /** The (public) URL of the media. */
97
+ url: string;
98
+ /** The [optional] caption of the media object. */
99
+ caption?: string;
100
+ /** The [optional] filename of the media file. */
101
+ fileName?: string;
102
+ }
103
+ /** The message template's document value information. */
104
+ export interface MessageTemplateDocument extends MessageTemplateValueParent {
105
+ /** Message parameter type is document. */
106
+ kind: "document";
107
+ /** The (public) URL of the media. */
108
+ url: string;
109
+ /** The [optional] caption of the media object. */
110
+ caption?: string;
111
+ /** The [optional] filename of the media file. */
112
+ fileName?: string;
113
+ }
114
+ /** The message template's video value information. */
115
+ export interface MessageTemplateVideo extends MessageTemplateValueParent {
116
+ /** Message parameter type is video. */
117
+ kind: "video";
118
+ /** The (public) URL of the media. */
119
+ url: string;
120
+ /** The [optional] caption of the media object. */
121
+ caption?: string;
122
+ /** The [optional] filename of the media file. */
123
+ fileName?: string;
124
+ }
125
+ /** The message template's location value information. */
126
+ export interface MessageTemplateLocation extends MessageTemplateValueParent {
127
+ /** Message parameter type is location. */
128
+ kind: "location";
129
+ /** The [Optional] name of the location. */
130
+ locationName?: string;
131
+ /** The [Optional] address of the location. */
132
+ address?: string;
133
+ /** The latitude of the location. */
134
+ latitude: number;
135
+ /** The longitude of the location. */
136
+ longitude: number;
137
+ }
138
+ /** The message template's quick action value information. */
139
+ export interface MessageTemplateQuickAction extends MessageTemplateValueParent {
140
+ /** Message parameter type is quick action. */
141
+ kind: "quickAction";
142
+ /** The [Optional] quick action text */
143
+ text?: string;
144
+ /** The [Optional] quick action payload */
145
+ payload?: string;
146
+ }
147
+ /** The binding object to link values to the template specific locations */
148
+ export interface MessageTemplateBindingsParent {
149
+ kind: MessageTemplateBindingsKind;
150
+ }
151
+ /** The template bindings for WhatsApp */
152
+ export interface WhatsAppMessageTemplateBindings extends MessageTemplateBindingsParent {
153
+ /** MessageTemplateBindings is whatsApp */
154
+ kind: "whatsApp";
155
+ /** The header template bindings */
156
+ header?: Array<WhatsAppMessageTemplateBindingsComponent>;
157
+ /** The body template bindings */
158
+ body?: Array<WhatsAppMessageTemplateBindingsComponent>;
159
+ /** The footer template bindings */
160
+ footer?: Array<WhatsAppMessageTemplateBindingsComponent>;
161
+ /** The button template bindings */
162
+ buttons?: Array<WhatsAppMessageTemplateBindingsButton>;
163
+ }
164
+ /** The template bindings component for WhatsApp */
165
+ export interface WhatsAppMessageTemplateBindingsComponent {
166
+ /** The name of the referenced item in the template values. */
167
+ refValue: string;
168
+ }
169
+ /** The template bindings component button for WhatsApp */
170
+ export interface WhatsAppMessageTemplateBindingsButton {
171
+ /**
172
+ * The WhatsApp button sub type
173
+ *
174
+ * Possible values: "quickReply", "url"
175
+ */
176
+ subType: WhatsAppMessageButtonSubType;
177
+ /** The name of the referenced item in the template values. */
178
+ refValue: string;
179
+ }
180
+ /** Details of the message to send. */
181
+ export type NotificationContent = NotificationContentParent | TextNotificationContent | MediaNotificationContent | ImageNotificationContent | DocumentNotificationContent | VideoNotificationContent | AudioNotificationContent | TemplateNotificationContent;
182
+ /** The class describes a parameter of a template. */
183
+ export type MessageTemplateValue = MessageTemplateValueParent | MessageTemplateText | MessageTemplateImage | MessageTemplateDocument | MessageTemplateVideo | MessageTemplateLocation | MessageTemplateQuickAction;
184
+ /** The binding object to link values to the template specific locations */
185
+ export type MessageTemplateBindings = MessageTemplateBindingsParent | WhatsAppMessageTemplateBindings;
186
+ /** Alias for CommunicationMessageKind */
187
+ export type CommunicationMessageKind = string;
188
+ /** Alias for MessageTemplateValueKind */
189
+ export type MessageTemplateValueKind = string;
190
+ /** Alias for MessageTemplateBindingsKind */
191
+ export type MessageTemplateBindingsKind = string;
192
+ /** Alias for WhatsAppMessageButtonSubType */
193
+ export type WhatsAppMessageButtonSubType = string;
194
+ //# sourceMappingURL=models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":"AAGA,sCAAsC;AACtC,MAAM,WAAW,yBAAyB;IACxC,+DAA+D;IAC/D,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sEAAsE;IACtE,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED,6CAA6C;AAC7C,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,2DAA2D;AAC3D,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,0CAA0C;IAC1C,IAAI,EAAE,UAAU,CAAC;IACjB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qGAAqG;IACrG,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,+CAA+C;AAC/C,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,0CAA0C;IAC1C,IAAI,EAAE,OAAO,CAAC;IACd,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAA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6B,GAC7B,+BAA+B,CAAC;AACpC,yCAAyC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,yCAAyC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,4CAA4C;AAC5C,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AACjD,6CAA6C;AAC7C,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC"}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ //# sourceMappingURL=models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Details of the message to send. */\nexport interface NotificationContentParent {\n /** The Channel Registration ID for the Business Identifier. */\n channelRegistrationId: string;\n /** The native external platform user identifiers of the recipient. */\n to: string[];\n kind: CommunicationMessageKind;\n}\n\n/** A request to send a text notification. */\nexport interface TextNotificationContent extends NotificationContentParent {\n /** Message notification type is text. */\n kind: \"text\";\n /** Message content. */\n content: string;\n}\n\n/** @deprecated A request to send an image notification. */\nexport interface MediaNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"image_v0\";\n /** Optional text content. */\n content?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send an image notification. */\nexport interface ImageNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"image\";\n /** Optional text content. */\n caption?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a document notification. */\nexport interface DocumentNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"document\";\n /** Optional text content. */\n caption?: string;\n /** Optional name for the file. */\n fileName?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a video notification. */\nexport interface VideoNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"video\";\n /** Optional text content. */\n caption?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send an audio notification. */\nexport interface AudioNotificationContent extends NotificationContentParent {\n /** Message notification type is audio. */\n kind: \"audio\";\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a template notification. */\nexport interface TemplateNotificationContent extends NotificationContentParent {\n /** Message notification type is template. */\n kind: \"template\";\n /** The template object used to create templates. */\n template: MessageTemplate;\n}\n\n/** The template object used to create templates. */\nexport interface MessageTemplate {\n /** Name of the template. */\n name: string;\n /** The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. */\n language: string;\n /** The template values. */\n values?: Array<MessageTemplateValue>;\n /** The binding object to link values to the template specific locations */\n bindings?: MessageTemplateBindings;\n}\n\n/** The class describes a parameter of a template. */\nexport interface MessageTemplateValueParent {\n /** Template binding reference name */\n name: string;\n kind: MessageTemplateValueKind;\n}\n\n/** The message template's text value information. */\nexport interface MessageTemplateText extends MessageTemplateValueParent {\n /** Message parameter type is text. */\n kind: \"text\";\n /** The text value. */\n text: string;\n}\n\n/** The message template's image value information. */\nexport interface MessageTemplateImage extends MessageTemplateValueParent {\n /** Message parameter type is image. */\n kind: \"image\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's document value information. */\nexport interface MessageTemplateDocument extends MessageTemplateValueParent {\n /** Message parameter type is document. */\n kind: \"document\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's video value information. */\nexport interface MessageTemplateVideo extends MessageTemplateValueParent {\n /** Message parameter type is video. */\n kind: \"video\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's location value information. */\nexport interface MessageTemplateLocation extends MessageTemplateValueParent {\n /** Message parameter type is location. */\n kind: \"location\";\n /** The [Optional] name of the location. */\n locationName?: string;\n /** The [Optional] address of the location. */\n address?: string;\n /** The latitude of the location. */\n latitude: number;\n /** The longitude of the location. */\n longitude: number;\n}\n\n/** The message template's quick action value information. */\nexport interface MessageTemplateQuickAction extends MessageTemplateValueParent {\n /** Message parameter type is quick action. */\n kind: \"quickAction\";\n /** The [Optional] quick action text */\n text?: string;\n /** The [Optional] quick action payload */\n payload?: string;\n}\n\n/** The binding object to link values to the template specific locations */\nexport interface MessageTemplateBindingsParent {\n kind: MessageTemplateBindingsKind;\n}\n\n/** The template bindings for WhatsApp */\nexport interface WhatsAppMessageTemplateBindings\n extends MessageTemplateBindingsParent {\n /** MessageTemplateBindings is whatsApp */\n kind: \"whatsApp\";\n /** The header template bindings */\n header?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The body template bindings */\n body?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The footer template bindings */\n footer?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The button template bindings */\n buttons?: Array<WhatsAppMessageTemplateBindingsButton>;\n}\n\n/** The template bindings component for WhatsApp */\nexport interface WhatsAppMessageTemplateBindingsComponent {\n /** The name of the referenced item in the template values. */\n refValue: string;\n}\n\n/** The template bindings component button for WhatsApp */\nexport interface WhatsAppMessageTemplateBindingsButton {\n /**\n * The WhatsApp button sub type\n *\n * Possible values: \"quickReply\", \"url\"\n */\n subType: WhatsAppMessageButtonSubType;\n /** The name of the referenced item in the template values. */\n refValue: string;\n}\n\n/** Details of the message to send. */\nexport type NotificationContent =\n | NotificationContentParent\n | TextNotificationContent\n | MediaNotificationContent\n | ImageNotificationContent\n | DocumentNotificationContent\n | VideoNotificationContent\n | AudioNotificationContent\n | TemplateNotificationContent;\n/** The class describes a parameter of a template. */\nexport type MessageTemplateValue =\n | MessageTemplateValueParent\n | MessageTemplateText\n | MessageTemplateImage\n | MessageTemplateDocument\n | MessageTemplateVideo\n | MessageTemplateLocation\n | MessageTemplateQuickAction;\n/** The binding object to link values to the template specific locations */\nexport type MessageTemplateBindings =\n | MessageTemplateBindingsParent\n | WhatsAppMessageTemplateBindings;\n/** Alias for CommunicationMessageKind */\nexport type CommunicationMessageKind = string;\n/** Alias for MessageTemplateValueKind */\nexport type MessageTemplateValueKind = string;\n/** Alias for MessageTemplateBindingsKind */\nexport type MessageTemplateBindingsKind = string;\n/** Alias for WhatsAppMessageButtonSubType */\nexport type WhatsAppMessageButtonSubType = string;\n"]}