mailpit-api 1.3.0 → 1.4.0-alpha
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/{mjs/index.d.ts → index.d.mts} +38 -25
- package/dist/{cjs/index.d.ts → index.d.ts} +38 -25
- package/dist/index.js +571 -0
- package/dist/index.mjs +538 -0
- package/package.json +13 -13
- package/dist/cjs/index.js +0 -562
- package/dist/cjs/package.json +0 -3
- package/dist/mjs/index.js +0 -464
- package/dist/mjs/package.json +0 -3
- package/src/index.ts +0 -1051
- package/tsconfig-base.json +0 -25
- package/tsconfig-cjs.json +0 -8
- package/tsconfig.json +0 -8
- package/typedoc.json +0 -11
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/** Represents a name and email address for a request. */
|
|
2
|
-
|
|
2
|
+
interface MailpitEmailAddressRequest {
|
|
3
3
|
/** Email address */
|
|
4
4
|
Email: string;
|
|
5
5
|
/** Optional name associated with the email address */
|
|
6
6
|
Name?: string;
|
|
7
7
|
}
|
|
8
8
|
/** Represents a name and email address from a response. */
|
|
9
|
-
|
|
9
|
+
interface MailpitEmailAddressResponse {
|
|
10
10
|
/** Email address */
|
|
11
11
|
Address: string;
|
|
12
12
|
/** Name associated with the email address */
|
|
13
13
|
Name: string;
|
|
14
14
|
}
|
|
15
15
|
/** Represents an attachment for a request. */
|
|
16
|
-
|
|
16
|
+
interface MailpitAttachmentRequest {
|
|
17
17
|
/** Base64-encoded string for the file content */
|
|
18
18
|
Content: string;
|
|
19
19
|
/** Optional Content-ID (cid) for attachment. If this field is set then the file is attached inline. */
|
|
@@ -24,7 +24,7 @@ export interface MailpitAttachmentRequest {
|
|
|
24
24
|
Filename: string;
|
|
25
25
|
}
|
|
26
26
|
/** Represents an attachment from a response. */
|
|
27
|
-
|
|
27
|
+
interface MailpitAttachmentResponse {
|
|
28
28
|
/** Content ID */
|
|
29
29
|
ContentID: string;
|
|
30
30
|
/** Content type */
|
|
@@ -37,29 +37,29 @@ export interface MailpitAttachmentResponse {
|
|
|
37
37
|
Size: number;
|
|
38
38
|
}
|
|
39
39
|
/** Represents information about a Chaos trigger */
|
|
40
|
-
|
|
40
|
+
interface MailpitChaosTrigger {
|
|
41
41
|
/** SMTP error code to return. The value must range from 400 to 599. */
|
|
42
42
|
ErrorCode: number;
|
|
43
43
|
/** Probability (chance) of triggering the error. The value must range from 0 to 100. */
|
|
44
44
|
Probability: number;
|
|
45
45
|
}
|
|
46
46
|
/** Common request parameters for APIs with a search query */
|
|
47
|
-
|
|
47
|
+
interface MailpitSearchRequest extends MailpitTimeZoneRequest {
|
|
48
48
|
/** {@link https://mailpit.axllent.org/docs/usage/search-filters/ | Search query} */
|
|
49
49
|
query: string;
|
|
50
50
|
}
|
|
51
51
|
/** Common request parameters for APIs with a search query and time zone option */
|
|
52
|
-
|
|
52
|
+
interface MailpitTimeZoneRequest {
|
|
53
53
|
/** {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | Timezone identifier} used only for `before:` & `after:` searches (eg: "Pacific/Auckland"). */
|
|
54
54
|
tz?: string;
|
|
55
55
|
}
|
|
56
56
|
/** Common request parameters for APIs requiring a list of message database IDs */
|
|
57
|
-
|
|
57
|
+
interface MailpitDatabaseIDsRequest {
|
|
58
58
|
/** Array of message database IDs */
|
|
59
59
|
IDs?: string[];
|
|
60
60
|
}
|
|
61
61
|
/** Response for the {@link MailpitClient.getInfo | getInfo()} API containing information about the Mailpit instance. */
|
|
62
|
-
|
|
62
|
+
interface MailpitInfoResponse {
|
|
63
63
|
/** Database path */
|
|
64
64
|
Database: string;
|
|
65
65
|
/** Datacase size in bytes */
|
|
@@ -96,7 +96,7 @@ export interface MailpitInfoResponse {
|
|
|
96
96
|
Version: string;
|
|
97
97
|
}
|
|
98
98
|
/** Response for the {@link MailpitClient.getConfiguration| getConfiguraton()} API containing configuration for the Mailpit web UI. */
|
|
99
|
-
|
|
99
|
+
interface MailpitConfigurationResponse {
|
|
100
100
|
/** Whether Chaos support is enabled at runtime */
|
|
101
101
|
ChaosEnabled: boolean;
|
|
102
102
|
/** Whether messages with duplicate IDs are ignored */
|
|
@@ -121,7 +121,7 @@ export interface MailpitConfigurationResponse {
|
|
|
121
121
|
SpamAssassin: boolean;
|
|
122
122
|
}
|
|
123
123
|
/** Response for the {@link MailpitClient.getMessageSummary| getMessageSummary()} API containing the summary of a message */
|
|
124
|
-
|
|
124
|
+
interface MailpitMessageSummaryResponse {
|
|
125
125
|
/** Message Attachmets */
|
|
126
126
|
Attachments: MailpitAttachmentResponse[];
|
|
127
127
|
/** BCC addresses */
|
|
@@ -138,6 +138,17 @@ export interface MailpitMessageSummaryResponse {
|
|
|
138
138
|
ID: string;
|
|
139
139
|
/** Inline message attachements */
|
|
140
140
|
Inline: MailpitEmailAddressResponse[];
|
|
141
|
+
/** ListUnsubscribe contains a summary of List-Unsubscribe & List-Unsubscribe-Post headers including validation of the link structure */
|
|
142
|
+
ListUnsubscribe: {
|
|
143
|
+
/** Validation errors (if any) */
|
|
144
|
+
Errors: string;
|
|
145
|
+
/** List-Unsubscrobe header value */
|
|
146
|
+
Header: string;
|
|
147
|
+
/** List-Unsubscribe-Post valie (if set) */
|
|
148
|
+
HeaderPost: string;
|
|
149
|
+
/** Detected links, maximum one email and one HTTP(S) link */
|
|
150
|
+
Links: string[];
|
|
151
|
+
};
|
|
141
152
|
/** Message ID */
|
|
142
153
|
MessageID: string;
|
|
143
154
|
/** ReplyTo addresses */
|
|
@@ -156,7 +167,7 @@ export interface MailpitMessageSummaryResponse {
|
|
|
156
167
|
To: MailpitEmailAddressResponse[];
|
|
157
168
|
}
|
|
158
169
|
/** Response for the {@link MailpitClient.listMessages| listMessages()} API containing the summary of multiple messages. */
|
|
159
|
-
|
|
170
|
+
interface MailpitMessagesSummaryResponse {
|
|
160
171
|
/** Messages */
|
|
161
172
|
messages: {
|
|
162
173
|
/** The number of attachments */
|
|
@@ -202,12 +213,12 @@ export interface MailpitMessagesSummaryResponse {
|
|
|
202
213
|
unread: number;
|
|
203
214
|
}
|
|
204
215
|
/** Response for the {@link MailpitClient.getMessageHeaders | getMessageHeaders()} API containing message headers */
|
|
205
|
-
|
|
216
|
+
interface MailpitMessageHeadersResponse {
|
|
206
217
|
/** Message headers */
|
|
207
218
|
[key: string]: [string];
|
|
208
219
|
}
|
|
209
220
|
/** Request parameters for the {@link MailpitClient.sendMessage | sendMessage()} API. */
|
|
210
|
-
|
|
221
|
+
interface MailpitSendRequest {
|
|
211
222
|
/** Attachments */
|
|
212
223
|
Attachments?: MailpitAttachmentRequest[];
|
|
213
224
|
/** Bcc recipients email addresses only */
|
|
@@ -235,12 +246,12 @@ export interface MailpitSendRequest {
|
|
|
235
246
|
To: MailpitEmailAddressRequest[];
|
|
236
247
|
}
|
|
237
248
|
/** Response for the {@link MailpitClient.sendMessage | sendMessage()} API containing confirmation identifier. */
|
|
238
|
-
|
|
249
|
+
interface MailpitSendMessageConfirmationResponse {
|
|
239
250
|
/** Confirmation message ID */
|
|
240
251
|
ID: string;
|
|
241
252
|
}
|
|
242
253
|
/** Response from the {@link MailpitClient.htmlCheck | htmlCheck()} API containing HTML check results. */
|
|
243
|
-
|
|
254
|
+
interface MailpitHTMLCheckResponse {
|
|
244
255
|
/** All platforms tested, mainly for the web UI */
|
|
245
256
|
Platforms: {
|
|
246
257
|
[key: string]: [string];
|
|
@@ -308,7 +319,7 @@ export interface MailpitHTMLCheckResponse {
|
|
|
308
319
|
}[];
|
|
309
320
|
}
|
|
310
321
|
/** Response from the {@link MailpitClient.linkCheck | linkCheck()} API containing link check results. */
|
|
311
|
-
|
|
322
|
+
interface MailpitLinkCheckResponse {
|
|
312
323
|
/** Total number of errors */
|
|
313
324
|
Errors: number;
|
|
314
325
|
/** Tested links */
|
|
@@ -322,7 +333,7 @@ export interface MailpitLinkCheckResponse {
|
|
|
322
333
|
}[];
|
|
323
334
|
}
|
|
324
335
|
/** Response from the {@link MailpitClient.spamAssassinCheck | spamAssassinCheck()} API containing containing SpamAssassin check results. */
|
|
325
|
-
|
|
336
|
+
interface MailpitSpamAssassinResponse {
|
|
326
337
|
/** If populated will return an error string */
|
|
327
338
|
Errors: number;
|
|
328
339
|
/** Whether the message is spam or not */
|
|
@@ -340,7 +351,7 @@ export interface MailpitSpamAssassinResponse {
|
|
|
340
351
|
Score: number;
|
|
341
352
|
}
|
|
342
353
|
/** Request parameters for the {@link MailpitClient.setReadStatus | setReadStatus()} API. */
|
|
343
|
-
|
|
354
|
+
interface MailpitReadStatusRequest extends MailpitDatabaseIDsRequest {
|
|
344
355
|
/**
|
|
345
356
|
* Read status
|
|
346
357
|
* @defaultValue false
|
|
@@ -350,21 +361,21 @@ export interface MailpitReadStatusRequest extends MailpitDatabaseIDsRequest {
|
|
|
350
361
|
Search?: string;
|
|
351
362
|
}
|
|
352
363
|
/** Request parameters for the {@link MailpitClient.searchMessages | searchMessages()} API. */
|
|
353
|
-
|
|
364
|
+
interface MailpitSearchMessagesRequest extends MailpitSearchRequest {
|
|
354
365
|
/** Pagination offset */
|
|
355
366
|
start?: number;
|
|
356
367
|
/** Limit results */
|
|
357
368
|
limit?: number;
|
|
358
369
|
}
|
|
359
370
|
/** Request parameters for the {@link MailpitClient.setTags | setTags()} API. */
|
|
360
|
-
|
|
371
|
+
interface MailpitSetTagsRequest {
|
|
361
372
|
/** Array of message database IDs */
|
|
362
373
|
IDs: string[];
|
|
363
374
|
/** Array of tag names to set */
|
|
364
375
|
Tags?: string[];
|
|
365
376
|
}
|
|
366
377
|
/** Request parameters for the {@link MailpitClient.setChaosTriggers | setChaosTriggers()} API. */
|
|
367
|
-
|
|
378
|
+
interface MailpitChaosTriggersRequest {
|
|
368
379
|
/** Optional Authentication trigger for Chaos */
|
|
369
380
|
Authentication?: MailpitChaosTrigger;
|
|
370
381
|
/** Optional Recipient trigger for Chaos */
|
|
@@ -373,7 +384,7 @@ export interface MailpitChaosTriggersRequest {
|
|
|
373
384
|
Sender?: MailpitChaosTrigger;
|
|
374
385
|
}
|
|
375
386
|
/** Response for the {@link MailpitClient.setChaosTriggers | setChaosTriggers()} and {@link MailpitClient.getChaosTriggers | getChaosTriggers()} APIs containing the current chaos triggers. */
|
|
376
|
-
|
|
387
|
+
interface MailpitChaosTriggersResponse {
|
|
377
388
|
/** Authentication trigger for Chaos */
|
|
378
389
|
Authentication: MailpitChaosTrigger;
|
|
379
390
|
/** Recipient trigger for Chaos */
|
|
@@ -382,7 +393,7 @@ export interface MailpitChaosTriggersResponse {
|
|
|
382
393
|
Sender: MailpitChaosTrigger;
|
|
383
394
|
}
|
|
384
395
|
/** Response for the {@link MailpitClient.getMessageAttachment |getMessageAttachment()} and {@link MailpitClient.getAttachmentThumbnail | getAttachmentThumbnail()} APIs containing attachment data */
|
|
385
|
-
|
|
396
|
+
interface MailpitAttachmentDataResponse {
|
|
386
397
|
/** The attachment binary data */
|
|
387
398
|
data: ArrayBuffer;
|
|
388
399
|
/** The attachment MIME type */
|
|
@@ -397,7 +408,7 @@ export interface MailpitAttachmentDataResponse {
|
|
|
397
408
|
* console.log(await mailpit.getInfo());
|
|
398
409
|
* ```
|
|
399
410
|
*/
|
|
400
|
-
|
|
411
|
+
declare class MailpitClient {
|
|
401
412
|
private axiosInstance;
|
|
402
413
|
/**
|
|
403
414
|
* Creates an instance of {@link MailpitClient}.
|
|
@@ -759,3 +770,5 @@ export declare class MailpitClient {
|
|
|
759
770
|
*/
|
|
760
771
|
renderMessageText(id?: string): Promise<string>;
|
|
761
772
|
}
|
|
773
|
+
|
|
774
|
+
export { type MailpitAttachmentDataResponse, type MailpitAttachmentRequest, type MailpitAttachmentResponse, type MailpitChaosTrigger, type MailpitChaosTriggersRequest, type MailpitChaosTriggersResponse, MailpitClient, type MailpitConfigurationResponse, type MailpitDatabaseIDsRequest, type MailpitEmailAddressRequest, type MailpitEmailAddressResponse, type MailpitHTMLCheckResponse, type MailpitInfoResponse, type MailpitLinkCheckResponse, type MailpitMessageHeadersResponse, type MailpitMessageSummaryResponse, type MailpitMessagesSummaryResponse, type MailpitReadStatusRequest, type MailpitSearchMessagesRequest, type MailpitSearchRequest, type MailpitSendMessageConfirmationResponse, type MailpitSendRequest, type MailpitSetTagsRequest, type MailpitSpamAssassinResponse, type MailpitTimeZoneRequest };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/** Represents a name and email address for a request. */
|
|
2
|
-
|
|
2
|
+
interface MailpitEmailAddressRequest {
|
|
3
3
|
/** Email address */
|
|
4
4
|
Email: string;
|
|
5
5
|
/** Optional name associated with the email address */
|
|
6
6
|
Name?: string;
|
|
7
7
|
}
|
|
8
8
|
/** Represents a name and email address from a response. */
|
|
9
|
-
|
|
9
|
+
interface MailpitEmailAddressResponse {
|
|
10
10
|
/** Email address */
|
|
11
11
|
Address: string;
|
|
12
12
|
/** Name associated with the email address */
|
|
13
13
|
Name: string;
|
|
14
14
|
}
|
|
15
15
|
/** Represents an attachment for a request. */
|
|
16
|
-
|
|
16
|
+
interface MailpitAttachmentRequest {
|
|
17
17
|
/** Base64-encoded string for the file content */
|
|
18
18
|
Content: string;
|
|
19
19
|
/** Optional Content-ID (cid) for attachment. If this field is set then the file is attached inline. */
|
|
@@ -24,7 +24,7 @@ export interface MailpitAttachmentRequest {
|
|
|
24
24
|
Filename: string;
|
|
25
25
|
}
|
|
26
26
|
/** Represents an attachment from a response. */
|
|
27
|
-
|
|
27
|
+
interface MailpitAttachmentResponse {
|
|
28
28
|
/** Content ID */
|
|
29
29
|
ContentID: string;
|
|
30
30
|
/** Content type */
|
|
@@ -37,29 +37,29 @@ export interface MailpitAttachmentResponse {
|
|
|
37
37
|
Size: number;
|
|
38
38
|
}
|
|
39
39
|
/** Represents information about a Chaos trigger */
|
|
40
|
-
|
|
40
|
+
interface MailpitChaosTrigger {
|
|
41
41
|
/** SMTP error code to return. The value must range from 400 to 599. */
|
|
42
42
|
ErrorCode: number;
|
|
43
43
|
/** Probability (chance) of triggering the error. The value must range from 0 to 100. */
|
|
44
44
|
Probability: number;
|
|
45
45
|
}
|
|
46
46
|
/** Common request parameters for APIs with a search query */
|
|
47
|
-
|
|
47
|
+
interface MailpitSearchRequest extends MailpitTimeZoneRequest {
|
|
48
48
|
/** {@link https://mailpit.axllent.org/docs/usage/search-filters/ | Search query} */
|
|
49
49
|
query: string;
|
|
50
50
|
}
|
|
51
51
|
/** Common request parameters for APIs with a search query and time zone option */
|
|
52
|
-
|
|
52
|
+
interface MailpitTimeZoneRequest {
|
|
53
53
|
/** {@link https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | Timezone identifier} used only for `before:` & `after:` searches (eg: "Pacific/Auckland"). */
|
|
54
54
|
tz?: string;
|
|
55
55
|
}
|
|
56
56
|
/** Common request parameters for APIs requiring a list of message database IDs */
|
|
57
|
-
|
|
57
|
+
interface MailpitDatabaseIDsRequest {
|
|
58
58
|
/** Array of message database IDs */
|
|
59
59
|
IDs?: string[];
|
|
60
60
|
}
|
|
61
61
|
/** Response for the {@link MailpitClient.getInfo | getInfo()} API containing information about the Mailpit instance. */
|
|
62
|
-
|
|
62
|
+
interface MailpitInfoResponse {
|
|
63
63
|
/** Database path */
|
|
64
64
|
Database: string;
|
|
65
65
|
/** Datacase size in bytes */
|
|
@@ -96,7 +96,7 @@ export interface MailpitInfoResponse {
|
|
|
96
96
|
Version: string;
|
|
97
97
|
}
|
|
98
98
|
/** Response for the {@link MailpitClient.getConfiguration| getConfiguraton()} API containing configuration for the Mailpit web UI. */
|
|
99
|
-
|
|
99
|
+
interface MailpitConfigurationResponse {
|
|
100
100
|
/** Whether Chaos support is enabled at runtime */
|
|
101
101
|
ChaosEnabled: boolean;
|
|
102
102
|
/** Whether messages with duplicate IDs are ignored */
|
|
@@ -121,7 +121,7 @@ export interface MailpitConfigurationResponse {
|
|
|
121
121
|
SpamAssassin: boolean;
|
|
122
122
|
}
|
|
123
123
|
/** Response for the {@link MailpitClient.getMessageSummary| getMessageSummary()} API containing the summary of a message */
|
|
124
|
-
|
|
124
|
+
interface MailpitMessageSummaryResponse {
|
|
125
125
|
/** Message Attachmets */
|
|
126
126
|
Attachments: MailpitAttachmentResponse[];
|
|
127
127
|
/** BCC addresses */
|
|
@@ -138,6 +138,17 @@ export interface MailpitMessageSummaryResponse {
|
|
|
138
138
|
ID: string;
|
|
139
139
|
/** Inline message attachements */
|
|
140
140
|
Inline: MailpitEmailAddressResponse[];
|
|
141
|
+
/** ListUnsubscribe contains a summary of List-Unsubscribe & List-Unsubscribe-Post headers including validation of the link structure */
|
|
142
|
+
ListUnsubscribe: {
|
|
143
|
+
/** Validation errors (if any) */
|
|
144
|
+
Errors: string;
|
|
145
|
+
/** List-Unsubscrobe header value */
|
|
146
|
+
Header: string;
|
|
147
|
+
/** List-Unsubscribe-Post valie (if set) */
|
|
148
|
+
HeaderPost: string;
|
|
149
|
+
/** Detected links, maximum one email and one HTTP(S) link */
|
|
150
|
+
Links: string[];
|
|
151
|
+
};
|
|
141
152
|
/** Message ID */
|
|
142
153
|
MessageID: string;
|
|
143
154
|
/** ReplyTo addresses */
|
|
@@ -156,7 +167,7 @@ export interface MailpitMessageSummaryResponse {
|
|
|
156
167
|
To: MailpitEmailAddressResponse[];
|
|
157
168
|
}
|
|
158
169
|
/** Response for the {@link MailpitClient.listMessages| listMessages()} API containing the summary of multiple messages. */
|
|
159
|
-
|
|
170
|
+
interface MailpitMessagesSummaryResponse {
|
|
160
171
|
/** Messages */
|
|
161
172
|
messages: {
|
|
162
173
|
/** The number of attachments */
|
|
@@ -202,12 +213,12 @@ export interface MailpitMessagesSummaryResponse {
|
|
|
202
213
|
unread: number;
|
|
203
214
|
}
|
|
204
215
|
/** Response for the {@link MailpitClient.getMessageHeaders | getMessageHeaders()} API containing message headers */
|
|
205
|
-
|
|
216
|
+
interface MailpitMessageHeadersResponse {
|
|
206
217
|
/** Message headers */
|
|
207
218
|
[key: string]: [string];
|
|
208
219
|
}
|
|
209
220
|
/** Request parameters for the {@link MailpitClient.sendMessage | sendMessage()} API. */
|
|
210
|
-
|
|
221
|
+
interface MailpitSendRequest {
|
|
211
222
|
/** Attachments */
|
|
212
223
|
Attachments?: MailpitAttachmentRequest[];
|
|
213
224
|
/** Bcc recipients email addresses only */
|
|
@@ -235,12 +246,12 @@ export interface MailpitSendRequest {
|
|
|
235
246
|
To: MailpitEmailAddressRequest[];
|
|
236
247
|
}
|
|
237
248
|
/** Response for the {@link MailpitClient.sendMessage | sendMessage()} API containing confirmation identifier. */
|
|
238
|
-
|
|
249
|
+
interface MailpitSendMessageConfirmationResponse {
|
|
239
250
|
/** Confirmation message ID */
|
|
240
251
|
ID: string;
|
|
241
252
|
}
|
|
242
253
|
/** Response from the {@link MailpitClient.htmlCheck | htmlCheck()} API containing HTML check results. */
|
|
243
|
-
|
|
254
|
+
interface MailpitHTMLCheckResponse {
|
|
244
255
|
/** All platforms tested, mainly for the web UI */
|
|
245
256
|
Platforms: {
|
|
246
257
|
[key: string]: [string];
|
|
@@ -308,7 +319,7 @@ export interface MailpitHTMLCheckResponse {
|
|
|
308
319
|
}[];
|
|
309
320
|
}
|
|
310
321
|
/** Response from the {@link MailpitClient.linkCheck | linkCheck()} API containing link check results. */
|
|
311
|
-
|
|
322
|
+
interface MailpitLinkCheckResponse {
|
|
312
323
|
/** Total number of errors */
|
|
313
324
|
Errors: number;
|
|
314
325
|
/** Tested links */
|
|
@@ -322,7 +333,7 @@ export interface MailpitLinkCheckResponse {
|
|
|
322
333
|
}[];
|
|
323
334
|
}
|
|
324
335
|
/** Response from the {@link MailpitClient.spamAssassinCheck | spamAssassinCheck()} API containing containing SpamAssassin check results. */
|
|
325
|
-
|
|
336
|
+
interface MailpitSpamAssassinResponse {
|
|
326
337
|
/** If populated will return an error string */
|
|
327
338
|
Errors: number;
|
|
328
339
|
/** Whether the message is spam or not */
|
|
@@ -340,7 +351,7 @@ export interface MailpitSpamAssassinResponse {
|
|
|
340
351
|
Score: number;
|
|
341
352
|
}
|
|
342
353
|
/** Request parameters for the {@link MailpitClient.setReadStatus | setReadStatus()} API. */
|
|
343
|
-
|
|
354
|
+
interface MailpitReadStatusRequest extends MailpitDatabaseIDsRequest {
|
|
344
355
|
/**
|
|
345
356
|
* Read status
|
|
346
357
|
* @defaultValue false
|
|
@@ -350,21 +361,21 @@ export interface MailpitReadStatusRequest extends MailpitDatabaseIDsRequest {
|
|
|
350
361
|
Search?: string;
|
|
351
362
|
}
|
|
352
363
|
/** Request parameters for the {@link MailpitClient.searchMessages | searchMessages()} API. */
|
|
353
|
-
|
|
364
|
+
interface MailpitSearchMessagesRequest extends MailpitSearchRequest {
|
|
354
365
|
/** Pagination offset */
|
|
355
366
|
start?: number;
|
|
356
367
|
/** Limit results */
|
|
357
368
|
limit?: number;
|
|
358
369
|
}
|
|
359
370
|
/** Request parameters for the {@link MailpitClient.setTags | setTags()} API. */
|
|
360
|
-
|
|
371
|
+
interface MailpitSetTagsRequest {
|
|
361
372
|
/** Array of message database IDs */
|
|
362
373
|
IDs: string[];
|
|
363
374
|
/** Array of tag names to set */
|
|
364
375
|
Tags?: string[];
|
|
365
376
|
}
|
|
366
377
|
/** Request parameters for the {@link MailpitClient.setChaosTriggers | setChaosTriggers()} API. */
|
|
367
|
-
|
|
378
|
+
interface MailpitChaosTriggersRequest {
|
|
368
379
|
/** Optional Authentication trigger for Chaos */
|
|
369
380
|
Authentication?: MailpitChaosTrigger;
|
|
370
381
|
/** Optional Recipient trigger for Chaos */
|
|
@@ -373,7 +384,7 @@ export interface MailpitChaosTriggersRequest {
|
|
|
373
384
|
Sender?: MailpitChaosTrigger;
|
|
374
385
|
}
|
|
375
386
|
/** Response for the {@link MailpitClient.setChaosTriggers | setChaosTriggers()} and {@link MailpitClient.getChaosTriggers | getChaosTriggers()} APIs containing the current chaos triggers. */
|
|
376
|
-
|
|
387
|
+
interface MailpitChaosTriggersResponse {
|
|
377
388
|
/** Authentication trigger for Chaos */
|
|
378
389
|
Authentication: MailpitChaosTrigger;
|
|
379
390
|
/** Recipient trigger for Chaos */
|
|
@@ -382,7 +393,7 @@ export interface MailpitChaosTriggersResponse {
|
|
|
382
393
|
Sender: MailpitChaosTrigger;
|
|
383
394
|
}
|
|
384
395
|
/** Response for the {@link MailpitClient.getMessageAttachment |getMessageAttachment()} and {@link MailpitClient.getAttachmentThumbnail | getAttachmentThumbnail()} APIs containing attachment data */
|
|
385
|
-
|
|
396
|
+
interface MailpitAttachmentDataResponse {
|
|
386
397
|
/** The attachment binary data */
|
|
387
398
|
data: ArrayBuffer;
|
|
388
399
|
/** The attachment MIME type */
|
|
@@ -397,7 +408,7 @@ export interface MailpitAttachmentDataResponse {
|
|
|
397
408
|
* console.log(await mailpit.getInfo());
|
|
398
409
|
* ```
|
|
399
410
|
*/
|
|
400
|
-
|
|
411
|
+
declare class MailpitClient {
|
|
401
412
|
private axiosInstance;
|
|
402
413
|
/**
|
|
403
414
|
* Creates an instance of {@link MailpitClient}.
|
|
@@ -759,3 +770,5 @@ export declare class MailpitClient {
|
|
|
759
770
|
*/
|
|
760
771
|
renderMessageText(id?: string): Promise<string>;
|
|
761
772
|
}
|
|
773
|
+
|
|
774
|
+
export { type MailpitAttachmentDataResponse, type MailpitAttachmentRequest, type MailpitAttachmentResponse, type MailpitChaosTrigger, type MailpitChaosTriggersRequest, type MailpitChaosTriggersResponse, MailpitClient, type MailpitConfigurationResponse, type MailpitDatabaseIDsRequest, type MailpitEmailAddressRequest, type MailpitEmailAddressResponse, type MailpitHTMLCheckResponse, type MailpitInfoResponse, type MailpitLinkCheckResponse, type MailpitMessageHeadersResponse, type MailpitMessageSummaryResponse, type MailpitMessagesSummaryResponse, type MailpitReadStatusRequest, type MailpitSearchMessagesRequest, type MailpitSearchRequest, type MailpitSendMessageConfirmationResponse, type MailpitSendRequest, type MailpitSetTagsRequest, type MailpitSpamAssassinResponse, type MailpitTimeZoneRequest };
|