ts-mailcow-api 0.8.5 → 0.9.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/LICENSE +661 -661
- package/dist/Endpoints/alias-endpoints.js +1 -2
- package/dist/Endpoints/alias-endpoints.js.map +1 -1
- package/dist/Endpoints/antispam-endpoints.js +1 -2
- package/dist/Endpoints/antispam-endpoints.js.map +1 -1
- package/dist/Endpoints/domain-endpoints.js +1 -2
- package/dist/Endpoints/domain-endpoints.js.map +1 -1
- package/dist/Endpoints/forwarding-endpoints.js +1 -2
- package/dist/Endpoints/forwarding-endpoints.js.map +1 -1
- package/dist/Endpoints/log-endpoints.js +1 -2
- package/dist/Endpoints/log-endpoints.js.map +1 -1
- package/dist/Endpoints/mailbox-endpoint.js +1 -2
- package/dist/Endpoints/mailbox-endpoint.js.map +1 -1
- package/dist/Endpoints/syncjob-endpoints.js +1 -2
- package/dist/Endpoints/syncjob-endpoints.js.map +1 -1
- package/dist/request-factory.js +1 -2
- package/dist/request-factory.js.map +1 -1
- package/package.json +59 -59
- package/src/Endpoints/alias-endpoints.ts +71 -71
- package/src/types.ts +1393 -1393
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aliasEndpoints =
|
|
3
|
+
exports.aliasEndpoints = aliasEndpoints;
|
|
4
4
|
const request_factory_1 = require("../request-factory");
|
|
5
5
|
/**
|
|
6
6
|
* Binder function between the MailcowClient class and the AliasEndpoints.
|
|
@@ -23,5 +23,4 @@ function aliasEndpoints(bind) {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
exports.aliasEndpoints = aliasEndpoints;
|
|
27
26
|
//# sourceMappingURL=alias-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/alias-endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"alias-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/alias-endpoints.ts"],"names":[],"mappings":";;AA4CA,wCA0BC;AA9DD,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.antiSpamEndpoints =
|
|
3
|
+
exports.antiSpamEndpoints = antiSpamEndpoints;
|
|
4
4
|
/**
|
|
5
5
|
* Binder function between the MailcowClient class and the AntiSpamEndpoints
|
|
6
6
|
* @param bind - The MailcowClient to bind.
|
|
@@ -19,5 +19,4 @@ function antiSpamEndpoints(bind) {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
exports.antiSpamEndpoints = antiSpamEndpoints;
|
|
23
22
|
//# sourceMappingURL=antispam-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antispam-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/antispam-endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"antispam-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/antispam-endpoints.ts"],"names":[],"mappings":";;AAsCA,8CAoBC;AAzBD;;;;GAIG;AACH,SAAgB,iBAAiB,CAAC,IAAmB;IACnD,OAAO;QACL,MAAM,CAAC,OAA8B;YACnC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,2BAA2B,EAC3B,OAAO,CACR,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,OAAgC;YACrC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,8BAA8B,EAC9B,OAAO,CAAC,MAAM,CACf,CAAC;QACJ,CAAC;QACD,GAAG,CAAC,OAA6B;YAC/B,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAC5B,sBAAuB,OAAO,CAAC,IAAK,WAAY,OAAO,CAAC,MAAO,EAAE,CAClE,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.domainEndpoints =
|
|
3
|
+
exports.domainEndpoints = domainEndpoints;
|
|
4
4
|
const request_factory_1 = require("../request-factory");
|
|
5
5
|
/**
|
|
6
6
|
* Binder function between the MailcowClient class and the DomainEndpoints.
|
|
@@ -23,5 +23,4 @@ function domainEndpoints(bind) {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
exports.domainEndpoints = domainEndpoints;
|
|
27
26
|
//# sourceMappingURL=domain-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/domain-endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"domain-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/domain-endpoints.ts"],"names":[],"mappings":";;AA4CA,0CA4BC;AAhED,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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.forwardingEndpoints =
|
|
3
|
+
exports.forwardingEndpoints = forwardingEndpoints;
|
|
4
4
|
/**
|
|
5
5
|
* Binder function between the MailcowClient class and the ForwardingEndpoints.
|
|
6
6
|
* @param bind - The MailcowClient to bind.
|
|
@@ -19,5 +19,4 @@ function forwardingEndpoints(bind) {
|
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
exports.forwardingEndpoints = forwardingEndpoints;
|
|
23
22
|
//# sourceMappingURL=forwarding-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forwarding-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/forwarding-endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"forwarding-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/forwarding-endpoints.ts"],"names":[],"mappings":";;AA8BA,kDAoBC;AAzBD;;;;GAIG;AACH,SAAgB,mBAAmB,CAAC,IAAmB;IACrD,OAAO;QACL,MAAM,CAAC,OAAgC;YACrC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,wBAAwB,EACxB,OAAO,CAAC,KAAK,CACd,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,OAAgC;YACrC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,qBAAqB,EACrB,OAAO,CACR,CAAC;QACJ,CAAC;QACD,MAAM;YACJ,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAC5B,yBAAyB,CAC1B,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.logEndpoints =
|
|
3
|
+
exports.logEndpoints = logEndpoints;
|
|
4
4
|
function logEndpoints(bind) {
|
|
5
5
|
return {
|
|
6
6
|
acme(count) {
|
|
@@ -35,5 +35,4 @@ function logEndpoints(bind) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
exports.logEndpoints = logEndpoints;
|
|
39
38
|
//# sourceMappingURL=log-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/log-endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"log-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/log-endpoints.ts"],"names":[],"mappings":";;AA4EA,oCAqDC;AArDD,SAAgB,YAAY,CAAC,IAAmB;IAC9C,OAAO;QACL,IAAI,CAAC,K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
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mailboxEndpoints =
|
|
3
|
+
exports.mailboxEndpoints = mailboxEndpoints;
|
|
4
4
|
const request_factory_1 = require("../request-factory");
|
|
5
5
|
/**
|
|
6
6
|
* Binder function between the MailcowClient class and the MailboxEndpoints
|
|
@@ -38,5 +38,4 @@ function mailboxEndpoints(bind) {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
exports.mailboxEndpoints = mailboxEndpoints;
|
|
42
41
|
//# sourceMappingURL=mailbox-endpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mailbox-endpoint.js","sourceRoot":"","sources":["../../src/Endpoints/mailbox-endpoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mailbox-endpoint.js","sourceRoot":"","sources":["../../src/Endpoints/mailbox-endpoint.ts"],"names":[],"mappings":";;AA8EA,4CAgEC;AAlID,wDAAwD;AA6DxD;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,IAAmB;IAClD,OAAO;QACL,MAAM,CAAC,OAA2B;YAChC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,qBAAqB,EACrB,OAAO,CACR,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,OAA6B;YAClC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,wBAAwB,EACxB,OAAO,CAAC,SAAS,CAClB,CAAC;QACJ,CAAC;QAED,IAAI,CAAC,OAA2B;YAC9B,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,sBAAsB,EACtB,OAAO,CACR,CAAC;QACJ,CAAC;QAED,GAAG,CAAC,UAAkB,KAAK;YACzB,OAAO,IAAA,oCAAkB,EACvB,IAAI,CAAC,cAAc,CAAC,GAAG,CACrB,uBAAwB,OAAQ,EAAE,CAAC,CACtC,CAAC;QACJ,CAAC;QAED,YAAY,CAAC,OAA4B;YACvC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,uBAAuB,EACvB,OAAO,CACR,CAAC;QACJ,CAAC;QAED,cAAc,CAAC,OAA+B;YAC5C,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,sCAAsC,EACtC,OAAO,CACR,CAAC;QACJ,CAAC;QAED,aAAa,CAAC,OAA6B;YACzC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,yBAAyB,EACzB,OAAO,CACR,CAAC;QACJ,CAAC;QAED,WAAW,CAAC,OAAuB;YACjC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,uBAAuB,EACvB,OAAO,CACR,CAAC;QACJ,CAAC;QAED,kBAAkB,CAAC,OAAe;YAChC,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAC5B,iCAAkC,OAAQ,EAAE,CAC7C,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.syncjobEndpoints =
|
|
3
|
+
exports.syncjobEndpoints = syncjobEndpoints;
|
|
4
4
|
function syncjobEndpoints(bind) {
|
|
5
5
|
return {
|
|
6
6
|
getAll() {
|
|
@@ -17,5 +17,4 @@ function syncjobEndpoints(bind) {
|
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
exports.syncjobEndpoints = syncjobEndpoints;
|
|
21
20
|
//# sourceMappingURL=syncjob-endpoints.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncjob-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/syncjob-endpoints.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"syncjob-endpoints.js","sourceRoot":"","sources":["../../src/Endpoints/syncjob-endpoints.ts"],"names":[],"mappings":";;AA4BA,4CA0BC;AA1BD,SAAgB,gBAAgB,CAAC,IAAmB;IAClD,OAAO;QACL,MAAM;YACJ,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG,CAC5B,iCAAiC,CAClC,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,OAA2B;YAChC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,qBAAqB,EACrB,OAAO,CACR,CAAC;QACJ,CAAC;QACD,IAAI,CAAC,OAA6B;YAChC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,sBAAsB,EACtB,OAAO,CACR,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,OAA6B;YAClC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAC7B,wBAAwB,EACxB,OAAO,CAAC,KAAK,CACd,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/request-factory.js
CHANGED
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.wrapPromiseToArray =
|
|
12
|
+
exports.wrapPromiseToArray = wrapPromiseToArray;
|
|
13
13
|
const axios_1 = require("axios");
|
|
14
14
|
const types_1 = require("./types");
|
|
15
15
|
/**
|
|
@@ -32,7 +32,6 @@ function wrapPromiseToArray(promise) {
|
|
|
32
32
|
.catch((err) => reject(err));
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
exports.wrapPromiseToArray = wrapPromiseToArray;
|
|
36
35
|
/**
|
|
37
36
|
* Factory method patterns for creating Axios Requests.
|
|
38
37
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-factory.js","sourceRoot":"","sources":["../src/request-factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"request-factory.js","sourceRoot":"","sources":["../src/request-factory.ts"],"names":[],"mappings":";;;;;;;;;;;AAkBA,gDAMC;AAxBD,iCAAyD;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C;YACP,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;IAED;;;OAGG;IACG,GAAG,CAAI,KAAa;;YACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,eAAK;qBACF,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;oBACjD,YAAY;qBACX,IAAI,CAAC,CAAC,GAAqB,EAAE,EAAE;oBAC9B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACpB,CAAC,CAAC;oBACF,WAAW;qBACV,KAAK,CAAC,CAAC,CAAmC,EAAE,EAAE;oBAC7C,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;oBAChC,MAAM,CAAC,IAAI,wBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF;AA/CD,iCA+CC"}
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ts-mailcow-api",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "TypeScript wrapper for the mailcow API.",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "ts-mocha ./test/**/*.test.ts",
|
|
7
|
-
"lint": "eslint --fix ./src/**/*.ts",
|
|
8
|
-
"docs": "typedoc",
|
|
9
|
-
"build": "tsc",
|
|
10
|
-
"prepare": "tsc",
|
|
11
|
-
"postpublish": "git add package.json && git tag v%npm_package_version% && git commit -m \"Version update.\" && git push --tags"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/JustSamuel/ts-mailcow-api.git"
|
|
16
|
-
},
|
|
17
|
-
"bugs": {
|
|
18
|
-
"url": "https://github.com/JustSamuel/ts-mailcow-api/issues"
|
|
19
|
-
},
|
|
20
|
-
"homepage": "https://github.com/JustSamuel/ts-mailcow-api#readme",
|
|
21
|
-
"author": "Samuel",
|
|
22
|
-
"files": [
|
|
23
|
-
"src",
|
|
24
|
-
"dist",
|
|
25
|
-
"index.js"
|
|
26
|
-
],
|
|
27
|
-
"keywords": [
|
|
28
|
-
"mailcow",
|
|
29
|
-
"typescript",
|
|
30
|
-
"API"
|
|
31
|
-
],
|
|
32
|
-
"typings": "./dist/index.d.ts",
|
|
33
|
-
"license": "ISC",
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"@types/chai": "^4.2.18",
|
|
36
|
-
"@types/mocha": "^8.2.2",
|
|
37
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
38
|
-
"@typescript-eslint/parser": "^
|
|
39
|
-
"chai": "^4.3.4",
|
|
40
|
-
"eslint": "^
|
|
41
|
-
"eslint-config-prettier": "^
|
|
42
|
-
"eslint-config-standard": "^
|
|
43
|
-
"eslint-config-typescript": "^3.0.0",
|
|
44
|
-
"eslint-plugin-import": "^2.23.2",
|
|
45
|
-
"eslint-plugin-node": "^11.1.0",
|
|
46
|
-
"eslint-plugin-prettier": "^
|
|
47
|
-
"eslint-plugin-promise": "^
|
|
48
|
-
"mocha": "^10.
|
|
49
|
-
"prettier": "^3.
|
|
50
|
-
"ts-mocha": "^
|
|
51
|
-
"ts-node": "^10.9.2",
|
|
52
|
-
"typedoc": "^0.
|
|
53
|
-
"typedoc-plugin-merge-modules": "^
|
|
54
|
-
"typescript": "^5.
|
|
55
|
-
},
|
|
56
|
-
"dependencies": {
|
|
57
|
-
"axios": "^1.
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ts-mailcow-api",
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "TypeScript wrapper for the mailcow API.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "ts-mocha ./test/**/*.test.ts",
|
|
7
|
+
"lint": "eslint --fix ./src/**/*.ts",
|
|
8
|
+
"docs": "typedoc",
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepare": "tsc",
|
|
11
|
+
"postpublish": "git add package.json && git tag v%npm_package_version% && git commit -m \"Version update.\" && git push --tags"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/JustSamuel/ts-mailcow-api.git"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/JustSamuel/ts-mailcow-api/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://github.com/JustSamuel/ts-mailcow-api#readme",
|
|
21
|
+
"author": "Samuel",
|
|
22
|
+
"files": [
|
|
23
|
+
"src",
|
|
24
|
+
"dist",
|
|
25
|
+
"index.js"
|
|
26
|
+
],
|
|
27
|
+
"keywords": [
|
|
28
|
+
"mailcow",
|
|
29
|
+
"typescript",
|
|
30
|
+
"API"
|
|
31
|
+
],
|
|
32
|
+
"typings": "./dist/index.d.ts",
|
|
33
|
+
"license": "ISC",
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/chai": "^4.2.18",
|
|
36
|
+
"@types/mocha": "^8.2.2",
|
|
37
|
+
"@typescript-eslint/eslint-plugin": "^8.7.0",
|
|
38
|
+
"@typescript-eslint/parser": "^8.7.0",
|
|
39
|
+
"chai": "^4.3.4",
|
|
40
|
+
"eslint": "^9.11.1",
|
|
41
|
+
"eslint-config-prettier": "^9.1.0",
|
|
42
|
+
"eslint-config-standard": "^17.1.0",
|
|
43
|
+
"eslint-config-typescript": "^3.0.0",
|
|
44
|
+
"eslint-plugin-import": "^2.23.2",
|
|
45
|
+
"eslint-plugin-node": "^11.1.0",
|
|
46
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
47
|
+
"eslint-plugin-promise": "^7.1.0",
|
|
48
|
+
"mocha": "^10.1.0",
|
|
49
|
+
"prettier": "^3.3.3",
|
|
50
|
+
"ts-mocha": "^8.0.0",
|
|
51
|
+
"ts-node": "^10.9.2",
|
|
52
|
+
"typedoc": "^0.26.7",
|
|
53
|
+
"typedoc-plugin-merge-modules": "^6.0.1",
|
|
54
|
+
"typescript": "^5.6.2"
|
|
55
|
+
},
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"axios": "^1.7.7"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Alias,
|
|
3
|
-
AliasDeleteRequest,
|
|
4
|
-
AliasPostRequest,
|
|
5
|
-
AliasEditRequest,
|
|
6
|
-
MailcowResponse
|
|
7
|
-
} from '../types';
|
|
8
|
-
import MailcowClient from '../index';
|
|
9
|
-
import { wrapPromiseToArray } from '../request-factory';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Interface for all Alias endpoints.
|
|
13
|
-
*/
|
|
14
|
-
export interface AliasEndpoints {
|
|
15
|
-
/**
|
|
16
|
-
* Endpoint for getting mailbox aliases in the system.
|
|
17
|
-
* @param id - The id of the alias you want to get. Use 'all' to retrieve all aliases in the system.
|
|
18
|
-
*/
|
|
19
|
-
get(id?: number | 'all'): Promise<Alias[]>;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Endpoint for creating mailbox aliases.
|
|
23
|
-
* @param payload - The creation payload.
|
|
24
|
-
*/
|
|
25
|
-
create(payload: AliasPostRequest): Promise<MailcowResponse>;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Endpoint for editing a mailbox alias.
|
|
29
|
-
* @param payload - The edit payload.
|
|
30
|
-
*/
|
|
31
|
-
edit(payload: AliasEditRequest): Promise<MailcowResponse>;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Endpoint for deleting a mailbox alias.
|
|
35
|
-
* @param payload - The deletion payload.
|
|
36
|
-
*/
|
|
37
|
-
delete(payload: AliasDeleteRequest): Promise<MailcowResponse>;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Binder function between the MailcowClient class and the AliasEndpoints.
|
|
42
|
-
* @param bind - The MailcowClient to bind.
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
export function aliasEndpoints(bind: MailcowClient): AliasEndpoints {
|
|
46
|
-
return {
|
|
47
|
-
get(id = 'all'): Promise<Alias[]> {
|
|
48
|
-
return wrapPromiseToArray<Alias>(
|
|
49
|
-
bind.requestFactory.get<Alias[] | Alias>(`/api/v1/get/alias/${id}`)
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
create: (payload: AliasPostRequest): Promise<MailcowResponse> => {
|
|
53
|
-
return bind.requestFactory.post<MailcowResponse>(
|
|
54
|
-
'/api/v1/add/alias',
|
|
55
|
-
payload
|
|
56
|
-
);
|
|
57
|
-
},
|
|
58
|
-
edit: (payload: AliasEditRequest): Promise<MailcowResponse> => {
|
|
59
|
-
return bind.requestFactory.post<MailcowResponse>(
|
|
60
|
-
'/api/v1/edit/alias',
|
|
61
|
-
payload
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
delete: (payload: AliasDeleteRequest): Promise<MailcowResponse> => {
|
|
65
|
-
return bind.requestFactory.post<MailcowResponse>(
|
|
66
|
-
'/api/v1/delete/alias',
|
|
67
|
-
payload.items
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
Alias,
|
|
3
|
+
AliasDeleteRequest,
|
|
4
|
+
AliasPostRequest,
|
|
5
|
+
AliasEditRequest,
|
|
6
|
+
MailcowResponse
|
|
7
|
+
} from '../types';
|
|
8
|
+
import MailcowClient from '../index';
|
|
9
|
+
import { wrapPromiseToArray } from '../request-factory';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Interface for all Alias endpoints.
|
|
13
|
+
*/
|
|
14
|
+
export interface AliasEndpoints {
|
|
15
|
+
/**
|
|
16
|
+
* Endpoint for getting mailbox aliases in the system.
|
|
17
|
+
* @param id - The id of the alias you want to get. Use 'all' to retrieve all aliases in the system.
|
|
18
|
+
*/
|
|
19
|
+
get(id?: number | 'all'): Promise<Alias[]>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Endpoint for creating mailbox aliases.
|
|
23
|
+
* @param payload - The creation payload.
|
|
24
|
+
*/
|
|
25
|
+
create(payload: AliasPostRequest): Promise<MailcowResponse>;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Endpoint for editing a mailbox alias.
|
|
29
|
+
* @param payload - The edit payload.
|
|
30
|
+
*/
|
|
31
|
+
edit(payload: AliasEditRequest): Promise<MailcowResponse>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Endpoint for deleting a mailbox alias.
|
|
35
|
+
* @param payload - The deletion payload.
|
|
36
|
+
*/
|
|
37
|
+
delete(payload: AliasDeleteRequest): Promise<MailcowResponse>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Binder function between the MailcowClient class and the AliasEndpoints.
|
|
42
|
+
* @param bind - The MailcowClient to bind.
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export function aliasEndpoints(bind: MailcowClient): AliasEndpoints {
|
|
46
|
+
return {
|
|
47
|
+
get(id = 'all'): Promise<Alias[]> {
|
|
48
|
+
return wrapPromiseToArray<Alias>(
|
|
49
|
+
bind.requestFactory.get<Alias[] | Alias>(`/api/v1/get/alias/${id}`)
|
|
50
|
+
);
|
|
51
|
+
},
|
|
52
|
+
create: (payload: AliasPostRequest): Promise<MailcowResponse> => {
|
|
53
|
+
return bind.requestFactory.post<MailcowResponse>(
|
|
54
|
+
'/api/v1/add/alias',
|
|
55
|
+
payload
|
|
56
|
+
);
|
|
57
|
+
},
|
|
58
|
+
edit: (payload: AliasEditRequest): Promise<MailcowResponse> => {
|
|
59
|
+
return bind.requestFactory.post<MailcowResponse>(
|
|
60
|
+
'/api/v1/edit/alias',
|
|
61
|
+
payload
|
|
62
|
+
);
|
|
63
|
+
},
|
|
64
|
+
delete: (payload: AliasDeleteRequest): Promise<MailcowResponse> => {
|
|
65
|
+
return bind.requestFactory.post<MailcowResponse>(
|
|
66
|
+
'/api/v1/delete/alias',
|
|
67
|
+
payload.items
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|