@mailhooks/sdk 2.2.0 → 2.3.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.
Files changed (2) hide show
  1. package/dist/index.d.ts +22 -1
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -5,6 +5,14 @@ interface Attachment {
5
5
  filename: string;
6
6
  contentType: string;
7
7
  size: number;
8
+ /** Storage path for the attachment (only present for custom storage) */
9
+ storagePath?: string;
10
+ }
11
+ interface StorageConfigSummary {
12
+ /** Storage provider type */
13
+ provider: 'S3' | 'AZURE_BLOB' | 'GCS';
14
+ /** Storage bucket or container name */
15
+ bucket: string;
8
16
  }
9
17
  interface Email {
10
18
  id: string;
@@ -14,6 +22,12 @@ interface Email {
14
22
  read: boolean;
15
23
  createdAt: Date;
16
24
  attachments: Attachment[];
25
+ /** Whether this email is stored in custom (BYOB) storage */
26
+ usesCustomStorage?: boolean;
27
+ /** Storage configuration details (only present for custom storage) */
28
+ storageConfig?: StorageConfigSummary;
29
+ /** Storage path for the email EML file (only present for custom storage) */
30
+ storagePath?: string;
17
31
  }
18
32
  interface EmailContent {
19
33
  html?: string;
@@ -218,6 +232,13 @@ interface WebhookPayload {
218
232
  usesCustomStorage: boolean;
219
233
  /** Storage path for the email (only present when usesCustomStorage is true) */
220
234
  storagePath?: string;
235
+ /** Storage configuration details (only present when usesCustomStorage is true) */
236
+ storageConfig?: {
237
+ /** Storage provider type (S3, AZURE_BLOB, GCS) */
238
+ provider: string;
239
+ /** Storage bucket or container name */
240
+ bucket: string;
241
+ };
221
242
  }
222
243
  /**
223
244
  * Verifies a webhook signature using HMAC-SHA256.
@@ -333,4 +354,4 @@ interface ParsedEmail {
333
354
  */
334
355
  declare function parseEml(eml: Buffer | string): Promise<ParsedEmail>;
335
356
 
336
- export { type Attachment, type DownloadResponse, type Email, type EmailContent, type EmailFilter, type EmailListParams, type EmailSort, EmailsResource, type EmailsResponse, Mailhooks, type MailhooksConfig, type PaginationResponse, type ParsedEmail, type WaitForOptions, type WebhookPayload, constructSignature, Mailhooks as default, parseEml, parseWebhookPayload, verifyWebhookSignature };
357
+ export { type Attachment, type DownloadResponse, type Email, type EmailContent, type EmailFilter, type EmailListParams, type EmailSort, EmailsResource, type EmailsResponse, Mailhooks, type MailhooksConfig, type PaginationResponse, type ParsedEmail, type StorageConfigSummary, type WaitForOptions, type WebhookPayload, constructSignature, Mailhooks as default, parseEml, parseWebhookPayload, verifyWebhookSignature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailhooks/sdk",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "TypeScript SDK for Mailhooks API",
5
5
  "publishConfig": {
6
6
  "access": "public"