mailpit-api 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -282,7 +282,7 @@ export declare class MailpitClient {
282
282
  spamAssassinCheck(id?: string): Promise<MailpitSpamAssassinResponse>;
283
283
  listMessages(start?: number, limit?: number): Promise<MailpitMessagesSummaryResponse>;
284
284
  setReadStatus(readStatus: MailpitReadStatusRequest): Promise<string>;
285
- deleteMessages(deleteRequest: MailpitDeleteRequest): Promise<string>;
285
+ deleteMessages(deleteRequest?: MailpitDeleteRequest): Promise<string>;
286
286
  searchMessages(search: MailpitSearchRequest): Promise<MailpitMessagesSummaryResponse>;
287
287
  deleteMessagesBySearch(search: MailpitSearchDeleteRequest): Promise<string>;
288
288
  getTags(): Promise<[string]>;
package/dist/cjs/index.js CHANGED
@@ -141,7 +141,7 @@ class MailpitClient {
141
141
  // See https://mailpit.axllent.org/docs/usage/search-filters/
142
142
  deleteMessagesBySearch(search) {
143
143
  return __awaiter(this, void 0, void 0, function* () {
144
- return this.handleRequest(() => this.axiosInstance.delete(`/api/v1/search`, { data: search }));
144
+ return this.handleRequest(() => this.axiosInstance.delete(`/api/v1/search`, { params: search }));
145
145
  });
146
146
  }
147
147
  // Tags
@@ -282,7 +282,7 @@ export declare class MailpitClient {
282
282
  spamAssassinCheck(id?: string): Promise<MailpitSpamAssassinResponse>;
283
283
  listMessages(start?: number, limit?: number): Promise<MailpitMessagesSummaryResponse>;
284
284
  setReadStatus(readStatus: MailpitReadStatusRequest): Promise<string>;
285
- deleteMessages(deleteRequest: MailpitDeleteRequest): Promise<string>;
285
+ deleteMessages(deleteRequest?: MailpitDeleteRequest): Promise<string>;
286
286
  searchMessages(search: MailpitSearchRequest): Promise<MailpitMessagesSummaryResponse>;
287
287
  deleteMessagesBySearch(search: MailpitSearchDeleteRequest): Promise<string>;
288
288
  getTags(): Promise<[string]>;
package/dist/mjs/index.js CHANGED
@@ -92,7 +92,7 @@ export class MailpitClient {
92
92
  }
93
93
  // See https://mailpit.axllent.org/docs/usage/search-filters/
94
94
  async deleteMessagesBySearch(search) {
95
- return this.handleRequest(() => this.axiosInstance.delete(`/api/v1/search`, { data: search }));
95
+ return this.handleRequest(() => this.axiosInstance.delete(`/api/v1/search`, { params: search }));
96
96
  }
97
97
  // Tags
98
98
  async getTags() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mailpit-api",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "A NodeJS client library, written in TypeScript, to interact with the Mailpit API.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  "author": "Matthew Spahr",
33
33
  "license": "MIT",
34
34
  "dependencies": {
35
- "axios": "^1.7.4"
35
+ "axios": "^1.7.8"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@eslint/js": "^8.57.0",
@@ -40,11 +40,11 @@
40
40
  "@typescript-eslint/eslint-plugin": "^7.18.0",
41
41
  "@typescript-eslint/parser": "^7.18.0",
42
42
  "eslint": "^8.57.0",
43
- "globals": "^15.9.0",
43
+ "globals": "^15.13.0",
44
44
  "jest": "^29.7.0",
45
- "prettier": "3.3.3",
46
- "tsx": "^4.17.0",
47
- "typescript": "^5.5.4",
45
+ "prettier": "3.4.1",
46
+ "tsx": "^4.19.2",
47
+ "typescript": "^5.7.2",
48
48
  "typescript-eslint": "^7.18.0"
49
49
  }
50
50
  }
package/src/index.ts CHANGED
@@ -456,7 +456,7 @@ export class MailpitClient {
456
456
  }
457
457
 
458
458
  public async deleteMessages(
459
- deleteRequest: MailpitDeleteRequest,
459
+ deleteRequest?: MailpitDeleteRequest,
460
460
  ): Promise<string> {
461
461
  return this.handleRequest(() =>
462
462
  this.axiosInstance.delete<string>(`/api/v1/messages`, {
@@ -481,7 +481,7 @@ export class MailpitClient {
481
481
  search: MailpitSearchDeleteRequest,
482
482
  ): Promise<string> {
483
483
  return this.handleRequest(() =>
484
- this.axiosInstance.delete<string>(`/api/v1/search`, { data: search }),
484
+ this.axiosInstance.delete<string>(`/api/v1/search`, { params: search }),
485
485
  );
486
486
  }
487
487