ts-mailcow-api 0.8.3 → 0.8.5
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/Endpoints/alias-endpoints.d.ts +33 -33
- package/dist/Endpoints/alias-endpoints.js +26 -26
- package/dist/Endpoints/alias-endpoints.js.map +1 -1
- package/dist/Endpoints/antispam-endpoints.d.ts +28 -28
- package/dist/Endpoints/antispam-endpoints.js +22 -22
- package/dist/Endpoints/domain-endpoints.d.ts +33 -33
- package/dist/Endpoints/domain-endpoints.js +26 -26
- package/dist/Endpoints/domain-endpoints.js.map +1 -1
- package/dist/Endpoints/forwarding-endpoints.d.ts +27 -27
- package/dist/Endpoints/forwarding-endpoints.js +22 -22
- package/dist/Endpoints/log-endpoints.d.ts +55 -55
- package/dist/Endpoints/log-endpoints.js +38 -38
- package/dist/Endpoints/mailbox-endpoint.d.ts +58 -58
- package/dist/Endpoints/mailbox-endpoint.js +41 -41
- package/dist/Endpoints/mailbox-endpoint.js.map +1 -1
- package/dist/Endpoints/syncjob-endpoints.d.ts +24 -24
- package/dist/Endpoints/syncjob-endpoints.js +20 -20
- package/dist/index.d.ts +86 -86
- package/dist/index.js +82 -82
- package/dist/index.js.map +1 -1
- package/dist/request-factory.d.ts +27 -27
- package/dist/request-factory.js +88 -88
- package/dist/types.d.ts +1313 -1313
- package/dist/types.js +9 -9
- package/package.json +59 -60
- package/src/Endpoints/alias-endpoints.ts +71 -71
- package/src/index.ts +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { Alias, AliasDeleteRequest, AliasPostRequest, AliasEditRequest, MailcowResponse } from '../types';
|
|
2
|
-
import MailcowClient from '../index';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for all Alias endpoints.
|
|
5
|
-
*/
|
|
6
|
-
export interface AliasEndpoints {
|
|
7
|
-
/**
|
|
8
|
-
* Endpoint for getting mailbox aliases in the system.
|
|
9
|
-
* @param id - The id of the alias you want to get. Use 'all' to retrieve all aliases in the system.
|
|
10
|
-
*/
|
|
11
|
-
get(id?: number | 'all'): Promise<Alias[]>;
|
|
12
|
-
/**
|
|
13
|
-
* Endpoint for creating mailbox aliases.
|
|
14
|
-
* @param payload - The creation payload.
|
|
15
|
-
*/
|
|
16
|
-
create(payload: AliasPostRequest): Promise<MailcowResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Endpoint for editing a mailbox alias.
|
|
19
|
-
* @param payload - The edit payload.
|
|
20
|
-
*/
|
|
21
|
-
edit(payload: AliasEditRequest): Promise<MailcowResponse>;
|
|
22
|
-
/**
|
|
23
|
-
* Endpoint for deleting a mailbox alias.
|
|
24
|
-
* @param payload - The deletion payload.
|
|
25
|
-
*/
|
|
26
|
-
delete(payload: AliasDeleteRequest): Promise<MailcowResponse>;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Binder function between the MailcowClient class and the AliasEndpoints.
|
|
30
|
-
* @param bind - The MailcowClient to bind.
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
export declare function aliasEndpoints(bind: MailcowClient): AliasEndpoints;
|
|
1
|
+
import { Alias, AliasDeleteRequest, AliasPostRequest, AliasEditRequest, MailcowResponse } from '../types';
|
|
2
|
+
import MailcowClient from '../index';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for all Alias endpoints.
|
|
5
|
+
*/
|
|
6
|
+
export interface AliasEndpoints {
|
|
7
|
+
/**
|
|
8
|
+
* Endpoint for getting mailbox aliases in the system.
|
|
9
|
+
* @param id - The id of the alias you want to get. Use 'all' to retrieve all aliases in the system.
|
|
10
|
+
*/
|
|
11
|
+
get(id?: number | 'all'): Promise<Alias[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Endpoint for creating mailbox aliases.
|
|
14
|
+
* @param payload - The creation payload.
|
|
15
|
+
*/
|
|
16
|
+
create(payload: AliasPostRequest): Promise<MailcowResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Endpoint for editing a mailbox alias.
|
|
19
|
+
* @param payload - The edit payload.
|
|
20
|
+
*/
|
|
21
|
+
edit(payload: AliasEditRequest): Promise<MailcowResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Endpoint for deleting a mailbox alias.
|
|
24
|
+
* @param payload - The deletion payload.
|
|
25
|
+
*/
|
|
26
|
+
delete(payload: AliasDeleteRequest): Promise<MailcowResponse>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Binder function between the MailcowClient class and the AliasEndpoints.
|
|
30
|
+
* @param bind - The MailcowClient to bind.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare function aliasEndpoints(bind: MailcowClient): AliasEndpoints;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aliasEndpoints = void 0;
|
|
4
|
-
const request_factory_1 = require("../request-factory");
|
|
5
|
-
/**
|
|
6
|
-
* Binder function between the MailcowClient class and the AliasEndpoints.
|
|
7
|
-
* @param bind - The MailcowClient to bind.
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
function aliasEndpoints(bind) {
|
|
11
|
-
return {
|
|
12
|
-
get(id = 'all') {
|
|
13
|
-
return request_factory_1.wrapPromiseToArray(bind.requestFactory.get(`/api/v1/get/alias/${id}`));
|
|
14
|
-
},
|
|
15
|
-
create: (payload) => {
|
|
16
|
-
return bind.requestFactory.post('/api/v1/add/alias', payload);
|
|
17
|
-
},
|
|
18
|
-
edit: (payload) => {
|
|
19
|
-
return bind.requestFactory.post('/api/v1/edit/alias', payload);
|
|
20
|
-
},
|
|
21
|
-
delete: (payload) => {
|
|
22
|
-
return bind.requestFactory.post('/api/v1/delete/alias', payload.items);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.aliasEndpoints = aliasEndpoints;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.aliasEndpoints = void 0;
|
|
4
|
+
const request_factory_1 = require("../request-factory");
|
|
5
|
+
/**
|
|
6
|
+
* Binder function between the MailcowClient class and the AliasEndpoints.
|
|
7
|
+
* @param bind - The MailcowClient to bind.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
function aliasEndpoints(bind) {
|
|
11
|
+
return {
|
|
12
|
+
get(id = 'all') {
|
|
13
|
+
return (0, request_factory_1.wrapPromiseToArray)(bind.requestFactory.get(`/api/v1/get/alias/${id}`));
|
|
14
|
+
},
|
|
15
|
+
create: (payload) => {
|
|
16
|
+
return bind.requestFactory.post('/api/v1/add/alias', payload);
|
|
17
|
+
},
|
|
18
|
+
edit: (payload) => {
|
|
19
|
+
return bind.requestFactory.post('/api/v1/edit/alias', payload);
|
|
20
|
+
},
|
|
21
|
+
delete: (payload) => {
|
|
22
|
+
return bind.requestFactory.post('/api/v1/delete/alias', payload.items);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.aliasEndpoints = aliasEndpoints;
|
|
27
27
|
//# sourceMappingURL=alias-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/alias-endpoints.ts"],"names":[],"mappings":";;;AAQA,wDAAwD;AA+BxD;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAmB;IAChD,OAAO;QACL,GAAG,CAAC,EAAE,GAAG,KAAK;YACZ,OAAO,oCAAkB,
|
|
1
|
+
{"version":3,"file":"alias-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/alias-endpoints.ts"],"names":[],"mappings":";;;AAQA,wDAAwD;AA+BxD;;;;GAIG;AACH,SAAgB,cAAc,CAAC,IAAmB;IAChD,OAAO;QACL,GAAG,CAAC,EAAE,GAAG,KAAK;YACZ,OAAO,IAAA,oCAAkB,EACvB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAkB,qBAAqB,EAAE,EAAE,CAAC,CACpE,CAAC;QACJ,CAAC;QACD,MAAM,EAAE,CAAC,OAAyB,EAA4B,EAAE;YAC9D,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,mBAAmB,EACnB,OAAO,CACR,CAAC;QACJ,CAAC;QACD,IAAI,EAAE,CAAC,OAAyB,EAA4B,EAAE;YAC5D,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,oBAAoB,EACpB,OAAO,CACR,CAAC;QACJ,CAAC;QACD,MAAM,EAAE,CAAC,OAA2B,EAA4B,EAAE;YAChE,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,sBAAsB,EACtB,OAAO,CAAC,KAAK,CACd,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AA1BD,wCA0BC"}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { SpamPolicyDeleteRequest, SpamPolicyPostRequest, MailcowResponse, SpamPolicyGetRequest, SpamPolicy } from '../types';
|
|
2
|
-
import MailcowClient from '../index';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for all antispam policies.
|
|
5
|
-
*/
|
|
6
|
-
export interface AntiSpamEndpoints {
|
|
7
|
-
/**
|
|
8
|
-
* Endpoint for getting antispam policies.
|
|
9
|
-
* @param payload - The get payload.
|
|
10
|
-
*/
|
|
11
|
-
get(payload: SpamPolicyGetRequest): Promise<SpamPolicy[]>;
|
|
12
|
-
/**
|
|
13
|
-
* Endpoint for creating antispam policies.
|
|
14
|
-
* @param payload - The creation payload.
|
|
15
|
-
*/
|
|
16
|
-
create(payload: SpamPolicyPostRequest): Promise<MailcowResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Endpoint for deleting antispam policies.
|
|
19
|
-
* @param payload - The deletion payload.
|
|
20
|
-
*/
|
|
21
|
-
delete(payload: SpamPolicyDeleteRequest): Promise<MailcowResponse>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Binder function between the MailcowClient class and the AntiSpamEndpoints
|
|
25
|
-
* @param bind - The MailcowClient to bind.
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
export declare function antiSpamEndpoints(bind: MailcowClient): AntiSpamEndpoints;
|
|
1
|
+
import { SpamPolicyDeleteRequest, SpamPolicyPostRequest, MailcowResponse, SpamPolicyGetRequest, SpamPolicy } from '../types';
|
|
2
|
+
import MailcowClient from '../index';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for all antispam policies.
|
|
5
|
+
*/
|
|
6
|
+
export interface AntiSpamEndpoints {
|
|
7
|
+
/**
|
|
8
|
+
* Endpoint for getting antispam policies.
|
|
9
|
+
* @param payload - The get payload.
|
|
10
|
+
*/
|
|
11
|
+
get(payload: SpamPolicyGetRequest): Promise<SpamPolicy[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Endpoint for creating antispam policies.
|
|
14
|
+
* @param payload - The creation payload.
|
|
15
|
+
*/
|
|
16
|
+
create(payload: SpamPolicyPostRequest): Promise<MailcowResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Endpoint for deleting antispam policies.
|
|
19
|
+
* @param payload - The deletion payload.
|
|
20
|
+
*/
|
|
21
|
+
delete(payload: SpamPolicyDeleteRequest): Promise<MailcowResponse>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Binder function between the MailcowClient class and the AntiSpamEndpoints
|
|
25
|
+
* @param bind - The MailcowClient to bind.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export declare function antiSpamEndpoints(bind: MailcowClient): AntiSpamEndpoints;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.antiSpamEndpoints = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Binder function between the MailcowClient class and the AntiSpamEndpoints
|
|
6
|
-
* @param bind - The MailcowClient to bind.
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
function antiSpamEndpoints(bind) {
|
|
10
|
-
return {
|
|
11
|
-
create(payload) {
|
|
12
|
-
return bind.requestFactory.post('/api/v1/add/domain-policy', payload);
|
|
13
|
-
},
|
|
14
|
-
delete(payload) {
|
|
15
|
-
return bind.requestFactory.post('/api/v1/delete/domain-policy', payload.prefid);
|
|
16
|
-
},
|
|
17
|
-
get(payload) {
|
|
18
|
-
return bind.requestFactory.get(`/api/v1/get/policy_${payload.type}_domain/${payload.domain}`);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.antiSpamEndpoints = antiSpamEndpoints;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.antiSpamEndpoints = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Binder function between the MailcowClient class and the AntiSpamEndpoints
|
|
6
|
+
* @param bind - The MailcowClient to bind.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
function antiSpamEndpoints(bind) {
|
|
10
|
+
return {
|
|
11
|
+
create(payload) {
|
|
12
|
+
return bind.requestFactory.post('/api/v1/add/domain-policy', payload);
|
|
13
|
+
},
|
|
14
|
+
delete(payload) {
|
|
15
|
+
return bind.requestFactory.post('/api/v1/delete/domain-policy', payload.prefid);
|
|
16
|
+
},
|
|
17
|
+
get(payload) {
|
|
18
|
+
return bind.requestFactory.get(`/api/v1/get/policy_${payload.type}_domain/${payload.domain}`);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.antiSpamEndpoints = antiSpamEndpoints;
|
|
23
23
|
//# sourceMappingURL=antispam-endpoints.js.map
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { DomainDeleteRequest, DomainEditRequest, DomainPostRequest, Domain, MailcowResponse } from '../types';
|
|
2
|
-
import MailcowClient from '../index';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for all Domain endpoints.
|
|
5
|
-
*/
|
|
6
|
-
export interface DomainEndpoints {
|
|
7
|
-
/**
|
|
8
|
-
* Endpoint for getting domains.
|
|
9
|
-
* @param domain - Name of the domain to get.
|
|
10
|
-
*/
|
|
11
|
-
get(domain: string): Promise<Domain[]>;
|
|
12
|
-
/**
|
|
13
|
-
* Endpoint for creating domains.
|
|
14
|
-
* @param payload - The creation payload.
|
|
15
|
-
*/
|
|
16
|
-
create(payload: DomainPostRequest): Promise<MailcowResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Endpoint for deleting a domain.
|
|
19
|
-
* @param payload - The deletion payload.
|
|
20
|
-
*/
|
|
21
|
-
delete(payload: DomainDeleteRequest): Promise<MailcowResponse>;
|
|
22
|
-
/**
|
|
23
|
-
* Endpoint for editing a domain.
|
|
24
|
-
* @param payload - The edit payload.
|
|
25
|
-
*/
|
|
26
|
-
edit(payload: DomainEditRequest): Promise<MailcowResponse>;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Binder function between the MailcowClient class and the DomainEndpoints.
|
|
30
|
-
* @param bind - The MailcowClient to bind.
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
export declare function domainEndpoints(bind: MailcowClient): DomainEndpoints;
|
|
1
|
+
import { DomainDeleteRequest, DomainEditRequest, DomainPostRequest, Domain, MailcowResponse } from '../types';
|
|
2
|
+
import MailcowClient from '../index';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for all Domain endpoints.
|
|
5
|
+
*/
|
|
6
|
+
export interface DomainEndpoints {
|
|
7
|
+
/**
|
|
8
|
+
* Endpoint for getting domains.
|
|
9
|
+
* @param domain - Name of the domain to get.
|
|
10
|
+
*/
|
|
11
|
+
get(domain: string): Promise<Domain[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Endpoint for creating domains.
|
|
14
|
+
* @param payload - The creation payload.
|
|
15
|
+
*/
|
|
16
|
+
create(payload: DomainPostRequest): Promise<MailcowResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Endpoint for deleting a domain.
|
|
19
|
+
* @param payload - The deletion payload.
|
|
20
|
+
*/
|
|
21
|
+
delete(payload: DomainDeleteRequest): Promise<MailcowResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Endpoint for editing a domain.
|
|
24
|
+
* @param payload - The edit payload.
|
|
25
|
+
*/
|
|
26
|
+
edit(payload: DomainEditRequest): Promise<MailcowResponse>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Binder function between the MailcowClient class and the DomainEndpoints.
|
|
30
|
+
* @param bind - The MailcowClient to bind.
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export declare function domainEndpoints(bind: MailcowClient): DomainEndpoints;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.domainEndpoints = void 0;
|
|
4
|
-
const request_factory_1 = require("../request-factory");
|
|
5
|
-
/**
|
|
6
|
-
* Binder function between the MailcowClient class and the DomainEndpoints.
|
|
7
|
-
* @param bind - The MailcowClient to bind.
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
function domainEndpoints(bind) {
|
|
11
|
-
return {
|
|
12
|
-
get(domain = 'all') {
|
|
13
|
-
return request_factory_1.wrapPromiseToArray(bind.requestFactory.get(`/api/v1/get/domain/${domain}`));
|
|
14
|
-
},
|
|
15
|
-
create(payload) {
|
|
16
|
-
return bind.requestFactory.post('/api/v1/add/domain', payload);
|
|
17
|
-
},
|
|
18
|
-
delete(payload) {
|
|
19
|
-
return bind.requestFactory.post('/api/v1/delete/domain', payload.domains);
|
|
20
|
-
},
|
|
21
|
-
edit(payload) {
|
|
22
|
-
return bind.requestFactory.post('/api/v1/edit/domain', payload);
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.domainEndpoints = domainEndpoints;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.domainEndpoints = void 0;
|
|
4
|
+
const request_factory_1 = require("../request-factory");
|
|
5
|
+
/**
|
|
6
|
+
* Binder function between the MailcowClient class and the DomainEndpoints.
|
|
7
|
+
* @param bind - The MailcowClient to bind.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
function domainEndpoints(bind) {
|
|
11
|
+
return {
|
|
12
|
+
get(domain = 'all') {
|
|
13
|
+
return (0, request_factory_1.wrapPromiseToArray)(bind.requestFactory.get(`/api/v1/get/domain/${domain}`));
|
|
14
|
+
},
|
|
15
|
+
create(payload) {
|
|
16
|
+
return bind.requestFactory.post('/api/v1/add/domain', payload);
|
|
17
|
+
},
|
|
18
|
+
delete(payload) {
|
|
19
|
+
return bind.requestFactory.post('/api/v1/delete/domain', payload.domains);
|
|
20
|
+
},
|
|
21
|
+
edit(payload) {
|
|
22
|
+
return bind.requestFactory.post('/api/v1/edit/domain', payload);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
exports.domainEndpoints = domainEndpoints;
|
|
27
27
|
//# sourceMappingURL=domain-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/domain-endpoints.ts"],"names":[],"mappings":";;;AAQA,wDAAwD;AA+BxD;;;;GAIG;AACH,SAAgB,eAAe,CAAC,IAAmB;IACjD,OAAO;QACL,GAAG,CAAC,SAAiB,KAAK;YACxB,OAAO,oCAAkB,
|
|
1
|
+
{"version":3,"file":"domain-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/domain-endpoints.ts"],"names":[],"mappings":";;;AAQA,wDAAwD;AA+BxD;;;;GAIG;AACH,SAAgB,eAAe,CAAC,IAAmB;IACjD,OAAO;QACL,GAAG,CAAC,SAAiB,KAAK;YACxB,OAAO,IAAA,oCAAkB,EACvB,IAAI,CAAC,cAAc,CAAC,GAAG,CACrB,sBAAuB,MAAO,EAAE,CACjC,CACF,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,OAA0B;YAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,oBAAoB,EACpB,OAAO,CACR,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,OAA4B;YACjC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,uBAAuB,EACvB,OAAO,CAAC,OAAO,CAChB,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,OAA0B;YAC7B,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,qBAAqB,EACrB,OAAO,CACR,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC;AA5BD,0CA4BC"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import MailcowClient from '../index';
|
|
2
|
-
import { ForwardingCreateRequest, ForwardingDeleteRequest, ForwardingHost, MailcowResponse } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Interface for all Forwarding Hosts endpoints.
|
|
5
|
-
*/
|
|
6
|
-
export interface ForwardingEndpoints {
|
|
7
|
-
/**
|
|
8
|
-
* Endpoint for deleting forwarding host.
|
|
9
|
-
* @param payload - The deletion payload
|
|
10
|
-
*/
|
|
11
|
-
delete(payload: ForwardingDeleteRequest): Promise<MailcowResponse>;
|
|
12
|
-
/**
|
|
13
|
-
* Endpoint for creating forwarding host.
|
|
14
|
-
* @param payload - The creation payload
|
|
15
|
-
*/
|
|
16
|
-
create(payload: ForwardingCreateRequest): Promise<MailcowResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Endpoint for getting all forwarding host.
|
|
19
|
-
*/
|
|
20
|
-
getAll(): Promise<ForwardingHost[]>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Binder function between the MailcowClient class and the ForwardingEndpoints.
|
|
24
|
-
* @param bind - The MailcowClient to bind.
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
export declare function forwardingEndpoints(bind: MailcowClient): ForwardingEndpoints;
|
|
1
|
+
import MailcowClient from '../index';
|
|
2
|
+
import { ForwardingCreateRequest, ForwardingDeleteRequest, ForwardingHost, MailcowResponse } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Interface for all Forwarding Hosts endpoints.
|
|
5
|
+
*/
|
|
6
|
+
export interface ForwardingEndpoints {
|
|
7
|
+
/**
|
|
8
|
+
* Endpoint for deleting forwarding host.
|
|
9
|
+
* @param payload - The deletion payload
|
|
10
|
+
*/
|
|
11
|
+
delete(payload: ForwardingDeleteRequest): Promise<MailcowResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Endpoint for creating forwarding host.
|
|
14
|
+
* @param payload - The creation payload
|
|
15
|
+
*/
|
|
16
|
+
create(payload: ForwardingCreateRequest): Promise<MailcowResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Endpoint for getting all forwarding host.
|
|
19
|
+
*/
|
|
20
|
+
getAll(): Promise<ForwardingHost[]>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Binder function between the MailcowClient class and the ForwardingEndpoints.
|
|
24
|
+
* @param bind - The MailcowClient to bind.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare function forwardingEndpoints(bind: MailcowClient): ForwardingEndpoints;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forwardingEndpoints = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Binder function between the MailcowClient class and the ForwardingEndpoints.
|
|
6
|
-
* @param bind - The MailcowClient to bind.
|
|
7
|
-
* @internal
|
|
8
|
-
*/
|
|
9
|
-
function forwardingEndpoints(bind) {
|
|
10
|
-
return {
|
|
11
|
-
delete(payload) {
|
|
12
|
-
return bind.requestFactory.post('/api/v1/delete/fwdhost', payload.items);
|
|
13
|
-
},
|
|
14
|
-
create(payload) {
|
|
15
|
-
return bind.requestFactory.post('/api/v1/add/fwdhost', payload);
|
|
16
|
-
},
|
|
17
|
-
getAll() {
|
|
18
|
-
return bind.requestFactory.get('/api/v1/get/fwdhost/all');
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
exports.forwardingEndpoints = forwardingEndpoints;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.forwardingEndpoints = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Binder function between the MailcowClient class and the ForwardingEndpoints.
|
|
6
|
+
* @param bind - The MailcowClient to bind.
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
function forwardingEndpoints(bind) {
|
|
10
|
+
return {
|
|
11
|
+
delete(payload) {
|
|
12
|
+
return bind.requestFactory.post('/api/v1/delete/fwdhost', payload.items);
|
|
13
|
+
},
|
|
14
|
+
create(payload) {
|
|
15
|
+
return bind.requestFactory.post('/api/v1/add/fwdhost', payload);
|
|
16
|
+
},
|
|
17
|
+
getAll() {
|
|
18
|
+
return bind.requestFactory.get('/api/v1/get/fwdhost/all');
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
exports.forwardingEndpoints = forwardingEndpoints;
|
|
23
23
|
//# sourceMappingURL=forwarding-endpoints.js.map
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import MailcowClient from '../index';
|
|
2
|
-
import { ACMELog, ADLog, APILog, DCLog, NFLog, PFLog, RLLog, RSLog, SGLog, WDLog } from '../types';
|
|
3
|
-
export interface LogEndpoints {
|
|
4
|
-
/**
|
|
5
|
-
* Endpoint for returning ACME Logs.
|
|
6
|
-
* @param count - The number of logs to return.
|
|
7
|
-
*/
|
|
8
|
-
acme(count: number): Promise<ACMELog[]>;
|
|
9
|
-
/**
|
|
10
|
-
* Endpoint for returning API Logs.
|
|
11
|
-
* @param count - The number of logs to return.
|
|
12
|
-
*/
|
|
13
|
-
api(count: number): Promise<APILog[]>;
|
|
14
|
-
/**
|
|
15
|
-
* Endpoint for returning Autodiscover Logs.
|
|
16
|
-
* @param count - The number of logs to return.
|
|
17
|
-
*/
|
|
18
|
-
autodiscover(count: number): Promise<ADLog[]>;
|
|
19
|
-
/**
|
|
20
|
-
* Endpoint for returning dovecot Logs.
|
|
21
|
-
* @param count - The number of logs to return.
|
|
22
|
-
*/
|
|
23
|
-
dovecot(count: number): Promise<DCLog[]>;
|
|
24
|
-
/**
|
|
25
|
-
* Endpoint for returning Netfilter Logs.
|
|
26
|
-
* @param count - The number of logs to return.
|
|
27
|
-
*/
|
|
28
|
-
netfilter(count: number): Promise<NFLog[]>;
|
|
29
|
-
/**
|
|
30
|
-
* Endpoint for returning Postfix Logs.
|
|
31
|
-
* @param count - The number of logs to return.
|
|
32
|
-
*/
|
|
33
|
-
postfix(count: number): Promise<PFLog[]>;
|
|
34
|
-
/**
|
|
35
|
-
* Endpoint for returning Rate limited Logs.
|
|
36
|
-
* @param count - The number of logs to return.
|
|
37
|
-
*/
|
|
38
|
-
ratelimited(count: number): Promise<RLLog[]>;
|
|
39
|
-
/**
|
|
40
|
-
* Endpoint for returning Rspamd Logs.
|
|
41
|
-
* @param count - The number of logs to return.
|
|
42
|
-
*/
|
|
43
|
-
rspamd(count: number): Promise<RSLog[]>;
|
|
44
|
-
/**
|
|
45
|
-
* Endpoint for returning SOGo Logs.
|
|
46
|
-
* @param count - The number of logs to return.
|
|
47
|
-
*/
|
|
48
|
-
sogo(count: number): Promise<SGLog[]>;
|
|
49
|
-
/**
|
|
50
|
-
* Endpoint for returning Watchdog Logs.
|
|
51
|
-
* @param count - The number of logs to return.
|
|
52
|
-
*/
|
|
53
|
-
watchdog(count: number): Promise<WDLog[]>;
|
|
54
|
-
}
|
|
55
|
-
export declare function logEndpoints(bind: MailcowClient): LogEndpoints;
|
|
1
|
+
import MailcowClient from '../index';
|
|
2
|
+
import { ACMELog, ADLog, APILog, DCLog, NFLog, PFLog, RLLog, RSLog, SGLog, WDLog } from '../types';
|
|
3
|
+
export interface LogEndpoints {
|
|
4
|
+
/**
|
|
5
|
+
* Endpoint for returning ACME Logs.
|
|
6
|
+
* @param count - The number of logs to return.
|
|
7
|
+
*/
|
|
8
|
+
acme(count: number): Promise<ACMELog[]>;
|
|
9
|
+
/**
|
|
10
|
+
* Endpoint for returning API Logs.
|
|
11
|
+
* @param count - The number of logs to return.
|
|
12
|
+
*/
|
|
13
|
+
api(count: number): Promise<APILog[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Endpoint for returning Autodiscover Logs.
|
|
16
|
+
* @param count - The number of logs to return.
|
|
17
|
+
*/
|
|
18
|
+
autodiscover(count: number): Promise<ADLog[]>;
|
|
19
|
+
/**
|
|
20
|
+
* Endpoint for returning dovecot Logs.
|
|
21
|
+
* @param count - The number of logs to return.
|
|
22
|
+
*/
|
|
23
|
+
dovecot(count: number): Promise<DCLog[]>;
|
|
24
|
+
/**
|
|
25
|
+
* Endpoint for returning Netfilter Logs.
|
|
26
|
+
* @param count - The number of logs to return.
|
|
27
|
+
*/
|
|
28
|
+
netfilter(count: number): Promise<NFLog[]>;
|
|
29
|
+
/**
|
|
30
|
+
* Endpoint for returning Postfix Logs.
|
|
31
|
+
* @param count - The number of logs to return.
|
|
32
|
+
*/
|
|
33
|
+
postfix(count: number): Promise<PFLog[]>;
|
|
34
|
+
/**
|
|
35
|
+
* Endpoint for returning Rate limited Logs.
|
|
36
|
+
* @param count - The number of logs to return.
|
|
37
|
+
*/
|
|
38
|
+
ratelimited(count: number): Promise<RLLog[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Endpoint for returning Rspamd Logs.
|
|
41
|
+
* @param count - The number of logs to return.
|
|
42
|
+
*/
|
|
43
|
+
rspamd(count: number): Promise<RSLog[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Endpoint for returning SOGo Logs.
|
|
46
|
+
* @param count - The number of logs to return.
|
|
47
|
+
*/
|
|
48
|
+
sogo(count: number): Promise<SGLog[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Endpoint for returning Watchdog Logs.
|
|
51
|
+
* @param count - The number of logs to return.
|
|
52
|
+
*/
|
|
53
|
+
watchdog(count: number): Promise<WDLog[]>;
|
|
54
|
+
}
|
|
55
|
+
export declare function logEndpoints(bind: MailcowClient): LogEndpoints;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.logEndpoints = void 0;
|
|
4
|
-
function logEndpoints(bind) {
|
|
5
|
-
return {
|
|
6
|
-
acme(count) {
|
|
7
|
-
return bind.requestFactory.get(`/api/v1/get/logs/acme/${count}`);
|
|
8
|
-
},
|
|
9
|
-
api(count) {
|
|
10
|
-
return bind.requestFactory.get(`/api/v1/get/logs/api/${count}`);
|
|
11
|
-
},
|
|
12
|
-
autodiscover(count) {
|
|
13
|
-
return bind.requestFactory.get(`/api/v1/get/logs/autodiscover/${count}`);
|
|
14
|
-
},
|
|
15
|
-
dovecot(count) {
|
|
16
|
-
return bind.requestFactory.get(`/api/v1/get/logs/dovecot/${count}`);
|
|
17
|
-
},
|
|
18
|
-
netfilter(count) {
|
|
19
|
-
return bind.requestFactory.get(`/api/v1/get/logs/netfilter/${count}`);
|
|
20
|
-
},
|
|
21
|
-
postfix(count) {
|
|
22
|
-
return bind.requestFactory.get(`/api/v1/get/logs/postfix/${count}`);
|
|
23
|
-
},
|
|
24
|
-
ratelimited(count) {
|
|
25
|
-
return bind.requestFactory.get(`/api/v1/get/logs/ratelimited/${count}`);
|
|
26
|
-
},
|
|
27
|
-
rspamd(count) {
|
|
28
|
-
return bind.requestFactory.get(`/api/v1/get/logs/rspamd-history/${count}`);
|
|
29
|
-
},
|
|
30
|
-
sogo(count) {
|
|
31
|
-
return bind.requestFactory.get(`/api/v1/get/logs/sogo/${count}`);
|
|
32
|
-
},
|
|
33
|
-
watchdog(count) {
|
|
34
|
-
return bind.requestFactory.get(`/api/v1/get/logs/watchdog/${count}`);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
exports.logEndpoints = logEndpoints;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logEndpoints = void 0;
|
|
4
|
+
function logEndpoints(bind) {
|
|
5
|
+
return {
|
|
6
|
+
acme(count) {
|
|
7
|
+
return bind.requestFactory.get(`/api/v1/get/logs/acme/${count}`);
|
|
8
|
+
},
|
|
9
|
+
api(count) {
|
|
10
|
+
return bind.requestFactory.get(`/api/v1/get/logs/api/${count}`);
|
|
11
|
+
},
|
|
12
|
+
autodiscover(count) {
|
|
13
|
+
return bind.requestFactory.get(`/api/v1/get/logs/autodiscover/${count}`);
|
|
14
|
+
},
|
|
15
|
+
dovecot(count) {
|
|
16
|
+
return bind.requestFactory.get(`/api/v1/get/logs/dovecot/${count}`);
|
|
17
|
+
},
|
|
18
|
+
netfilter(count) {
|
|
19
|
+
return bind.requestFactory.get(`/api/v1/get/logs/netfilter/${count}`);
|
|
20
|
+
},
|
|
21
|
+
postfix(count) {
|
|
22
|
+
return bind.requestFactory.get(`/api/v1/get/logs/postfix/${count}`);
|
|
23
|
+
},
|
|
24
|
+
ratelimited(count) {
|
|
25
|
+
return bind.requestFactory.get(`/api/v1/get/logs/ratelimited/${count}`);
|
|
26
|
+
},
|
|
27
|
+
rspamd(count) {
|
|
28
|
+
return bind.requestFactory.get(`/api/v1/get/logs/rspamd-history/${count}`);
|
|
29
|
+
},
|
|
30
|
+
sogo(count) {
|
|
31
|
+
return bind.requestFactory.get(`/api/v1/get/logs/sogo/${count}`);
|
|
32
|
+
},
|
|
33
|
+
watchdog(count) {
|
|
34
|
+
return bind.requestFactory.get(`/api/v1/get/logs/watchdog/${count}`);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.logEndpoints = logEndpoints;
|
|
39
39
|
//# sourceMappingURL=log-endpoints.js.map
|