ysyt-agent-sdk 1.0.93 → 1.0.95

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,4 +1,4 @@
1
- import { AgentDataType, AgentItemType, AgentStateDataType, DeviceType, InitInfoType, RequestBodyType, StateType, Events } from './types';
1
+ import { AgentDataType, AgentItemType, AgentStateDataType, DeviceType, InitInfoType, RequestBodyType, StateType, Events, CallCrmObject } from './types';
2
2
  export type * from './types';
3
3
  export * from './types/Enum';
4
4
  declare class YSYTAgentSdk {
@@ -66,5 +66,6 @@ declare class YSYTAgentSdk {
66
66
  }>) => Promise<void>;
67
67
  };
68
68
  getAgentData(): AgentDataType;
69
+ getRealTimeCustomerInfo(): Promise<CallCrmObject>;
69
70
  }
70
71
  export default YSYTAgentSdk;
@@ -1,4 +1,4 @@
1
- import { CallInfoType } from '@/types';
1
+ import { CallCrmObject, CallInfoType } from '@/types';
2
2
  import { ReactiveStore } from './reactive-store';
3
3
  declare class CallInfoStore extends ReactiveStore<CallInfoType> {
4
4
  updateIsCalling(isCalling: boolean): void;
@@ -14,6 +14,7 @@ declare class CallInfoStore extends ReactiveStore<CallInfoType> {
14
14
  updateIsMeeting(isMeeting: boolean): void;
15
15
  updateTransferIsAnswer(transferIsAnswer: boolean): void;
16
16
  updateSelectOutNumber(selectOutNumber: string): void;
17
+ updateCustomerInfo(customerObject: CallCrmObject): void;
17
18
  reset(): void;
18
19
  getCallInfo(): CallInfoType;
19
20
  get<K extends keyof CallInfoType>(key: K): CallInfoType[K];
@@ -33,6 +33,7 @@ export interface CallInfoType {
33
33
  actionConfigs: ActionConfigsType;
34
34
  answerDevice: DeviceType;
35
35
  selectOutNumber: string;
36
+ customerObject?: CallCrmObject;
36
37
  }
37
38
  export interface InitInfoType {
38
39
  enableBrowserAlert?: boolean;
@@ -58,11 +59,6 @@ export type DeviceType = 1 | 2 | 3;
58
59
  export type StateType = AgentStatus.OFFLINE | AgentStatus.IDLE | AgentStatus.BUSY | AgentStatus.RINGING;
59
60
  export type ActionType = 'call_number' | 'answer' | 'reject' | 'hangup' | 'dtmf' | 'unhold' | 'hold' | 'mute' | 'unmute' | 'satisfaction' | 'consult' | 'consult_transfer' | 'consult_retrieve' | 'conference' | 'transfer';
60
61
  export type ActionConfigsType = Array<ActionType>;
61
- type HangupType = {
62
- session_id: string;
63
- device_type: 0 | 1 | 2 | 3 | 4;
64
- agent_no: string;
65
- };
66
62
  export interface AgentObjectType {
67
63
  agent_id: number;
68
64
  agent_no: string;
@@ -218,11 +214,11 @@ export interface Events {
218
214
  conf_name: string;
219
215
  };
220
216
  [CallSipCallEventEnum.CUSTOMER_INFO]: CallCrmObject;
221
- [CallSipCallEventEnum.OTHER_SIDE_CONSULT_HANGUP]: HangupType;
222
- [CallSipCallEventEnum.OUT_HANGUP]: HangupType;
223
- [CallSipCallEventEnum.OUR_SIDE_CONSULT_HANGUP]: HangupType;
224
- [CallSipCallEventEnum.THREE_WAY_OUR_SIDE_HANGUP]: HangupType;
225
- [CallSipCallEventEnum.TRANSFER_END]: HangupType;
217
+ [CallSipCallEventEnum.OTHER_SIDE_CONSULT_HANGUP]: unknown;
218
+ [CallSipCallEventEnum.OUT_HANGUP]: unknown;
219
+ [CallSipCallEventEnum.OUR_SIDE_CONSULT_HANGUP]: unknown;
220
+ [CallSipCallEventEnum.THREE_WAY_OUR_SIDE_HANGUP]: unknown;
221
+ [CallSipCallEventEnum.TRANSFER_END]: unknown;
226
222
  [CallSipCallEventEnum.OUT_OFF_ANSWER]: unknown;
227
223
  [CallSipCallEventEnum.OUT_RINGING]: {
228
224
  call_id: string;
@@ -232,11 +228,11 @@ export interface Events {
232
228
  [CallSipCallEventEnum.UNHOLD_SUCCESS]: unknown;
233
229
  [CallSipCallEventEnum.HOLD_FAILED]: string;
234
230
  [CallSipCallEventEnum.UNHOLD_FAILED]: string;
235
- [CallSipCallEventEnum.TRANSFER_PROGRESS]: {
236
- agent_mane: string;
237
- };
231
+ [CallSipCallEventEnum.TRANSFER_PROGRESS]: unknown;
238
232
  [CallSipCallEventEnum.TRANSFER_INCOMING_CALL]: {
239
233
  agent_no: string;
234
+ agent_name: string;
235
+ session_id: string;
240
236
  };
241
237
  [CallSipCallEventEnum.TRANSFER_OFF_HOOK]: {
242
238
  session_id: string;