@azure/communication-email 1.0.1-alpha.20241119.1 → 1.0.1-alpha.20241122.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. package/dist/index.js +802 -0
  2. package/dist/index.js.map +1 -0
  3. package/dist-esm/samples-dev/sendEmailMultipleRecipients.js +46 -0
  4. package/dist-esm/samples-dev/sendEmailMultipleRecipients.js.map +1 -0
  5. package/dist-esm/samples-dev/sendEmailSingleRecipient.js +40 -0
  6. package/dist-esm/samples-dev/sendEmailSingleRecipient.js.map +1 -0
  7. package/dist-esm/samples-dev/sendEmailWithAttachments.js +47 -0
  8. package/dist-esm/samples-dev/sendEmailWithAttachments.js.map +1 -0
  9. package/dist-esm/samples-dev/sendEmailWithInlineAttachments.js +48 -0
  10. package/dist-esm/samples-dev/sendEmailWithInlineAttachments.js.map +1 -0
  11. package/{dist/esm → dist-esm/src}/emailClient.js +2 -2
  12. package/dist-esm/src/emailClient.js.map +1 -0
  13. package/{dist/esm → dist-esm/src}/generated/src/emailRestApiClient.js +1 -1
  14. package/dist-esm/src/generated/src/emailRestApiClient.js.map +1 -0
  15. package/{dist/esm/generated/src/operations → dist-esm/src/generated/src}/index.js +3 -1
  16. package/dist-esm/src/generated/src/index.js.map +1 -0
  17. package/{dist/esm → dist-esm/src}/generated/src/models/parameters.js +1 -1
  18. package/{dist/browser → dist-esm/src}/generated/src/models/parameters.js.map +1 -1
  19. package/{dist/esm → dist-esm/src}/generated/src/operations/email.js +3 -3
  20. package/dist-esm/src/generated/src/operations/email.js.map +1 -0
  21. package/{dist/esm/generated/src/operationsInterfaces/email.js → dist-esm/src/generated/src/operations/index.js} +2 -2
  22. package/{dist/esm → dist-esm/src}/generated/src/operations/index.js.map +1 -1
  23. package/dist-esm/src/generated/src/operationsInterfaces/email.js.map +1 -0
  24. package/{dist/react-native/generated/src/operationsInterfaces/email.js → dist-esm/src/generated/src/operationsInterfaces/index.js} +2 -2
  25. package/{dist/esm → dist-esm/src}/generated/src/operationsInterfaces/index.js.map +1 -1
  26. package/dist-esm/src/index.js +5 -0
  27. package/dist-esm/src/index.js.map +1 -0
  28. package/dist-esm/src/models.js +4 -0
  29. package/dist-esm/src/models.js.map +1 -0
  30. package/dist-esm/test/public/emailClient.spec.js +138 -0
  31. package/dist-esm/test/public/emailClient.spec.js.map +1 -0
  32. package/dist-esm/test/public/utils/recordedClient.js +59 -0
  33. package/dist-esm/test/public/utils/recordedClient.js.map +1 -0
  34. package/package.json +40 -63
  35. package/dist/browser/emailClient.d.ts +0 -31
  36. package/dist/browser/emailClient.d.ts.map +0 -1
  37. package/dist/browser/emailClient.js +0 -38
  38. package/dist/browser/emailClient.js.map +0 -1
  39. package/dist/browser/generated/src/emailRestApiClient.d.ts +0 -17
  40. package/dist/browser/generated/src/emailRestApiClient.d.ts.map +0 -1
  41. package/dist/browser/generated/src/emailRestApiClient.js +0 -69
  42. package/dist/browser/generated/src/emailRestApiClient.js.map +0 -1
  43. package/dist/browser/generated/src/index.d.ts +0 -4
  44. package/dist/browser/generated/src/index.d.ts.map +0 -1
  45. package/dist/browser/generated/src/index.js +0 -11
  46. package/dist/browser/generated/src/index.js.map +0 -1
  47. package/dist/browser/generated/src/lroImpl.d.ts +0 -16
  48. package/dist/browser/generated/src/lroImpl.d.ts.map +0 -1
  49. package/dist/browser/generated/src/models/index.d.ts +0 -184
  50. package/dist/browser/generated/src/models/index.d.ts.map +0 -1
  51. package/dist/browser/generated/src/models/mappers.d.ts +0 -15
  52. package/dist/browser/generated/src/models/mappers.d.ts.map +0 -1
  53. package/dist/browser/generated/src/models/parameters.d.ts +0 -10
  54. package/dist/browser/generated/src/models/parameters.d.ts.map +0 -1
  55. package/dist/browser/generated/src/models/parameters.js +0 -85
  56. package/dist/browser/generated/src/operations/email.d.ts +0 -33
  57. package/dist/browser/generated/src/operations/email.d.ts.map +0 -1
  58. package/dist/browser/generated/src/operations/email.js +0 -135
  59. package/dist/browser/generated/src/operations/email.js.map +0 -1
  60. package/dist/browser/generated/src/operations/index.d.ts +0 -2
  61. package/dist/browser/generated/src/operations/index.d.ts.map +0 -1
  62. package/dist/browser/generated/src/operations/index.js +0 -9
  63. package/dist/browser/generated/src/operations/index.js.map +0 -1
  64. package/dist/browser/generated/src/operationsInterfaces/email.d.ts +0 -25
  65. package/dist/browser/generated/src/operationsInterfaces/email.d.ts.map +0 -1
  66. package/dist/browser/generated/src/operationsInterfaces/email.js.map +0 -1
  67. package/dist/browser/generated/src/operationsInterfaces/index.d.ts +0 -2
  68. package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  69. package/dist/browser/generated/src/operationsInterfaces/index.js +0 -9
  70. package/dist/browser/generated/src/operationsInterfaces/index.js.map +0 -1
  71. package/dist/browser/index.d.ts +0 -3
  72. package/dist/browser/index.d.ts.map +0 -1
  73. package/dist/browser/index.js +0 -5
  74. package/dist/browser/index.js.map +0 -1
  75. package/dist/browser/logger.d.ts +0 -5
  76. package/dist/browser/logger.d.ts.map +0 -1
  77. package/dist/browser/models.d.ts +0 -57
  78. package/dist/browser/models.d.ts.map +0 -1
  79. package/dist/browser/models.js +0 -4
  80. package/dist/browser/models.js.map +0 -1
  81. package/dist/browser/package.json +0 -3
  82. package/dist/commonjs/emailClient.d.ts +0 -31
  83. package/dist/commonjs/emailClient.d.ts.map +0 -1
  84. package/dist/commonjs/emailClient.js +0 -42
  85. package/dist/commonjs/emailClient.js.map +0 -1
  86. package/dist/commonjs/generated/src/emailRestApiClient.d.ts +0 -17
  87. package/dist/commonjs/generated/src/emailRestApiClient.d.ts.map +0 -1
  88. package/dist/commonjs/generated/src/emailRestApiClient.js +0 -74
  89. package/dist/commonjs/generated/src/emailRestApiClient.js.map +0 -1
  90. package/dist/commonjs/generated/src/index.d.ts +0 -4
  91. package/dist/commonjs/generated/src/index.d.ts.map +0 -1
  92. package/dist/commonjs/generated/src/index.js +0 -16
  93. package/dist/commonjs/generated/src/index.js.map +0 -1
  94. package/dist/commonjs/generated/src/lroImpl.d.ts +0 -16
  95. package/dist/commonjs/generated/src/lroImpl.d.ts.map +0 -1
  96. package/dist/commonjs/generated/src/lroImpl.js +0 -29
  97. package/dist/commonjs/generated/src/lroImpl.js.map +0 -1
  98. package/dist/commonjs/generated/src/models/index.d.ts +0 -184
  99. package/dist/commonjs/generated/src/models/index.d.ts.map +0 -1
  100. package/dist/commonjs/generated/src/models/index.js +0 -25
  101. package/dist/commonjs/generated/src/models/index.js.map +0 -1
  102. package/dist/commonjs/generated/src/models/mappers.d.ts +0 -15
  103. package/dist/commonjs/generated/src/models/mappers.d.ts.map +0 -1
  104. package/dist/commonjs/generated/src/models/mappers.js +0 -388
  105. package/dist/commonjs/generated/src/models/mappers.js.map +0 -1
  106. package/dist/commonjs/generated/src/models/parameters.d.ts +0 -10
  107. package/dist/commonjs/generated/src/models/parameters.d.ts.map +0 -1
  108. package/dist/commonjs/generated/src/models/parameters.js +0 -88
  109. package/dist/commonjs/generated/src/models/parameters.js.map +0 -1
  110. package/dist/commonjs/generated/src/operations/email.d.ts +0 -33
  111. package/dist/commonjs/generated/src/operations/email.d.ts.map +0 -1
  112. package/dist/commonjs/generated/src/operations/email.js +0 -140
  113. package/dist/commonjs/generated/src/operations/email.js.map +0 -1
  114. package/dist/commonjs/generated/src/operations/index.d.ts +0 -2
  115. package/dist/commonjs/generated/src/operations/index.d.ts.map +0 -1
  116. package/dist/commonjs/generated/src/operations/index.js +0 -12
  117. package/dist/commonjs/generated/src/operations/index.js.map +0 -1
  118. package/dist/commonjs/generated/src/operationsInterfaces/email.d.ts +0 -25
  119. package/dist/commonjs/generated/src/operationsInterfaces/email.d.ts.map +0 -1
  120. package/dist/commonjs/generated/src/operationsInterfaces/email.js +0 -10
  121. package/dist/commonjs/generated/src/operationsInterfaces/email.js.map +0 -1
  122. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +0 -2
  123. package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  124. package/dist/commonjs/generated/src/operationsInterfaces/index.js +0 -12
  125. package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +0 -1
  126. package/dist/commonjs/index.d.ts +0 -3
  127. package/dist/commonjs/index.d.ts.map +0 -1
  128. package/dist/commonjs/index.js +0 -8
  129. package/dist/commonjs/index.js.map +0 -1
  130. package/dist/commonjs/logger.d.ts +0 -5
  131. package/dist/commonjs/logger.d.ts.map +0 -1
  132. package/dist/commonjs/logger.js +0 -11
  133. package/dist/commonjs/logger.js.map +0 -1
  134. package/dist/commonjs/models.d.ts +0 -57
  135. package/dist/commonjs/models.d.ts.map +0 -1
  136. package/dist/commonjs/models.js +0 -8
  137. package/dist/commonjs/models.js.map +0 -1
  138. package/dist/commonjs/package.json +0 -3
  139. package/dist/commonjs/tsdoc-metadata.json +0 -11
  140. package/dist/esm/emailClient.d.ts +0 -31
  141. package/dist/esm/emailClient.d.ts.map +0 -1
  142. package/dist/esm/emailClient.js.map +0 -1
  143. package/dist/esm/generated/src/emailRestApiClient.d.ts +0 -17
  144. package/dist/esm/generated/src/emailRestApiClient.d.ts.map +0 -1
  145. package/dist/esm/generated/src/emailRestApiClient.js.map +0 -1
  146. package/dist/esm/generated/src/index.d.ts +0 -4
  147. package/dist/esm/generated/src/index.d.ts.map +0 -1
  148. package/dist/esm/generated/src/index.js +0 -11
  149. package/dist/esm/generated/src/index.js.map +0 -1
  150. package/dist/esm/generated/src/lroImpl.d.ts +0 -16
  151. package/dist/esm/generated/src/lroImpl.d.ts.map +0 -1
  152. package/dist/esm/generated/src/lroImpl.js +0 -25
  153. package/dist/esm/generated/src/lroImpl.js.map +0 -1
  154. package/dist/esm/generated/src/models/index.d.ts +0 -184
  155. package/dist/esm/generated/src/models/index.d.ts.map +0 -1
  156. package/dist/esm/generated/src/models/index.js +0 -22
  157. package/dist/esm/generated/src/models/index.js.map +0 -1
  158. package/dist/esm/generated/src/models/mappers.d.ts +0 -15
  159. package/dist/esm/generated/src/models/mappers.d.ts.map +0 -1
  160. package/dist/esm/generated/src/models/mappers.js +0 -385
  161. package/dist/esm/generated/src/models/mappers.js.map +0 -1
  162. package/dist/esm/generated/src/models/parameters.d.ts +0 -10
  163. package/dist/esm/generated/src/models/parameters.d.ts.map +0 -1
  164. package/dist/esm/generated/src/models/parameters.js.map +0 -1
  165. package/dist/esm/generated/src/operations/email.d.ts +0 -33
  166. package/dist/esm/generated/src/operations/email.d.ts.map +0 -1
  167. package/dist/esm/generated/src/operations/email.js.map +0 -1
  168. package/dist/esm/generated/src/operations/index.d.ts +0 -2
  169. package/dist/esm/generated/src/operations/index.d.ts.map +0 -1
  170. package/dist/esm/generated/src/operationsInterfaces/email.d.ts +0 -25
  171. package/dist/esm/generated/src/operationsInterfaces/email.d.ts.map +0 -1
  172. package/dist/esm/generated/src/operationsInterfaces/email.js.map +0 -1
  173. package/dist/esm/generated/src/operationsInterfaces/index.d.ts +0 -2
  174. package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  175. package/dist/esm/generated/src/operationsInterfaces/index.js +0 -9
  176. package/dist/esm/index.d.ts +0 -3
  177. package/dist/esm/index.d.ts.map +0 -1
  178. package/dist/esm/index.js +0 -5
  179. package/dist/esm/index.js.map +0 -1
  180. package/dist/esm/logger.d.ts +0 -5
  181. package/dist/esm/logger.d.ts.map +0 -1
  182. package/dist/esm/logger.js +0 -8
  183. package/dist/esm/logger.js.map +0 -1
  184. package/dist/esm/models.d.ts +0 -57
  185. package/dist/esm/models.d.ts.map +0 -1
  186. package/dist/esm/models.js +0 -4
  187. package/dist/esm/models.js.map +0 -1
  188. package/dist/esm/package.json +0 -3
  189. package/dist/react-native/emailClient.d.ts +0 -31
  190. package/dist/react-native/emailClient.d.ts.map +0 -1
  191. package/dist/react-native/emailClient.js +0 -38
  192. package/dist/react-native/emailClient.js.map +0 -1
  193. package/dist/react-native/generated/src/emailRestApiClient.d.ts +0 -17
  194. package/dist/react-native/generated/src/emailRestApiClient.d.ts.map +0 -1
  195. package/dist/react-native/generated/src/emailRestApiClient.js +0 -69
  196. package/dist/react-native/generated/src/emailRestApiClient.js.map +0 -1
  197. package/dist/react-native/generated/src/index.d.ts +0 -4
  198. package/dist/react-native/generated/src/index.d.ts.map +0 -1
  199. package/dist/react-native/generated/src/index.js +0 -11
  200. package/dist/react-native/generated/src/index.js.map +0 -1
  201. package/dist/react-native/generated/src/lroImpl.d.ts +0 -16
  202. package/dist/react-native/generated/src/lroImpl.d.ts.map +0 -1
  203. package/dist/react-native/generated/src/lroImpl.js +0 -25
  204. package/dist/react-native/generated/src/lroImpl.js.map +0 -1
  205. package/dist/react-native/generated/src/models/index.d.ts +0 -184
  206. package/dist/react-native/generated/src/models/index.d.ts.map +0 -1
  207. package/dist/react-native/generated/src/models/index.js +0 -22
  208. package/dist/react-native/generated/src/models/index.js.map +0 -1
  209. package/dist/react-native/generated/src/models/mappers.d.ts +0 -15
  210. package/dist/react-native/generated/src/models/mappers.d.ts.map +0 -1
  211. package/dist/react-native/generated/src/models/mappers.js +0 -385
  212. package/dist/react-native/generated/src/models/mappers.js.map +0 -1
  213. package/dist/react-native/generated/src/models/parameters.d.ts +0 -10
  214. package/dist/react-native/generated/src/models/parameters.d.ts.map +0 -1
  215. package/dist/react-native/generated/src/models/parameters.js +0 -85
  216. package/dist/react-native/generated/src/models/parameters.js.map +0 -1
  217. package/dist/react-native/generated/src/operations/email.d.ts +0 -33
  218. package/dist/react-native/generated/src/operations/email.d.ts.map +0 -1
  219. package/dist/react-native/generated/src/operations/email.js +0 -135
  220. package/dist/react-native/generated/src/operations/email.js.map +0 -1
  221. package/dist/react-native/generated/src/operations/index.d.ts +0 -2
  222. package/dist/react-native/generated/src/operations/index.d.ts.map +0 -1
  223. package/dist/react-native/generated/src/operations/index.js +0 -9
  224. package/dist/react-native/generated/src/operations/index.js.map +0 -1
  225. package/dist/react-native/generated/src/operationsInterfaces/email.d.ts +0 -25
  226. package/dist/react-native/generated/src/operationsInterfaces/email.d.ts.map +0 -1
  227. package/dist/react-native/generated/src/operationsInterfaces/email.js.map +0 -1
  228. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +0 -2
  229. package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +0 -1
  230. package/dist/react-native/generated/src/operationsInterfaces/index.js +0 -9
  231. package/dist/react-native/generated/src/operationsInterfaces/index.js.map +0 -1
  232. package/dist/react-native/index.d.ts +0 -3
  233. package/dist/react-native/index.d.ts.map +0 -1
  234. package/dist/react-native/index.js +0 -5
  235. package/dist/react-native/index.js.map +0 -1
  236. package/dist/react-native/logger.d.ts +0 -5
  237. package/dist/react-native/logger.d.ts.map +0 -1
  238. package/dist/react-native/logger.js +0 -8
  239. package/dist/react-native/logger.js.map +0 -1
  240. package/dist/react-native/models.d.ts +0 -57
  241. package/dist/react-native/models.d.ts.map +0 -1
  242. package/dist/react-native/models.js +0 -4
  243. package/dist/react-native/models.js.map +0 -1
  244. package/dist/react-native/package.json +0 -3
  245. /package/{dist/browser → dist-esm/src}/generated/src/lroImpl.js +0 -0
  246. /package/{dist/browser → dist-esm/src}/generated/src/lroImpl.js.map +0 -0
  247. /package/{dist/browser → dist-esm/src}/generated/src/models/index.js +0 -0
  248. /package/{dist/browser → dist-esm/src}/generated/src/models/index.js.map +0 -0
  249. /package/{dist/browser → dist-esm/src}/generated/src/models/mappers.js +0 -0
  250. /package/{dist/browser → dist-esm/src}/generated/src/models/mappers.js.map +0 -0
  251. /package/{dist/browser → dist-esm/src}/generated/src/operationsInterfaces/email.js +0 -0
  252. /package/{dist/browser → dist-esm/src}/logger.js +0 -0
  253. /package/{dist/browser → dist-esm/src}/logger.js.map +0 -0
  254. /package/{dist → types}/communication-email.d.ts +0 -0
