@azure-rest/communication-messages 2.0.1-alpha.20241114.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,45 @@
1
+ import { Paged } from "@azure/core-paging";
2
+ /** Result of the send message operation. */
3
+ export interface SendMessageResultOutput {
4
+ /** Receipts of the send message operation. */
5
+ receipts: Array<MessageReceiptOutput>;
6
+ }
7
+ /** Receipt of the sending one message. */
8
+ export interface MessageReceiptOutput {
9
+ /** The message id. */
10
+ messageId: string;
11
+ /** The native external platform user identifier of the recipient. */
12
+ to: string;
13
+ }
14
+ /** The message template as returned from the service. */
15
+ export interface MessageTemplateItemOutputParent {
16
+ /** The template's name. */
17
+ readonly name: string;
18
+ /** 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'. */
19
+ language: string;
20
+ /**
21
+ * The aggregated template status.
22
+ *
23
+ * Possible values: "approved", "rejected", "pending", "paused"
24
+ */
25
+ status: MessageTemplateStatusOutput;
26
+ kind: CommunicationMessagesChannelOutput;
27
+ }
28
+ /** The WhatsApp-specific template response contract */
29
+ export interface WhatsAppMessageTemplateItemOutput extends MessageTemplateItemOutputParent {
30
+ /** WhatsApp platform's template content. This is the payload returned from WhatsApp API. */
31
+ content?: any;
32
+ /** Message template response type is whatsApp. */
33
+ kind: "whatsApp";
34
+ }
35
+ /** The message template as returned from the service. */
36
+ export type MessageTemplateItemOutput = MessageTemplateItemOutputParent | WhatsAppMessageTemplateItemOutput;
37
+ /** Alias for RepeatabilityResultOutput */
38
+ export type RepeatabilityResultOutput = "accepted" | "rejected";
39
+ /** Paged collection of MessageTemplateItem items */
40
+ export type PagedMessageTemplateItemOutput = Paged<MessageTemplateItemOutput>;
41
+ /** Alias for MessageTemplateStatusOutput */
42
+ export type MessageTemplateStatusOutput = string;
43
+ /** Alias for CommunicationMessagesChannelOutput */
44
+ export type CommunicationMessagesChannelOutput = string;
45
+ //# sourceMappingURL=outputModels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;CACvC;AAED,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,yDAAyD;AACzD,MAAM,WAAW,+BAA+B;IAC9C,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oKAAoK;IACpK,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,2BAA2B,CAAC;IACpC,IAAI,EAAE,kCAAkC,CAAC;CAC1C;AAED,uDAAuD;AACvD,MAAM,WAAW,iCACf,SAAQ,+BAA+B;IACvC,4FAA4F;IAC5F,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,kDAAkD;IAClD,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GACjC,+BAA+B,GAC/B,iCAAiC,CAAC;AACtC,0CAA0C;AAC1C,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,UAAU,CAAC;AAChE,oDAAoD;AACpD,MAAM,MAAM,8BAA8B,GAAG,KAAK,CAAC,yBAAyB,CAAC,CAAC;AAC9E,4CAA4C;AAC5C,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AACjD,mDAAmD;AACnD,MAAM,MAAM,kCAAkC,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=outputModels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Paged } from \"@azure/core-paging\";\n\n/** Result of the send message operation. */\nexport interface SendMessageResultOutput {\n /** Receipts of the send message operation. */\n receipts: Array<MessageReceiptOutput>;\n}\n\n/** Receipt of the sending one message. */\nexport interface MessageReceiptOutput {\n /** The message id. */\n messageId: string;\n /** The native external platform user identifier of the recipient. */\n to: string;\n}\n\n/** The message template as returned from the service. */\nexport interface MessageTemplateItemOutputParent {\n /** The template's name. */\n readonly 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 /**\n * The aggregated template status.\n *\n * Possible values: \"approved\", \"rejected\", \"pending\", \"paused\"\n */\n status: MessageTemplateStatusOutput;\n kind: CommunicationMessagesChannelOutput;\n}\n\n/** The WhatsApp-specific template response contract */\nexport interface WhatsAppMessageTemplateItemOutput\n extends MessageTemplateItemOutputParent {\n /** WhatsApp platform's template content. This is the payload returned from WhatsApp API. */\n content?: any;\n /** Message template response type is whatsApp. */\n kind: \"whatsApp\";\n}\n\n/** The message template as returned from the service. */\nexport type MessageTemplateItemOutput =\n | MessageTemplateItemOutputParent\n | WhatsAppMessageTemplateItemOutput;\n/** Alias for RepeatabilityResultOutput */\nexport type RepeatabilityResultOutput = \"accepted\" | \"rejected\";\n/** Paged collection of MessageTemplateItem items */\nexport type PagedMessageTemplateItemOutput = Paged<MessageTemplateItemOutput>;\n/** Alias for MessageTemplateStatusOutput */\nexport type MessageTemplateStatusOutput = string;\n/** Alias for CommunicationMessagesChannelOutput */\nexport type CommunicationMessagesChannelOutput = string;\n"]}
@@ -0,0 +1,43 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { Client, PathUncheckedResponse } from "@azure-rest/core-client";
3
+ /**
4
+ * Helper type to extract the type of an array
5
+ */
6
+ export type GetArrayType<T> = T extends Array<infer TData> ? TData : never;
7
+ /**
8
+ * The type of a custom function that defines how to get a page and a link to the next one if any.
9
+ */
10
+ export type GetPage<TPage> = (pageLink: string, maxPageSize?: number) => Promise<{
11
+ page: TPage;
12
+ nextPageLink?: string;
13
+ }>;
14
+ /**
15
+ * Options for the paging helper
16
+ */
17
+ export interface PagingOptions<TResponse> {
18
+ /**
19
+ * Custom function to extract pagination details for crating the PagedAsyncIterableIterator
20
+ */
21
+ customGetPage?: GetPage<PaginateReturn<TResponse>[]>;
22
+ }
23
+ /**
24
+ * Helper type to infer the Type of the paged elements from the response type
25
+ * This type is generated based on the swagger information for x-ms-pageable
26
+ * specifically on the itemName property which indicates the property of the response
27
+ * where the page items are found. The default value is `value`.
28
+ * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter
29
+ */
30
+ export type PaginateReturn<TResult> = TResult extends {
31
+ body: {
32
+ value?: infer TPage;
33
+ };
34
+ } ? GetArrayType<TPage> : Array<unknown>;
35
+ /**
36
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
37
+ * @param client - Client to use for sending the next page requests
38
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
39
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
40
+ * @returns - PagedAsyncIterableIterator to iterate the elements
41
+ */
42
+ export declare function paginate<TResponse extends PathUncheckedResponse>(client: Client, initialResponse: TResponse, options?: PagingOptions<TResponse>): PagedAsyncIterableIterator<PaginateReturn<TResponse>>;
43
+ //# sourceMappingURL=paginateHelper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/paginateHelper.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,0BAA0B,EAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,MAAM,EAEN,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,SAAS,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,GAAG,KAAK,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,KAAK,IAAI,CAC3B,QAAQ,EAAE,MAAM,EAChB,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC;IACX,IAAI,EAAE,KAAK,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa,CAAC,SAAS;IACtC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;CACtD;AAED;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,CAAC,OAAO,IAAI,OAAO,SAAS;IACpD,IAAI,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,KAAK,CAAA;KAAE,CAAC;CAC/B,GACG,YAAY,CAAC,KAAK,CAAC,GACnB,KAAK,CAAC,OAAO,CAAC,CAAC;AAEnB;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,SAAS,SAAS,qBAAqB,EAC9D,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,SAAS,EAC1B,OAAO,GAAE,aAAa,CAAC,SAAS,CAAM,GACrC,0BAA0B,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CA4BvD"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ // Copyright (c) Microsoft Corporation.
3
+ // Licensed under the MIT License.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.paginate = paginate;
6
+ const core_paging_1 = require("@azure/core-paging");
7
+ const core_client_1 = require("@azure-rest/core-client");
8
+ /**
9
+ * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension
10
+ * @param client - Client to use for sending the next page requests
11
+ * @param initialResponse - Initial response containing the nextLink and current page of elements
12
+ * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results
13
+ * @returns - PagedAsyncIterableIterator to iterate the elements
14
+ */
15
+ function paginate(client, initialResponse, options = {}) {
16
+ let firstRun = true;
17
+ const itemName = "value";
18
+ const nextLinkName = "nextLink";
19
+ const { customGetPage } = options;
20
+ const pagedResult = {
21
+ firstPageLink: "",
22
+ getPage: typeof customGetPage === "function"
23
+ ? customGetPage
24
+ : async (pageLink) => {
25
+ const result = firstRun
26
+ ? initialResponse
27
+ : await client.pathUnchecked(pageLink).get();
28
+ firstRun = false;
29
+ checkPagingRequest(result);
30
+ const nextLink = getNextLink(result.body, nextLinkName);
31
+ const values = getElements(result.body, itemName);
32
+ return {
33
+ page: values,
34
+ nextPageLink: nextLink,
35
+ };
36
+ },
37
+ };
38
+ return (0, core_paging_1.getPagedAsyncIterator)(pagedResult);
39
+ }
40
+ /**
41
+ * Gets for the value of nextLink in the body
42
+ */
43
+ function getNextLink(body, nextLinkName) {
44
+ if (!nextLinkName) {
45
+ return undefined;
46
+ }
47
+ const nextLink = body[nextLinkName];
48
+ if (typeof nextLink !== "string" && typeof nextLink !== "undefined") {
49
+ throw new Error(`Body Property ${nextLinkName} should be a string or undefined`);
50
+ }
51
+ return nextLink;
52
+ }
53
+ /**
54
+ * Gets the elements of the current request in the body.
55
+ */
56
+ function getElements(body, itemName) {
57
+ const value = body[itemName];
58
+ // value has to be an array according to the x-ms-pageable extension.
59
+ // The fact that this must be an array is used above to calculate the
60
+ // type of elements in the page in PaginateReturn
61
+ if (!Array.isArray(value)) {
62
+ throw new Error(`Couldn't paginate response\n Body doesn't contain an array property with name: ${itemName}`);
63
+ }
64
+ return value !== null && value !== void 0 ? value : [];
65
+ }
66
+ /**
67
+ * Checks if a request failed
68
+ */
69
+ function checkPagingRequest(response) {
70
+ const Http2xxStatusCodes = [
71
+ "200",
72
+ "201",
73
+ "202",
74
+ "203",
75
+ "204",
76
+ "205",
77
+ "206",
78
+ "207",
79
+ "208",
80
+ "226",
81
+ ];
82
+ if (!Http2xxStatusCodes.includes(response.status)) {
83
+ throw (0, core_client_1.createRestError)(`Pagination failed with unexpected statusCode ${response.status}`, response);
84
+ }
85
+ }
86
+ //# sourceMappingURL=paginateHelper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paginateHelper.js","sourceRoot":"","sources":["../../../../src/generated/src/paginateHelper.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AA2DlC,4BAgCC;AAzFD,oDAI4B;AAC5B,yDAIiC;AAyCjC;;;;;;GAMG;AACH,SAAgB,QAAQ,CACtB,MAAc,EACd,eAA0B,EAC1B,UAAoC,EAAE;IAItC,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,MAAM,QAAQ,GAAG,OAAO,CAAC;IACzB,MAAM,YAAY,GAAG,UAAU,CAAC;IAChC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC;IAClC,MAAM,WAAW,GAA4B;QAC3C,aAAa,EAAE,EAAE;QACjB,OAAO,EACL,OAAO,aAAa,KAAK,UAAU;YACjC,CAAC,CAAC,aAAa;YACf,CAAC,CAAC,KAAK,EAAE,QAAgB,EAAE,EAAE;gBACzB,MAAM,MAAM,GAAG,QAAQ;oBACrB,CAAC,CAAC,eAAe;oBACjB,CAAC,CAAC,MAAM,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,GAAG,EAAE,CAAC;gBAC/C,QAAQ,GAAG,KAAK,CAAC;gBACjB,kBAAkB,CAAC,MAAM,CAAC,CAAC;gBAC3B,MAAM,QAAQ,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;gBACxD,MAAM,MAAM,GAAG,WAAW,CAAW,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;gBAC5D,OAAO;oBACL,IAAI,EAAE,MAAM;oBACZ,YAAY,EAAE,QAAQ;iBACvB,CAAC;YACJ,CAAC;KACR,CAAC;IAEF,OAAO,IAAA,mCAAqB,EAAC,WAAW,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAa,EAAE,YAAqB;IACvD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,QAAQ,GAAI,IAAgC,CAAC,YAAY,CAAC,CAAC;IAEjE,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QACpE,MAAM,IAAI,KAAK,CACb,iBAAiB,YAAY,kCAAkC,CAChE,CAAC;IACJ,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAc,IAAa,EAAE,QAAgB;IAC/D,MAAM,KAAK,GAAI,IAAgC,CAAC,QAAQ,CAAQ,CAAC;IAEjE,qEAAqE;IACrE,qEAAqE;IACrE,iDAAiD;IACjD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CACb,kFAAkF,QAAQ,EAAE,CAC7F,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC;AACrB,CAAC;AAED;;GAEG;AACH,SAAS,kBAAkB,CAAC,QAA+B;IACzD,MAAM,kBAAkB,GAAG;QACzB,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;KACN,CAAC;IACF,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAClD,MAAM,IAAA,6BAAe,EACnB,gDAAgD,QAAQ,CAAC,MAAM,EAAE,EACjE,QAAQ,CACT,CAAC;IACJ,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n getPagedAsyncIterator,\n PagedAsyncIterableIterator,\n PagedResult,\n} from \"@azure/core-paging\";\nimport {\n Client,\n createRestError,\n PathUncheckedResponse,\n} from \"@azure-rest/core-client\";\n\n/**\n * Helper type to extract the type of an array\n */\nexport type GetArrayType<T> = T extends Array<infer TData> ? TData : never;\n\n/**\n * The type of a custom function that defines how to get a page and a link to the next one if any.\n */\nexport type GetPage<TPage> = (\n pageLink: string,\n maxPageSize?: number,\n) => Promise<{\n page: TPage;\n nextPageLink?: string;\n}>;\n\n/**\n * Options for the paging helper\n */\nexport interface PagingOptions<TResponse> {\n /**\n * Custom function to extract pagination details for crating the PagedAsyncIterableIterator\n */\n customGetPage?: GetPage<PaginateReturn<TResponse>[]>;\n}\n\n/**\n * Helper type to infer the Type of the paged elements from the response type\n * This type is generated based on the swagger information for x-ms-pageable\n * specifically on the itemName property which indicates the property of the response\n * where the page items are found. The default value is `value`.\n * This type will allow us to provide strongly typed Iterator based on the response we get as second parameter\n */\nexport type PaginateReturn<TResult> = TResult extends {\n body: { value?: infer TPage };\n}\n ? GetArrayType<TPage>\n : Array<unknown>;\n\n/**\n * Helper to paginate results from an initial response that follows the specification of Autorest `x-ms-pageable` extension\n * @param client - Client to use for sending the next page requests\n * @param initialResponse - Initial response containing the nextLink and current page of elements\n * @param customGetPage - Optional - Function to define how to extract the page and next link to be used to paginate the results\n * @returns - PagedAsyncIterableIterator to iterate the elements\n */\nexport function paginate<TResponse extends PathUncheckedResponse>(\n client: Client,\n initialResponse: TResponse,\n options: PagingOptions<TResponse> = {},\n): PagedAsyncIterableIterator<PaginateReturn<TResponse>> {\n // Extract element type from initial response\n type TElement = PaginateReturn<TResponse>;\n let firstRun = true;\n const itemName = \"value\";\n const nextLinkName = \"nextLink\";\n const { customGetPage } = options;\n const pagedResult: PagedResult<TElement[]> = {\n firstPageLink: \"\",\n getPage:\n typeof customGetPage === \"function\"\n ? customGetPage\n : async (pageLink: string) => {\n const result = firstRun\n ? initialResponse\n : await client.pathUnchecked(pageLink).get();\n firstRun = false;\n checkPagingRequest(result);\n const nextLink = getNextLink(result.body, nextLinkName);\n const values = getElements<TElement>(result.body, itemName);\n return {\n page: values,\n nextPageLink: nextLink,\n };\n },\n };\n\n return getPagedAsyncIterator(pagedResult);\n}\n\n/**\n * Gets for the value of nextLink in the body\n */\nfunction getNextLink(body: unknown, nextLinkName?: string): string | undefined {\n if (!nextLinkName) {\n return undefined;\n }\n\n const nextLink = (body as Record<string, unknown>)[nextLinkName];\n\n if (typeof nextLink !== \"string\" && typeof nextLink !== \"undefined\") {\n throw new Error(\n `Body Property ${nextLinkName} should be a string or undefined`,\n );\n }\n\n return nextLink;\n}\n\n/**\n * Gets the elements of the current request in the body.\n */\nfunction getElements<T = unknown>(body: unknown, itemName: string): T[] {\n const value = (body as Record<string, unknown>)[itemName] as T[];\n\n // value has to be an array according to the x-ms-pageable extension.\n // The fact that this must be an array is used above to calculate the\n // type of elements in the page in PaginateReturn\n if (!Array.isArray(value)) {\n throw new Error(\n `Couldn't paginate response\\n Body doesn't contain an array property with name: ${itemName}`,\n );\n }\n\n return value ?? [];\n}\n\n/**\n * Checks if a request failed\n */\nfunction checkPagingRequest(response: PathUncheckedResponse): void {\n const Http2xxStatusCodes = [\n \"200\",\n \"201\",\n \"202\",\n \"203\",\n \"204\",\n \"205\",\n \"206\",\n \"207\",\n \"208\",\n \"226\",\n ];\n if (!Http2xxStatusCodes.includes(response.status)) {\n throw createRestError(\n `Pagination failed with unexpected statusCode ${response.status}`,\n response,\n );\n }\n}\n"]}
@@ -0,0 +1,43 @@
1
+ import { RawHttpHeadersInput } from "@azure/core-rest-pipeline";
2
+ import { RequestParameters } from "@azure-rest/core-client";
3
+ import { NotificationContent } from "./models.js";
4
+ export interface GetMediaHeaders {
5
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
6
+ "x-ms-client-request-id"?: string;
7
+ }
8
+ export interface GetMediaHeaderParam {
9
+ headers?: RawHttpHeadersInput & GetMediaHeaders;
10
+ }
11
+ export type GetMediaParameters = GetMediaHeaderParam & RequestParameters;
12
+ export interface SendHeaders {
13
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
14
+ "Repeatability-Request-ID"?: string;
15
+ /** Specifies the date and time at which the request was first created. */
16
+ "Repeatability-First-Sent"?: string;
17
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
18
+ "x-ms-client-request-id"?: string;
19
+ }
20
+ export interface SendBodyParam {
21
+ /** Details of the message to send. */
22
+ body: NotificationContent;
23
+ }
24
+ export interface SendHeaderParam {
25
+ headers?: RawHttpHeadersInput & SendHeaders;
26
+ }
27
+ export type SendParameters = SendHeaderParam & SendBodyParam & RequestParameters;
28
+ export interface ListTemplatesHeaders {
29
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
30
+ "x-ms-client-request-id"?: string;
31
+ }
32
+ export interface ListTemplatesQueryParamProperties {
33
+ /** Number of objects to return per page. */
34
+ maxpagesize?: number;
35
+ }
36
+ export interface ListTemplatesQueryParam {
37
+ queryParameters?: ListTemplatesQueryParamProperties;
38
+ }
39
+ export interface ListTemplatesHeaderParam {
40
+ headers?: RawHttpHeadersInput & ListTemplatesHeaders;
41
+ }
42
+ export type ListTemplatesParameters = ListTemplatesQueryParam & ListTemplatesHeaderParam & RequestParameters;
43
+ //# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/parameters.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,mBAAmB,GAAG,eAAe,CAAC;CACjD;AAED,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AAEzE,MAAM,WAAW,WAAW;IAC1B,sFAAsF;IACtF,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,0EAA0E;IAC1E,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,IAAI,EAAE,mBAAmB,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,CAAC,EAAE,mBAAmB,GAAG,WAAW,CAAC;CAC7C;AAED,MAAM,MAAM,cAAc,GAAG,eAAe,GAC1C,aAAa,GACb,iBAAiB,CAAC;AAEpB,MAAM,WAAW,oBAAoB;IACnC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,MAAM,WAAW,iCAAiC;IAChD,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,iCAAiC,CAAC;CACrD;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,mBAAmB,GAAG,oBAAoB,CAAC;CACtD;AAED,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,GAC3D,wBAAwB,GACxB,iBAAiB,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=parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../src/generated/src/parameters.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RawHttpHeadersInput } from \"@azure/core-rest-pipeline\";\nimport { RequestParameters } from \"@azure-rest/core-client\";\nimport { NotificationContent } from \"./models.js\";\n\nexport interface GetMediaHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface GetMediaHeaderParam {\n headers?: RawHttpHeadersInput & GetMediaHeaders;\n}\n\nexport type GetMediaParameters = GetMediaHeaderParam & RequestParameters;\n\nexport interface SendHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"Repeatability-Request-ID\"?: string;\n /** Specifies the date and time at which the request was first created. */\n \"Repeatability-First-Sent\"?: string;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface SendBodyParam {\n /** Details of the message to send. */\n body: NotificationContent;\n}\n\nexport interface SendHeaderParam {\n headers?: RawHttpHeadersInput & SendHeaders;\n}\n\nexport type SendParameters = SendHeaderParam &\n SendBodyParam &\n RequestParameters;\n\nexport interface ListTemplatesHeaders {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\nexport interface ListTemplatesQueryParamProperties {\n /** Number of objects to return per page. */\n maxpagesize?: number;\n}\n\nexport interface ListTemplatesQueryParam {\n queryParameters?: ListTemplatesQueryParamProperties;\n}\n\nexport interface ListTemplatesHeaderParam {\n headers?: RawHttpHeadersInput & ListTemplatesHeaders;\n}\n\nexport type ListTemplatesParameters = ListTemplatesQueryParam &\n ListTemplatesHeaderParam &\n RequestParameters;\n"]}
@@ -0,0 +1,66 @@
1
+ import { RawHttpHeaders } from "@azure/core-rest-pipeline";
2
+ import { HttpResponse, ErrorResponse } from "@azure-rest/core-client";
3
+ import { RepeatabilityResultOutput, SendMessageResultOutput, PagedMessageTemplateItemOutput } from "./outputModels.js";
4
+ export interface GetMedia200Headers {
5
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
6
+ "x-ms-client-request-id"?: string;
7
+ /** The stream content type. */
8
+ "content-type": "application/octet-stream";
9
+ }
10
+ /** The request has succeeded. */
11
+ export interface GetMedia200Response extends HttpResponse {
12
+ status: "200";
13
+ /** Value may contain any sequence of octets */
14
+ body: Uint8Array;
15
+ headers: RawHttpHeaders & GetMedia200Headers;
16
+ }
17
+ export interface GetMediaDefaultHeaders {
18
+ /** String error code indicating what went wrong. */
19
+ "x-ms-error-code"?: string;
20
+ }
21
+ export interface GetMediaDefaultResponse extends HttpResponse {
22
+ status: string;
23
+ body: ErrorResponse;
24
+ headers: RawHttpHeaders & GetMediaDefaultHeaders;
25
+ }
26
+ export interface Send202Headers {
27
+ /** Indicates whether the repeatable request was accepted or rejected. */
28
+ "repeatability-result"?: RepeatabilityResultOutput;
29
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
30
+ "x-ms-client-request-id"?: string;
31
+ }
32
+ /** The request has been accepted for processing, but processing has not yet completed. */
33
+ export interface Send202Response extends HttpResponse {
34
+ status: "202";
35
+ body: SendMessageResultOutput;
36
+ headers: RawHttpHeaders & Send202Headers;
37
+ }
38
+ export interface SendDefaultHeaders {
39
+ /** String error code indicating what went wrong. */
40
+ "x-ms-error-code"?: string;
41
+ }
42
+ export interface SendDefaultResponse extends HttpResponse {
43
+ status: string;
44
+ body: ErrorResponse;
45
+ headers: RawHttpHeaders & SendDefaultHeaders;
46
+ }
47
+ export interface ListTemplates200Headers {
48
+ /** An opaque, globally-unique, client-generated string identifier for the request. */
49
+ "x-ms-client-request-id"?: string;
50
+ }
51
+ /** The request has succeeded. */
52
+ export interface ListTemplates200Response extends HttpResponse {
53
+ status: "200";
54
+ body: PagedMessageTemplateItemOutput;
55
+ headers: RawHttpHeaders & ListTemplates200Headers;
56
+ }
57
+ export interface ListTemplatesDefaultHeaders {
58
+ /** String error code indicating what went wrong. */
59
+ "x-ms-error-code"?: string;
60
+ }
61
+ export interface ListTemplatesDefaultResponse extends HttpResponse {
62
+ status: string;
63
+ body: ErrorResponse;
64
+ headers: RawHttpHeaders & ListTemplatesDefaultHeaders;
65
+ }
66
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/responses.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EACL,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,+BAA+B;IAC/B,cAAc,EAAE,0BAA0B,CAAC;CAC5C;AAED,iCAAiC;AACjC,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,MAAM,EAAE,KAAK,CAAC;IACd,+CAA+C;IAC/C,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,EAAE,cAAc,GAAG,kBAAkB,CAAC;CAC9C;AAED,MAAM,WAAW,sBAAsB;IACrC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC3D,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,sBAAsB,CAAC;CAClD;AAED,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,sBAAsB,CAAC,EAAE,yBAAyB,CAAC;IACnD,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,0FAA0F;AAC1F,MAAM,WAAW,eAAgB,SAAQ,YAAY;IACnD,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,cAAc,GAAG,cAAc,CAAC;CAC1C;AAED,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,kBAAkB,CAAC;CAC9C;AAED,MAAM,WAAW,uBAAuB;IACtC,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED,iCAAiC;AACjC,MAAM,WAAW,wBAAyB,SAAQ,YAAY;IAC5D,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,8BAA8B,CAAC;IACrC,OAAO,EAAE,cAAc,GAAG,uBAAuB,CAAC;CACnD;AAED,MAAM,WAAW,2BAA2B;IAC1C,oDAAoD;IACpD,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,4BAA6B,SAAQ,YAAY;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,cAAc,GAAG,2BAA2B,CAAC;CACvD"}
@@ -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=responses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../../src/generated/src/responses.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RawHttpHeaders } from \"@azure/core-rest-pipeline\";\nimport { HttpResponse, ErrorResponse } from \"@azure-rest/core-client\";\nimport {\n RepeatabilityResultOutput,\n SendMessageResultOutput,\n PagedMessageTemplateItemOutput,\n} from \"./outputModels.js\";\n\nexport interface GetMedia200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n /** The stream content type. */\n \"content-type\": \"application/octet-stream\";\n}\n\n/** The request has succeeded. */\nexport interface GetMedia200Response extends HttpResponse {\n status: \"200\";\n /** Value may contain any sequence of octets */\n body: Uint8Array;\n headers: RawHttpHeaders & GetMedia200Headers;\n}\n\nexport interface GetMediaDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface GetMediaDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & GetMediaDefaultHeaders;\n}\n\nexport interface Send202Headers {\n /** Indicates whether the repeatable request was accepted or rejected. */\n \"repeatability-result\"?: RepeatabilityResultOutput;\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has been accepted for processing, but processing has not yet completed. */\nexport interface Send202Response extends HttpResponse {\n status: \"202\";\n body: SendMessageResultOutput;\n headers: RawHttpHeaders & Send202Headers;\n}\n\nexport interface SendDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface SendDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & SendDefaultHeaders;\n}\n\nexport interface ListTemplates200Headers {\n /** An opaque, globally-unique, client-generated string identifier for the request. */\n \"x-ms-client-request-id\"?: string;\n}\n\n/** The request has succeeded. */\nexport interface ListTemplates200Response extends HttpResponse {\n status: \"200\";\n body: PagedMessageTemplateItemOutput;\n headers: RawHttpHeaders & ListTemplates200Headers;\n}\n\nexport interface ListTemplatesDefaultHeaders {\n /** String error code indicating what went wrong. */\n \"x-ms-error-code\"?: string;\n}\n\nexport interface ListTemplatesDefaultResponse extends HttpResponse {\n status: string;\n body: ErrorResponse;\n headers: RawHttpHeaders & ListTemplatesDefaultHeaders;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import MessagesServiceClient from "./messagesServiceClient.js";
2
+ export * from "./generated/src/messagesServiceClient.js";
3
+ export * from "./generated/src/parameters.js";
4
+ export * from "./generated/src/responses.js";
5
+ export * from "./generated/src/clientDefinitions.js";
6
+ export * from "./generated/src/isUnexpected.js";
7
+ export * from "./generated/src/models.js";
8
+ export * from "./generated/src/outputModels.js";
9
+ export * from "./generated/src/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/index.ts"],"names":[],"mappings":"AAGA,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"}
@@ -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("./generated/src/messagesServiceClient.js"), exports);
8
+ tslib_1.__exportStar(require("./generated/src/parameters.js"), exports);
9
+ tslib_1.__exportStar(require("./generated/src/responses.js"), exports);
10
+ tslib_1.__exportStar(require("./generated/src/clientDefinitions.js"), exports);
11
+ tslib_1.__exportStar(require("./generated/src/isUnexpected.js"), exports);
12
+ tslib_1.__exportStar(require("./generated/src/models.js"), exports);
13
+ tslib_1.__exportStar(require("./generated/src/outputModels.js"), exports);
14
+ tslib_1.__exportStar(require("./generated/src/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/index.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,kGAA+D;AAC/D,mFAAyD;AACzD,wEAA8C;AAC9C,uEAA6C;AAC7C,+EAAqD;AACrD,0EAAgD;AAChD,oEAA0C;AAC1C,0EAAgD;AAChD,4EAAkD;AAClD,kBAAe,kCAAqB,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"}
@@ -0,0 +1,31 @@
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_auth_1 = require("@azure/core-auth");
8
+ const communication_common_1 = require("@azure/communication-common");
9
+ const messagesServiceClient_js_1 = tslib_1.__importDefault(require("./generated/src/messagesServiceClient.js"));
10
+ /**
11
+ * Initialize a new instance of `MessagesServiceClient`
12
+ * @param endpoint - The communication resource, for example https://my-resource.communication.azure.com
13
+ * @param credentials - uniquely identify client credential
14
+ * @param options - the parameter for all optional parameters
15
+ */
16
+ function createClient(endpointOrConnectionString, credentialOrOptions, options) {
17
+ var _a;
18
+ if (!((0, core_auth_1.isTokenCredential)(credentialOrOptions) || (0, core_auth_1.isKeyCredential)(credentialOrOptions))) {
19
+ options = credentialOrOptions;
20
+ }
21
+ if (options === undefined) {
22
+ options = {};
23
+ }
24
+ const { url, credential } = (0, communication_common_1.parseClientArguments)(endpointOrConnectionString, credentialOrOptions);
25
+ const baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : `${url}`;
26
+ const client = (0, messagesServiceClient_js_1.default)(baseUrl, credential, options);
27
+ const authPolicy = (0, communication_common_1.createCommunicationAuthPolicy)(credential);
28
+ client.pipeline.addPolicy(authPolicy);
29
+ return client;
30
+ }
31
+ //# sourceMappingURL=messagesServiceClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messagesServiceClient.js","sourceRoot":"","sources":["../../src/messagesServiceClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAqClC,+BAqBC;;AAvDD,gDAAsE;AAEtE,sEAAkG;AAElG,gHAAuG;AAwBvG;;;;;GAKG;AACH,SAAwB,YAAY,CAClC,0BAAkC,EAClC,mBAAuE,EACvE,OAAuB;;IAEvB,IAAI,CAAC,CAAC,IAAA,6BAAiB,EAAC,mBAAmB,CAAC,IAAI,IAAA,2BAAe,EAAC,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,IAAA,2CAAoB,EAAC,0BAA0B,EAAE,mBAAmB,CAAC,CAAC;IAClG,MAAM,OAAO,GAAG,MAAA,OAAO,CAAC,OAAO,mCAAI,GAAG,GAAG,EAAE,CAAC;IAE5C,MAAM,MAAM,GAAG,IAAA,kCAA+C,EAAC,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC7F,MAAM,UAAU,GAAG,IAAA,oDAA6B,EAAC,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": "commonjs"
3
+ }
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.47.11"
9
+ }
10
+ ]
11
+ }
@@ -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,4 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ export {};
4
+ //# 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,13 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import MessagesServiceClient from "./messagesServiceClient.js";
4
+ export * from "./messagesServiceClient.js";
5
+ export * from "./parameters.js";
6
+ export * from "./responses.js";
7
+ export * from "./clientDefinitions.js";
8
+ export * from "./isUnexpected.js";
9
+ export * from "./models.js";
10
+ export * from "./outputModels.js";
11
+ export * from "./paginateHelper.js";
12
+ export default MessagesServiceClient;
13
+ //# 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,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","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"}