@bluecopa/core 0.1.51 → 0.1.52

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.
@@ -1,31 +1,51 @@
1
1
  export interface FilterOnSenderId {
2
2
  senderId: string;
3
- direction: "INBOUND" | "OUTBOUND";
3
+ direction?: "INBOUND" | "OUTBOUND";
4
+ page?: number;
5
+ pageSize?: number;
6
+ orderByCreatedDate?: boolean;
4
7
  }
5
8
  export interface EmailMessage {
6
- id?: string;
7
- conversationId?: string;
8
- senderId?: string;
9
- toEmail?: string[];
10
- cc?: string[];
11
- bcc?: string[];
9
+ conversationId: string;
10
+ direction: "INBOUND" | "OUTBOUND";
11
+ fromAddress: string;
12
+ toAddresses: string[];
13
+ ccAddresses?: string[];
14
+ bccAddresses?: string[];
12
15
  subject?: string;
13
- bodyText?: string;
14
- bodyHtml?: string;
15
- messagePreview?: string;
16
- accountId?: string;
17
- workspaceId?: string;
16
+ emailengineId?: string;
17
+ emailMessageId?: string;
18
+ threadId?: string;
19
+ inReplyTo?: string;
20
+ senderId: string;
21
+ emlStorageKey?: string;
22
+ sentAt?: string;
23
+ receivedAt?: string;
18
24
  createdBy?: string;
19
25
  createdDate?: string;
20
26
  lastModifiedBy?: string;
21
27
  lastModifiedDate?: string;
28
+ id?: string;
29
+ workspaceId?: string;
30
+ entityVersion?: number;
31
+ }
32
+ export interface PageChunkEmailMessage {
33
+ content: EmailMessage[];
34
+ pageNumber: number;
35
+ pageSize: number;
36
+ totalPages: number;
37
+ totalElements: number;
38
+ isLast: boolean;
22
39
  }
23
40
  /**
24
41
  * Filters email messages by sender ID
25
42
  * @param params - The filter parameters
26
43
  * @param params.senderId - Required: The sender email address
27
- * @param params.direction - Required: 'INBOUND' or 'OUTBOUND'
28
- * @returns Promise<EmailMessage[]> List of matching messages
44
+ * @param params.direction - 'INBOUND' or 'OUTBOUND' (default: OUTBOUND)
45
+ * @param params.page - Page number (default: 1)
46
+ * @param params.pageSize - Page size (default: 10)
47
+ * @param params.orderByCreatedDate - Order by created date (default: false)
48
+ * @returns Promise<PageChunkEmailMessage> Paginated list of matching messages
29
49
  * @throws Error if the request fails
30
50
  */
31
- export declare function getMessageBySenderId(params: FilterOnSenderId): Promise<EmailMessage[]>;
51
+ export declare function getMessageBySenderId(params: FilterOnSenderId): Promise<PageChunkEmailMessage>;
package/dist/index.d.ts CHANGED
@@ -40,4 +40,4 @@ export type { TcnDialSettings } from './api/tcn/getHuntGroupAgentSettings';
40
40
  export type { TcnProcessDialData } from './api/tcn/processManualDial';
41
41
  export type { TcnConnectedParty } from './api/tcn/agentGetConnectedParty';
42
42
  export type { TcnCallData } from './api/tcn/getCallData';
43
- export type { FilterOnSenderId, EmailMessage, } from './api/emailEngine/getMessageBySenderId';
43
+ export type { FilterOnSenderId, EmailMessage, PageChunkEmailMessage, } from './api/emailEngine/getMessageBySenderId';