@azure/communication-email 1.0.1-beta.1 → 1.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{LICENSE.txt → LICENSE} +4 -4
- package/README.md +96 -15
- package/dist/browser/emailClient.d.ts +31 -0
- package/dist/browser/emailClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/emailClient.js +10 -6
- package/dist/browser/emailClient.js.map +1 -0
- package/dist/browser/generated/src/emailRestApiClient.d.ts +17 -0
- package/dist/browser/generated/src/emailRestApiClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/emailRestApiClient.js +11 -4
- package/dist/browser/generated/src/emailRestApiClient.js.map +1 -0
- package/dist/browser/generated/src/index.d.ts +4 -0
- package/dist/browser/generated/src/index.d.ts.map +1 -0
- package/dist/browser/generated/src/index.js +11 -0
- package/dist/browser/generated/src/index.js.map +1 -0
- package/dist/browser/generated/src/lroImpl.d.ts +16 -0
- package/dist/browser/generated/src/lroImpl.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/lroImpl.js +11 -3
- package/dist/browser/generated/src/lroImpl.js.map +1 -0
- package/{types/communication-email.d.ts → dist/browser/generated/src/models/index.d.ts} +184 -215
- package/dist/browser/generated/src/models/index.d.ts.map +1 -0
- package/dist/browser/generated/src/models/mappers.d.ts +15 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/src/models/parameters.d.ts +10 -0
- package/dist/browser/generated/src/models/parameters.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/models/parameters.js +1 -1
- package/{dist-esm/src → dist/browser}/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/operations/email.d.ts +33 -0
- package/dist/browser/generated/src/operations/email.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/src/operations/email.js +15 -9
- package/dist/browser/generated/src/operations/email.js.map +1 -0
- package/dist/browser/generated/src/operations/index.d.ts +2 -0
- package/dist/browser/generated/src/operations/index.d.ts.map +1 -0
- package/{dist-esm/src/generated/src → dist/browser/generated/src/operations}/index.js +1 -3
- package/{dist-esm/src → dist/browser}/generated/src/operations/index.js.map +1 -1
- package/dist/browser/generated/src/operationsInterfaces/email.d.ts +25 -0
- package/dist/browser/generated/src/operationsInterfaces/email.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/email.js.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/browser/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/browser/generated/src/operationsInterfaces/index.js +9 -0
- package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/index.js.map +1 -1
- package/dist/browser/index.d.ts +3 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +5 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +5 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/models.d.ts +57 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/models.js +4 -0
- package/dist/browser/models.js.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/commonjs/emailClient.d.ts +31 -0
- package/dist/commonjs/emailClient.d.ts.map +1 -0
- package/dist/commonjs/emailClient.js +46 -0
- package/dist/commonjs/emailClient.js.map +1 -0
- package/dist/commonjs/generated/src/emailRestApiClient.d.ts +17 -0
- package/dist/commonjs/generated/src/emailRestApiClient.d.ts.map +1 -0
- package/dist/commonjs/generated/src/emailRestApiClient.js +81 -0
- package/dist/commonjs/generated/src/emailRestApiClient.js.map +1 -0
- package/dist/commonjs/generated/src/index.d.ts +4 -0
- package/dist/commonjs/generated/src/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/index.js +16 -0
- package/dist/commonjs/generated/src/index.js.map +1 -0
- package/dist/commonjs/generated/src/lroImpl.d.ts +16 -0
- package/dist/commonjs/generated/src/lroImpl.d.ts.map +1 -0
- package/dist/commonjs/generated/src/lroImpl.js +37 -0
- package/dist/commonjs/generated/src/lroImpl.js.map +1 -0
- package/dist/commonjs/generated/src/models/index.d.ts +184 -0
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/index.js +25 -0
- package/dist/commonjs/generated/src/models/index.js.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts +15 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/mappers.js +388 -0
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts +10 -0
- package/dist/commonjs/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/src/models/parameters.js +88 -0
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -0
- package/dist/commonjs/generated/src/operations/email.d.ts +33 -0
- package/dist/commonjs/generated/src/operations/email.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/email.js +146 -0
- package/dist/commonjs/generated/src/operations/email.js.map +1 -0
- package/dist/commonjs/generated/src/operations/index.d.ts +2 -0
- package/dist/commonjs/generated/src/operations/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operations/index.js +12 -0
- package/dist/commonjs/generated/src/operations/index.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/email.d.ts +25 -0
- package/dist/commonjs/generated/src/operationsInterfaces/email.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/email.js +10 -0
- package/dist/commonjs/generated/src/operationsInterfaces/email.js.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js +12 -0
- package/dist/commonjs/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/commonjs/index.d.ts +3 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +8 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +5 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +11 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models.d.ts +57 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +8 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/esm/emailClient.d.ts +31 -0
- package/dist/esm/emailClient.d.ts.map +1 -0
- package/dist/esm/emailClient.js +42 -0
- package/dist/esm/emailClient.js.map +1 -0
- package/dist/esm/generated/src/emailRestApiClient.d.ts +17 -0
- package/dist/esm/generated/src/emailRestApiClient.d.ts.map +1 -0
- package/dist/esm/generated/src/emailRestApiClient.js +76 -0
- package/dist/esm/generated/src/emailRestApiClient.js.map +1 -0
- package/dist/esm/generated/src/index.d.ts +4 -0
- package/dist/esm/generated/src/index.d.ts.map +1 -0
- package/dist/esm/generated/src/index.js +11 -0
- package/dist/esm/generated/src/index.js.map +1 -0
- package/dist/esm/generated/src/lroImpl.d.ts +16 -0
- package/dist/esm/generated/src/lroImpl.d.ts.map +1 -0
- package/dist/esm/generated/src/lroImpl.js +33 -0
- package/dist/esm/generated/src/lroImpl.js.map +1 -0
- package/dist/esm/generated/src/models/index.d.ts +184 -0
- package/dist/esm/generated/src/models/index.d.ts.map +1 -0
- package/dist/esm/generated/src/models/index.js +22 -0
- package/dist/esm/generated/src/models/index.js.map +1 -0
- package/dist/esm/generated/src/models/mappers.d.ts +15 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/esm/generated/src/models/mappers.js +385 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -0
- package/dist/esm/generated/src/models/parameters.d.ts +10 -0
- package/dist/esm/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/src/models/parameters.js +85 -0
- package/dist/esm/generated/src/models/parameters.js.map +1 -0
- package/dist/esm/generated/src/operations/email.d.ts +33 -0
- package/dist/esm/generated/src/operations/email.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/email.js +141 -0
- package/dist/esm/generated/src/operations/email.js.map +1 -0
- package/dist/esm/generated/src/operations/index.d.ts +2 -0
- package/dist/esm/generated/src/operations/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operations/index.js +9 -0
- package/dist/esm/generated/src/operations/index.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/email.d.ts +25 -0
- package/dist/esm/generated/src/operationsInterfaces/email.d.ts.map +1 -0
- package/{dist-esm/src/generated/src/operationsInterfaces/index.js → dist/esm/generated/src/operationsInterfaces/email.js} +2 -2
- package/dist/esm/generated/src/operationsInterfaces/email.js.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/esm/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js +9 -0
- package/dist/esm/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +5 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +8 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models.d.ts +57 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +4 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/react-native/emailClient.d.ts +31 -0
- package/dist/react-native/emailClient.d.ts.map +1 -0
- package/dist/react-native/emailClient.js +42 -0
- package/dist/react-native/emailClient.js.map +1 -0
- package/dist/react-native/generated/src/emailRestApiClient.d.ts +17 -0
- package/dist/react-native/generated/src/emailRestApiClient.d.ts.map +1 -0
- package/dist/react-native/generated/src/emailRestApiClient.js +76 -0
- package/dist/react-native/generated/src/emailRestApiClient.js.map +1 -0
- package/dist/react-native/generated/src/index.d.ts +4 -0
- package/dist/react-native/generated/src/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/index.js +11 -0
- package/dist/react-native/generated/src/index.js.map +1 -0
- package/dist/react-native/generated/src/lroImpl.d.ts +16 -0
- package/dist/react-native/generated/src/lroImpl.d.ts.map +1 -0
- package/dist/react-native/generated/src/lroImpl.js +33 -0
- package/dist/react-native/generated/src/lroImpl.js.map +1 -0
- package/dist/react-native/generated/src/models/index.d.ts +184 -0
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/index.js +22 -0
- package/dist/react-native/generated/src/models/index.js.map +1 -0
- package/dist/react-native/generated/src/models/mappers.d.ts +15 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/mappers.js +385 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -0
- package/dist/react-native/generated/src/models/parameters.d.ts +10 -0
- package/dist/react-native/generated/src/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/src/models/parameters.js +85 -0
- package/dist/react-native/generated/src/models/parameters.js.map +1 -0
- package/dist/react-native/generated/src/operations/email.d.ts +33 -0
- package/dist/react-native/generated/src/operations/email.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/email.js +141 -0
- package/dist/react-native/generated/src/operations/email.js.map +1 -0
- package/dist/react-native/generated/src/operations/index.d.ts +2 -0
- package/dist/react-native/generated/src/operations/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operations/index.js +9 -0
- package/dist/react-native/generated/src/operations/index.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/email.d.ts +25 -0
- package/dist/react-native/generated/src/operationsInterfaces/email.d.ts.map +1 -0
- package/{dist-esm/src/generated/src/operations/index.js → dist/react-native/generated/src/operationsInterfaces/email.js} +2 -2
- package/dist/react-native/generated/src/operationsInterfaces/email.js.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts +2 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js +9 -0
- package/dist/react-native/generated/src/operationsInterfaces/index.js.map +1 -0
- package/dist/react-native/index.d.ts +3 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +5 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +5 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +8 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models.d.ts +57 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +4 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/package.json +83 -66
- package/dist/index.js +0 -802
- package/dist/index.js.map +0 -1
- package/dist-esm/samples-dev/sendEmailMultipleRecipients.js +0 -46
- package/dist-esm/samples-dev/sendEmailMultipleRecipients.js.map +0 -1
- package/dist-esm/samples-dev/sendEmailSingleRecipient.js +0 -40
- package/dist-esm/samples-dev/sendEmailSingleRecipient.js.map +0 -1
- package/dist-esm/samples-dev/sendEmailWithAttachments.js +0 -47
- package/dist-esm/samples-dev/sendEmailWithAttachments.js.map +0 -1
- package/dist-esm/samples-dev/sendEmailWithInlineAttachments.js +0 -48
- package/dist-esm/samples-dev/sendEmailWithInlineAttachments.js.map +0 -1
- package/dist-esm/src/emailClient.js.map +0 -1
- package/dist-esm/src/generated/src/emailRestApiClient.js.map +0 -1
- package/dist-esm/src/generated/src/index.js.map +0 -1
- package/dist-esm/src/generated/src/lroImpl.js.map +0 -1
- package/dist-esm/src/generated/src/operations/email.js.map +0 -1
- package/dist-esm/src/generated/src/operationsInterfaces/email.js.map +0 -1
- package/dist-esm/src/index.js +0 -5
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/models.js +0 -4
- package/dist-esm/src/models.js.map +0 -1
- package/dist-esm/test/public/emailClient.spec.js +0 -138
- package/dist-esm/test/public/emailClient.spec.js.map +0 -1
- package/dist-esm/test/public/utils/recordedClient.js +0 -59
- package/dist-esm/test/public/utils/recordedClient.js.map +0 -1
- /package/{dist-esm/src → dist/browser}/generated/src/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/src/operationsInterfaces/email.js +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
@@ -1,215 +1,184 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
/**
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
/**
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
/**
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
/**
|
34
|
-
*
|
35
|
-
*
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
*
|
43
|
-
*
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
*
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
*/
|
58
|
-
export
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
/**
|
79
|
-
|
80
|
-
/**
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
/**
|
95
|
-
export
|
96
|
-
/**
|
97
|
-
|
98
|
-
/**
|
99
|
-
|
100
|
-
}
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
/**
|
113
|
-
export
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
/**
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
/**
|
139
|
-
|
140
|
-
/**
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
/**
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
/** Plain text version of the email message. */
|
186
|
-
plainText?: string;
|
187
|
-
/** Html version of the email message. */
|
188
|
-
html: string;
|
189
|
-
}
|
190
|
-
|
191
|
-
/** Known values of {@link EmailSendStatus} that the service accepts. */
|
192
|
-
export declare enum KnownEmailSendStatus {
|
193
|
-
/** NotStarted */
|
194
|
-
NotStarted = "NotStarted",
|
195
|
-
/** Running */
|
196
|
-
Running = "Running",
|
197
|
-
/** Succeeded */
|
198
|
-
Succeeded = "Succeeded",
|
199
|
-
/** Failed */
|
200
|
-
Failed = "Failed",
|
201
|
-
/** Canceled */
|
202
|
-
Canceled = "Canceled"
|
203
|
-
}
|
204
|
-
|
205
|
-
/** Content of the email with a required plainText property. */
|
206
|
-
export declare interface PlainTextEmailContent {
|
207
|
-
/** Subject of the email message */
|
208
|
-
subject: string;
|
209
|
-
/** Plain text version of the email message. */
|
210
|
-
plainText: string;
|
211
|
-
/** Html version of the email message. */
|
212
|
-
html?: string;
|
213
|
-
}
|
214
|
-
|
215
|
-
export { }
|
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
|
@@ -0,0 +1 @@
|
|
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,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACjD;AAED,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACzC;AAED,qKAAqK;AACrK,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,KAAK,CAAC,EAAE,WAAW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C3B,MAAM,WAAW,gCACf,SAAQ,UAAU,CAAC,oBAAoB;IACvC,kBAAkB;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
@@ -0,0 +1,15 @@
|
|
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
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/models/mappers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,eA4BxC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,eAsDpC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAAC,eAsB5C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,UAAU,CAAC,eActC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,eAiErC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,eA0BrC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,eA2CxC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,eAoBrC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,eAkCxC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,eAalD,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,UAAU,CAAC,eAa3D,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,UAAU,CAAC,eAmBzC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,UAAU,CAAC,eAalD,CAAC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { OperationParameter, OperationURLParameter, OperationQueryParameter } from "@azure/core-client";
|
2
|
+
export declare const accept: OperationParameter;
|
3
|
+
export declare const endpoint: OperationURLParameter;
|
4
|
+
export declare const operationId: OperationURLParameter;
|
5
|
+
export declare const apiVersion: OperationQueryParameter;
|
6
|
+
export declare const contentType: OperationParameter;
|
7
|
+
export declare const message: OperationParameter;
|
8
|
+
export declare const operationId1: OperationParameter;
|
9
|
+
export declare const clientRequestId: OperationParameter;
|
10
|
+
//# sourceMappingURL=parameters.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/models/parameters.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAG5B,eAAO,MAAM,MAAM,EAAE,kBAUpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,qBAUtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,qBASzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,uBAUxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,kBAUzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,kBAGrB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,kBAQ1B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,kBAQ7B,CAAC"}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
|
-
import { EmailMessage as EmailMessageMapper } from "../models/mappers";
|
8
|
+
import { EmailMessage as EmailMessageMapper } from "../models/mappers.js";
|
9
9
|
export const accept = {
|
10
10
|
parameterPath: "accept",
|
11
11
|
mapper: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1E,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE;QACN,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAA0B;IAChD,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE;QACN,cAAc,EAAE,aAAa;QAC7B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA4B;IACjD,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE;QACN,YAAY,EAAE,oBAAoB;QAClC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,aAAa;QAC7B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAuB;IACzC,aAAa,EAAE,SAAS;IACxB,MAAM,EAAE,kBAAkB;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAuB;IAC9C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAuB;IACjD,aAAa,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC;IAC7C,MAAM,EAAE;QACN,cAAc,EAAE,wBAAwB;QACxC,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;SACb;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter\n} from \"@azure/core-client\";\nimport { EmailMessage as EmailMessageMapper } from \"../models/mappers.js\";\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\"\n }\n },\n skipEncoding: true\n};\n\nexport const operationId: OperationURLParameter = {\n parameterPath: \"operationId\",\n mapper: {\n serializedName: \"operationId\",\n required: true,\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2024-07-01-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\"\n }\n }\n};\n\nexport const message: OperationParameter = {\n parameterPath: \"message\",\n mapper: EmailMessageMapper\n};\n\nexport const operationId1: OperationParameter = {\n parameterPath: [\"options\", \"operationId\"],\n mapper: {\n serializedName: \"Operation-Id\",\n type: {\n name: \"Uuid\"\n }\n }\n};\n\nexport const clientRequestId: OperationParameter = {\n parameterPath: [\"options\", \"clientRequestId\"],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"Uuid\"\n }\n }\n};\n"]}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Email } from "../operationsInterfaces/index.js";
|
2
|
+
import { EmailRestApiClient } from "../emailRestApiClient.js";
|
3
|
+
import { PollerLike, PollOperationState } from "@azure/core-lro";
|
4
|
+
import { EmailGetSendResultOptionalParams, EmailGetSendResultResponse, EmailMessage, EmailSendOptionalParams, EmailSendResponse } from "../models/index.js";
|
5
|
+
/** Class containing Email operations. */
|
6
|
+
export declare class EmailImpl implements Email {
|
7
|
+
private readonly client;
|
8
|
+
/**
|
9
|
+
* Initialize a new instance of the class Email class.
|
10
|
+
* @param client Reference to the service client
|
11
|
+
*/
|
12
|
+
constructor(client: EmailRestApiClient);
|
13
|
+
/**
|
14
|
+
* Gets the status of the email send operation.
|
15
|
+
* @param operationId ID of the long running operation (GUID) returned from a previous call to send
|
16
|
+
* email
|
17
|
+
* @param options The options parameters.
|
18
|
+
*/
|
19
|
+
getSendResult(operationId: string, options?: EmailGetSendResultOptionalParams): Promise<EmailGetSendResultResponse>;
|
20
|
+
/**
|
21
|
+
* Queues an email message to be sent to one or more recipients
|
22
|
+
* @param message Message payload for sending an email
|
23
|
+
* @param options The options parameters.
|
24
|
+
*/
|
25
|
+
beginSend(message: EmailMessage, options?: EmailSendOptionalParams): Promise<PollerLike<PollOperationState<EmailSendResponse>, EmailSendResponse>>;
|
26
|
+
/**
|
27
|
+
* Queues an email message to be sent to one or more recipients
|
28
|
+
* @param message Message payload for sending an email
|
29
|
+
* @param options The options parameters.
|
30
|
+
*/
|
31
|
+
beginSendAndWait(message: EmailMessage, options?: EmailSendOptionalParams): Promise<EmailSendResponse>;
|
32
|
+
}
|
33
|
+
//# sourceMappingURL=email.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operations/email.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAa,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC1B,YAAY,EACZ,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,oBAAoB,CAAC;AAE5B,yCAAyC;AACzC,qBAAa,SAAU,YAAW,KAAK;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;;;OAKG;IACH,aAAa,CACX,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC;IAOtC;;;;OAIG;IACG,SAAS,CACb,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CACR,UAAU,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAC,CACrE;IAsDD;;;;OAIG;IACG,gBAAgB,CACpB,OAAO,EAAE,YAAY,EACrB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,iBAAiB,CAAC;CAI9B"}
|
@@ -6,12 +6,13 @@
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
8
|
import * as coreClient from "@azure/core-client";
|
9
|
-
import * as Mappers from "../models/mappers";
|
10
|
-
import * as Parameters from "../models/parameters";
|
9
|
+
import * as Mappers from "../models/mappers.js";
|
10
|
+
import * as Parameters from "../models/parameters.js";
|
11
11
|
import { LroEngine } from "@azure/core-lro";
|
12
|
-
import { LroImpl } from "../lroImpl";
|
12
|
+
import { LroImpl } from "../lroImpl.js";
|
13
13
|
/** Class containing Email operations. */
|
14
14
|
export class EmailImpl {
|
15
|
+
client;
|
15
16
|
/**
|
16
17
|
* Initialize a new instance of the class Email class.
|
17
18
|
* @param client Reference to the service client
|
@@ -38,14 +39,19 @@ export class EmailImpl {
|
|
38
39
|
return this.client.sendOperationRequest(args, spec);
|
39
40
|
};
|
40
41
|
const sendOperation = async (args, spec) => {
|
41
|
-
var _a;
|
42
42
|
let currentRawResponse = undefined;
|
43
|
-
const providedCallback =
|
43
|
+
const providedCallback = args.options?.onResponse;
|
44
44
|
const callback = (rawResponse, flatResponse) => {
|
45
45
|
currentRawResponse = rawResponse;
|
46
|
-
providedCallback
|
46
|
+
providedCallback?.(rawResponse, flatResponse);
|
47
|
+
};
|
48
|
+
const updatedArgs = {
|
49
|
+
...args,
|
50
|
+
options: {
|
51
|
+
...args.options,
|
52
|
+
onResponse: callback
|
53
|
+
}
|
47
54
|
};
|
48
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
49
55
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
50
56
|
return {
|
51
57
|
flatResponse,
|
@@ -58,8 +64,8 @@ export class EmailImpl {
|
|
58
64
|
};
|
59
65
|
const lro = new LroImpl(sendOperation, { message, options }, sendOperationSpec);
|
60
66
|
const poller = new LroEngine(lro, {
|
61
|
-
resumeFrom: options
|
62
|
-
intervalInMs: options
|
67
|
+
resumeFrom: options?.resumeFrom,
|
68
|
+
intervalInMs: options?.updateIntervalInMs,
|
63
69
|
lroResourceLocationConfig: "azure-async-operation"
|
64
70
|
});
|
65
71
|
await poller.poll();
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/email.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AASxC,yCAAyC;AACzC,MAAM,OAAO,SAAS;IACH,MAAM,CAAqB;IAE5C;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,aAAa,CACX,WAAmB,EACnB,OAA0C;QAE1C,OAAO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gB;SACxC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;YACnC,aAAa,EAAE,OAAO,CAAC,gBAAgB;SACxC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;YACnC,aAAa,EAAE,OAAO,CAAC,gBAAgB;SACxC;QACD,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;YACnC,aAAa,EAAE,OAAO,CAAC,gBAAgB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,aAAa;YACjC,aAAa,EAAE,OAAO,CAAC,yBAAyB;SACjD;KACF;IACD,WAAW,EAAE,UAAU,CAAC,OAAO;IAC/B,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;IACpC,gBAAgB,EAAE;QAChB,UAAU,CAAC,MAAM;QACjB,UAAU,CAAC,WAAW;QACtB,UAAU,CAAC,YAAY;QACvB,UAAU,CAAC,eAAe;KAC3B;IACD,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { Email } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { EmailRestApiClient } from \"../emailRestApiClient.js\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n EmailGetSendResultOptionalParams,\n EmailGetSendResultResponse,\n EmailMessage,\n EmailSendOptionalParams,\n EmailSendResponse\n} from \"../models/index.js\";\n\n/** Class containing Email operations. */\nexport class EmailImpl implements Email {\n private readonly client: EmailRestApiClient;\n\n /**\n * Initialize a new instance of the class Email class.\n * @param client Reference to the service client\n */\n constructor(client: EmailRestApiClient) {\n this.client = client;\n }\n\n /**\n * Gets the status of the email send operation.\n * @param operationId ID of the long running operation (GUID) returned from a previous call to send\n * email\n * @param options The options parameters.\n */\n getSendResult(\n operationId: string,\n options?: EmailGetSendResultOptionalParams\n ): Promise<EmailGetSendResultResponse> {\n return this.client.sendOperationRequest(\n { operationId, options },\n getSendResultOperationSpec\n );\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 async beginSend(\n message: EmailMessage,\n options?: EmailSendOptionalParams\n ): Promise<\n PollerLike<PollOperationState<EmailSendResponse>, EmailSendResponse>\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<EmailSendResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { message, options },\n sendOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs,\n lroResourceLocationConfig: \"azure-async-operation\"\n });\n await poller.poll();\n return poller;\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 async beginSendAndWait(\n message: EmailMessage,\n options?: EmailSendOptionalParams\n ): Promise<EmailSendResponse> {\n const poller = await this.beginSend(message, options);\n return poller.pollUntilDone();\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getSendResultOperationSpec: coreClient.OperationSpec = {\n path: \"/emails/operations/{operationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.EmailSendResult,\n headersMapper: Mappers.EmailGetSendResultHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.EmailGetSendResultExceptionHeaders\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint, Parameters.operationId],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst sendOperationSpec: coreClient.OperationSpec = {\n path: \"/emails:send\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.EmailSendResult,\n headersMapper: Mappers.EmailSendHeaders\n },\n 201: {\n bodyMapper: Mappers.EmailSendResult,\n headersMapper: Mappers.EmailSendHeaders\n },\n 202: {\n bodyMapper: Mappers.EmailSendResult,\n headersMapper: Mappers.EmailSendHeaders\n },\n 204: {\n bodyMapper: Mappers.EmailSendResult,\n headersMapper: Mappers.EmailSendHeaders\n },\n default: {\n bodyMapper: Mappers.ErrorResponse,\n headersMapper: Mappers.EmailSendExceptionHeaders\n }\n },\n requestBody: Parameters.message,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [Parameters.endpoint],\n headerParameters: [\n Parameters.accept,\n Parameters.contentType,\n Parameters.operationId1,\n Parameters.clientRequestId\n ],\n mediaType: \"json\",\n serializer\n};\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAQA,cAAc,YAAY,CAAC"}
|
@@ -5,7 +5,5 @@
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
7
7
|
*/
|
8
|
-
export * from "./
|
9
|
-
export { EmailRestApiClient } from "./emailRestApiClient";
|
10
|
-
export * from "./operationsInterfaces";
|
8
|
+
export * from "./email.js";
|
11
9
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/generated/src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,YAAY,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport * from \"./email.js\";\n"]}
|