1
- /** 1.0.2 */
1
+ /** 1.1.0 */
2
2
3
3
export as namespace SendBirdCall ;
4
4
@@ -25,7 +25,7 @@ export function useMedia(constraints: { audio: boolean; video: boolean }): Media
25
25
export function updateCustomItems ( callId : string , customItems : CustomItems , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
26
26
export function deleteCustomItems ( callId : string , customItemKeys : string [ ] , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
27
27
export function deleteAllCustomItems ( callId : string , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
28
- export function setLoggerLevel ( level : LoggerLevel ) ;
28
+ export function setLoggerLevel ( level : LoggerLevel ) : LoggerLevel ;
29
29
export function setRingingTimeout ( timeout : int ) ;
30
30
export function getCall ( callId : string ) : DirectCall ;
31
31
export const sdkVersion : string ;
@@ -45,7 +45,9 @@ export interface AcceptParams {
45
45
46
46
export enum LoggerLevel {
47
47
NONE = 'NONE' ,
48
- ERROR = 'ERROR'
48
+ ERROR = 'ERROR' ,
49
+ WARNING = 'WARNING' ,
50
+ INFO = 'INFO'
49
51
}
50
52
51
53
export enum DirectCallUserRole {
@@ -66,6 +68,38 @@ export enum DirectCallEndResult {
66
68
UNKNOWN = 'unknown'
67
69
}
68
70
71
+ export enum ErrorCode {
72
+ // Call
73
+ DIAL_CANCELED = 1800100 ,
74
+ MY_USER_ID_NOT_ALLOWED = 1800101 ,
75
+
76
+ // Client
77
+ ERR_REQUEST_FAILED = 1800200 ,
78
+ WS_NOT_CONNECTED = 1800201 ,
79
+ WS_CONNECTION_FAILED = 1800202 ,
80
+ ERR_NO_RESPONSE_DUE_TO_TIMEOUT = 1800203 ,
81
+ ERR_REQUEST_FAILED_DUE_TO_WEBSOCKET_CONNECTION_LOST = 1800204 ,
82
+ ERR_WRONG_RESPONSE = 1800205 ,
83
+ ERR_QUERY_IN_PROGRESS = 1800206 ,
84
+ INTERNAL_SERVER_ERROR = 1800207 ,
85
+ ERR_MALFORMED_DATA = 1800208 ,
86
+
87
+ // General
88
+ INVALID_PARAMETER_VALUE = 1800300 ,
89
+ INVALID_PARAMETER_TYPE = 1800301 ,
90
+ INSTANCE_NOT_INITIALIZED = 1800302 ,
91
+ USER_NOT_AUTHENTICATED = 1800303 ,
92
+
93
+ // Server
94
+ ERR_SERVER_INTERNAL_ERROR = 1400999 ,
95
+ ERR_INVALID_CALL_STATUS = 1400101 ,
96
+ ERR_CALL_DOES_NOT_EXIST = 1400102 ,
97
+ ERR_CALLEE_DOES_NOT_EXIST = 1400103 ,
98
+ ERR_DIAL_MYSELF = 1400104 ,
99
+ ERR_NO_PERMISSION = 1400105 ,
100
+ ERR_CALLEE_NEVER_AUTHENTICATE = 1400106
101
+ }
102
+
69
103
export interface SendBirdCallListener {
70
104
onRinging : ( ( directCall : DirectCall ) => void ) | null ;
71
105
onAudioInputDeviceChanged : ( ( currentAudioInputDevice : MediaDeviceInfo , availableAudioInputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
@@ -99,6 +133,7 @@ export interface DirectCall {
99
133
readonly endedBy : DirectCallUser ;
100
134
readonly isEnded : boolean ;
101
135
readonly endResult : DirectCallEndResult ;
136
+ readonly callLog : DirectCallLog ;
102
137
readonly customItems : CustomItems ;
103
138
readonly localMediaView : HTMLMediaElement ;
104
139
readonly remoteMediaView : HTMLMediaElement ;
@@ -150,6 +185,7 @@ export interface DirectCallLog {
150
185
readonly endResult : DirectCallEndResult ;
151
186
readonly isVideoCall : boolean ;
152
187
readonly customItems : CustomItems ;
188
+ readonly isFromServer : boolean ;
153
189
}
154
190
155
191
export interface DirectCallUser {
@@ -195,4 +231,4 @@ export interface CustomItems {
195
231
196
232
export interface MediaAccess {
197
233
dispose ( ) : void ;
198
- }
234
+ }
0 commit comments