mailisk 2.2.1 → 2.2.2

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.
Files changed (144) hide show
  1. package/package.json +1 -1
  2. package/private/dist/private/index.js +0 -28
  3. package/private/dist/private/index.js.map +0 -1
  4. package/private/dist/src/mailisk.interfaces.js +0 -3
  5. package/private/dist/src/mailisk.interfaces.js.map +0 -1
  6. package/private/dist/src/mailisk.js +0 -168
  7. package/private/dist/src/mailisk.js.map +0 -1
  8. package/private/index.ts +0 -17
  9. package/private/node_modules/.package-lock.json +0 -44
  10. package/private/node_modules/typescript/LICENSE.txt +0 -55
  11. package/private/node_modules/typescript/README.md +0 -50
  12. package/private/node_modules/typescript/SECURITY.md +0 -41
  13. package/private/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
  14. package/private/node_modules/typescript/bin/tsc +0 -2
  15. package/private/node_modules/typescript/bin/tsserver +0 -2
  16. package/private/node_modules/typescript/lib/_tsc.js +0 -133818
  17. package/private/node_modules/typescript/lib/_tsserver.js +0 -659
  18. package/private/node_modules/typescript/lib/_typingsInstaller.js +0 -222
  19. package/private/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
  20. package/private/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
  21. package/private/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
  22. package/private/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
  23. package/private/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
  24. package/private/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
  25. package/private/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
  26. package/private/node_modules/typescript/lib/lib.d.ts +0 -22
  27. package/private/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
  28. package/private/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
  29. package/private/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
  30. package/private/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
  31. package/private/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
  32. package/private/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
  33. package/private/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
  34. package/private/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
  35. package/private/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
  36. package/private/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
  37. package/private/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
  38. package/private/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
  39. package/private/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
  40. package/private/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
  41. package/private/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
  42. package/private/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
  43. package/private/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
  44. package/private/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
  45. package/private/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
  46. package/private/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
  47. package/private/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
  48. package/private/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
  49. package/private/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
  50. package/private/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
  51. package/private/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
  52. package/private/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
  53. package/private/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
  54. package/private/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
  55. package/private/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
  56. package/private/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
  57. package/private/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
  58. package/private/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
  59. package/private/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
  60. package/private/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
  61. package/private/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
  62. package/private/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
  63. package/private/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
  64. package/private/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
  65. package/private/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
  66. package/private/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
  67. package/private/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
  68. package/private/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
  69. package/private/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
  70. package/private/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
  71. package/private/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
  72. package/private/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
  73. package/private/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
  74. package/private/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
  75. package/private/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
  76. package/private/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
  77. package/private/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
  78. package/private/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
  79. package/private/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
  80. package/private/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
  81. package/private/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
  82. package/private/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
  83. package/private/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
  84. package/private/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
  85. package/private/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
  86. package/private/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
  87. package/private/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
  88. package/private/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
  89. package/private/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
  90. package/private/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
  91. package/private/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
  92. package/private/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
  93. package/private/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
  94. package/private/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
  95. package/private/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
  96. package/private/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
  97. package/private/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
  98. package/private/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
  99. package/private/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
  100. package/private/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
  101. package/private/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
  102. package/private/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
  103. package/private/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
  104. package/private/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
  105. package/private/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
  106. package/private/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
  107. package/private/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
  108. package/private/node_modules/typescript/lib/lib.es6.d.ts +0 -23
  109. package/private/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
  110. package/private/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
  111. package/private/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
  112. package/private/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
  113. package/private/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
  114. package/private/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
  115. package/private/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
  116. package/private/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
  117. package/private/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
  118. package/private/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
  119. package/private/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
  120. package/private/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
  121. package/private/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
  122. package/private/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
  123. package/private/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
  124. package/private/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
  125. package/private/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
  126. package/private/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
  127. package/private/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
  128. package/private/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
  129. package/private/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
  130. package/private/node_modules/typescript/lib/tsc.js +0 -8
  131. package/private/node_modules/typescript/lib/tsserver.js +0 -8
  132. package/private/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
  133. package/private/node_modules/typescript/lib/tsserverlibrary.js +0 -21
  134. package/private/node_modules/typescript/lib/typesMap.json +0 -497
  135. package/private/node_modules/typescript/lib/typescript.d.ts +0 -11437
  136. package/private/node_modules/typescript/lib/typescript.js +0 -200276
  137. package/private/node_modules/typescript/lib/typingsInstaller.js +0 -8
  138. package/private/node_modules/typescript/lib/watchGuard.js +0 -53
  139. package/private/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
  140. package/private/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
  141. package/private/node_modules/typescript/package.json +0 -120
  142. package/private/package-lock.json +0 -53
  143. package/private/package.json +0 -17
  144. package/private/tsconfig.json +0 -103
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailisk",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "description": "Mailisk library for NodeJS",
5
5
  "keywords": [
6
6
  "mailisk",
@@ -1,28 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const mailisk_1 = require("../src/mailisk");
13
- const mailisk = new mailisk_1.MailiskClient({ apiKey: "3vJHvcSDCowy0DDrXEs2DLrwJB0nSbw4PxGG_3370EI" });
14
- function main() {
15
- return __awaiter(this, void 0, void 0, function* () {
16
- // const namespaces = await mailisk.listNamespaces();
17
- // console.log(namespaces);
18
- // const response = await mailisk.searchInbox("test", { wait: false, from_timestamp: 0 });
19
- // console.log(response);
20
- const response = yield mailisk.getAttachment("0005b397-b313-4771-b543-298aac5cb19e");
21
- console.log(response);
22
- });
23
- }
24
- main().then(() => {
25
- console.log("done");
26
- process.exit(0);
27
- });
28
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,4CAA+C;AAE/C,MAAM,OAAO,GAAG,IAAI,uBAAa,CAAC,EAAE,MAAM,EAAE,6CAA6C,EAAE,CAAC,CAAC;AAE7F,SAAe,IAAI;;QACjB,qDAAqD;QACrD,2BAA2B;QAC3B,0FAA0F;QAC1F,yBAAyB;QACzB,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,aAAa,CAAC,sCAAsC,CAAC,CAAC;QACrF,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;CAAA;AAED,IAAI,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;IACf,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=mailisk.interfaces.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mailisk.interfaces.js","sourceRoot":"","sources":["../../../src/mailisk.interfaces.ts"],"names":[],"mappings":""}
@@ -1,168 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.MailiskClient = void 0;
16
- const axios_1 = __importDefault(require("axios"));
17
- const nodemailer_1 = __importDefault(require("nodemailer"));
18
- class MailiskClient {
19
- constructor({ apiKey, baseUrl, auth }) {
20
- this.axiosInstance = axios_1.default.create({
21
- headers: {
22
- "X-Api-Key": apiKey,
23
- },
24
- baseURL: baseUrl || "https://api.mailisk.com/",
25
- auth,
26
- });
27
- }
28
- /**
29
- * List all namespaces that belong to the current account (API key).
30
- */
31
- listNamespaces() {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- return (yield this.axiosInstance.get("api/namespaces")).data;
34
- });
35
- }
36
- /**
37
- * Send an email using the Virtual SMTP.
38
- *
39
- * These emails can only be sent to valid Mailisk namespaces, i.e. emails that end in @mynamespace.mailisk.net
40
- *
41
- * @example
42
- * For example, sending a test email:
43
- * ```typescript
44
- * client.sendVirtualEmail(namespace, {
45
- * from: "test@example.com",
46
- * to: `john@${namespace}.mailisk.net`,
47
- * subject: "This is a test",
48
- * text: "Testing",
49
- * });
50
- * ```
51
- */
52
- sendVirtualEmail(namespace, params) {
53
- return __awaiter(this, void 0, void 0, function* () {
54
- const smtpSettings = yield this.getSmtpSettings(namespace);
55
- const transport = nodemailer_1.default.createTransport({
56
- host: smtpSettings.data.host,
57
- port: smtpSettings.data.port,
58
- secure: false,
59
- auth: {
60
- user: smtpSettings.data.username,
61
- pass: smtpSettings.data.password,
62
- },
63
- });
64
- const { from, to, subject, text, html, headers, attachments } = params;
65
- yield transport.sendMail({
66
- from,
67
- to,
68
- subject,
69
- text,
70
- html,
71
- headers,
72
- attachments,
73
- });
74
- transport.close();
75
- });
76
- }
77
- /**
78
- * Search inbox of a namespace.
79
- *
80
- * By default, this calls the api using the `wait` flag. This means the call won't timeout until at least one email is received or 5 minutes pass.
81
- * It also uses a default `from_timestamp` of **current timestamp - 15 minutes**. This means that older emails will be ignored.
82
- *
83
- * Both of these settings can be overriden by passing them in the `params` object.
84
- *
85
- * @example
86
- * Get the latest emails
87
- * ```typescript
88
- * const { data: emails } = await client.searchInbox(namespace);
89
- * ```
90
- *
91
- * @example
92
- * Get the latest emails for a specific email address
93
- * ```typescript
94
- * const { data: emails } = await client.searchInbox(namespace, {
95
- * to_addr_prefix: 'john@mynamespace.mailisk.net'
96
- * });
97
- * ```
98
- *
99
- * @example
100
- * Get the last 20 emails in the namespace
101
- * ```typescript
102
- * const { data: emails } = await mailisk.searchInbox(namespace, {
103
- * wait: false,
104
- * from_timestamp: 0,
105
- * limit: 20
106
- * });
107
- * ```
108
- */
109
- searchInbox(namespace, params, config) {
110
- return __awaiter(this, void 0, void 0, function* () {
111
- let _params = Object.assign({}, params);
112
- // default from timestamp, 15 minutes before starting this request
113
- if ((params === null || params === void 0 ? void 0 : params.from_timestamp) === undefined || (params === null || params === void 0 ? void 0 : params.from_timestamp) === null) {
114
- _params.from_timestamp = Math.floor(new Date().getTime() / 1000) - 15 * 60;
115
- }
116
- // by default wait for email
117
- if ((params === null || params === void 0 ? void 0 : params.wait) !== false) {
118
- _params.wait = true;
119
- }
120
- let _config = Object.assign({}, config);
121
- if (!(config === null || config === void 0 ? void 0 : config.maxRedirects)) {
122
- _config.maxRedirects = 99999;
123
- }
124
- // by default, wait 5 minutes for emails before timing out
125
- if (_params.wait && !(config === null || config === void 0 ? void 0 : config.timeout)) {
126
- _config.timeout = 1000 * 60 * 5;
127
- }
128
- return (yield this.axiosInstance.get(`api/emails/${namespace}/inbox`, Object.assign(Object.assign({}, _config), { params: _params }))).data;
129
- });
130
- }
131
- /**
132
- * Get the SMTP settings for a namespace.
133
- */
134
- getSmtpSettings(namespace) {
135
- return __awaiter(this, void 0, void 0, function* () {
136
- const result = yield this.axiosInstance.get(`api/smtp/${namespace}`);
137
- return result.data;
138
- });
139
- }
140
- getAttachment(attachmentId) {
141
- return __awaiter(this, void 0, void 0, function* () {
142
- const result = yield this.axiosInstance.get(`api/attachments/${attachmentId}`);
143
- return result.data;
144
- });
145
- }
146
- /**
147
- * Download an attachment from an attachment ID.
148
- *
149
- * @example
150
- * Download an attachment from an email
151
- * ```typescript
152
- * const attachment = email.attachments[0];
153
- * const attachmentBuffer = await client.downloadAttachment(attachment.id);
154
- *
155
- * // save to file
156
- * fs.writeFileSync(attachment.filename, attachmentBuffer);
157
- * ```
158
- */
159
- downloadAttachment(attachmentId) {
160
- return __awaiter(this, void 0, void 0, function* () {
161
- const result = yield this.getAttachment(attachmentId);
162
- const response = yield axios_1.default.get(result.data.download_url, { responseType: "arraybuffer" });
163
- return Buffer.from(response.data);
164
- });
165
- }
166
- }
167
- exports.MailiskClient = MailiskClient;
168
- //# sourceMappingURL=mailisk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mailisk.js","sourceRoot":"","sources":["../../../src/mailisk.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAAyE;AASzE,4DAAoC;AAEpC,MAAa,aAAa;IACxB,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAsE;QACvG,IAAI,CAAC,aAAa,GAAG,eAAK,CAAC,MAAM,CAAC;YAChC,OAAO,EAAE;gBACP,WAAW,EAAE,MAAM;aACpB;YACD,OAAO,EAAE,OAAO,IAAI,0BAA0B;YAC9C,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAID;;OAEG;IACG,cAAc;;YAClB,OAAO,CAAC,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC;QAC/D,CAAC;KAAA;IAED;;;;;;;;;;;;;;;OAeG;IACG,gBAAgB,CAAC,SAAiB,EAAE,MAA8B;;YACtE,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;YAE3D,MAAM,SAAS,GAAG,oBAAU,CAAC,eAAe,CAAC;gBAC3C,IAAI,EAAE,YAAY,CAAC,IAAI,CAAC,IAAI;gBAC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-1,17 +0,0 @@
1
- import { MailiskClient } from "../src/mailisk";
2
-
3
- const mailisk = new MailiskClient({ apiKey: "3vJHvcSDCowy0DDrXEs2DLrwJB0nSbw4PxGG_3370EI" });
4
-
5
- async function main() {
6
- // const namespaces = await mailisk.listNamespaces();
7
- // console.log(namespaces);
8
- // const response = await mailisk.searchInbox("test", { wait: false, from_timestamp: 0 });
9
- // console.log(response);
10
- const response = await mailisk.getAttachment("0005b397-b313-4771-b543-298aac5cb19e");
11
- console.log(response);
12
- }
13
-
14
- main().then(() => {
15
- console.log("done");
16
- process.exit(0);
17
- });
@@ -1,44 +0,0 @@
1
- {
2
- "name": "private",
3
- "version": "1.0.0",
4
- "lockfileVersion": 3,
5
- "requires": true,
6
- "packages": {
7
- "..": {
8
- "name": "mailisk",
9
- "version": "2.1.1",
10
- "license": "ISC",
11
- "dependencies": {
12
- "axios": "^1.1.2",
13
- "nodemailer": "^6.8.0"
14
- },
15
- "devDependencies": {
16
- "@types/jest": "^29.5.14",
17
- "@types/nodemailer": "^6.4.6",
18
- "dotenv": "^16.4.7",
19
- "jest": "^29.7.0",
20
- "jest-mock-axios": "^4.8.0",
21
- "ts-jest": "^29.2.6",
22
- "tsup": "^6.2.3",
23
- "typescript": "^4.9.5"
24
- }
25
- },
26
- "node_modules/mailisk": {
27
- "resolved": "..",
28
- "link": true
29
- },
30
- "node_modules/typescript": {
31
- "version": "5.9.3",
32
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
33
- "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
34
- "license": "Apache-2.0",
35
- "bin": {
36
- "tsc": "bin/tsc",
37
- "tsserver": "bin/tsserver"
38
- },
39
- "engines": {
40
- "node": ">=14.17"
41
- }
42
- }
43
- }
44
- }
@@ -1,55 +0,0 @@
1
- Apache License
2
-
3
- Version 2.0, January 2004
4
-
5
- http://www.apache.org/licenses/
6
-
7
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
-
9
- 1. Definitions.
10
-
11
- "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
-
17
- "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
-
19
- "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
-
21
- "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
-
23
- "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
-
25
- "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
-
27
- "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
-
29
- "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
-
31
- 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
32
-
33
- 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
34
-
35
- 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
36
-
37
- You must give any other recipients of the Work or Derivative Works a copy of this License; and
38
-
39
- You must cause any modified files to carry prominent notices stating that You changed the files; and
40
-
41
- You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
42
-
43
- If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
44
-
45
- 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
46
-
47
- 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
48
-
49
- 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
50
-
51
- 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
52
-
53
- 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
54
-
55
- END OF TERMS AND CONDITIONS
@@ -1,50 +0,0 @@
1
-
2
- # TypeScript
3
-
4
- [![CI](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml)
5
- [![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
6
- [![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
7
- [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)
8
-
9
-
10
- [TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
11
-
12
- Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/).
13
-
14
- ## Installing
15
-
16
- For the latest stable version:
17
-
18
- ```bash
19
- npm install -D typescript
20
- ```
21
-
22
- For our nightly builds:
23
-
24
- ```bash
25
- npm install -D typescript@next
26
- ```
27
-
28
- ## Contribute
29
-
30
- There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript.
31
- * [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
32
- * Review the [source code changes](https://github.com/microsoft/TypeScript/pulls).
33
- * Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
34
- * Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
35
- * Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
36
- * [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md).
37
-
38
- This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
39
- the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
40
- with any additional questions or comments.
41
-
42
- ## Documentation
43
-
44
- * [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
45
- * [Programming handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
46
- * [Homepage](https://www.typescriptlang.org/)
47
-
48
- ## Roadmap
49
-
50
- For details on our planned features and future direction, please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).
@@ -1,41 +0,0 @@
1
- <!-- BEGIN MICROSOFT SECURITY.MD V0.0.9 BLOCK -->
2
-
3
- ## Security
4
-
5
- Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet) and [Xamarin](https://github.com/xamarin).
6
-
7
- If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/security.md/definition), please report it to us as described below.
8
-
9
- ## Reporting Security Issues
10
-
11
- **Please do not report security vulnerabilities through public GitHub issues.**
12
-
13
- Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/security.md/msrc/create-report).
14
-
15
- If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/security.md/msrc/pgp).
16
-
17
- You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18
-
19
- Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20
-
21
- * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22
- * Full paths of source file(s) related to the manifestation of the issue
23
- * The location of the affected source code (tag/branch/commit or direct URL)
24
- * Any special configuration required to reproduce the issue
25
- * Step-by-step instructions to reproduce the issue
26
- * Proof-of-concept or exploit code (if possible)
27
- * Impact of the issue, including how an attacker might exploit the issue
28
-
29
- This information will help us triage your report more quickly.
30
-
31
- If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/security.md/msrc/bounty) page for more details about our active programs.
32
-
33
- ## Preferred Languages
34
-
35
- We prefer all communications to be in English.
36
-
37
- ## Policy
38
-
39
- Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/security.md/cvd).
40
-
41
- <!-- END MICROSOFT SECURITY.MD BLOCK -->