mailgun.js 4.1.3 → 4.1.4
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 +7 -0
- package/dist/lib/domainsTemplates.d.ts +2 -2
- package/dist/lib/interfaces/DomainTemplates.d.ts +4 -1
- package/dist/mailgun.node.js +2 -2
- package/dist/mailgun.node.js.LICENSE.txt +1 -1
- package/dist/mailgun.web.js +2 -2
- package/dist/mailgun.web.js.LICENSE.txt +1 -1
- package/lib/domainsTemplates.ts +3 -2
- package/lib/interfaces/DomainTemplates.ts +5 -1
- package/package.json +1 -1
package/lib/domainsTemplates.ts
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
NotificationAPIResponse,
|
|
23
23
|
NotificationResult,
|
|
24
24
|
ShortTemplateVersion,
|
|
25
|
+
TemplateQuery,
|
|
25
26
|
TemplateVersion,
|
|
26
27
|
UpdateOrDeleteDomainTemplateAPIResponse,
|
|
27
28
|
UpdateOrDeleteDomainTemplateResult
|
|
@@ -146,8 +147,8 @@ export default class DomainTemplatesClient implements IDomainTemplatesClient {
|
|
|
146
147
|
);
|
|
147
148
|
}
|
|
148
149
|
|
|
149
|
-
get(domain: string, templateName: string): Promise<DomainTemplateItem> {
|
|
150
|
-
return this.request.get(urljoin(this.baseRoute, domain, '/templates/', templateName))
|
|
150
|
+
get(domain: string, templateName: string, query?: TemplateQuery): Promise<DomainTemplateItem> {
|
|
151
|
+
return this.request.get(urljoin(this.baseRoute, domain, '/templates/', templateName), query)
|
|
151
152
|
.then(
|
|
152
153
|
(res: GetDomainTemplateAPIResponse) => new DomainTemplateItem(res.body.template)
|
|
153
154
|
);
|
|
@@ -45,6 +45,10 @@ export interface DomainTemplatesQuery {
|
|
|
45
45
|
p: string;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
export interface TemplateQuery {
|
|
49
|
+
active: YesNo;
|
|
50
|
+
}
|
|
51
|
+
|
|
48
52
|
export interface ShortTemplateVersion {
|
|
49
53
|
tag: string;
|
|
50
54
|
engine: string;
|
|
@@ -202,7 +206,7 @@ export interface ListDomainTemplateVersionsResult {
|
|
|
202
206
|
|
|
203
207
|
export interface IDomainTemplatesClient {
|
|
204
208
|
list(domain: string, query?: DomainTemplatesQuery): Promise<ListDomainTemplatesResult>
|
|
205
|
-
get(domain: string, templateName: string): Promise<DomainTemplateItem>
|
|
209
|
+
get(domain: string, templateName: string, query: TemplateQuery): Promise<DomainTemplateItem>
|
|
206
210
|
create(domain: string, data: DomainTemplateData): Promise<DomainTemplateItem>
|
|
207
211
|
update(
|
|
208
212
|
domain: string,
|