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

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.47.11"
8
+ "packageVersion": "7.48.0"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-email",
3
- "version": "1.0.1-alpha.20241119.1",
3
+ "version": "1.0.1-alpha.20241203.1",
4
4
  "description": "The is the JS Client SDK for email. This SDK enables users to send emails and get the status of sent email message.",
5
5
  "author": "Microsoft Corporation",
6
6
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "@azure/core-auth": "^1.9.0",
50
50
  "@azure/core-client": "^1.9.2",
51
51
  "@azure/core-lro": "^2.5.0",
52
- "@azure/core-rest-pipeline": ">=1.18.0-alpha <1.18.0-alphb",
52
+ "@azure/core-rest-pipeline": "^1.18.0",
53
53
  "@azure/core-util": "^1.11.0",
54
54
  "@azure/logger": "^1.1.4",
55
55
  "tslib": "^2.8.1"
@@ -1,215 +0,0 @@
1
- import type { CommonClientOptions } from '@azure/core-client';
2
- import type { KeyCredential } from '@azure/core-auth';
3
- import type { OperationOptions } from '@azure/core-client';
4
- import type { PollerLike } from '@azure/core-lro';
5
- import type { PollOperationState } from '@azure/core-lro';
6
- import type { TokenCredential } from '@azure/core-auth';
7
-
8
- /** An object representing the email address and its display name */
9
- export declare interface EmailAddress {
10
- /** Email address. */
11
- address: string;
12
- /** Email display name. */
13
- displayName?: string;
14
- }
15
-
16
- /** Attachment to the email. */
17
- export declare interface EmailAttachment {
18
- /** Name of the attachment */
19
- name: string;
20
- /** MIME type of the content being attached. */
21
- contentType: string;
22
- /** Base64 encoded contents of the attachment */
23
- contentInBase64: string;
24
- /** Unique identifier (CID) to reference an inline attachment. */
25
- contentId?: string;
26
- }
27
-
28
- /**
29
- * The Email service client.
30
- */
31
- export declare class EmailClient {
32
- private readonly generatedClient;
33
- /**
34
- * Initializes a new instance of the EmailClient class.
35
- * @param connectionString - Connection string to connect to an Azure Communication Service resource.
36
- * Example: "endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret";
37
- * @param options - Optional. Options to configure the HTTP pipeline.
38
- */
39
- constructor(connectionString: string, options?: EmailClientOptions);
40
- /**
41
- * Initializes a new instance of the EmailClient class using an Azure KeyCredential.
42
- * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).
43
- * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.
44
- * @param options - Optional. Options to configure the HTTP pipeline.
45
- */
46
- constructor(endpoint: string, credential: KeyCredential | TokenCredential, options?: EmailClientOptions);
47
- /**
48
- * Queues an email message to be sent to one or more recipients
49
- * @param message - Message payload for sending an email
50
- * @param options - The options parameters.
51
- */
52
- beginSend(message: EmailMessage, options?: EmailSendOptionalParams): Promise<PollerLike<PollOperationState<EmailSendResponse>, EmailSendResponse>>;
53
- }
54
-
55
- /**
56
- * Client options used to configure Email Client API requests.
57
- */
58
- export declare interface EmailClientOptions extends CommonClientOptions {
59
- }
60
-
61
- /** Content of the email. */
62
- export declare type EmailContent = HtmlEmailContent | PlainTextEmailContent;
63
-
64
- /** Message payload for sending an email */
65
- export declare interface EmailMessage {
66
- /** Custom email headers to be passed. */
67
- headers?: {
68
- [propertyName: string]: string;
69
- };
70
- /** Sender email address from a verified domain. */
71
- senderAddress: string;
72
- /** Email content to be sent. */
73
- content: EmailContent;
74
- /** Recipients for the email. */
75
- recipients: EmailRecipients;
76
- /** List of attachments. Please note that we limit the total size of an email request (which includes attachments) to 10MB. */
77
- attachments?: EmailAttachment[];
78
- /** Email addresses where recipients' replies will be sent to. */
79
- replyTo?: EmailAddress[];
80
- /** 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. */
81
- disableUserEngagementTracking?: boolean;
82
- }
83
-
84
- /** Recipients of the email */
85
- export declare interface EmailRecipients {
86
- /** Email To recipients */
87
- to?: EmailAddress[];
88
- /** Email CC recipients */
89
- cc?: EmailAddress[];
90
- /** Email BCC recipients */
91
- bcc?: EmailAddress[];
92
- }
93
-
94
- /** Defines headers for Email_send operation. */
95
- export declare interface EmailSendHeaders {
96
- /** Location url of where to poll the status of this operation from. */
97
- operationLocation?: string;
98
- /** 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. */
99
- retryAfter?: number;
100
- }
101
-
102
- /** Optional parameters for the beginSend method. */
103
- export declare interface EmailSendOptionalParams extends OperationOptions {
104
- /** This is the ID used by the status monitor for this long running operation. */
105
- operationId?: string;
106
- /** Delay to wait until next poll, in milliseconds. */
107
- updateIntervalInMs?: number;
108
- /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
109
- resumeFrom?: string;
110
- }
111
-
112
- /** Contains response data for the send operation. */
113
- export declare type EmailSendResponse = EmailSendHeaders & EmailSendResult;
114
-
115
- /** Status of the long running operation */
116
- export declare interface EmailSendResult {
117
- /** The unique id of the operation. Use a UUID. */
118
- id: string;
119
- /** Status of operation. */
120
- status: EmailSendStatus;
121
- /** Error details when status is a non-success terminal state. */
122
- error?: ErrorDetail;
123
- }
124
-
125
- /**
126
- * Defines values for EmailSendStatus. \
127
- * {@link KnownEmailSendStatus} can be used interchangeably with EmailSendStatus,
128
- * this enum contains the known values that the service supports.
129
- * ### Known values supported by the service
130
- * **NotStarted** \
131
- * **Running** \
132
- * **Succeeded** \
133
- * **Failed** \
134
- * **Canceled**
135
- */
136
- export declare type EmailSendStatus = string;
137
-
138
- /** The resource management error additional info. */
139
- export declare interface ErrorAdditionalInfo {
140
- /**
141
- * The additional info type.
142
- * NOTE: This property will not be serialized. It can only be populated by the server.
143
- */
144
- readonly type?: string;
145
- /**
146
- * The additional info.
147
- * NOTE: This property will not be serialized. It can only be populated by the server.
148
- */
149
- readonly info?: Record<string, unknown>;
150
- }
151
-
152
- /** The error detail. */
153
- export declare interface ErrorDetail {
154
- /**
155
- * The error code.
156
- * NOTE: This property will not be serialized. It can only be populated by the server.
157
- */
158
- readonly code?: string;
159
- /**
160
- * The error message.
161
- * NOTE: This property will not be serialized. It can only be populated by the server.
162
- */
163
- readonly message?: string;
164
- /**
165
- * The error target.
166
- * NOTE: This property will not be serialized. It can only be populated by the server.
167
- */
168
- readonly target?: string;
169
- /**
170
- * The error details.
171
- * NOTE: This property will not be serialized. It can only be populated by the server.
172
- */
173
- readonly details?: ErrorDetail[];
174
- /**
175
- * The error additional info.
176
- * NOTE: This property will not be serialized. It can only be populated by the server.
177
- */
178
- readonly additionalInfo?: ErrorAdditionalInfo[];
179
- }
180
-
181
- /** Content of the email with a required html property. */
182
- export declare interface HtmlEmailContent {
183
- /** Subject of the email message */
184
- subject: string;
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 { }