@@ -1,57 +0,0 @@
1
- import type { CommonClientOptions, OperationOptions } from "@azure/core-client";
2
- import type { EmailRecipients, EmailAttachment, EmailAddress } from "./models.js";
3
- /**
4
- * Client options used to configure Email Client API requests.
5
- */
6
- export interface EmailClientOptions extends CommonClientOptions {
7
- }
8
- /** Content of the email. */
9
- export type EmailContent = HtmlEmailContent | PlainTextEmailContent;
10
- /** Content of the email with a required html property. */
11
- export interface HtmlEmailContent {
12
- /** Subject of the email message */
13
- subject: string;
14
- /** Plain text version of the email message. */
15
- plainText?: string;
16
- /** Html version of the email message. */
17
- html: string;
18
- }
19
- /** Content of the email with a required plainText property. */
20
- export interface PlainTextEmailContent {
21
- /** Subject of the email message */
22
- subject: string;
23
- /** Plain text version of the email message. */
24
- plainText: string;
25
- /** Html version of the email message. */
26
- html?: string;
27
- }
28
- /** Message payload for sending an email */
29
- export interface EmailMessage {
30
- /** Custom email headers to be passed. */
31
- headers?: {
32
- [propertyName: string]: string;
33
- };
34
- /** Sender email address from a verified domain. */
35
- senderAddress: string;
36
- /** Email content to be sent. */
37
- content: EmailContent;
38
- /** Recipients for the email. */
39
- recipients: EmailRecipients;
40
- /** List of attachments. Please note that we limit the total size of an email request (which includes attachments) to 10MB. */
41
- attachments?: EmailAttachment[];
42
- /** Email addresses where recipients' replies will be sent to. */
43
- replyTo?: EmailAddress[];
44
- /** Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane. */
45
- disableUserEngagementTracking?: boolean;
46
- }
47
- /** Optional parameters for the beginSend method. */
48
- export interface EmailSendOptionalParams extends OperationOptions {
49
- /** This is the ID used by the status monitor for this long running operation. */
50
- operationId?: string;
51
- /** Delay to wait until next poll, in milliseconds. */
52
- updateIntervalInMs?: number;
53
- /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
54
- resumeFrom?: string;
55
- }
56
- export { EmailRecipients, EmailAddress, EmailAttachment, EmailSendResponse, EmailSendHeaders, EmailSendResult, EmailSendStatus, ErrorDetail, ErrorAdditionalInfo, KnownEmailSendStatus, } from "./generated/src/models/index.js";
57
- //# sourceMappingURL=models.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,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ACrB;AAED,OAAO,EACL,eAAe,EACf,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC"}
@@ -1,4 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
- export { KnownEmailSendStatus, } from "./generated/src/models/index.js";
4
- //# sourceMappingURL=models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA6DlC,OAAO,EAUL,oBAAoB,GACrB,MAAM,iCAAiC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { EmailRecipients, EmailAttachment, EmailAddress } from \"./models.js\";\n\n/**\n * Client options used to configure Email Client API requests.\n */\nexport interface EmailClientOptions extends CommonClientOptions {}\n\n/** Content of the email. */\nexport type EmailContent = HtmlEmailContent | PlainTextEmailContent;\n\n/** Content of the email with a required html property. */\nexport interface HtmlEmailContent {\n /** Subject of the email message */\n subject: string;\n /** Plain text version of the email message. */\n plainText?: string;\n /** Html version of the email message. */\n html: string;\n}\n\n/** Content of the email with a required plainText property. */\nexport interface PlainTextEmailContent {\n /** Subject of the email message */\n subject: string;\n /** Plain text version of the email message. */\n plainText: string;\n /** Html version of the email message. */\n html?: string;\n}\n\n/** Message payload for sending an email */\nexport interface EmailMessage {\n /** Custom email headers to be passed. */\n headers?: { [propertyName: string]: string };\n /** Sender email address from a verified domain. */\n senderAddress: string;\n /** Email content to be sent. */\n content: EmailContent;\n /** Recipients for the email. */\n recipients: EmailRecipients;\n /** List of attachments. Please note that we limit the total size of an email request (which includes attachments) to 10MB. */\n attachments?: EmailAttachment[];\n /** Email addresses where recipients' replies will be sent to. */\n replyTo?: EmailAddress[];\n /** Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane. */\n disableUserEngagementTracking?: boolean;\n}\n\n/** Optional parameters for the beginSend method. */\nexport interface EmailSendOptionalParams extends OperationOptions {\n /** This is the ID used by the status monitor for this long running operation. */\n operationId?: string;\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */\n resumeFrom?: string;\n}\n\nexport {\n EmailRecipients,\n EmailAddress,\n EmailAttachment,\n EmailSendResponse,\n EmailSendHeaders,\n EmailSendResult,\n EmailSendStatus,\n ErrorDetail,\n ErrorAdditionalInfo,\n KnownEmailSendStatus,\n} from \"./generated/src/models/index.js\";\n"]}
@@ -1,3 +0,0 @@
1
- {
2
- "type": "module"
3
- }
@@ -1,31 +0,0 @@
1
- import type { EmailClientOptions, EmailMessage, EmailSendOptionalParams } from "./models.js";
2
- import type { KeyCredential, TokenCredential } from "@azure/core-auth";
3
- import type { PollerLike, PollOperationState } from "@azure/core-lro";
4
- import type { EmailSendResponse } from "./generated/src/index.js";
5
- /**
6
- * The Email service client.
7
- */
8
- export declare class EmailClient {
9
- private readonly generatedClient;
10
- /**
11
- * Initializes a new instance of the EmailClient class.
12
- * @param connectionString - Connection string to connect to an Azure Communication Service resource.
13
- * Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";
14
- * @param options - Optional. Options to configure the HTTP pipeline.
15
- */
16
- constructor(connectionString: string, options?: EmailClientOptions);
17
- /**
18
- * Initializes a new instance of the EmailClient class using an Azure KeyCredential.
19
- * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
20
- * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.
21
- * @param options - Optional. Options to configure the HTTP pipeline.
22
- */
23
- constructor(endpoint: string, credential: KeyCredential | TokenCredential, options?: EmailClientOptions);
24
- /**
25
- * Queues an email message to be sent to one or more recipients
26
- * @param message - Message payload for sending an email
27
- * @param options - The options parameters.
28
- */
29
- beginSend(message: EmailMessage, options?: EmailSendOptionalParams): Promise<PollerLike<PollOperationState<EmailSendResponse>, EmailSendResponse>>;
30
- }
31
- //# sourceMappingURL=emailClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emailClient.d.ts","sourceRoot":"","sources":["../../src/emailClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAStE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAUlE;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAqB;IAErD;;;;;OAKG;gBACS,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB;IAElE;;;;;OAKG;gBAED,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,aAAa,GAAG,eAAe,EAC3C,OAAO,CAAC,EAAE,kBAAkB;IAyB9B;;;;OAIG;IACH,SAAS,CACP,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,CAAC;CAGjF"}
@@ -1,42 +0,0 @@
1
- "use strict";
2
- // Copyright (c) Microsoft Corporation.
3
- // Licensed under the MIT License.
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.EmailClient = void 0;
6
- const core_auth_1 = require("@azure/core-auth");
7
- const communication_common_1 = require("@azure/communication-common");
8
- const emailRestApiClient_js_1 = require("./generated/src/emailRestApiClient.js");
9
- const logger_js_1 = require("./logger.js");
10
- /**
11
- * Checks whether the type of a value is EmailClientOptions or not.
12
- *
13
- * @param options - The value being checked.
14
- */
15
- const isEmailClientOptions = (options) => !!options && !(0, core_auth_1.isTokenCredential)(options) && !(0, communication_common_1.isKeyCredential)(options);
16
- /**
17
- * The Email service client.
18
- */
19
- class EmailClient {
20
- constructor(connectionStringOrUrl, credentialOrOptions, maybeOptions = {}) {
21
- const { url, credential } = (0, communication_common_1.parseClientArguments)(connectionStringOrUrl, credentialOrOptions);
22
- const options = isEmailClientOptions(credentialOrOptions) ? credentialOrOptions : maybeOptions;
23
- const internalPipelineOptions = Object.assign(Object.assign({}, options), {
24
- loggingOptions: {
25
- logger: logger_js_1.logger.info,
26
- },
27
- });
28
- const authPolicy = (0, communication_common_1.createCommunicationAuthPolicy)(credential);
29
- this.generatedClient = new emailRestApiClient_js_1.EmailRestApiClient(url, internalPipelineOptions);
30
- this.generatedClient.pipeline.addPolicy(authPolicy);
31
- }
32
- /**
33
- * Queues an email message to be sent to one or more recipients
34
- * @param message - Message payload for sending an email
35
- * @param options - The options parameters.
36
- */
37
- beginSend(message, options) {
38
- return this.generatedClient.email.beginSend(message, options);
39
- }
40
- }
41
- exports.EmailClient = EmailClient;
42
- //# sourceMappingURL=emailClient.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emailClient.js","sourceRoot":"","sources":["../../src/emailClient.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAIlC,gDAAqD;AAErD,sEAIqC;AACrC,iFAA2E;AAE3E,2CAAqC;AAGrC;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,CAAC,OAAY,EAAiC,EAAE,CAC3E,CAAC,CAAC,OAAO,IAAI,CAAC,IAAA,6BAAiB,EAAC,OAAO,CAAC,IAAI,CAAC,IAAA,sCAAe,EAAC,OAAO,CAAC,CAAC;AAExE;;GAEG;AACH,MAAa,WAAW;IAuBtB,YACE,qBAA6B,EAC7B,mBAA0E,EAC1E,eAAmC,EAAE;QAErC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,IAAA,2CAAoB,EAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAC;QAC7F,MAAM,OAAO,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,YAAY,CAAC;QAE/F,MAAM,uBAAuB,mCACxB,OAAO,GACP;YACD,cAAc,EAAE;gBACd,MAAM,EAAE,kBAAM,CAAC,IAAI;aACpB;SACF,CACF,CAAC;QAEF,MAAM,UAAU,GAAG,IAAA,oDAA6B,EAAC,UAAU,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,GAAG,IAAI,0CAAkB,CAAC,GAAG,EAAE,uBAAuB,CAAC,CAAC;QAC5E,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC;IAED;;;;OAIG;IACH,SAAS,CACP,OAAqB,EACrB,OAAiC;QAEjC,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AAxDD,kCAwDC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { EmailClientOptions, EmailMessage, EmailSendOptionalParams } from \"./models.js\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { PollerLike, PollOperationState } from \"@azure/core-lro\";\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\nimport { EmailRestApiClient } from \"./generated/src/emailRestApiClient.js\";\nimport type { InternalPipelineOptions } from \"@azure/core-rest-pipeline\";\nimport { logger } from \"./logger.js\";\nimport type { EmailSendResponse } from \"./generated/src/index.js\";\n\n/**\n * Checks whether the type of a value is EmailClientOptions or not.\n *\n * @param options - The value being checked.\n */\nconst isEmailClientOptions = (options: any): options is EmailClientOptions =>\n !!options && !isTokenCredential(options) && !isKeyCredential(options);\n\n/**\n * The Email service client.\n */\nexport class EmailClient {\n private readonly generatedClient: EmailRestApiClient;\n\n /**\n * Initializes a new instance of the EmailClient class.\n * @param connectionString - Connection string to connect to an Azure Communication Service resource.\n * Example: \"endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret\";\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(connectionString: string, options?: EmailClientOptions);\n\n /**\n * Initializes a new instance of the EmailClient class using an Azure KeyCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(\n endpoint: string,\n credential: KeyCredential | TokenCredential,\n options?: EmailClientOptions,\n );\n\n constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: EmailClientOptions | TokenCredential | KeyCredential,\n maybeOptions: EmailClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isEmailClientOptions(credentialOrOptions) ? credentialOrOptions : maybeOptions;\n\n const internalPipelineOptions: InternalPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.generatedClient = new EmailRestApiClient(url, internalPipelineOptions);\n this.generatedClient.pipeline.addPolicy(authPolicy);\n }\n\n /**\n * Queues an email message to be sent to one or more recipients\n * @param message - Message payload for sending an email\n * @param options - The options parameters.\n */\n beginSend(\n message: EmailMessage,\n options?: EmailSendOptionalParams,\n ): Promise<PollerLike<PollOperationState<EmailSendResponse>, EmailSendResponse>> {\n return this.generatedClient.email.beginSend(message, options);\n }\n}\n"]}
@@ -1,17 +0,0 @@
1
- import * as coreClient from "@azure/core-client";
2
- import { Email } from "./operationsInterfaces/index.js";
3
- import { EmailRestApiClientOptionalParams } from "./models/index.js";
4
- export declare class EmailRestApiClient extends coreClient.ServiceClient {
5
- endpoint: string;
6
- apiVersion: string;
7
- /**
8
- * Initializes a new instance of the EmailRestApiClient class.
9
- * @param endpoint The communication resource, for example https://my-resource.communication.azure.com
10
- * @param options The parameter options
11
- */
12
- constructor(endpoint: string, options?: EmailRestApiClientOptionalParams);
13
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
14
- private addCustomApiVersionPolicy;
15
- email: Email;
16
- }
17
- //# sourceMappingURL=emailRestApiClient.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emailRestApiClient.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/emailRestApiClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAOjD,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,mBAAmB,CAAC;AAErE,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;gBACS,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,gCAAgC;IAqCxE,8GAA8G;IAC9G,OAAO,CAAC,yBAAyB;IA2BjC,KAAK,EAAE,KAAK,CAAC;CACd"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.EmailRestApiClient = void 0;
11
- const tslib_1 = require("tslib");
12
- const coreClient = tslib_1.__importStar(require("@azure/core-client"));
13
- const index_js_1 = require("./operations/index.js");
14
- class EmailRestApiClient extends coreClient.ServiceClient {
15
- /**
16
- * Initializes a new instance of the EmailRestApiClient class.
17
- * @param endpoint The communication resource, for example https://my-resource.communication.azure.com
18
- * @param options The parameter options
19
- */
20
- constructor(endpoint, options) {
21
- var _a, _b;
22
- if (endpoint === undefined) {
23
- throw new Error("'endpoint' cannot be null");
24
- }
25
- // Initializing default values for options
26
- if (!options) {
27
- options = {};
28
- }
29
- const defaults = {
30
- requestContentType: "application/json; charset=utf-8"
31
- };
32
- const packageDetails = `azsdk-js-communication-email/1.0.0`;
33
- const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
34
- ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
35
- : `${packageDetails}`;
36
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
37
- userAgentPrefix
38
- }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{endpoint}" });
39
- super(optionsWithDefaults);
40
- // Parameter assignments
41
- this.endpoint = endpoint;
42
- // Assigning values to Constant parameters
43
- this.apiVersion = options.apiVersion || "2024-07-01-preview";
44
- this.email = new index_js_1.EmailImpl(this);
45
- this.addCustomApiVersionPolicy(options.apiVersion);
46
- }
47
- /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
48
- addCustomApiVersionPolicy(apiVersion) {
49
- if (!apiVersion) {
50
- return;
51
- }
52
- const apiVersionPolicy = {
53
- name: "CustomApiVersionPolicy",
54
- async sendRequest(request, next) {
55
- const param = request.url.split("?");
56
- if (param.length > 1) {
57
- const newParams = param[1].split("&").map((item) => {
58
- if (item.indexOf("api-version") > -1) {
59
- return "api-version=" + apiVersion;
60
- }
61
- else {
62
- return item;
63
- }
64
- });
65
- request.url = param[0] + "?" + newParams.join("&");
66
- }
67
- return next(request);
68
- }
69
- };
70
- this.pipeline.addPolicy(apiVersionPolicy);
71
- }
72
- }
73
- exports.EmailRestApiClient = EmailRestApiClient;
74
- //# sourceMappingURL=emailRestApiCl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OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAGF;AA3ED,gDA2EC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport { EmailImpl } from \"./operations/index.js\";\nimport { Email } from \"./operationsInterfaces/index.js\";\nimport { EmailRestApiClientOptionalParams } from \"./models/index.js\";\n\nexport class EmailRestApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the EmailRestApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: EmailRestApiClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: EmailRestApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\"\n };\n\n const packageDetails = `azsdk-js-communication-email/1.0.0`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n baseUri: options.endpoint ?? options.baseUri ?? \"{endpoint}\"\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2024-07-01-preview\";\n this.email = new EmailImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n email: Email;\n}\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./models/index.js";
2
- export { EmailRestApiClient } from "./emailRestApiClient.js";
3
- export * from "./operationsInterfaces/index.js";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":"AAQA,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,cAAc,iCAAiC,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.EmailRestApiClient = void 0;
11
- const tslib_1 = require("tslib");
12
- tslib_1.__exportStar(require("./models/index.js"), exports);
13
- var emailRestApiClient_js_1 = require("./emailRestApiClient.js");
14
- Object.defineProperty(exports, "EmailRestApiClient", { enumerable: true, get: function () { return emailRestApiClient_js_1.EmailRestApiClient; } });
15
- tslib_1.__exportStar(require("./operationsInterfaces/index.js"), exports);
16
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/generated/src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,4DAAkC;AAClC,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,0EAAgD","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./models/index.js\";\nexport { EmailRestApiClient } from \"./emailRestApiClient.js\";\nexport * from \"./operationsInterfaces/index.js\";\n"]}
@@ -1,16 +0,0 @@
1
- import { LongRunningOperation, LroResponse } from "@azure/core-lro";
2
- export declare class LroImpl<T> implements LongRunningOperation<T> {
3
- private sendOperationFn;
4
- private args;
5
- private spec;
6
- requestPath: string;
7
- requestMethod: string;
8
- constructor(sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>, args: Record<string, unknown>, spec: {
9
- readonly requestBody?: unknown;
10
- readonly path?: string;
11
- readonly httpMethod: string;
12
- } & Record<string, any>, requestPath?: string, requestMethod?: string);
13
- sendInitialRequest(): Promise<LroResponse<T>>;
14
- sendPollRequest(path: string): Promise<LroResponse<T>>;
15
- }
16
- //# sourceMappingURL=lroImpl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/lroImpl.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,qBAAa,OAAO,CAAC,CAAC,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAEtD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,IAAI;IAKL,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,MAAM;gBARpB,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAClE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,EAAE;QACZ,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChB,WAAW,GAAE,MAAmB,EAChC,aAAa,GAAE,MAAwB;IAEnC,kBAAkB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAG7C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAQpE"}
@@ -1,29 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.LroImpl = void 0;
11
- const tslib_1 = require("tslib");
12
- class LroImpl {
13
- constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
14
- this.sendOperationFn = sendOperationFn;
15
- this.args = args;
16
- this.spec = spec;
17
- this.requestPath = requestPath;
18
- this.requestMethod = requestMethod;
19
- }
20
- async sendInitialRequest() {
21
- return this.sendOperationFn(this.args, this.spec);
22
- }
23
- async sendPollRequest(path) {
24
- const _a = this.spec, { requestBody } = _a, restSpec = tslib_1.__rest(_a, ["requestBody"]);
25
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
26
- }
27
- }
28
- exports.LroImpl = LroImpl;
29
- //# sourceMappingURL=lroImpl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../../../src/generated/src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,MAAa,OAAO;IAClB,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,KAA+B,IAAI,CAAC,IAAI,EAAxC,EAAE,WAAW,OAA2B,EAAtB,QAAQ,sBAA1B,eAA4B,CAAY,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,kCAChC,QAAQ,KACX,IAAI,EACJ,UAAU,EAAE,KAAK,IACjB,CAAC;IACL,CAAC;CACF;AAvBD,0BAuBC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
@@ -1,184 +0,0 @@
1
- import * as coreClient from "@azure/core-client";
2
- /** Status of the long running operation */
3
- export interface EmailSendResult {
4
- /** The unique id of the operation. Use a UUID. */
5
- id: string;
6
- /** Status of operation. */
7
- status: EmailSendStatus;
8
- /** Error details when status is a non-success terminal state. */
9
- error?: ErrorDetail;
10
- }
11
- /** The error detail. */
12
- export interface ErrorDetail {
13
- /**
14
- * The error code.
15
- * NOTE: This property will not be serialized. It can only be populated by the server.
16
- */
17
- readonly code?: string;
18
- /**
19
- * The error message.
20
- * NOTE: This property will not be serialized. It can only be populated by the server.
21
- */
22
- readonly message?: string;
23
- /**
24
- * The error target.
25
- * NOTE: This property will not be serialized. It can only be populated by the server.
26
- */
27
- readonly target?: string;
28
- /**
29
- * The error details.
30
- * NOTE: This property will not be serialized. It can only be populated by the server.
31
- */
32
- readonly details?: ErrorDetail[];
33
- /**
34
- * The error additional info.
35
- * NOTE: This property will not be serialized. It can only be populated by the server.
36
- */
37
- readonly additionalInfo?: ErrorAdditionalInfo[];
38
- }
39
- /** The resource management error additional info. */
40
- export interface ErrorAdditionalInfo {
41
- /**
42
- * The additional info type.
43
- * NOTE: This property will not be serialized. It can only be populated by the server.
44
- */
45
- readonly type?: string;
46
- /**
47
- * The additional info.
48
- * NOTE: This property will not be serialized. It can only be populated by the server.
49
- */
50
- readonly info?: Record<string, unknown>;
51
- }
52
- /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */
53
- export interface ErrorResponse {
54
- /** The error object. */
55
- error?: ErrorDetail;
56
- }
57
- /** Message payload for sending an email */
58
- export interface EmailMessage {
59
- /** Custom email headers to be passed. */
60
- headers?: {
61
- [propertyName: string]: string;
62
- };
63
- /** Sender email address from a verified domain. */
64
- senderAddress: string;
65
- /** Email content to be sent. */
66
- content: EmailContent;
67
- /** Recipients for the email. */
68
- recipients: EmailRecipients;
69
- /** List of attachments. Please note that we limit the total size of an email request (which includes both regular and inline attachments) to 10MB. */
70
- attachments?: EmailAttachment[];
71
- /** Email addresses where recipients' replies will be sent to. */
72
- replyTo?: EmailAddress[];
73
- /** Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane. */
74
- disableUserEngagementTracking?: boolean;
75
- }
76
- /** Content of the email. */
77
- export interface EmailContent {
78
- /** Subject of the email message */
79
- subject: string;
80
- /** Plain text version of the email message. */
81
- plainText?: string;
82
- /** Html version of the email message. */
83
- html?: string;
84
- }
85
- /** Recipients of the email */
86
- export interface EmailRecipients {
87
- /** Email To recipients */
88
- to?: EmailAddress[];
89
- /** Email CC recipients */
90
- cc?: EmailAddress[];
91
- /** Email BCC recipients */
92
- bcc?: EmailAddress[];
93
- }
94
- /** An object representing the email address and its display name */
95
- export interface EmailAddress {
96
- /** Email address. */
97
- address: string;
98
- /** Email display name. */
99
- displayName?: string;
100
- }
101
- /** Attachment to the email. */
102
- export interface EmailAttachment {
103
- /** Name of the attachment */
104
- name: string;
105
- /** MIME type of the content being attached. */
106
- contentType: string;
107
- /** Base64 encoded contents of the attachment */
108
- contentInBase64: string;
109
- /** Unique identifier (CID) to reference an inline attachment. */
110
- contentId?: string;
111
- }
112
- /** Defines headers for Email_getSendResult operation. */
113
- export interface EmailGetSendResultHeaders {
114
- /** This header will only be present when the status is a non-terminal status. It indicates the minimum amount of time in seconds to wait before polling for operation status again. */
115
- retryAfter?: number;
116
- }
117
- /** Defines headers for Email_getSendResult operation. */
118
- export interface EmailGetSendResultExceptionHeaders {
119
- /** Error code - this will be the same as the code in the error property in the response body. */
120
- xMsErrorCode?: string;
121
- }
122
- /** Defines headers for Email_send operation. */
123
- export interface EmailSendHeaders {
124
- /** Location url of where to poll the status of this operation from. */
125
- operationLocation?: string;
126
- /** This header will only be present when the operation status is a non-terminal status. It indicates the minimum amount of time in seconds to wait before polling for operation status again. */
127
- retryAfter?: number;
128
- }
129
- /** Defines headers for Email_send operation. */
130
- export interface EmailSendExceptionHeaders {
131
- /** Error code - this will be the same as the code in the error property in the response body. */
132
- xMsErrorCode?: string;
133
- }
134
- /** Known values of {@link EmailSendStatus} that the service accepts. */
135
- export declare enum KnownEmailSendStatus {
136
- /** NotStarted */
137
- NotStarted = "NotStarted",
138
- /** Running */
139
- Running = "Running",
140
- /** Succeeded */
141
- Succeeded = "Succeeded",
142
- /** Failed */
143
- Failed = "Failed",
144
- /** Canceled */
145
- Canceled = "Canceled"
146
- }
147
- /**
148
- * Defines values for EmailSendStatus. \
149
- * {@link KnownEmailSendStatus} can be used interchangeably with EmailSendStatus,
150
- * this enum contains the known values that the service supports.
151
- * ### Known values supported by the service
152
- * **NotStarted** \
153
- * **Running** \
154
- * **Succeeded** \
155
- * **Failed** \
156
- * **Canceled**
157
- */
158
- export type EmailSendStatus = string;
159
- /** Optional parameters. */
160
- export interface EmailGetSendResultOptionalParams extends coreClient.OperationOptions {
161
- }
162
- /** Contains response data for the getSendResult operation. */
163
- export type EmailGetSendResultResponse = EmailGetSendResultHeaders & EmailSendResult;
164
- /** Optional parameters. */
165
- export interface EmailSendOptionalParams extends coreClient.OperationOptions {
166
- /** This is the ID provided by the customer to identify the long running operation. If an ID is not provided by the customer, the service will generate one. */
167
- operationId?: string;
168
- /** Tracking ID sent with the request to help with debugging. */
169
- clientRequestId?: string;
170
- /** Delay to wait until next poll, in milliseconds. */
171
- updateIntervalInMs?: number;
172
- /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
173
- resumeFrom?: string;
174
- }
175
- /** Contains response data for the send operation. */
176
- export type EmailSendResponse = EmailSendHeaders & EmailSendResult;
177
- /** Optional parameters. */
178
- export interface EmailRestApiClientOptionalParams extends coreClient.ServiceClientOptions {
179
- /** Api Version */
180
- apiVersion?: string;
181
- /** Overrides client endpoint. */
182
- endpoint?: string;
183
- }
184
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/models/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,2CAA2C;AAC3C,MAAM,WAAW,eAAe;IAC9B,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,2BAA2B;IAC3B,MAAM,EAAE,eAAe,CAAC;IACxB,iEAAiE;IACjE,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,wBAAwB;AACxB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IACb,MAAM,WAAW;IACjB,eAAe;IACf,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,2BAA2B;AAC3B,MAAM,WAAW,gCACf,SAAQ,UAAU,CAAC,gBAAgB;CAAG;AAExC,8DAA8D;AAC9D,MAAM,MAAM,0BAA0B,GAAG,yBAAyB,GAChE,eAAe,CAAC;AAElB,2BAA2B;AAC3B,MAAM,WAAW,uBAAwB,SAAQ,UAAU,CAAC,gBAAgB;IAC1E,+JAA+J;IAC/J,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sDAAsD;IACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,iGAAiG;IACjG,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qDAAqD;AACrD,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG,eAAe,CAAC;AAEnE,2BAA2B;AAC3B,MAAM,WAAW,gCACf,SAAQ,UAAU,CAAC,oBAAoB;IACvC,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,25 +0,0 @@
1
- "use strict";
2
- /*
3
- * Copyright (c) Microsoft Corporation.
4
- * Licensed under the MIT License.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.KnownEmailSendStatus = void 0;
11
- /** Known values of {@link EmailSendStatus} that the service accepts. */
12
- var KnownEmailSendStatus;
13
- (function (KnownEmailSendStatus) {
14
- /** NotStarted */
15
- KnownEmailSendStatus["NotStarted"] = "NotStarted";
16
- /** Running */
17
- KnownEmailSendStatus["Running"] = "Running";
18
- /** Succeeded */
19
- KnownEmailSendStatus["Succeeded"] = "Succeeded";
20
- /** Failed */
21
- KnownEmailSendStatus["Failed"] = "Failed";
22
- /** Canceled */
23
- KnownEmailSendStatus["Canceled"] = "Canceled";
24
- })(KnownEmailSendStatus || (exports.KnownEmailSendStatus = KnownEmailSendStatus = {}));
25
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAmJH,wEAAwE;AACxE,IAAY,oBAWX;AAXD,WAAY,oBAAoB;IAC9B,iBAAiB;IACjB,iDAAyB,CAAA;IACzB,cAAc;IACd,2CAAmB,CAAA;IACnB,gBAAgB;IAChB,+CAAuB,CAAA;IACvB,aAAa;IACb,yCAAiB,CAAA;IACjB,eAAe;IACf,6CAAqB,CAAA;AACvB,CAAC,EAXW,oBAAoB,oCAApB,oBAAoB,QAW/B","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\n/** Status of the long running operation */\nexport interface EmailSendResult {\n /** The unique id of the operation. Use a UUID. */\n id: string;\n /** Status of operation. */\n status: EmailSendStatus;\n /** Error details when status is a non-success terminal state. */\n error?: ErrorDetail;\n}\n\n/** The error detail. */\nexport interface ErrorDetail {\n /**\n * The error code.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly code?: string;\n /**\n * The error message.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly message?: string;\n /**\n * The error target.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly target?: string;\n /**\n * The error details.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly details?: ErrorDetail[];\n /**\n * The error additional info.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly additionalInfo?: ErrorAdditionalInfo[];\n}\n\n/** The resource management error additional info. */\nexport interface ErrorAdditionalInfo {\n /**\n * The additional info type.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly type?: string;\n /**\n * The additional info.\n * NOTE: This property will not be serialized. It can only be populated by the server.\n */\n readonly info?: Record<string, unknown>;\n}\n\n/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */\nexport interface ErrorResponse {\n /** The error object. */\n error?: ErrorDetail;\n}\n\n/** Message payload for sending an email */\nexport interface EmailMessage {\n /** Custom email headers to be passed. */\n headers?: { [propertyName: string]: string };\n /** Sender email address from a verified domain. */\n senderAddress: string;\n /** Email content to be sent. */\n content: EmailContent;\n /** Recipients for the email. */\n recipients: EmailRecipients;\n /** List of attachments. Please note that we limit the total size of an email request (which includes both regular and inline attachments) to 10MB. */\n attachments?: EmailAttachment[];\n /** Email addresses where recipients' replies will be sent to. */\n replyTo?: EmailAddress[];\n /** Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane. */\n disableUserEngagementTracking?: boolean;\n}\n\n/** Content of the email. */\nexport interface EmailContent {\n /** Subject of the email message */\n subject: string;\n /** Plain text version of the email message. */\n plainText?: string;\n /** Html version of the email message. */\n html?: string;\n}\n\n/** Recipients of the email */\nexport interface EmailRecipients {\n /** Email To recipients */\n to?: EmailAddress[];\n /** Email CC recipients */\n cc?: EmailAddress[];\n /** Email BCC recipients */\n bcc?: EmailAddress[];\n}\n\n/** An object representing the email address and its display name */\nexport interface EmailAddress {\n /** Email address. */\n address: string;\n /** Email display name. */\n displayName?: string;\n}\n\n/** Attachment to the email. */\nexport interface EmailAttachment {\n /** Name of the attachment */\n name: string;\n /** MIME type of the content being attached. */\n contentType: string;\n /** Base64 encoded contents of the attachment */\n contentInBase64: string;\n /** Unique identifier (CID) to reference an inline attachment. */\n contentId?: string;\n}\n\n/** Defines headers for Email_getSendResult operation. */\nexport interface EmailGetSendResultHeaders {\n /** This header will only be present when the status is a non-terminal status. It indicates the minimum amount of time in seconds to wait before polling for operation status again. */\n retryAfter?: number;\n}\n\n/** Defines headers for Email_getSendResult operation. */\nexport interface EmailGetSendResultExceptionHeaders {\n /** Error code - this will be the same as the code in the error property in the response body. */\n xMsErrorCode?: string;\n}\n\n/** Defines headers for Email_send operation. */\nexport interface EmailSendHeaders {\n /** Location url of where to poll the status of this operation from. */\n operationLocation?: string;\n /** This header will only be present when the operation status is a non-terminal status. It indicates the minimum amount of time in seconds to wait before polling for operation status again. */\n retryAfter?: number;\n}\n\n/** Defines headers for Email_send operation. */\nexport interface EmailSendExceptionHeaders {\n /** Error code - this will be the same as the code in the error property in the response body. */\n xMsErrorCode?: string;\n}\n\n/** Known values of {@link EmailSendStatus} that the service accepts. */\nexport enum KnownEmailSendStatus {\n /** NotStarted */\n NotStarted = \"NotStarted\",\n /** Running */\n Running = \"Running\",\n /** Succeeded */\n Succeeded = \"Succeeded\",\n /** Failed */\n Failed = \"Failed\",\n /** Canceled */\n Canceled = \"Canceled\"\n}\n\n/**\n * Defines values for EmailSendStatus. \\\n * {@link KnownEmailSendStatus} can be used interchangeably with EmailSendStatus,\n * this enum contains the known values that the service supports.\n * ### Known values supported by the service\n * **NotStarted** \\\n * **Running** \\\n * **Succeeded** \\\n * **Failed** \\\n * **Canceled**\n */\nexport type EmailSendStatus = string;\n\n/** Optional parameters. */\nexport interface EmailGetSendResultOptionalParams\n extends coreClient.OperationOptions {}\n\n/** Contains response data for the getSendResult operation. */\nexport type EmailGetSendResultResponse = EmailGetSendResultHeaders &\n EmailSendResult;\n\n/** Optional parameters. */\nexport interface EmailSendOptionalParams extends coreClient.OperationOptions {\n /** This is the ID provided by the customer to identify the long running operation. If an ID is not provided by the customer, the service will generate one. */\n operationId?: string;\n /** Tracking ID sent with the request to help with debugging. */\n clientRequestId?: string;\n /** Delay to wait until next poll, in milliseconds. */\n updateIntervalInMs?: number;\n /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */\n resumeFrom?: string;\n}\n\n/** Contains response data for the send operation. */\nexport type EmailSendResponse = EmailSendHeaders & EmailSendResult;\n\n/** Optional parameters. */\nexport interface EmailRestApiClientOptionalParams\n extends coreClient.ServiceClientOptions {\n /** Api Version */\n apiVersion?: string;\n /** Overrides client endpoint. */\n endpoint?: string;\n}\n"]}
@@ -1,15 +0,0 @@
1
- import * as coreClient from "@azure/core-client";
2
- export declare const EmailSendResult: coreClient.CompositeMapper;
3
- export declare const ErrorDetail: coreClient.CompositeMapper;
4
- export declare const ErrorAdditionalInfo: coreClient.CompositeMapper;
5
- export declare const ErrorResponse: coreClient.CompositeMapper;
6
- export declare const EmailMessage: coreClient.CompositeMapper;
7
- export declare const EmailContent: coreClient.CompositeMapper;
8
- export declare const EmailRecipients: coreClient.CompositeMapper;
9
- export declare const EmailAddress: coreClient.CompositeMapper;
10
- export declare const EmailAttachment: coreClient.CompositeMapper;
11
- export declare const EmailGetSendResultHeaders: coreClient.CompositeMapper;
12
- export declare const EmailGetSendResultExceptionHeaders: coreClient.CompositeMapper;
13
- export declare const EmailSendHeaders: coreClient.CompositeMapper;
14
- export declare const EmailSendExceptionHeaders: coreClient.CompositeMapper;
15
- //# sourceMappingURL=mappers.d.ts.map