mailgun.js 12.1.1 → 12.3.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/AMD/definitions.amd.js +1 -1
- package/AMD/mailgun.amd.js +2 -2
- package/CHANGELOG.md +23 -0
- package/CJS/definitions.cjs +1 -1
- package/CJS/mailgun.node.cjs +2 -2
- package/ESM/definitions.browser.js +1 -1
- package/ESM/definitions.node.js +1 -1
- package/ESM/mailgun.browser.js +2 -2
- package/ESM/mailgun.node.js +2 -2
- package/README.md +548 -96
- package/Types/Classes/Domains/domainsClient.d.ts +13 -2
- package/Types/Classes/Domains/domainsKeys.d.ts +19 -0
- package/Types/Classes/Messages.d.ts +19 -1
- package/Types/Classes/Subaccounts.d.ts +6 -1
- package/Types/Classes/common/Request.d.ts +3 -3
- package/Types/Interfaces/Domains/DomainKeys.d.ts +11 -0
- package/Types/Interfaces/Domains/index.d.ts +1 -0
- package/Types/Interfaces/Subaccounts/ISubaccountsClient.d.ts +4 -1
- package/Types/Types/Common/RequestOptions.d.ts +6 -3
- package/Types/Types/Domains/DomainKeys.d.ts +70 -0
- package/Types/Types/Domains/index.d.ts +1 -0
- package/Types/Types/Messages/Messages.d.ts +58 -0
- package/Types/Types/Subaccounts/Subaccounts.d.ts +52 -3
- package/Types/index.js +387 -34
- package/package.json +1 -1
- package/version.md +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDomainTemplatesClient, IDomainTagsClient, IDomainCredentials, IDomainsClient } from '../../Interfaces/Domains/index.js';
|
|
1
|
+
import { IDomainTemplatesClient, IDomainTagsClient, IDomainCredentials, IDomainsClient, IDomainKeysClient } from '../../Interfaces/Domains/index.js';
|
|
2
2
|
import { APIResponse } from '../../Types/Common/ApiResponse.js';
|
|
3
3
|
import Request from '../common/Request.js';
|
|
4
4
|
import { MessageResponse, DomainTrackingData, UpdatedOpenTracking, DomainsQuery, DomainInfo, ConnectionSettings, UpdatedConnectionSettings, OpenTrackingInfo, ClickTrackingInfo, UnsubscribeTrackingInfo, ReplacementForPool, DKIMAuthorityInfo, UpdatedDKIMAuthority, DKIMSelectorInfo, WebPrefixInfo, UpdatedWebPrefixResponse, TDomain, DomainUpdateInfo, DomainGetQuery, UpdatedDKIMSelectorResult } from '../../Types/Domains/index.js';
|
|
@@ -9,8 +9,9 @@ export default class DomainsClient implements IDomainsClient {
|
|
|
9
9
|
domainTemplates: IDomainTemplatesClient;
|
|
10
10
|
domainTags: IDomainTagsClient;
|
|
11
11
|
domainTracking: IDomainTrackingClient;
|
|
12
|
+
domainKeys: IDomainKeysClient;
|
|
12
13
|
private logger;
|
|
13
|
-
constructor(request: Request, domainCredentialsClient: IDomainCredentials, domainTemplatesClient: IDomainTemplatesClient, domainTagsClient: IDomainTagsClient, domainTracking: IDomainTrackingClient, logger?: ILogger);
|
|
14
|
+
constructor(request: Request, domainCredentialsClient: IDomainCredentials, domainTemplatesClient: IDomainTemplatesClient, domainTagsClient: IDomainTagsClient, domainTracking: IDomainTrackingClient, domainKeysClient: IDomainKeysClient, logger?: ILogger);
|
|
14
15
|
private _handleBoolValues;
|
|
15
16
|
private _parseMessage;
|
|
16
17
|
private parseDomainList;
|
|
@@ -55,7 +56,17 @@ export default class DomainsClient implements IDomainsClient {
|
|
|
55
56
|
* in the future releases.
|
|
56
57
|
*/
|
|
57
58
|
unlinkIpPoll(domain: string, replacement: ReplacementForPool): Promise<APIResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* @deprecated "domains.updateDKIMAuthority" method is deprecated,
|
|
61
|
+
* and moved into the "domains.domainKeys.updateDKIMAuthority".
|
|
62
|
+
* Current method will be removed in the future releases.
|
|
63
|
+
*/
|
|
58
64
|
updateDKIMAuthority(domain: string, data: DKIMAuthorityInfo): Promise<UpdatedDKIMAuthority>;
|
|
65
|
+
/**
|
|
66
|
+
* @deprecated "domains.updateDKIMSelector" method is deprecated,
|
|
67
|
+
* and moved into the "domains.domainKeys.updateDKIMSelector".
|
|
68
|
+
* Current method will be removed in the future releases.
|
|
69
|
+
*/
|
|
59
70
|
updateDKIMSelector(domain: string, data: DKIMSelectorInfo): Promise<UpdatedDKIMSelectorResult>;
|
|
60
71
|
/**
|
|
61
72
|
* @deprecated "domains.updateWebPrefix" method is deprecated.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DKIMSelectorInfo, UpdatedDKIMSelectorResult, UpdatedDKIMAuthority, DKIMAuthorityInfo, DomainKeyCreateData, DomainKeyCreateDataResult, DomainKeysListResult, DomainKeysListAllQuery, DomainKeysListAllResult, DomainKeysListAllApi, DeletedDomainKeysResult, ActivateDomainKeyResponse, DeactivateDomainKeyResponse } from '../../Types/Domains/index.js';
|
|
2
|
+
import Request from '../common/Request.js';
|
|
3
|
+
import { IDomainKeysClient } from '../../Interfaces/Domains/index.js';
|
|
4
|
+
import NavigationThruPages from '../common/NavigationThruPages.js';
|
|
5
|
+
export default class DomainKeysClient extends NavigationThruPages<DomainKeysListAllResult> implements IDomainKeysClient {
|
|
6
|
+
baseRoute: string;
|
|
7
|
+
request: Request;
|
|
8
|
+
constructor(request: Request);
|
|
9
|
+
private _parseDomainKeysList;
|
|
10
|
+
protected parseList(response: DomainKeysListAllApi): DomainKeysListAllResult;
|
|
11
|
+
list(domainName: string): Promise<DomainKeysListResult>;
|
|
12
|
+
listAll(query?: DomainKeysListAllQuery): Promise<DomainKeysListAllResult>;
|
|
13
|
+
create(data: DomainKeyCreateData): Promise<DomainKeyCreateDataResult>;
|
|
14
|
+
activate(domainName: string, selector: string): Promise<ActivateDomainKeyResponse>;
|
|
15
|
+
deactivate(domainName: string, selector: string): Promise<DeactivateDomainKeyResponse>;
|
|
16
|
+
destroy(domain: string, selector: string): Promise<DeletedDomainKeysResult>;
|
|
17
|
+
updateDKIMSelector(domain: string, data: DKIMSelectorInfo): Promise<UpdatedDKIMSelectorResult>;
|
|
18
|
+
updateDKIMAuthority(domain: string, data: DKIMAuthorityInfo): Promise<UpdatedDKIMAuthority>;
|
|
19
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MailgunMessageData, MessagesSendAPIResponse, MessagesSendResult } from '../Types/index.js';
|
|
1
|
+
import { ClearMessagesQueueResult, MailgunMessageData, MessagesQueueStatusResult, MessagesSendAPIResponse, MessagesSendResult, StoredEmailResponse } from '../Types/index.js';
|
|
2
2
|
import Request from './common/Request.js';
|
|
3
3
|
import { IMessagesClient } from '../Interfaces/index.js';
|
|
4
4
|
export default class MessagesClient implements IMessagesClient {
|
|
@@ -7,4 +7,22 @@ export default class MessagesClient implements IMessagesClient {
|
|
|
7
7
|
private prepareBooleanValues;
|
|
8
8
|
_parseResponse(response: MessagesSendAPIResponse): MessagesSendResult;
|
|
9
9
|
create(domain: string, data: MailgunMessageData): Promise<MessagesSendResult>;
|
|
10
|
+
retrieveStoredEmail(domain: string, storageKey: string): Promise<StoredEmailResponse>;
|
|
11
|
+
/**
|
|
12
|
+
* domain: string
|
|
13
|
+
* Domain name used to send the message
|
|
14
|
+
*
|
|
15
|
+
* storageKey: string
|
|
16
|
+
* Storage key from the email's associated events
|
|
17
|
+
* (Example: Accepted/Delivered events storage.key field)
|
|
18
|
+
*
|
|
19
|
+
* recipients: string
|
|
20
|
+
* Email address of the recipient(s). You can use commas to separate multiple recipients
|
|
21
|
+
*/
|
|
22
|
+
resendEmail(domain: string, storageKey: string, recipients: string): Promise<MessagesSendResult>;
|
|
23
|
+
getMessagesQueueStatus(domain: string): Promise<MessagesQueueStatusResult>;
|
|
24
|
+
/** Deletes all scheduled and undelivered mail from the domain queue.
|
|
25
|
+
* https://documentation.mailgun.com/docs/mailgun/api-reference/send/mailgun/messages/delete-v3--domain-name--envelopes
|
|
26
|
+
*/
|
|
27
|
+
clearMessagesQueue(domain: string, storageUrl: string): Promise<ClearMessagesQueueResult>;
|
|
10
28
|
}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import type Request from './common/Request.js';
|
|
2
2
|
import { ISubaccountsClient } from '../Interfaces/index.js';
|
|
3
|
-
import { SubaccountListResponseData, SubaccountResponseData, SubaccountsQuery } from '../Types/index.js';
|
|
3
|
+
import { SubaccountDestroyResponse, SubaccountFeaturesData, SubaccountFeaturesResult, SubaccountListResponseData, SubaccountResponseData, SubaccountSendingLimitResponse, SubaccountSetSendingLimitResponse, SubaccountsQuery } from '../Types/index.js';
|
|
4
4
|
export default class SubaccountsClient implements ISubaccountsClient {
|
|
5
5
|
request: Request;
|
|
6
6
|
static SUBACCOUNT_HEADER: string;
|
|
7
7
|
constructor(request: Request);
|
|
8
|
+
private convertToDate;
|
|
8
9
|
list(query?: SubaccountsQuery): Promise<SubaccountListResponseData>;
|
|
9
10
|
get(id: string): Promise<SubaccountResponseData>;
|
|
10
11
|
create(name: string): Promise<SubaccountResponseData>;
|
|
12
|
+
destroy(id: string): Promise<SubaccountDestroyResponse>;
|
|
13
|
+
getMonthlySendingLimit(id: string): Promise<SubaccountSendingLimitResponse>;
|
|
14
|
+
setMonthlySendingLimit(id: string, limit: number): Promise<SubaccountSetSendingLimitResponse>;
|
|
15
|
+
updateSubaccountFeature(id: string, features: SubaccountFeaturesData): Promise<SubaccountFeaturesResult>;
|
|
11
16
|
enable(id: string): Promise<SubaccountResponseData>;
|
|
12
17
|
disable(id: string): Promise<SubaccountResponseData>;
|
|
13
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RequestOptions, InputFormData, APIResponse, IpPoolDeleteData, FormDataInput, RequestData, GetQueryTypes, PostDataTypes, PutDataTypes, CommandQuery, PutOptionsType, PutQueryTypes, onCallReqConfig } from '../../Types/index.js';
|
|
1
|
+
import { RequestOptions, InputFormData, APIResponse, IpPoolDeleteData, FormDataInput, RequestData, GetQueryTypes, PostDataTypes, PutDataTypes, CommandQuery, PutOptionsType, PutQueryTypes, onCallReqConfig, DeleteQueryTypes } from '../../Types/index.js';
|
|
2
2
|
import { IRequestProvider } from '../../Interfaces/index.js';
|
|
3
3
|
declare class Request {
|
|
4
4
|
private url;
|
|
@@ -7,7 +7,7 @@ declare class Request {
|
|
|
7
7
|
constructor(options: RequestOptions, formData: InputFormData);
|
|
8
8
|
request(method: string, url: string, onCallOptions?: {
|
|
9
9
|
body?: RequestData;
|
|
10
|
-
query?: GetQueryTypes | PutQueryTypes;
|
|
10
|
+
query?: GetQueryTypes | PutQueryTypes | DeleteQueryTypes;
|
|
11
11
|
}, config?: onCallReqConfig): Promise<APIResponse>;
|
|
12
12
|
setSubaccountHeader(subAccountId: string): void;
|
|
13
13
|
resetSubaccountHeader(): void;
|
|
@@ -19,6 +19,6 @@ declare class Request {
|
|
|
19
19
|
putWithFD(url: string, data: FormDataInput): Promise<APIResponse>;
|
|
20
20
|
patchWithFD(url: string, data: FormDataInput): Promise<APIResponse>;
|
|
21
21
|
put(url: string, data?: PutDataTypes, queryObject?: PutOptionsType): Promise<APIResponse>;
|
|
22
|
-
delete(url: string, data?: IpPoolDeleteData): Promise<APIResponse>;
|
|
22
|
+
delete(url: string, data?: IpPoolDeleteData, queryObject?: DeleteQueryTypes): Promise<APIResponse>;
|
|
23
23
|
}
|
|
24
24
|
export default Request;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ActivateDomainKeyResponse, DeactivateDomainKeyResponse, DeletedDomainKeysResult, DKIMAuthorityInfo, DKIMSelectorInfo, DomainKeyCreateData, DomainKeyCreateDataResult, DomainKeysListAllQuery, DomainKeysListAllResult, DomainKeysListResult, UpdatedDKIMAuthority, UpdatedDKIMSelectorResult } from '../../Types/Domains/index.js';
|
|
2
|
+
export interface IDomainKeysClient {
|
|
3
|
+
list(domainName: string): Promise<DomainKeysListResult>;
|
|
4
|
+
listAll(query: DomainKeysListAllQuery): Promise<DomainKeysListAllResult>;
|
|
5
|
+
create(data: DomainKeyCreateData): Promise<DomainKeyCreateDataResult>;
|
|
6
|
+
destroy(domain: string, selector: string): Promise<DeletedDomainKeysResult>;
|
|
7
|
+
activate(domainName: string, selector: string): Promise<ActivateDomainKeyResponse>;
|
|
8
|
+
deactivate(domainName: string, selector: string): Promise<DeactivateDomainKeyResponse>;
|
|
9
|
+
updateDKIMAuthority(domain: string, data: DKIMAuthorityInfo): Promise<UpdatedDKIMAuthority>;
|
|
10
|
+
updateDKIMSelector(domain: string, data: DKIMSelectorInfo): Promise<UpdatedDKIMSelectorResult>;
|
|
11
|
+
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { SubaccountListResponseData, SubaccountResponseData, SubaccountsQuery } from '../../Types/index.js';
|
|
1
|
+
import { SubaccountDestroyResponse, SubaccountListResponseData, SubaccountResponseData, SubaccountSendingLimitResponse, SubaccountSetSendingLimitResponse, SubaccountsQuery } from '../../Types/index.js';
|
|
2
2
|
export interface ISubaccountsClient {
|
|
3
3
|
list(query?: SubaccountsQuery): Promise<SubaccountListResponseData>;
|
|
4
4
|
get(id: string): Promise<SubaccountResponseData>;
|
|
5
5
|
create(name: string): Promise<SubaccountResponseData>;
|
|
6
6
|
disable(id: string): Promise<SubaccountResponseData>;
|
|
7
7
|
enable(id: string): Promise<SubaccountResponseData>;
|
|
8
|
+
destroy(id: string): Promise<SubaccountDestroyResponse>;
|
|
9
|
+
getMonthlySendingLimit(id: string): Promise<SubaccountSendingLimitResponse>;
|
|
10
|
+
setMonthlySendingLimit(id: string, limit: number): Promise<SubaccountSetSendingLimitResponse>;
|
|
8
11
|
}
|
|
@@ -4,7 +4,7 @@ import type { IPsListQuery } from '../IPs/index.js';
|
|
|
4
4
|
import type { RoutesListQuery } from '../Routes/index.js';
|
|
5
5
|
import type { SubaccountsQuery } from '../Subaccounts/index.js';
|
|
6
6
|
import type { WebhooksQuery } from '../Webhooks/index.js';
|
|
7
|
-
import type { ConnectionSettings, DomainCredentialsQuery, DomainGetAPIQuery, DomainsQuery, DomainTagsStatisticQuery, DomainTemplatesQuery, TemplateQuery } from '../Domains/index.js';
|
|
7
|
+
import type { ConnectionSettings, DeletedDomainKeysQuery, DomainCredentialsQuery, DomainGetAPIQuery, DomainsQuery, DomainTagsStatisticQuery, DomainTemplatesQuery, TemplateQuery } from '../Domains/index.js';
|
|
8
8
|
import type { InboxPlacementsData, InboxPlacementsResultsApiQuery, SeedsListsAPIQuery, SeedsListsUpdatingData } from '../InboxPlacements/index.js';
|
|
9
9
|
import type { ValidationQuery } from '../Validations/index.js';
|
|
10
10
|
import type { IpPoolDeleteData } from '../IPPools/index.js';
|
|
@@ -35,6 +35,7 @@ export type OnCallRequestOptions = {
|
|
|
35
35
|
export type GetQueryTypes = IPsListQuery | RoutesListQuery | SubaccountsQuery | WebhooksQuery | DomainsQuery | DomainGetAPIQuery | DomainCredentialsQuery | DomainTagsStatisticQuery | TemplateQuery | DomainTemplatesQuery | InboxPlacementsResultsApiQuery | SeedsListsAPIQuery | {
|
|
36
36
|
searchParams?: Array<Array<string>>;
|
|
37
37
|
} | ValidationQuery;
|
|
38
|
+
export type DeleteQueryTypes = DeletedDomainKeysQuery;
|
|
38
39
|
export type PostDataTypes = InboxPlacementsData | MetricsQuery | string;
|
|
39
40
|
export type PutDataTypes = SeedsListsUpdatingData | object | FormDataInput | ConnectionSettings;
|
|
40
41
|
export type RequestData = IpPoolDeleteData | PostDataTypes | PutDataTypes | NodeFormData | FormData;
|
|
@@ -43,17 +44,19 @@ type EnableQuery = ContainsPrefix<'enabled='>;
|
|
|
43
44
|
type DkimSelectorQuery = ContainsPrefix<'dkim_selector='>;
|
|
44
45
|
type SelfQuery = ContainsPrefix<'self='>;
|
|
45
46
|
type WebPrefixQuery = ContainsPrefix<'web_prefix='>;
|
|
46
|
-
|
|
47
|
+
type LimitQuery = ContainsPrefix<'limit='>;
|
|
48
|
+
export type PutQueryTypes = EnableQuery | DkimSelectorQuery | SelfQuery | WebPrefixQuery | LimitQuery;
|
|
47
49
|
export type PutOptionsType = {
|
|
48
50
|
query?: PutQueryTypes;
|
|
49
51
|
};
|
|
50
52
|
export type CommandQuery = {
|
|
51
|
-
query?: PutQueryTypes;
|
|
53
|
+
query?: PutQueryTypes | DeleteQueryTypes;
|
|
52
54
|
};
|
|
53
55
|
export type onCallReqConfig = {
|
|
54
56
|
isFormURLEncoded?: boolean;
|
|
55
57
|
isMultipartFormData?: boolean;
|
|
56
58
|
isApplicationJSON?: boolean;
|
|
57
59
|
dataSize?: number;
|
|
60
|
+
isStorageAPI?: boolean;
|
|
58
61
|
};
|
|
59
62
|
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { PagesList, ParsedPagesList } from '../index.js';
|
|
2
|
+
import type { DNSRecord } from './index.js';
|
|
3
|
+
export type DomainKeyItem = {
|
|
4
|
+
'signing_domain': string;
|
|
5
|
+
selector: string;
|
|
6
|
+
'dns_record': Omit<DNSRecord, 'priority'> & {
|
|
7
|
+
'is_active': boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export type DomainKeyCreateDataResult = Omit<DomainKeyItem, 'dns_record'> & {
|
|
11
|
+
'dns_record': Omit<DNSRecord, 'priority'> & {
|
|
12
|
+
'is_active': boolean;
|
|
13
|
+
};
|
|
14
|
+
status: number;
|
|
15
|
+
};
|
|
16
|
+
export type DomainKeyCreateData = {
|
|
17
|
+
signingDomain: string;
|
|
18
|
+
selector: string;
|
|
19
|
+
bits?: '1024' | '2048';
|
|
20
|
+
pem?: string;
|
|
21
|
+
};
|
|
22
|
+
export type DomainKeyCreateDataApi = Omit<DomainKeyCreateData, 'signingDomain'> & {
|
|
23
|
+
'signing_domain': string;
|
|
24
|
+
};
|
|
25
|
+
export type DomainKeysList = {
|
|
26
|
+
items: DomainKeyItem[];
|
|
27
|
+
};
|
|
28
|
+
export type DomainKeysListResult = {
|
|
29
|
+
items: DomainKeyItem[];
|
|
30
|
+
status: number;
|
|
31
|
+
};
|
|
32
|
+
export type DomainKeysListAllQuery = {
|
|
33
|
+
page?: string;
|
|
34
|
+
limit?: number;
|
|
35
|
+
signingDomain?: string;
|
|
36
|
+
selector?: string;
|
|
37
|
+
};
|
|
38
|
+
export type DomainKeysListAllResult = {
|
|
39
|
+
items: DomainKeyItem[];
|
|
40
|
+
status: number;
|
|
41
|
+
pages: ParsedPagesList;
|
|
42
|
+
};
|
|
43
|
+
export type DomainKeysListAllApi = {
|
|
44
|
+
status: number;
|
|
45
|
+
body: {
|
|
46
|
+
items: DomainKeyItem[];
|
|
47
|
+
paging: PagesList;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export type DeletedDomainKeysQuery = {
|
|
51
|
+
'signing_domain': string;
|
|
52
|
+
selector: string;
|
|
53
|
+
};
|
|
54
|
+
export type DeletedDomainKeysResult = {
|
|
55
|
+
message: string;
|
|
56
|
+
};
|
|
57
|
+
export type ActivateDomainKeyResponse = {
|
|
58
|
+
message: string;
|
|
59
|
+
authority: string;
|
|
60
|
+
selector: string;
|
|
61
|
+
active: boolean;
|
|
62
|
+
status: number;
|
|
63
|
+
};
|
|
64
|
+
export type DeactivateDomainKeyResponse = {
|
|
65
|
+
message: string;
|
|
66
|
+
authority: string;
|
|
67
|
+
selector: string;
|
|
68
|
+
active: boolean;
|
|
69
|
+
status: number;
|
|
70
|
+
};
|
|
@@ -202,3 +202,61 @@ export type MessagesSendResult = {
|
|
|
202
202
|
status: number;
|
|
203
203
|
details?: string;
|
|
204
204
|
};
|
|
205
|
+
export type MessageHeader = [string, string];
|
|
206
|
+
export type StoredEmailResponse = {
|
|
207
|
+
'Content-Type': string;
|
|
208
|
+
From: string;
|
|
209
|
+
'Message-Id': string;
|
|
210
|
+
'Mime-Version': string;
|
|
211
|
+
Subject: string;
|
|
212
|
+
To: string;
|
|
213
|
+
sender: string;
|
|
214
|
+
recipients: string;
|
|
215
|
+
from?: string;
|
|
216
|
+
subject?: string;
|
|
217
|
+
'body-html': string;
|
|
218
|
+
'body-plain': string;
|
|
219
|
+
attachments?: [
|
|
220
|
+
{
|
|
221
|
+
name: string;
|
|
222
|
+
'content-type': string;
|
|
223
|
+
size: number;
|
|
224
|
+
url: string;
|
|
225
|
+
}
|
|
226
|
+
];
|
|
227
|
+
'content-id-map'?: object;
|
|
228
|
+
'message-headers': MessageHeader[];
|
|
229
|
+
'stripped-html': string;
|
|
230
|
+
'stripped-text': string;
|
|
231
|
+
'stripped-signature': string;
|
|
232
|
+
'Content-Transfer-Encoding'?: string;
|
|
233
|
+
'X-Mailgun-Tag'?: string;
|
|
234
|
+
'X-Mailgun-Template-Name'?: string;
|
|
235
|
+
'X-Mailgun-Template-Variables'?: string;
|
|
236
|
+
'X-Mailgun-Deliver-By'?: string;
|
|
237
|
+
};
|
|
238
|
+
type QueueStatusAPI = {
|
|
239
|
+
'is_disabled': boolean;
|
|
240
|
+
disabled: {
|
|
241
|
+
until: string;
|
|
242
|
+
reason: string;
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
type QueueStatus = Omit<QueueStatusAPI, 'disabled'> & {
|
|
246
|
+
disabled: {
|
|
247
|
+
until: Date | '';
|
|
248
|
+
reason: string;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
export type MessagesQueueStatusAPIResponse = {
|
|
252
|
+
regular: QueueStatusAPI;
|
|
253
|
+
scheduled: QueueStatusAPI;
|
|
254
|
+
};
|
|
255
|
+
export type MessagesQueueStatusResult = {
|
|
256
|
+
regular: QueueStatus;
|
|
257
|
+
scheduled: QueueStatus;
|
|
258
|
+
};
|
|
259
|
+
export type ClearMessagesQueueResult = {
|
|
260
|
+
message: string;
|
|
261
|
+
};
|
|
262
|
+
export {};
|
|
@@ -4,15 +4,64 @@ export type SubaccountsQuery = {
|
|
|
4
4
|
skip?: number;
|
|
5
5
|
sort?: 'asc' | 'desc';
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type SubaccountFeatureValue = {
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type SubaccountFeatures = {
|
|
11
|
+
email_preview?: SubaccountFeatureValue;
|
|
12
|
+
inbox_placement?: SubaccountFeatureValue;
|
|
13
|
+
sending?: SubaccountFeatureValue;
|
|
14
|
+
validations?: SubaccountFeatureValue;
|
|
15
|
+
validations_bulk?: SubaccountFeatureValue;
|
|
16
|
+
};
|
|
17
|
+
export type SubaccountFeaturesResult = {
|
|
18
|
+
features: SubaccountFeatures;
|
|
19
|
+
};
|
|
20
|
+
export type SubaccountFeaturesData = {
|
|
21
|
+
email_preview?: boolean;
|
|
22
|
+
inbox_placement?: boolean;
|
|
23
|
+
sending?: boolean;
|
|
24
|
+
validations?: boolean;
|
|
25
|
+
validations_bulk?: boolean;
|
|
26
|
+
};
|
|
27
|
+
export type SubaccountApiItem = {
|
|
8
28
|
id: string;
|
|
9
29
|
name: string;
|
|
10
30
|
status: string;
|
|
31
|
+
created_at: string;
|
|
32
|
+
updated_at: string;
|
|
33
|
+
features: SubaccountFeatures;
|
|
34
|
+
};
|
|
35
|
+
export type SubaccountItem = Omit<SubaccountApiItem, 'created_at' | 'updated_at'> & {
|
|
36
|
+
created_at: Date;
|
|
37
|
+
updated_at: Date;
|
|
38
|
+
};
|
|
39
|
+
export type SubaccountListAPIResponseData = {
|
|
40
|
+
body: {
|
|
41
|
+
subaccounts: SubaccountApiItem[];
|
|
42
|
+
total: number;
|
|
43
|
+
};
|
|
11
44
|
};
|
|
12
45
|
export type SubaccountListResponseData = {
|
|
13
|
-
subaccounts:
|
|
46
|
+
subaccounts: SubaccountItem[];
|
|
14
47
|
total: number;
|
|
15
48
|
};
|
|
49
|
+
export type SubaccountAPIResponseData = {
|
|
50
|
+
body: {
|
|
51
|
+
subaccount: SubaccountApiItem;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
16
54
|
export type SubaccountResponseData = {
|
|
17
|
-
subaccount:
|
|
55
|
+
subaccount: SubaccountItem;
|
|
56
|
+
};
|
|
57
|
+
export type SubaccountSendingLimitResponse = {
|
|
58
|
+
limit: number;
|
|
59
|
+
current: number;
|
|
60
|
+
period: string;
|
|
61
|
+
};
|
|
62
|
+
export type SubaccountSetSendingLimitResponse = {
|
|
63
|
+
success: boolean;
|
|
64
|
+
};
|
|
65
|
+
export type SubaccountDestroyResponse = {
|
|
66
|
+
message: string;
|
|
18
67
|
};
|