@bluecopa/core 0.1.50 → 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>;
@@ -20,3 +20,4 @@ export * as inboxItems from './inboxItems';
20
20
  export * as permissions from './permissions';
21
21
  export * as clientIp from './clientIp';
22
22
  export * as emailEngine from './emailEngine';
23
+ export * as tcn from './tcn';
@@ -0,0 +1 @@
1
+ export declare function agentDisconnect(token: string, sessionSid: string, reason?: string): Promise<any>;
@@ -0,0 +1,5 @@
1
+ export interface TcnConnectedParty {
2
+ callType: string;
3
+ callId: string;
4
+ }
5
+ export declare function agentGetConnectedParty(token: string, sessionSid: string): Promise<TcnConnectedParty>;
@@ -0,0 +1,4 @@
1
+ export interface TcnStatusData {
2
+ currentSessionId: string;
3
+ }
4
+ export declare function agentGetStatus(token: string): Promise<TcnStatusData>;
@@ -0,0 +1 @@
1
+ export declare function agentPause(token: string, sessionSid: string): Promise<any>;
@@ -0,0 +1 @@
1
+ export declare function agentSetReady(token: string, sessionSid: string): Promise<any>;
@@ -0,0 +1,9 @@
1
+ export interface TcnSessionData {
2
+ voiceSessionSid: number;
3
+ voiceRegistration: {
4
+ username: string;
5
+ password: string;
6
+ dialUrl: string;
7
+ };
8
+ }
9
+ export declare function createSession(token: string, huntGroupSid: string, skills: Record<string, unknown>): Promise<TcnSessionData>;
@@ -0,0 +1 @@
1
+ export declare function dialManualPrepare(token: string, sessionSid: string): Promise<any>;
@@ -0,0 +1,5 @@
1
+ export interface TcnTokenData {
2
+ access_token: string;
3
+ refresh_token: string;
4
+ }
5
+ export declare function exchangeCode(code: string): Promise<TcnTokenData>;
@@ -0,0 +1,4 @@
1
+ export interface TcnSkillsData {
2
+ skills: Record<string, unknown>;
3
+ }
4
+ export declare function getAgentSkills(token: string, huntGroupSid: string): Promise<TcnSkillsData>;
@@ -0,0 +1,4 @@
1
+ export interface TcnAuthUrlResponse {
2
+ url: string;
3
+ }
4
+ export declare function getAuthUrl(): Promise<TcnAuthUrlResponse>;
@@ -0,0 +1,8 @@
1
+ export interface TcnCallData {
2
+ callerIdName?: string;
3
+ journeyRetrievedData?: {
4
+ FName?: string;
5
+ PhoneNumber?: string;
6
+ };
7
+ }
8
+ export declare function getCallData(token: string, callSid: number): Promise<TcnCallData>;
@@ -0,0 +1,6 @@
1
+ export interface TcnAgentData {
2
+ agentSid: string;
3
+ clientSid: string;
4
+ huntGroupSid: string;
5
+ }
6
+ export declare function getCurrentAgent(token: string): Promise<TcnAgentData>;
@@ -0,0 +1,9 @@
1
+ export interface TcnDialSettings {
2
+ manualDial: {
3
+ defaultCallerId?: string;
4
+ callRecording?: boolean;
5
+ defaultCountrySid?: number;
6
+ scrubCellPhones?: boolean;
7
+ };
8
+ }
9
+ export declare function getHuntGroupAgentSettings(token: string, huntGroupSid: string): Promise<TcnDialSettings>;
@@ -0,0 +1,17 @@
1
+ export * from './getAuthUrl';
2
+ export * from './exchangeCode';
3
+ export * from './refreshToken';
4
+ export * from './getCurrentAgent';
5
+ export * from './getAgentSkills';
6
+ export * from './createSession';
7
+ export * from './keepAlive';
8
+ export * from './agentGetStatus';
9
+ export * from './getHuntGroupAgentSettings';
10
+ export * from './dialManualPrepare';
11
+ export * from './processManualDial';
12
+ export * from './manualDialStart';
13
+ export * from './agentDisconnect';
14
+ export * from './agentPause';
15
+ export * from './agentSetReady';
16
+ export * from './agentGetConnectedParty';
17
+ export * from './getCallData';
@@ -0,0 +1,5 @@
1
+ export interface TcnKeepAliveData {
2
+ status: string;
3
+ statusDesc: string;
4
+ }
5
+ export declare function keepAlive(token: string, sessionSid: string): Promise<TcnKeepAliveData>;
@@ -0,0 +1 @@
1
+ export declare function manualDialStart(token: string, agentSessionSid: string, huntGroupSid: string, simpleCallData: Record<string, unknown>): Promise<any>;
@@ -0,0 +1,13 @@
1
+ export interface TcnProcessDialData {
2
+ scrubbedCall: {
3
+ callSid: string;
4
+ taskGroupSid: string;
5
+ callerId: string;
6
+ doRecord: string;
7
+ callerIdCountryCode: string;
8
+ countryCode: string;
9
+ callerIdCountrySid: number;
10
+ countrySid: number;
11
+ };
12
+ }
13
+ export declare function processManualDial(token: string, call: Record<string, unknown>): Promise<TcnProcessDialData>;
@@ -0,0 +1,2 @@
1
+ import { TcnTokenData } from './exchangeCode';
2
+ export declare function refreshToken(refreshTokenValue: string): Promise<TcnTokenData>;
package/dist/index.d.ts CHANGED
@@ -29,4 +29,15 @@ export type { EmailConversation, GetAllConversationsParams, PageChunkEmailConver
29
29
  export type { GetConversationRequest, } from './api/emailEngine/getConversation';
30
30
  export type { CreateConversationRequest, } from './api/emailEngine/createConversation';
31
31
  export type { ReplyToConversationRequest, } from './api/emailEngine/replyToConversation';
32
- export type { FilterOnSenderId, EmailMessage, } from './api/emailEngine/getMessageBySenderId';
32
+ export type { TcnAuthUrlResponse } from './api/tcn/getAuthUrl';
33
+ export type { TcnTokenData } from './api/tcn/exchangeCode';
34
+ export type { TcnAgentData } from './api/tcn/getCurrentAgent';
35
+ export type { TcnSkillsData } from './api/tcn/getAgentSkills';
36
+ export type { TcnSessionData } from './api/tcn/createSession';
37
+ export type { TcnKeepAliveData } from './api/tcn/keepAlive';
38
+ export type { TcnStatusData } from './api/tcn/agentGetStatus';
39
+ export type { TcnDialSettings } from './api/tcn/getHuntGroupAgentSettings';
40
+ export type { TcnProcessDialData } from './api/tcn/processManualDial';
41
+ export type { TcnConnectedParty } from './api/tcn/agentGetConnectedParty';
42
+ export type { TcnCallData } from './api/tcn/getCallData';
43
+ export type { FilterOnSenderId, EmailMessage, PageChunkEmailMessage, } from './api/emailEngine/getMessageBySenderId';