mailchannels-sdk 0.6.1 → 0.7.0
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/dist/mailchannels.d.mts +37 -30
- package/dist/mailchannels.d.ts +37 -30
- package/dist/mailchannels.mjs +517 -615
- package/package.json +7 -7
package/dist/mailchannels.d.mts
CHANGED
|
@@ -12,27 +12,41 @@ declare class MailChannelsClient {
|
|
|
12
12
|
patch<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
interface ErrorResponse {
|
|
16
|
+
message: string;
|
|
17
|
+
statusCode: number | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
interface SuccessResponse {
|
|
16
21
|
/**
|
|
17
22
|
* Whether the operation was successful.
|
|
18
23
|
*/
|
|
19
24
|
success: boolean;
|
|
20
25
|
/**
|
|
21
|
-
* Error
|
|
26
|
+
* Error information if the operation failed.
|
|
22
27
|
*/
|
|
23
|
-
error:
|
|
28
|
+
error: ErrorResponse | null;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
type DataResponse<T> = {
|
|
27
32
|
/**
|
|
28
33
|
* The response data.
|
|
29
34
|
*/
|
|
30
|
-
data: T
|
|
35
|
+
data: T;
|
|
31
36
|
/**
|
|
32
|
-
* Error
|
|
37
|
+
* Error information if the operation failed.
|
|
33
38
|
*/
|
|
34
|
-
error:
|
|
35
|
-
}
|
|
39
|
+
error: null;
|
|
40
|
+
} | {
|
|
41
|
+
/**
|
|
42
|
+
* The response data.
|
|
43
|
+
*/
|
|
44
|
+
data: null;
|
|
45
|
+
/**
|
|
46
|
+
* Error information if the operation failed.
|
|
47
|
+
*/
|
|
48
|
+
error: ErrorResponse;
|
|
49
|
+
};
|
|
36
50
|
|
|
37
51
|
interface EmailsSendRecipient {
|
|
38
52
|
/**
|
|
@@ -238,41 +252,34 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
|
238
252
|
}
|
|
239
253
|
);
|
|
240
254
|
|
|
241
|
-
|
|
255
|
+
type EmailsSendResponse = SuccessResponse & DataResponse<{
|
|
242
256
|
/**
|
|
243
|
-
* Indicates if the email was successfully sent.
|
|
244
|
-
*/
|
|
245
|
-
success: boolean;
|
|
246
|
-
data: {
|
|
247
|
-
/**
|
|
248
257
|
* Fully rendered message if `dryRun` was set to `true`. A string representation of a rendered message, one per personalization in the request.
|
|
249
258
|
*/
|
|
250
|
-
|
|
251
|
-
|
|
259
|
+
rendered?: string[];
|
|
260
|
+
/**
|
|
252
261
|
* The Request ID is a unique identifier generated by the service to track the HTTP request. It will also be included in all webhooks for reference.
|
|
253
262
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
263
|
+
requestId?: string;
|
|
264
|
+
results?: {
|
|
265
|
+
/**
|
|
257
266
|
* The index of the personalization in the request. Starts at 0.
|
|
258
267
|
*/
|
|
259
|
-
|
|
260
|
-
|
|
268
|
+
index?: number;
|
|
269
|
+
/**
|
|
261
270
|
* The Message ID is a unique identifier generated by the service. Each personalization has a distinct Message ID, which is also used in the `Message-Id` header and included in webhooks.
|
|
262
271
|
*/
|
|
263
|
-
|
|
264
|
-
|
|
272
|
+
messageId: string;
|
|
273
|
+
/**
|
|
265
274
|
* A human-readable explanation of the status.
|
|
266
275
|
*/
|
|
267
|
-
|
|
268
|
-
|
|
276
|
+
reason?: string;
|
|
277
|
+
/**
|
|
269
278
|
* The status of the message. Note that 'sent' is a temporary status; the final status will be provided through webhooks, if configured.
|
|
270
279
|
*/
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
error: string | null;
|
|
275
|
-
}
|
|
280
|
+
status: "sent" | "failed";
|
|
281
|
+
}[];
|
|
282
|
+
}>;
|
|
276
283
|
|
|
277
284
|
interface EmailsCreateDkimKeyOptions {
|
|
278
285
|
/**
|
|
@@ -1933,4 +1940,4 @@ declare class MailChannels extends MailChannelsClient {
|
|
|
1933
1940
|
}
|
|
1934
1941
|
|
|
1935
1942
|
export { Domains, Emails, Lists, MailChannels, MailChannelsClient, Metrics, Service, SubAccounts, Suppressions, Users, Webhooks };
|
|
1936
|
-
export type { DataResponse, DomainsBulkCreateLoginLinkResult, DomainsBulkCreateLoginLinks, DomainsBulkCreateLoginLinksResponse, DomainsBulkProvisionOptions, DomainsBulkProvisionResponse, DomainsCreateLoginLink, DomainsCreateLoginLinkResponse, DomainsData, DomainsDownstreamAddress, DomainsListDownstreamAddressesOptions, DomainsListDownstreamAddressesResponse, DomainsListOptions, DomainsListResponse, DomainsProvisionOptions, DomainsProvisionResponse, EmailsCheckDomainDkim, EmailsCheckDomainOptions, EmailsCheckDomainResponse, EmailsCheckDomainVerdict, EmailsCreateDkimKeyOptions, EmailsCreateDkimKeyResponse, EmailsDkimKey, EmailsDkimKeyStatus, EmailsGetDkimKeysOptions, EmailsGetDkimKeysResponse, EmailsRotateDkimKeyOptions, EmailsRotateDkimKeyResponse, EmailsSendAttachment, EmailsSendOptions, EmailsSendOptionsBase, EmailsSendRecipient, EmailsSendResponse, EmailsSendTracking, EmailsUpdateDkimKeyOptions, ListEntriesResponse, ListEntry, ListEntryOptions, ListEntryResponse, ListNames, MetricsBucket, MetricsEngagement, MetricsEngagementResponse, MetricsOptions, MetricsPerformance, MetricsPerformanceResponse, MetricsRecipientBehaviour, MetricsRecipientBehaviourResponse, MetricsSenders, MetricsSendersOptions, MetricsSendersResponse, MetricsSendersType, MetricsUsageResponse, MetricsVolume, MetricsVolumeResponse, Optional, ServiceReportOptions, ServiceSubscriptionsResponse, SubAccountsAccount, SubAccountsApiKey, SubAccountsCreateApiKeyResponse, SubAccountsCreateResponse, SubAccountsCreateSmtpPasswordResponse, SubAccountsLimit, SubAccountsLimitResponse, SubAccountsListApiKeyOptions, SubAccountsListApiKeyResponse, SubAccountsListOptions, SubAccountsListResponse, SubAccountsListSmtpPasswordResponse, SubAccountsSmtpPassword, SubAccountsUsage, SubAccountsUsageResponse, SuccessResponse, SuppressionsCreateOptions, SuppressionsListEntry, SuppressionsListOptions, SuppressionsListResponse, SuppressionsSource, SuppressionsTypes, UsersCreateOptions, UsersCreateResponse, WebhooksListResponse, WebhooksSigningKeyResponse, WebhooksValidateResponse };
|
|
1943
|
+
export type { DataResponse, DomainsBulkCreateLoginLinkResult, DomainsBulkCreateLoginLinks, DomainsBulkCreateLoginLinksResponse, DomainsBulkProvisionOptions, DomainsBulkProvisionResponse, DomainsCreateLoginLink, DomainsCreateLoginLinkResponse, DomainsData, DomainsDownstreamAddress, DomainsListDownstreamAddressesOptions, DomainsListDownstreamAddressesResponse, DomainsListOptions, DomainsListResponse, DomainsProvisionOptions, DomainsProvisionResponse, EmailsCheckDomainDkim, EmailsCheckDomainOptions, EmailsCheckDomainResponse, EmailsCheckDomainVerdict, EmailsCreateDkimKeyOptions, EmailsCreateDkimKeyResponse, EmailsDkimKey, EmailsDkimKeyStatus, EmailsGetDkimKeysOptions, EmailsGetDkimKeysResponse, EmailsRotateDkimKeyOptions, EmailsRotateDkimKeyResponse, EmailsSendAttachment, EmailsSendOptions, EmailsSendOptionsBase, EmailsSendRecipient, EmailsSendResponse, EmailsSendTracking, EmailsUpdateDkimKeyOptions, ErrorResponse, ListEntriesResponse, ListEntry, ListEntryOptions, ListEntryResponse, ListNames, MetricsBucket, MetricsEngagement, MetricsEngagementResponse, MetricsOptions, MetricsPerformance, MetricsPerformanceResponse, MetricsRecipientBehaviour, MetricsRecipientBehaviourResponse, MetricsSenders, MetricsSendersOptions, MetricsSendersResponse, MetricsSendersType, MetricsUsageResponse, MetricsVolume, MetricsVolumeResponse, Optional, ServiceReportOptions, ServiceSubscriptionsResponse, SubAccountsAccount, SubAccountsApiKey, SubAccountsCreateApiKeyResponse, SubAccountsCreateResponse, SubAccountsCreateSmtpPasswordResponse, SubAccountsLimit, SubAccountsLimitResponse, SubAccountsListApiKeyOptions, SubAccountsListApiKeyResponse, SubAccountsListOptions, SubAccountsListResponse, SubAccountsListSmtpPasswordResponse, SubAccountsSmtpPassword, SubAccountsUsage, SubAccountsUsageResponse, SuccessResponse, SuppressionsCreateOptions, SuppressionsListEntry, SuppressionsListOptions, SuppressionsListResponse, SuppressionsSource, SuppressionsTypes, UsersCreateOptions, UsersCreateResponse, WebhooksListResponse, WebhooksSigningKeyResponse, WebhooksValidateResponse };
|
package/dist/mailchannels.d.ts
CHANGED
|
@@ -12,27 +12,41 @@ declare class MailChannelsClient {
|
|
|
12
12
|
patch<T>(path: string, options?: Omit<FetchOptions<"json">, "method">): Promise<T>;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
interface ErrorResponse {
|
|
16
|
+
message: string;
|
|
17
|
+
statusCode: number | null;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
interface SuccessResponse {
|
|
16
21
|
/**
|
|
17
22
|
* Whether the operation was successful.
|
|
18
23
|
*/
|
|
19
24
|
success: boolean;
|
|
20
25
|
/**
|
|
21
|
-
* Error
|
|
26
|
+
* Error information if the operation failed.
|
|
22
27
|
*/
|
|
23
|
-
error:
|
|
28
|
+
error: ErrorResponse | null;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
type DataResponse<T> = {
|
|
27
32
|
/**
|
|
28
33
|
* The response data.
|
|
29
34
|
*/
|
|
30
|
-
data: T
|
|
35
|
+
data: T;
|
|
31
36
|
/**
|
|
32
|
-
* Error
|
|
37
|
+
* Error information if the operation failed.
|
|
33
38
|
*/
|
|
34
|
-
error:
|
|
35
|
-
}
|
|
39
|
+
error: null;
|
|
40
|
+
} | {
|
|
41
|
+
/**
|
|
42
|
+
* The response data.
|
|
43
|
+
*/
|
|
44
|
+
data: null;
|
|
45
|
+
/**
|
|
46
|
+
* Error information if the operation failed.
|
|
47
|
+
*/
|
|
48
|
+
error: ErrorResponse;
|
|
49
|
+
};
|
|
36
50
|
|
|
37
51
|
interface EmailsSendRecipient {
|
|
38
52
|
/**
|
|
@@ -238,41 +252,34 @@ type EmailsSendOptions = EmailsSendOptionsBase & (
|
|
|
238
252
|
}
|
|
239
253
|
);
|
|
240
254
|
|
|
241
|
-
|
|
255
|
+
type EmailsSendResponse = SuccessResponse & DataResponse<{
|
|
242
256
|
/**
|
|
243
|
-
* Indicates if the email was successfully sent.
|
|
244
|
-
*/
|
|
245
|
-
success: boolean;
|
|
246
|
-
data: {
|
|
247
|
-
/**
|
|
248
257
|
* Fully rendered message if `dryRun` was set to `true`. A string representation of a rendered message, one per personalization in the request.
|
|
249
258
|
*/
|
|
250
|
-
|
|
251
|
-
|
|
259
|
+
rendered?: string[];
|
|
260
|
+
/**
|
|
252
261
|
* The Request ID is a unique identifier generated by the service to track the HTTP request. It will also be included in all webhooks for reference.
|
|
253
262
|
*/
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
263
|
+
requestId?: string;
|
|
264
|
+
results?: {
|
|
265
|
+
/**
|
|
257
266
|
* The index of the personalization in the request. Starts at 0.
|
|
258
267
|
*/
|
|
259
|
-
|
|
260
|
-
|
|
268
|
+
index?: number;
|
|
269
|
+
/**
|
|
261
270
|
* The Message ID is a unique identifier generated by the service. Each personalization has a distinct Message ID, which is also used in the `Message-Id` header and included in webhooks.
|
|
262
271
|
*/
|
|
263
|
-
|
|
264
|
-
|
|
272
|
+
messageId: string;
|
|
273
|
+
/**
|
|
265
274
|
* A human-readable explanation of the status.
|
|
266
275
|
*/
|
|
267
|
-
|
|
268
|
-
|
|
276
|
+
reason?: string;
|
|
277
|
+
/**
|
|
269
278
|
* The status of the message. Note that 'sent' is a temporary status; the final status will be provided through webhooks, if configured.
|
|
270
279
|
*/
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
error: string | null;
|
|
275
|
-
}
|
|
280
|
+
status: "sent" | "failed";
|
|
281
|
+
}[];
|
|
282
|
+
}>;
|
|
276
283
|
|
|
277
284
|
interface EmailsCreateDkimKeyOptions {
|
|
278
285
|
/**
|
|
@@ -1933,4 +1940,4 @@ declare class MailChannels extends MailChannelsClient {
|
|
|
1933
1940
|
}
|
|
1934
1941
|
|
|
1935
1942
|
export { Domains, Emails, Lists, MailChannels, MailChannelsClient, Metrics, Service, SubAccounts, Suppressions, Users, Webhooks };
|
|
1936
|
-
export type { DataResponse, DomainsBulkCreateLoginLinkResult, DomainsBulkCreateLoginLinks, DomainsBulkCreateLoginLinksResponse, DomainsBulkProvisionOptions, DomainsBulkProvisionResponse, DomainsCreateLoginLink, DomainsCreateLoginLinkResponse, DomainsData, DomainsDownstreamAddress, DomainsListDownstreamAddressesOptions, DomainsListDownstreamAddressesResponse, DomainsListOptions, DomainsListResponse, DomainsProvisionOptions, DomainsProvisionResponse, EmailsCheckDomainDkim, EmailsCheckDomainOptions, EmailsCheckDomainResponse, EmailsCheckDomainVerdict, EmailsCreateDkimKeyOptions, EmailsCreateDkimKeyResponse, EmailsDkimKey, EmailsDkimKeyStatus, EmailsGetDkimKeysOptions, EmailsGetDkimKeysResponse, EmailsRotateDkimKeyOptions, EmailsRotateDkimKeyResponse, EmailsSendAttachment, EmailsSendOptions, EmailsSendOptionsBase, EmailsSendRecipient, EmailsSendResponse, EmailsSendTracking, EmailsUpdateDkimKeyOptions, ListEntriesResponse, ListEntry, ListEntryOptions, ListEntryResponse, ListNames, MetricsBucket, MetricsEngagement, MetricsEngagementResponse, MetricsOptions, MetricsPerformance, MetricsPerformanceResponse, MetricsRecipientBehaviour, MetricsRecipientBehaviourResponse, MetricsSenders, MetricsSendersOptions, MetricsSendersResponse, MetricsSendersType, MetricsUsageResponse, MetricsVolume, MetricsVolumeResponse, Optional, ServiceReportOptions, ServiceSubscriptionsResponse, SubAccountsAccount, SubAccountsApiKey, SubAccountsCreateApiKeyResponse, SubAccountsCreateResponse, SubAccountsCreateSmtpPasswordResponse, SubAccountsLimit, SubAccountsLimitResponse, SubAccountsListApiKeyOptions, SubAccountsListApiKeyResponse, SubAccountsListOptions, SubAccountsListResponse, SubAccountsListSmtpPasswordResponse, SubAccountsSmtpPassword, SubAccountsUsage, SubAccountsUsageResponse, SuccessResponse, SuppressionsCreateOptions, SuppressionsListEntry, SuppressionsListOptions, SuppressionsListResponse, SuppressionsSource, SuppressionsTypes, UsersCreateOptions, UsersCreateResponse, WebhooksListResponse, WebhooksSigningKeyResponse, WebhooksValidateResponse };
|
|
1943
|
+
export type { DataResponse, DomainsBulkCreateLoginLinkResult, DomainsBulkCreateLoginLinks, DomainsBulkCreateLoginLinksResponse, DomainsBulkProvisionOptions, DomainsBulkProvisionResponse, DomainsCreateLoginLink, DomainsCreateLoginLinkResponse, DomainsData, DomainsDownstreamAddress, DomainsListDownstreamAddressesOptions, DomainsListDownstreamAddressesResponse, DomainsListOptions, DomainsListResponse, DomainsProvisionOptions, DomainsProvisionResponse, EmailsCheckDomainDkim, EmailsCheckDomainOptions, EmailsCheckDomainResponse, EmailsCheckDomainVerdict, EmailsCreateDkimKeyOptions, EmailsCreateDkimKeyResponse, EmailsDkimKey, EmailsDkimKeyStatus, EmailsGetDkimKeysOptions, EmailsGetDkimKeysResponse, EmailsRotateDkimKeyOptions, EmailsRotateDkimKeyResponse, EmailsSendAttachment, EmailsSendOptions, EmailsSendOptionsBase, EmailsSendRecipient, EmailsSendResponse, EmailsSendTracking, EmailsUpdateDkimKeyOptions, ErrorResponse, ListEntriesResponse, ListEntry, ListEntryOptions, ListEntryResponse, ListNames, MetricsBucket, MetricsEngagement, MetricsEngagementResponse, MetricsOptions, MetricsPerformance, MetricsPerformanceResponse, MetricsRecipientBehaviour, MetricsRecipientBehaviourResponse, MetricsSenders, MetricsSendersOptions, MetricsSendersResponse, MetricsSendersType, MetricsUsageResponse, MetricsVolume, MetricsVolumeResponse, Optional, ServiceReportOptions, ServiceSubscriptionsResponse, SubAccountsAccount, SubAccountsApiKey, SubAccountsCreateApiKeyResponse, SubAccountsCreateResponse, SubAccountsCreateSmtpPasswordResponse, SubAccountsLimit, SubAccountsLimitResponse, SubAccountsListApiKeyOptions, SubAccountsListApiKeyResponse, SubAccountsListOptions, SubAccountsListResponse, SubAccountsListSmtpPasswordResponse, SubAccountsSmtpPassword, SubAccountsUsage, SubAccountsUsageResponse, SuccessResponse, SuppressionsCreateOptions, SuppressionsListEntry, SuppressionsListOptions, SuppressionsListResponse, SuppressionsSource, SuppressionsTypes, UsersCreateOptions, UsersCreateResponse, WebhooksListResponse, WebhooksSigningKeyResponse, WebhooksValidateResponse };
|