ysyt-agent-sdk 1.0.128 → 1.0.130
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.
- package/dist/src/core/api-client.d.ts +2 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/types/Enum.d.ts +2 -1
- package/dist/src/types/index.d.ts +7 -3
- package/dist/src/utils/http.d.ts +2 -1
- package/dist/src/utils/phone-style-config.d.ts +1 -0
- package/dist/ysyt-agent-sdk.cjs.js +25 -25
- package/dist/ysyt-agent-sdk.esm.js +25 -25
- package/dist/ysyt-agent-sdk.umd.js +25 -25
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentItemType, AgentStateDataType, DeviceType, CallCrmObject, RequestBodyType, StateType, RecordItemType } from '@/types';
|
|
1
|
+
import { AgentItemType, AgentStateDataType, DeviceType, CallCrmObject, RequestBodyType, StateType, RecordItemType, AgentLogoutBodyType } from '@/types';
|
|
2
2
|
export declare class ApiClient {
|
|
3
3
|
private roleData;
|
|
4
4
|
formatDate(date: Date): string;
|
|
@@ -34,4 +34,5 @@ export declare class ApiClient {
|
|
|
34
34
|
is_login: boolean;
|
|
35
35
|
}>): Promise<void>;
|
|
36
36
|
getCallRecord(params: RequestBodyType<any, RecordItemType[]>): Promise<void>;
|
|
37
|
+
logout(params: RequestBodyType<AgentLogoutBodyType, any>): Promise<void>;
|
|
37
38
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentDataType, AgentItemType, AgentStateDataType, DeviceType, InitInfoType, RequestBodyType, StateType, Events, CallCrmObject, RecordItemType } from './types';
|
|
1
|
+
import { AgentDataType, AgentItemType, AgentStateDataType, DeviceType, InitInfoType, RequestBodyType, StateType, Events, CallCrmObject, RecordItemType, AgentLogoutBodyType } from './types';
|
|
2
2
|
export type * from './types';
|
|
3
3
|
export * from './types/Enum';
|
|
4
4
|
declare class YSYTAgentSdk {
|
|
@@ -65,6 +65,7 @@ declare class YSYTAgentSdk {
|
|
|
65
65
|
is_login: boolean;
|
|
66
66
|
}>) => Promise<void>;
|
|
67
67
|
getCallRecord: (params: RequestBodyType<any, RecordItemType[]>) => Promise<void>;
|
|
68
|
+
agentLogout: (params: RequestBodyType<AgentLogoutBodyType, any>) => Promise<void>;
|
|
68
69
|
};
|
|
69
70
|
getAgentData(): AgentDataType;
|
|
70
71
|
getRealTimeCustomerInfo(): Promise<CallCrmObject>;
|
package/dist/src/types/Enum.d.ts
CHANGED
|
@@ -61,12 +61,12 @@ export interface StyleType {
|
|
|
61
61
|
[AgentStatus.RINGING]: string;
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
+
export type DeviceType = 1 | 2 | 3;
|
|
65
|
+
export type StateType = AgentStatus.OFFLINE | AgentStatus.IDLE | AgentStatus.BUSY | AgentStatus.RINGING | AgentStatus.UNREGISTERED;
|
|
64
66
|
export interface StatusType {
|
|
65
|
-
state:
|
|
67
|
+
state: StateType;
|
|
66
68
|
statusName: string;
|
|
67
69
|
}
|
|
68
|
-
export type DeviceType = 1 | 2 | 3;
|
|
69
|
-
export type StateType = AgentStatus.OFFLINE | AgentStatus.IDLE | AgentStatus.BUSY | AgentStatus.RINGING;
|
|
70
70
|
export type ActionType = 'call_number' | 'answer' | 'reject' | 'hangup' | 'dtmf' | 'unhold' | 'hold' | 'mute' | 'unmute' | 'satisfaction' | 'consult' | 'consult_transfer' | 'consult_retrieve' | 'conference' | 'transfer';
|
|
71
71
|
export type ActionConfigsType = Array<ActionType>;
|
|
72
72
|
export interface AgentObjectType {
|
|
@@ -183,6 +183,10 @@ export interface RecordItemType {
|
|
|
183
183
|
start_time: string;
|
|
184
184
|
call_state: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
185
185
|
}
|
|
186
|
+
export interface AgentLogoutBodyType {
|
|
187
|
+
agent_no: string;
|
|
188
|
+
offline_answer?: boolean;
|
|
189
|
+
}
|
|
186
190
|
type EventObject<T> = {
|
|
187
191
|
event: keyof Events;
|
|
188
192
|
data: T;
|
package/dist/src/utils/http.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeviceType, StateType } from '@/types';
|
|
1
|
+
import { AgentLogoutBodyType, DeviceType, StateType } from '@/types';
|
|
2
2
|
export declare const agentLogin: (params: {
|
|
3
3
|
agent_no: string;
|
|
4
4
|
}) => Promise<any>;
|
|
@@ -32,3 +32,4 @@ export declare const queryAllRecordList: (params: {
|
|
|
32
32
|
page_size: number;
|
|
33
33
|
agent_no: string;
|
|
34
34
|
}) => Promise<any>;
|
|
35
|
+
export declare const logout: (params: AgentLogoutBodyType) => Promise<any>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ActionConfigsType, StatusType, StyleType } from '@/types';
|
|
2
2
|
export declare const phoneStyleConfig: StyleType;
|
|
3
3
|
export declare const IdleNode: ({ state, statusName }: StatusType) => import("lit").TemplateResult<1>;
|
|
4
|
+
export declare const unregisteredConfig: ActionConfigsType;
|
|
4
5
|
export declare const initIdleConfig: ActionConfigsType;
|
|
5
6
|
export declare const initBusyConfig: ActionConfigsType;
|
|
6
7
|
export declare const incomingConfig: ActionConfigsType;
|