mailgun.js 8.2.2 → 9.0.1
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/CHANGELOG.md +66 -0
- package/Classes/Domains/domain.d.ts +16 -0
- package/{domains.d.ts → Classes/Domains/domains.d.ts} +5 -8
- package/Classes/Domains/domainsClient.d.ts +36 -0
- package/{domainsCredentials.d.ts → Classes/Domains/domainsCredentials.d.ts} +3 -2
- package/{domainsTags.d.ts → Classes/Domains/domainsTags.d.ts} +6 -4
- package/{domainsTemplates.d.ts → Classes/Domains/domainsTemplates.d.ts} +9 -8
- package/{events.d.ts → Classes/Events.d.ts} +4 -3
- package/{ip-pools.d.ts → Classes/IPPools.d.ts} +4 -3
- package/Classes/IPs.d.ts +10 -0
- package/Classes/MailgunClient.d.ts +18 -0
- package/{mailListMembers.d.ts → Classes/MailingLists/mailListMembers.d.ts} +4 -3
- package/Classes/MailingLists/mailingLists.d.ts +21 -0
- package/{messages.d.ts → Classes/Messages.d.ts} +4 -3
- package/{routes.d.ts → Classes/Routes.d.ts} +4 -3
- package/Classes/Stats/StatsClient.d.ts +14 -0
- package/Classes/Stats/StatsContainer.d.ts +9 -0
- package/Classes/Suppressions/Bounce.d.ts +10 -0
- package/Classes/Suppressions/Complaint.d.ts +8 -0
- package/Classes/Suppressions/Suppression.d.ts +5 -0
- package/Classes/Suppressions/SuppressionsClient.d.ts +23 -0
- package/Classes/Suppressions/Unsubscribe.d.ts +9 -0
- package/Classes/Suppressions/WhiteList.d.ts +9 -0
- package/{multipleValidation.d.ts → Classes/Validations/multipleValidation.d.ts} +4 -3
- package/Classes/Validations/validate.d.ts +9 -0
- package/Classes/Webhooks.d.ts +21 -0
- package/Classes/common/Error.d.ts +8 -0
- package/{formDataBuilder.d.ts → Classes/common/FormDataBuilder.d.ts} +1 -1
- package/Classes/common/NavigationThruPages.d.ts +17 -0
- package/{request.d.ts → Classes/common/Request.d.ts} +2 -4
- package/Enums/index.d.ts +24 -0
- package/Interfaces/Common/Logger.d.ts +3 -0
- package/Interfaces/Common/index.d.ts +1 -0
- package/Interfaces/Domains/DomainCredentials.d.ts +7 -0
- package/Interfaces/Domains/DomainTags.d.ts +20 -0
- package/Interfaces/Domains/DomainTemplates.d.ts +23 -0
- package/Interfaces/Domains/DomainsClient.d.ts +27 -0
- package/Interfaces/Domains/index.d.ts +4 -0
- package/Interfaces/EventClient/IEventClient.d.ts +4 -0
- package/Interfaces/EventClient/index.d.ts +1 -0
- package/Interfaces/IPPools/IIPPoolsClient.d.ts +7 -0
- package/Interfaces/IPPools/index.d.ts +1 -0
- package/Interfaces/IPs/IIPsClient.d.ts +5 -0
- package/Interfaces/IPs/index.d.ts +1 -0
- package/Interfaces/MailgunClient/IMailgunClient.d.ts +24 -0
- package/Interfaces/MailgunClient/index.d.ts +1 -0
- package/Interfaces/MailingLists/MailingListMembers.d.ts +9 -0
- package/Interfaces/MailingLists/MailingListsClient.d.ts +13 -0
- package/Interfaces/MailingLists/index.d.ts +2 -0
- package/Interfaces/Messages/IMessagesClient.d.ts +4 -0
- package/Interfaces/Messages/index.d.ts +1 -0
- package/Interfaces/Routes/IRoutesClient.d.ts +8 -0
- package/Interfaces/Routes/index.d.ts +1 -0
- package/Interfaces/Stats/StatsClient.d.ts +6 -0
- package/Interfaces/Stats/StatsContainer.d.ts +7 -0
- package/Interfaces/Stats/index.d.ts +2 -0
- package/{interfaces → Interfaces}/Suppressions/Bounce.d.ts +0 -6
- package/{interfaces → Interfaces}/Suppressions/Complaint.d.ts +0 -4
- package/Interfaces/Suppressions/ISuppressionsClient.d.ts +11 -0
- package/{interfaces → Interfaces}/Suppressions/Unsubscribe.d.ts +0 -5
- package/Interfaces/Suppressions/WhiteList.d.ts +6 -0
- package/Interfaces/Suppressions/index.d.ts +5 -0
- package/Interfaces/Validations/MultipleValidation.d.ts +7 -0
- package/Interfaces/Validations/Validation.d.ts +6 -0
- package/Interfaces/Validations/index.d.ts +2 -0
- package/Interfaces/Webhooks/IWebHooksClient.d.ts +9 -0
- package/Interfaces/Webhooks/index.d.ts +1 -0
- package/Interfaces/index.d.ts +13 -0
- package/README.md +42 -13
- package/Types/Common/ApiResponse.d.ts +4 -0
- package/Types/Common/Error.d.ts +19 -0
- package/Types/Common/FormData.d.ts +7 -0
- package/{interfaces → Types/Common}/NavigationThruPages.d.ts +14 -14
- package/{interfaces → Types/Common}/RequestOptions.d.ts +7 -7
- package/Types/Common/index.d.ts +5 -0
- package/Types/Domains/DomainCredentials.d.ts +46 -0
- package/{interfaces → Types/Domains}/DomainTags.d.ts +34 -57
- package/Types/Domains/DomainTemplates.d.ts +153 -0
- package/{interfaces → Types/Domains}/DomainTracking.d.ts +8 -8
- package/{interfaces → Types/Domains}/Domains.d.ts +50 -36
- package/Types/Domains/index.d.ts +5 -0
- package/{interfaces → Types/Events}/Events.d.ts +15 -15
- package/Types/Events/index.d.ts +1 -0
- package/{interfaces → Types/IPPools}/IpPools.d.ts +6 -6
- package/Types/IPPools/index.d.ts +1 -0
- package/{interfaces/Ips.d.ts → Types/IPs/IPs.d.ts} +7 -4
- package/Types/IPs/index.d.ts +1 -0
- package/{interfaces/Options.d.ts → Types/MailgunClient/MailgunClientOptions.d.ts} +2 -3
- package/Types/MailgunClient/index.d.ts +1 -0
- package/Types/MailingLists/MailingListMembers.d.ts +60 -0
- package/{interfaces/lists.d.ts → Types/MailingLists/MailingLists.d.ts} +22 -22
- package/Types/MailingLists/index.d.ts +2 -0
- package/{interfaces → Types/Messages}/Messages.d.ts +5 -5
- package/Types/Messages/index.d.ts +1 -0
- package/{interfaces/routes.d.ts → Types/Routes/Routes.d.ts} +6 -6
- package/Types/Routes/index.d.ts +1 -0
- package/{interfaces/StatsOptions.d.ts → Types/Stats/Stats.d.ts} +6 -6
- package/Types/Stats/index.d.ts +1 -0
- package/Types/Suppressions/Bounce.d.ts +6 -0
- package/Types/Suppressions/Complaint.d.ts +4 -0
- package/{interfaces → Types}/Suppressions/Suppressions.d.ts +19 -28
- package/Types/Suppressions/Unsubscribe.d.ts +5 -0
- package/Types/Suppressions/WhiteList.d.ts +6 -0
- package/Types/Suppressions/index.d.ts +5 -0
- package/{interfaces → Types/Validations}/MultipleValidation.d.ts +20 -26
- package/{interfaces/Validate.d.ts → Types/Validations/Validation.d.ts} +4 -4
- package/Types/Validations/index.d.ts +2 -0
- package/Types/Webhooks/Webhooks.d.ts +29 -0
- package/Types/Webhooks/index.d.ts +1 -0
- package/Types/index.d.ts +13 -0
- package/index.d.ts +7 -4
- package/mailgun.node.js +2 -2
- package/mailgun.node.js.LICENSE.txt +1 -1
- package/mailgun.web.js +2 -2
- package/mailgun.web.js.LICENSE.txt +1 -1
- package/package.json +1 -1
- package/version.md +1 -1
- package/client.d.ts +0 -29
- package/common/NavigationThruPages.d.ts +0 -19
- package/error.d.ts +0 -8
- package/interfaces/APIErrorOptions.d.ts +0 -11
- package/interfaces/ApiResponse.d.ts +0 -5
- package/interfaces/DomainCredentials.d.ts +0 -52
- package/interfaces/DomainTemplates.d.ts +0 -178
- package/interfaces/IFormData.d.ts +0 -7
- package/interfaces/IMailgunClient.d.ts +0 -24
- package/interfaces/Suppressions/WhiteList.d.ts +0 -12
- package/interfaces/Supressions.d.ts +0 -103
- package/interfaces/Webhooks.d.ts +0 -34
- package/interfaces/mailListMembers.d.ts +0 -68
- package/ips.d.ts +0 -9
- package/lists.d.ts +0 -20
- package/stats.d.ts +0 -20
- package/suppressions.d.ts +0 -53
- package/validate.d.ts +0 -9
- package/webhooks.d.ts +0 -32
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [9.0.1](https://github.com/mailgun/mailgun.js/compare/v9.0.0...v9.0.1) (2023-06-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* Add public properties to IDomainsClient interface ([f4ca325](https://github.com/mailgun/mailgun.js/commits/f4ca3253c9042cd67739024cc6096996dbdcd026))
|
|
11
|
+
* Add public properties to IMailListsMembers interface ([0782c8d](https://github.com/mailgun/mailgun.js/commits/0782c8d3d04b520cce6eaec51231089ba44864a1))
|
|
12
|
+
* Add public properties to IMultipleValidationClient interface ([f1fd614](https://github.com/mailgun/mailgun.js/commits/f1fd6142c5ccbf5b772ce91d51d165fcb867af54))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Other changes
|
|
16
|
+
|
|
17
|
+
* Add tests for IDomainsClient public props ([8f1b81e](https://github.com/mailgun/mailgun.js/commits/8f1b81e663d4c26f16e22b3073045abf98061f14))
|
|
18
|
+
|
|
19
|
+
## [9.0.0](https://github.com/mailgun/mailgun.js/compare/v8.2.2...v9.0.0) (2023-05-29)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### ⚠ BREAKING CHANGES
|
|
23
|
+
|
|
24
|
+
* Types available as a named import from the package
|
|
25
|
+
* Add missing types and interfaces
|
|
26
|
+
* Move StatsClient and StatsContainer classes to different files
|
|
27
|
+
* Move rest of the types to appropriate folders
|
|
28
|
+
* Move common types to another folder
|
|
29
|
+
* Move Validations types to another folder
|
|
30
|
+
* Move Suppressions types to another folder
|
|
31
|
+
* Move MailingLists types to another folder
|
|
32
|
+
* Move domains types to another folder
|
|
33
|
+
* WebhookClient class renamed to WebhooksClient
|
|
34
|
+
* Client class renamed to MailgunClient
|
|
35
|
+
* Options interfase renamed to MailgunClientOptions
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
* Add missing types and interfaces ([ea4f289](https://github.com/mailgun/mailgun.js/commits/ea4f2898c93504354c57eb26bf6264dbfdec80e2))
|
|
40
|
+
* Add types,enums, and interfaces to default export from SDK ([6ccc043](https://github.com/mailgun/mailgun.js/commits/6ccc0433569cb55de48125a527cf6d527f329c6f))
|
|
41
|
+
* TS version update ([8523c11](https://github.com/mailgun/mailgun.js/commits/8523c118e2320e13a2d4ce430bbef1d9756dc082))
|
|
42
|
+
* Types available as a named import from the package ([adf93c8](https://github.com/mailgun/mailgun.js/commits/adf93c81391f2224a11432739c0caa75c6c7079b))
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
### Breaking changes
|
|
46
|
+
|
|
47
|
+
* Group enums to own folder ([306e19a](https://github.com/mailgun/mailgun.js/commits/306e19a56c97ce03c9b8af5fc6363a0726864c61))
|
|
48
|
+
* Group related Classes and Interfaces to folders ([8d785fa](https://github.com/mailgun/mailgun.js/commits/8d785fa1fd6232dca4651b8f38666192369961c3))
|
|
49
|
+
* Move common types to another folder ([d31b802](https://github.com/mailgun/mailgun.js/commits/d31b8026799d5d2d66a940cccb9973e6e78e6681))
|
|
50
|
+
* Move domains types to another folder ([6f5b479](https://github.com/mailgun/mailgun.js/commits/6f5b479d8e03c3e2ba3b40dc6f31982e20f87a47))
|
|
51
|
+
* Move MailingLists types to another folder ([416e7be](https://github.com/mailgun/mailgun.js/commits/416e7be1860e2ce7883fadcbf7d124be23b3bf5b))
|
|
52
|
+
* Move rest of the types to appropriate folders ([4c0c81a](https://github.com/mailgun/mailgun.js/commits/4c0c81a8da036f438cb549d741b6322e8653367a))
|
|
53
|
+
* Move StatsClient and StatsContainer classes to different files ([bfc25cf](https://github.com/mailgun/mailgun.js/commits/bfc25cf9ff926657b73e8dc7c7593f67ec9e2dc7))
|
|
54
|
+
* Move Suppressions types to another folder ([efd2e92](https://github.com/mailgun/mailgun.js/commits/efd2e929b82200bfca7407e424069462a543b7da))
|
|
55
|
+
* Move Validations types to another folder ([a64112a](https://github.com/mailgun/mailgun.js/commits/a64112aa32c8f03b8dd8e467f5a87e9e1a2d4b49))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Other changes
|
|
59
|
+
|
|
60
|
+
* Add typedock generation step to release ([d7afc0e](https://github.com/mailgun/mailgun.js/commits/d7afc0ea06db5b38f228f1beb32aeeee1b925dd5))
|
|
61
|
+
* Decrease number of eslint warnings ([c372344](https://github.com/mailgun/mailgun.js/commits/c37234443a4a853ac5a668a32ddd140d8bc3d6a9))
|
|
62
|
+
* Merge branch 'master' into expose-types ([53f6435](https://github.com/mailgun/mailgun.js/commits/53f643512686619506cebf8fe59bb546306d6263))
|
|
63
|
+
* Move suppressions classes to different files ([2b692de](https://github.com/mailgun/mailgun.js/commits/2b692deb2b7acb11cb3ce189342d751844d441b5))
|
|
64
|
+
* Rename suppressions.ts file to SuppressionClient.ts ([b3ba0ac](https://github.com/mailgun/mailgun.js/commits/b3ba0acc90111d953f2278b4c0d49729cd649c8b))
|
|
65
|
+
* Update interfaces folder name to be Interfaces in dist ([0b22bcd](https://github.com/mailgun/mailgun.js/commits/0b22bcd6be02b111a1030df2b0d3c0ae6d491e3c))
|
|
66
|
+
* Update readme one more time ([0f5a98b](https://github.com/mailgun/mailgun.js/commits/0f5a98b507d2dca3668d2efda05c0aa7d42a1043))
|
|
67
|
+
* Update registry for npm ([3175093](https://github.com/mailgun/mailgun.js/commits/3175093de9501eb5976387a31c237fdd349da1fd))
|
|
68
|
+
* Update ts-loader and ts-node ([d6b0ba0](https://github.com/mailgun/mailgun.js/commits/d6b0ba0b96a9346a7f7347c0b2ddb40bee16a608))
|
|
69
|
+
* Update Typedoc documentation ([6ae20c2](https://github.com/mailgun/mailgun.js/commits/6ae20c2b82968ac89c4bd01e1a8c45c122c5445e))
|
|
70
|
+
|
|
5
71
|
### [8.2.2](https://github.com/mailgun/mailgun.js/compare/v8.2.1...v8.2.2) (2023-05-26)
|
|
6
72
|
|
|
7
73
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DNSRecord, DomainShortData, TDomain } from '../../Types/Domains';
|
|
2
|
+
export default class Domain implements TDomain {
|
|
3
|
+
name: string;
|
|
4
|
+
require_tls: boolean;
|
|
5
|
+
skip_verification: boolean;
|
|
6
|
+
state: string;
|
|
7
|
+
wildcard: boolean;
|
|
8
|
+
spam_action: string;
|
|
9
|
+
created_at: string;
|
|
10
|
+
smtp_password: string;
|
|
11
|
+
smtp_login: string;
|
|
12
|
+
type: string;
|
|
13
|
+
receiving_dns_records: DNSRecord[] | null;
|
|
14
|
+
sending_dns_records: DNSRecord[] | null;
|
|
15
|
+
constructor(data: DomainShortData, receiving?: DNSRecord[] | null, sending?: DNSRecord[] | null);
|
|
16
|
+
}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import APIResponse from '
|
|
3
|
-
import Request from '
|
|
4
|
-
import { DomainTrackingData, OpenTrackingInfo, ClickTrackingInfo, UnsubscribeTrackingInfo, UpdatedOpenTracking } from './interfaces/DomainTracking';
|
|
5
|
-
import { IDomainCredentials } from './interfaces/DomainCredentials';
|
|
6
|
-
import { IDomainTemplatesClient } from './interfaces/DomainTemplates';
|
|
1
|
+
import { IDomainTemplatesClient, IDomainTagsClient, IDomainCredentials, IDomainClient } from '../../Interfaces/Domains';
|
|
2
|
+
import { APIResponse } from '../../Types/Common/ApiResponse';
|
|
3
|
+
import Request from '../common/Request';
|
|
7
4
|
import DomainCredentialsClient from './domainsCredentials';
|
|
8
5
|
import DomainTemplatesClient from './domainsTemplates';
|
|
9
|
-
import { IDomainTagsClient } from './interfaces/DomainTags';
|
|
10
6
|
import DomainTagsClient from './domainsTags';
|
|
7
|
+
import { DNSRecord, DomainShortData, MessageResponse, DomainTrackingData, UpdatedOpenTracking, DomainsQuery, DomainInfo, ConnectionSettings, UpdatedConnectionSettings, OpenTrackingInfo, ClickTrackingInfo, UnsubscribeTrackingInfo, ReplacementForPool, DKIMAuthorityInfo, UpdatedDKIMAuthority, DKIMSelectorInfo, UpdatedDKIMSelectorResponse, WebPrefixInfo, UpdatedWebPrefixResponse } from '../../Types/Domains';
|
|
11
8
|
export declare class Domain {
|
|
12
9
|
name: string;
|
|
13
10
|
require_tls: boolean;
|
|
@@ -23,7 +20,7 @@ export declare class Domain {
|
|
|
23
20
|
sending_dns_records: DNSRecord[] | null;
|
|
24
21
|
constructor(data: DomainShortData, receiving?: DNSRecord[] | null, sending?: DNSRecord[] | null);
|
|
25
22
|
}
|
|
26
|
-
export default class DomainClient {
|
|
23
|
+
export default class DomainClient implements IDomainClient {
|
|
27
24
|
request: Request;
|
|
28
25
|
domainCredentials: IDomainCredentials;
|
|
29
26
|
domainTemplates: IDomainTemplatesClient;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { IDomainTemplatesClient, IDomainTagsClient, IDomainCredentials, IDomainsClient } from '../../Interfaces/Domains';
|
|
2
|
+
import { APIResponse } from '../../Types/Common/ApiResponse';
|
|
3
|
+
import Request from '../common/Request';
|
|
4
|
+
import DomainCredentialsClient from './domainsCredentials';
|
|
5
|
+
import DomainTemplatesClient from './domainsTemplates';
|
|
6
|
+
import DomainTagsClient from './domainsTags';
|
|
7
|
+
import { MessageResponse, DomainTrackingData, UpdatedOpenTracking, DomainsQuery, DomainInfo, ConnectionSettings, UpdatedConnectionSettings, OpenTrackingInfo, ClickTrackingInfo, UnsubscribeTrackingInfo, ReplacementForPool, DKIMAuthorityInfo, UpdatedDKIMAuthority, DKIMSelectorInfo, UpdatedDKIMSelectorResponse, WebPrefixInfo, UpdatedWebPrefixResponse, TDomain } from '../../Types/Domains';
|
|
8
|
+
export default class DomainsClient implements IDomainsClient {
|
|
9
|
+
request: Request;
|
|
10
|
+
domainCredentials: IDomainCredentials;
|
|
11
|
+
domainTemplates: IDomainTemplatesClient;
|
|
12
|
+
domainTags: IDomainTagsClient;
|
|
13
|
+
constructor(request: Request, domainCredentialsClient: DomainCredentialsClient, domainTemplatesClient: DomainTemplatesClient, domainTagsClient: DomainTagsClient);
|
|
14
|
+
private _parseMessage;
|
|
15
|
+
private parseDomainList;
|
|
16
|
+
private _parseDomain;
|
|
17
|
+
private _parseTrackingSettings;
|
|
18
|
+
private _parseTrackingUpdate;
|
|
19
|
+
list(query?: DomainsQuery): Promise<TDomain[]>;
|
|
20
|
+
get(domain: string): Promise<TDomain>;
|
|
21
|
+
create(data: DomainInfo): Promise<TDomain>;
|
|
22
|
+
verify(domain: string): Promise<TDomain>;
|
|
23
|
+
destroy(domain: string): Promise<MessageResponse>;
|
|
24
|
+
getConnection(domain: string): Promise<ConnectionSettings>;
|
|
25
|
+
updateConnection(domain: string, data: ConnectionSettings): Promise<UpdatedConnectionSettings>;
|
|
26
|
+
getTracking(domain: string): Promise<DomainTrackingData>;
|
|
27
|
+
updateTracking(domain: string, type: string, data: OpenTrackingInfo | ClickTrackingInfo | UnsubscribeTrackingInfo): Promise<UpdatedOpenTracking>;
|
|
28
|
+
getIps(domain: string): Promise<string[]>;
|
|
29
|
+
assignIp(domain: string, ip: string): Promise<APIResponse>;
|
|
30
|
+
deleteIp(domain: string, ip: string): Promise<APIResponse>;
|
|
31
|
+
linkIpPool(domain: string, poolId: string): Promise<APIResponse>;
|
|
32
|
+
unlinkIpPoll(domain: string, replacement: ReplacementForPool): Promise<APIResponse>;
|
|
33
|
+
updateDKIMAuthority(domain: string, data: DKIMAuthorityInfo): Promise<UpdatedDKIMAuthority>;
|
|
34
|
+
updateDKIMSelector(domain: string, data: DKIMSelectorInfo): Promise<UpdatedDKIMSelectorResponse>;
|
|
35
|
+
updateWebPrefix(domain: string, data: WebPrefixInfo): Promise<UpdatedWebPrefixResponse>;
|
|
36
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { IDomainCredentials } from '../../Interfaces/Domains';
|
|
2
|
+
import { DomainCredentialsList, DomainCredentialsResult, DomainCredentialsQuery, DomainCredentials, UpdateDomainCredentialsData } from '../../Types/Domains';
|
|
3
|
+
import Request from '../common/Request';
|
|
3
4
|
export default class DomainCredentialsClient implements IDomainCredentials {
|
|
4
5
|
baseRoute: string;
|
|
5
6
|
request: Request;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import Request from '
|
|
2
|
-
import {
|
|
3
|
-
import NavigationThruPages from '
|
|
1
|
+
import Request from '../common/Request';
|
|
2
|
+
import { IDomainTagStatisticResult, IDomainTagsClient } from '../../Interfaces/Domains';
|
|
3
|
+
import NavigationThruPages from '../common/NavigationThruPages';
|
|
4
|
+
import { Resolution } from '../../Enums';
|
|
5
|
+
import { DomainTagsItem, DomainTagsItemInfo, DomainTagStatisticItem, DomainTagStatAPIResponse, DomainTagsList, DomainTagsResponseData, DomainTagsQuery, DomainTagsMessageRes, DomainTagsStatisticQuery, DomainTagCountriesAggregation, DomainTagProvidersAggregation, DomainTagDevicesAggregation } from '../../Types/Domains';
|
|
4
6
|
export declare class DomainTag implements DomainTagsItem {
|
|
5
7
|
tag: string;
|
|
6
8
|
description: string;
|
|
@@ -8,7 +10,7 @@ export declare class DomainTag implements DomainTagsItem {
|
|
|
8
10
|
'last-seen': Date;
|
|
9
11
|
constructor(tagInfo: DomainTagsItemInfo);
|
|
10
12
|
}
|
|
11
|
-
export declare class DomainTagStatistic implements
|
|
13
|
+
export declare class DomainTagStatistic implements IDomainTagStatisticResult {
|
|
12
14
|
tag: string;
|
|
13
15
|
description: string;
|
|
14
16
|
start: Date;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import Request from '
|
|
2
|
-
import { CreateDomainTemplateVersionResult,
|
|
3
|
-
import NavigationThruPages from '
|
|
4
|
-
|
|
1
|
+
import Request from '../common/Request';
|
|
2
|
+
import { CreateDomainTemplateVersionResult, DomainTemplateData, DomainTemplatesQuery, DomainTemplateUpdateData, DomainTemplateUpdateVersionData, DomainTemplateVersionData, ListDomainTemplatesAPIResponse, ListDomainTemplatesResult, ListDomainTemplateVersionsResult, MutateDomainTemplateVersionResult, NotificationResult, ShortTemplateVersion, TemplateQuery, TemplateVersion, UpdateOrDeleteDomainTemplateResult } from '../../Types/Domains';
|
|
3
|
+
import NavigationThruPages from '../common/NavigationThruPages';
|
|
4
|
+
import { IDomainTemplate, IDomainTemplatesClient } from '../../Interfaces/Domains';
|
|
5
|
+
export declare class DomainTemplateItem implements IDomainTemplate {
|
|
5
6
|
name: string;
|
|
6
7
|
description: string;
|
|
7
8
|
createdAt: Date | '';
|
|
@@ -9,7 +10,7 @@ export declare class DomainTemplateItem implements DomainTemplate {
|
|
|
9
10
|
id: string;
|
|
10
11
|
version?: TemplateVersion;
|
|
11
12
|
versions?: ShortTemplateVersion[];
|
|
12
|
-
constructor(domainTemplateFromAPI:
|
|
13
|
+
constructor(domainTemplateFromAPI: IDomainTemplate);
|
|
13
14
|
}
|
|
14
15
|
export default class DomainTemplatesClient extends NavigationThruPages<ListDomainTemplatesResult> implements IDomainTemplatesClient {
|
|
15
16
|
baseRoute: string;
|
|
@@ -23,13 +24,13 @@ export default class DomainTemplatesClient extends NavigationThruPages<ListDomai
|
|
|
23
24
|
protected parseList(response: ListDomainTemplatesAPIResponse): ListDomainTemplatesResult;
|
|
24
25
|
private parseListTemplateVersions;
|
|
25
26
|
list(domain: string, query?: DomainTemplatesQuery): Promise<ListDomainTemplatesResult>;
|
|
26
|
-
get(domain: string, templateName: string, query?: TemplateQuery): Promise<
|
|
27
|
-
create(domain: string, data: DomainTemplateData): Promise<
|
|
27
|
+
get(domain: string, templateName: string, query?: TemplateQuery): Promise<IDomainTemplate>;
|
|
28
|
+
create(domain: string, data: DomainTemplateData): Promise<IDomainTemplate>;
|
|
28
29
|
update(domain: string, templateName: string, data: DomainTemplateUpdateData): Promise<UpdateOrDeleteDomainTemplateResult>;
|
|
29
30
|
destroy(domain: string, templateName: string): Promise<UpdateOrDeleteDomainTemplateResult>;
|
|
30
31
|
destroyAll(domain: string): Promise<NotificationResult>;
|
|
31
32
|
createVersion(domain: string, templateName: string, data: DomainTemplateVersionData): Promise<CreateDomainTemplateVersionResult>;
|
|
32
|
-
getVersion(domain: string, templateName: string, tag: string): Promise<
|
|
33
|
+
getVersion(domain: string, templateName: string, tag: string): Promise<IDomainTemplate>;
|
|
33
34
|
updateVersion(domain: string, templateName: string, tag: string, data: DomainTemplateUpdateVersionData): Promise<MutateDomainTemplateVersionResult>;
|
|
34
35
|
destroyVersion(domain: string, templateName: string, tag: string): Promise<MutateDomainTemplateVersionResult>;
|
|
35
36
|
listVersions(domain: string, templateName: string, query?: DomainTemplatesQuery): Promise<ListDomainTemplateVersionsResult>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import NavigationThruPages from './common/NavigationThruPages';
|
|
2
|
-
import { EventsList, EventsQuery, EventsResponse } from '
|
|
3
|
-
import Request from './
|
|
4
|
-
|
|
2
|
+
import { EventsList, EventsQuery, EventsResponse } from '../Types/Events';
|
|
3
|
+
import Request from './common/Request';
|
|
4
|
+
import { IEventClient } from '../Interfaces';
|
|
5
|
+
export default class EventClient extends NavigationThruPages<EventsList> implements IEventClient {
|
|
5
6
|
request: Request;
|
|
6
7
|
constructor(request: Request);
|
|
7
8
|
protected parseList(response: EventsResponse): EventsList;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import Request from './
|
|
2
|
-
import { IpPoolCreateData, IpPoolCreateResult, IpPoolDeleteData, IpPoolListResult, IpPoolMessageResult, IpPoolUpdateData } from '
|
|
3
|
-
|
|
1
|
+
import Request from './common/Request';
|
|
2
|
+
import { IpPoolCreateData, IpPoolCreateResult, IpPoolDeleteData, IpPoolListResult, IpPoolMessageResult, IpPoolUpdateData } from '../Types/IPPools';
|
|
3
|
+
import { IIPPoolsClient } from '../Interfaces';
|
|
4
|
+
export default class IpPoolsClient implements IIPPoolsClient {
|
|
4
5
|
request: Request;
|
|
5
6
|
constructor(request: Request);
|
|
6
7
|
list(): Promise<IpPoolListResult>;
|
package/Classes/IPs.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import MgRequest from './common/Request';
|
|
2
|
+
import { IpData, IPsListQuery, IpsListResponseBody } from '../Types/IPs';
|
|
3
|
+
import { IIPsClient } from '../Interfaces';
|
|
4
|
+
export default class IpsClient implements IIPsClient {
|
|
5
|
+
request: MgRequest;
|
|
6
|
+
constructor(request: MgRequest);
|
|
7
|
+
list(query?: IPsListQuery): Promise<IpsListResponseBody>;
|
|
8
|
+
get(ip: string): Promise<IpData>;
|
|
9
|
+
private parseIpsResponse;
|
|
10
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MailgunClientOptions } from '../Types/MailgunClient';
|
|
2
|
+
import { InputFormData } from '../Types/Common';
|
|
3
|
+
import { IDomainsClient, IWebHooksClient, IMailgunClient, IMailingListsClient, IEventClient, IStatsClient, ISuppressionClient, IMessagesClient, IRoutesClient, IValidationClient, IIPsClient, IIPPoolsClient } from '../Interfaces';
|
|
4
|
+
export default class MailgunClient implements IMailgunClient {
|
|
5
|
+
private request;
|
|
6
|
+
domains: IDomainsClient;
|
|
7
|
+
webhooks: IWebHooksClient;
|
|
8
|
+
events: IEventClient;
|
|
9
|
+
stats: IStatsClient;
|
|
10
|
+
suppressions: ISuppressionClient;
|
|
11
|
+
messages: IMessagesClient;
|
|
12
|
+
routes: IRoutesClient;
|
|
13
|
+
validate: IValidationClient;
|
|
14
|
+
ips: IIPsClient;
|
|
15
|
+
ip_pools: IIPPoolsClient;
|
|
16
|
+
lists: IMailingListsClient;
|
|
17
|
+
constructor(options: MailgunClientOptions, formData: InputFormData);
|
|
18
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import Request from '
|
|
2
|
-
import { MailListMembersQuery,
|
|
3
|
-
import NavigationThruPages from '
|
|
1
|
+
import Request from '../common/Request';
|
|
2
|
+
import { MailListMembersQuery, CreateUpdateMailListMembers, MailListMember, MultipleMembersData, DeletedMember, NewMultipleMembersResponse, MailListMembersResult, MailListMembersResponse } from '../../Types/MailingLists';
|
|
3
|
+
import NavigationThruPages from '../common/NavigationThruPages';
|
|
4
|
+
import { IMailListsMembers } from '../../Interfaces/MailingLists';
|
|
4
5
|
export default class MailListsMembers extends NavigationThruPages<MailListMembersResult> implements IMailListsMembers {
|
|
5
6
|
baseRoute: string;
|
|
6
7
|
request: Request;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Request from '../common/Request';
|
|
2
|
+
import { ListsQuery, CreateUpdateList, DestroyedList, MailingList, StartValidationResult, MailingListValidationResult, MailingListCancelValidationResult, MailingListResult, MailingListApiResponse } from '../../Types/MailingLists';
|
|
3
|
+
import { IMailListsMembers } from '../../Interfaces/MailingLists/MailingListMembers';
|
|
4
|
+
import NavigationThruPages from '../common/NavigationThruPages';
|
|
5
|
+
import { IMailingListsClient } from '../../Interfaces';
|
|
6
|
+
export default class MailingListsClient extends NavigationThruPages<MailingListResult> implements IMailingListsClient {
|
|
7
|
+
baseRoute: string;
|
|
8
|
+
request: Request;
|
|
9
|
+
members: IMailListsMembers;
|
|
10
|
+
constructor(request: Request, members: IMailListsMembers);
|
|
11
|
+
private parseValidationResult;
|
|
12
|
+
protected parseList(response: MailingListApiResponse): MailingListResult;
|
|
13
|
+
list(query?: ListsQuery): Promise<MailingListResult>;
|
|
14
|
+
get(mailListAddress: string): Promise<MailingList>;
|
|
15
|
+
create(data: CreateUpdateList): Promise<MailingList>;
|
|
16
|
+
update(mailListAddress: string, data: CreateUpdateList): Promise<MailingList>;
|
|
17
|
+
destroy(mailListAddress: string): Promise<DestroyedList>;
|
|
18
|
+
validate(mailListAddress: string): Promise<StartValidationResult>;
|
|
19
|
+
validationResult(mailListAddress: string): Promise<MailingListValidationResult>;
|
|
20
|
+
cancelValidation(mailListAddress: string): Promise<MailingListCancelValidationResult>;
|
|
21
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { MailgunMessageData, MessagesSendAPIResponse, MessagesSendResult } from '
|
|
2
|
-
import Request from './
|
|
3
|
-
|
|
1
|
+
import { MailgunMessageData, MessagesSendAPIResponse, MessagesSendResult } from '../Types/Messages';
|
|
2
|
+
import Request from './common/Request';
|
|
3
|
+
import { IMessagesClient } from '../Interfaces';
|
|
4
|
+
export default class MessagesClient implements IMessagesClient {
|
|
4
5
|
request: Request;
|
|
5
6
|
constructor(request: Request);
|
|
6
7
|
private prepareBooleanValues;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { IRoutesClient } from '../Interfaces';
|
|
2
|
+
import { CreateUpdateRouteData, DestroyRouteResponse, Route, RoutesListQuery, UpdateRouteResponse } from '../Types/Routes';
|
|
3
|
+
import Request from './common/Request';
|
|
4
|
+
export default class RoutesClient implements IRoutesClient {
|
|
4
5
|
request: Request;
|
|
5
6
|
constructor(request: Request);
|
|
6
7
|
list(query: RoutesListQuery): Promise<Route[]>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Request from '../common/Request';
|
|
2
|
+
import { StatsQuery } from '../../Types/Stats';
|
|
3
|
+
import { ILogger } from '../../Interfaces/Common';
|
|
4
|
+
import { IStatsClient, IStatsContainer } from '../../Interfaces/Stats';
|
|
5
|
+
export default class StatsClient implements IStatsClient {
|
|
6
|
+
request: Request;
|
|
7
|
+
private logger;
|
|
8
|
+
constructor(request: Request, logger?: ILogger);
|
|
9
|
+
private convertDateToUTC;
|
|
10
|
+
private prepareSearchParams;
|
|
11
|
+
private parseStats;
|
|
12
|
+
getDomain(domain: string, query?: StatsQuery): Promise<IStatsContainer>;
|
|
13
|
+
getAccount(query?: StatsQuery): Promise<IStatsContainer>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IStatsContainer } from '../../Interfaces/Stats';
|
|
2
|
+
import { Stat, StatsOptions } from '../../Types/Stats';
|
|
3
|
+
export default class StatsContainer implements IStatsContainer {
|
|
4
|
+
start: Date;
|
|
5
|
+
end: Date;
|
|
6
|
+
resolution: string;
|
|
7
|
+
stats: Stat[];
|
|
8
|
+
constructor(data: StatsOptions);
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IBounce } from '../../Interfaces/Suppressions';
|
|
2
|
+
import { BounceData } from '../../Types/Suppressions';
|
|
3
|
+
import Suppression from './Suppression';
|
|
4
|
+
export default class Bounce extends Suppression implements IBounce {
|
|
5
|
+
address: string;
|
|
6
|
+
code: number;
|
|
7
|
+
error: string;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
constructor(data: BounceData);
|
|
10
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IComplaint } from '../../Interfaces/Suppressions';
|
|
2
|
+
import { ComplaintData } from '../../Types/Suppressions';
|
|
3
|
+
import Suppression from './Suppression';
|
|
4
|
+
export default class Complaint extends Suppression implements IComplaint {
|
|
5
|
+
address: string;
|
|
6
|
+
created_at: Date;
|
|
7
|
+
constructor(data: ComplaintData);
|
|
8
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import Request from '../common/Request';
|
|
2
|
+
import NavigationThruPages from '../common/NavigationThruPages';
|
|
3
|
+
import Suppression from './Suppression';
|
|
4
|
+
import { IBounce, IComplaint, ISuppressionClient, IUnsubscribe, IWhiteList } from '../../Interfaces/Suppressions';
|
|
5
|
+
import { SuppressionList, SuppressionListResponse, SuppressionDataType, SuppressionCreationData, SuppressionCreationResult, SuppressionListQuery, SuppressionDestroyResult } from '../../Types/Suppressions';
|
|
6
|
+
export default class SuppressionClient extends NavigationThruPages<SuppressionList> implements ISuppressionClient {
|
|
7
|
+
request: Request;
|
|
8
|
+
models: Map<string, any>;
|
|
9
|
+
constructor(request: Request);
|
|
10
|
+
protected parseList(response: SuppressionListResponse, Model: {
|
|
11
|
+
new (data: SuppressionDataType): IBounce | IComplaint | IUnsubscribe | IWhiteList;
|
|
12
|
+
}): SuppressionList;
|
|
13
|
+
_parseItem<T extends Suppression>(data: SuppressionDataType, Model: {
|
|
14
|
+
new (dataType: SuppressionDataType): T;
|
|
15
|
+
}): T;
|
|
16
|
+
private createWhiteList;
|
|
17
|
+
private checkType;
|
|
18
|
+
private prepareResponse;
|
|
19
|
+
list(domain: string, type: string, query?: SuppressionListQuery): Promise<SuppressionList>;
|
|
20
|
+
get(domain: string, type: string, address: string): Promise<IBounce | IComplaint | IUnsubscribe | IWhiteList>;
|
|
21
|
+
create(domain: string, type: string, data: SuppressionCreationData | SuppressionCreationData[]): Promise<SuppressionCreationResult>;
|
|
22
|
+
destroy(domain: string, type: string, address: string): Promise<SuppressionDestroyResult>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IUnsubscribe } from '../../Interfaces/Suppressions';
|
|
2
|
+
import { UnsubscribeData } from '../../Types/Suppressions';
|
|
3
|
+
import Suppression from './Suppression';
|
|
4
|
+
export default class Unsubscribe extends Suppression implements IUnsubscribe {
|
|
5
|
+
address: string;
|
|
6
|
+
tags: string[];
|
|
7
|
+
created_at: Date;
|
|
8
|
+
constructor(data: UnsubscribeData);
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IWhiteList } from '../../Interfaces/Suppressions';
|
|
2
|
+
import { WhiteListData } from '../../Types/Suppressions';
|
|
3
|
+
import Suppression from './Suppression';
|
|
4
|
+
export default class WhiteList extends Suppression implements IWhiteList {
|
|
5
|
+
value: string;
|
|
6
|
+
reason: string;
|
|
7
|
+
createdAt: Date;
|
|
8
|
+
constructor(data: WhiteListData);
|
|
9
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import NavigationThruPages from '
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import NavigationThruPages from '../common/NavigationThruPages';
|
|
2
|
+
import Request from '../common/Request';
|
|
3
|
+
import { IMultipleValidationClient } from '../../Interfaces/Validations';
|
|
4
|
+
import { MultipleValidationJobResult, MultipleValidationJobData, MultipleValidationJobsListResult, MultipleValidationJobsListResponse, MultipleValidationJobsListQuery, MultipleValidationCreationData, CreatedMultipleValidationJob, CanceledMultipleValidationJob } from '../../Types/Validations/MultipleValidation';
|
|
4
5
|
export declare class MultipleValidationJob implements MultipleValidationJobResult {
|
|
5
6
|
createdAt: Date;
|
|
6
7
|
id: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IValidationClient, IMultipleValidationClient } from '../../Interfaces/Validations';
|
|
2
|
+
import { ValidationResult } from '../../Types/Validations';
|
|
3
|
+
import Request from '../common/Request';
|
|
4
|
+
export default class ValidateClient implements IValidationClient {
|
|
5
|
+
multipleValidation: IMultipleValidationClient;
|
|
6
|
+
request: Request;
|
|
7
|
+
constructor(request: Request, multipleValidationClient: IMultipleValidationClient);
|
|
8
|
+
get(address: string): Promise<ValidationResult>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WebhooksIds } from '../Enums';
|
|
2
|
+
import { IWebHooksClient } from '../Interfaces/Webhooks';
|
|
3
|
+
import { WebhookValidationResponse, WebhookList, WebhookResponse, WebhooksQuery, WebhookResult } from '../Types/Webhooks';
|
|
4
|
+
import Request from './common/Request';
|
|
5
|
+
export declare class Webhook implements WebhookResult {
|
|
6
|
+
id: string;
|
|
7
|
+
url: string | undefined;
|
|
8
|
+
constructor(id: string, url: string | undefined);
|
|
9
|
+
}
|
|
10
|
+
export default class WebhooksClient implements IWebHooksClient {
|
|
11
|
+
request: Request;
|
|
12
|
+
constructor(request: Request);
|
|
13
|
+
private _parseWebhookList;
|
|
14
|
+
_parseWebhookWithID(id: string): (response: WebhookResponse) => WebhookResult;
|
|
15
|
+
private _parseWebhookTest;
|
|
16
|
+
list(domain: string, query: WebhooksQuery): Promise<WebhookList>;
|
|
17
|
+
get(domain: string, id: WebhooksIds): Promise<WebhookResult>;
|
|
18
|
+
create(domain: string, id: string, url: string, test?: boolean): Promise<WebhookResult | WebhookValidationResponse>;
|
|
19
|
+
update(domain: string, id: string, url: string): Promise<WebhookResult>;
|
|
20
|
+
destroy(domain: string, id: string): Promise<WebhookResult>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { APIErrorOptions, APIErrorType } from '../../Types/Common';
|
|
2
|
+
export default class APIError extends Error implements APIErrorType {
|
|
3
|
+
status: number;
|
|
4
|
+
stack: string;
|
|
5
|
+
details: string;
|
|
6
|
+
type: string;
|
|
7
|
+
constructor({ status, statusText, message, body }: APIErrorOptions);
|
|
8
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as NodeFormData from 'form-data';
|
|
2
|
-
import { InputFormData } from '
|
|
2
|
+
import { InputFormData } from '../../Types/Common';
|
|
3
3
|
declare class FormDataBuilder {
|
|
4
4
|
private FormDataConstructor;
|
|
5
5
|
constructor(FormDataConstructor: InputFormData);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ParsedPage, ParsedPagesList, QueryWithPage, ResponseWithPaging } from '../../Types/Common';
|
|
2
|
+
import { IBounce, IComplaint, IUnsubscribe, IWhiteList } from '../../Interfaces/Suppressions';
|
|
3
|
+
import Request from './Request';
|
|
4
|
+
import { SuppressionDataType } from '../../Types/Suppressions';
|
|
5
|
+
export default abstract class NavigationThruPages<T> {
|
|
6
|
+
request?: Request;
|
|
7
|
+
constructor(request?: Request);
|
|
8
|
+
protected parsePage(id: string, pageUrl: string, urlSeparator: string, iteratorName: string | undefined): ParsedPage;
|
|
9
|
+
protected parsePageLinks(response: ResponseWithPaging, urlSeparator: string, iteratorName?: string): ParsedPagesList;
|
|
10
|
+
private updateUrlAndQuery;
|
|
11
|
+
protected requestListWithPages(clientUrl: string, query?: QueryWithPage, Model?: {
|
|
12
|
+
new (data: SuppressionDataType): IBounce | IComplaint | IUnsubscribe | IWhiteList;
|
|
13
|
+
}): Promise<T>;
|
|
14
|
+
protected abstract parseList(response: ResponseWithPaging, Model?: {
|
|
15
|
+
new (data: SuppressionDataType): IBounce | IComplaint | IUnsubscribe | IWhiteList;
|
|
16
|
+
}): T;
|
|
17
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as NodeFormData from 'form-data';
|
|
2
|
-
import { RequestOptions } from '
|
|
3
|
-
import {
|
|
4
|
-
import APIResponse from './interfaces/ApiResponse';
|
|
5
|
-
import { IpPoolDeleteData } from './interfaces/IpPools';
|
|
2
|
+
import { RequestOptions, InputFormData, APIResponse } from '../../Types/Common';
|
|
3
|
+
import { IpPoolDeleteData } from '../../Types/IPPools';
|
|
6
4
|
declare class Request {
|
|
7
5
|
private username;
|
|
8
6
|
private key;
|
package/Enums/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare enum Resolution {
|
|
2
|
+
HOUR = "hour",
|
|
3
|
+
DAY = "day",
|
|
4
|
+
MONTH = "month"
|
|
5
|
+
}
|
|
6
|
+
export declare enum SuppressionModels {
|
|
7
|
+
BOUNCES = "bounces",
|
|
8
|
+
COMPLAINTS = "complaints",
|
|
9
|
+
UNSUBSCRIBES = "unsubscribes",
|
|
10
|
+
WHITELISTS = "whitelists"
|
|
11
|
+
}
|
|
12
|
+
export declare enum WebhooksIds {
|
|
13
|
+
CLICKED = "clicked",
|
|
14
|
+
COMPLAINED = "complained",
|
|
15
|
+
DELIVERED = "delivered",
|
|
16
|
+
OPENED = "opened",
|
|
17
|
+
PERMANENT_FAIL = "permanent_fail",
|
|
18
|
+
TEMPORARY_FAIL = "temporary_fail",
|
|
19
|
+
UNSUBSCRIBED = "unsubscribe"
|
|
20
|
+
}
|
|
21
|
+
export declare enum YesNo {
|
|
22
|
+
YES = "yes",
|
|
23
|
+
NO = "no"
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Logger';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { DomainCredentials, DomainCredentialsList, DomainCredentialsQuery, DomainCredentialsResult, UpdateDomainCredentialsData } from '../../Types/Domains';
|
|
2
|
+
export interface IDomainCredentials {
|
|
3
|
+
list(domain: string, query: DomainCredentialsQuery): Promise<DomainCredentialsList>;
|
|
4
|
+
create(domain: string, data: DomainCredentials): Promise<DomainCredentialsResult>;
|
|
5
|
+
update(domain: string, credentialsLogin: string, data: UpdateDomainCredentialsData): Promise<DomainCredentialsResult>;
|
|
6
|
+
destroy(domain: string, credentialsLogin: string): Promise<DomainCredentialsResult>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Resolution } from '../../Enums';
|
|
2
|
+
import { DomainTagCountriesAggregation, DomainTagDevicesAggregation, DomainTagProvidersAggregation, DomainTagsItem, DomainTagsList, DomainTagsMessageRes, DomainTagsStatisticQuery, DomainTagStatisticItem } from '../../Types/Domains';
|
|
3
|
+
export interface IDomainTagStatisticResult {
|
|
4
|
+
tag: string;
|
|
5
|
+
description: string;
|
|
6
|
+
start: Date;
|
|
7
|
+
end: Date;
|
|
8
|
+
resolution: Resolution;
|
|
9
|
+
stats: DomainTagStatisticItem[];
|
|
10
|
+
}
|
|
11
|
+
export interface IDomainTagsClient {
|
|
12
|
+
list(domain: string): Promise<DomainTagsList>;
|
|
13
|
+
get(domain: string, tag: string): Promise<DomainTagsItem>;
|
|
14
|
+
update(domain: string, tag: string, description: string): Promise<DomainTagsMessageRes>;
|
|
15
|
+
destroy(domain: string, tag: string): Promise<DomainTagsMessageRes>;
|
|
16
|
+
statistic(domain: string, tag: string, query: DomainTagsStatisticQuery): Promise<IDomainTagStatisticResult>;
|
|
17
|
+
countries(domain: string, tag: string): Promise<DomainTagCountriesAggregation>;
|
|
18
|
+
providers(domain: string, tag: string): Promise<DomainTagProvidersAggregation>;
|
|
19
|
+
devices(domain: string, tag: string): Promise<DomainTagDevicesAggregation>;
|
|
20
|
+
}
|