1- /** 1.0.2 */
1+ /** 1.1.0 */
22
33export as namespace SendBirdCall ;
44
@@ -25,7 +25,7 @@ export function useMedia(constraints: { audio: boolean; video: boolean }): Media
2525export function updateCustomItems ( callId : string , customItems : CustomItems , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
2626export function deleteCustomItems ( callId : string , customItemKeys : string [ ] , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
2727export function deleteAllCustomItems ( callId : string , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
28- export function setLoggerLevel ( level : LoggerLevel ) ;
28+ export function setLoggerLevel ( level : LoggerLevel ) : LoggerLevel ;
2929export function setRingingTimeout ( timeout : int ) ;
3030export function getCall ( callId : string ) : DirectCall ;
3131export const sdkVersion : string ;
@@ -45,7 +45,9 @@ export interface AcceptParams {
4545
4646export enum LoggerLevel {
4747 NONE = 'NONE' ,
48- ERROR = 'ERROR'
48+ ERROR = 'ERROR' ,
49+ WARNING = 'WARNING' ,
50+ INFO = 'INFO'
4951}
5052
5153export enum DirectCallUserRole {
@@ -66,6 +68,38 @@ export enum DirectCallEndResult {
6668 UNKNOWN = 'unknown'
6769}
6870
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+
69103export interface SendBirdCallListener {
70104 onRinging : ( ( directCall : DirectCall ) => void ) | null ;
71105 onAudioInputDeviceChanged : ( ( currentAudioInputDevice : MediaDeviceInfo , availableAudioInputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
@@ -99,6 +133,7 @@ export interface DirectCall {
99133 readonly endedBy : DirectCallUser ;
100134 readonly isEnded : boolean ;
101135 readonly endResult : DirectCallEndResult ;
136+ readonly callLog : DirectCallLog ;
102137 readonly customItems : CustomItems ;
103138 readonly localMediaView : HTMLMediaElement ;
104139 readonly remoteMediaView : HTMLMediaElement ;
@@ -150,6 +185,7 @@ export interface DirectCallLog {
150185 readonly endResult : DirectCallEndResult ;
151186 readonly isVideoCall : boolean ;
152187 readonly customItems : CustomItems ;
188+ readonly isFromServer : boolean ;
153189}
154190
155191export interface DirectCallUser {
@@ -195,4 +231,4 @@ export interface CustomItems {
195231
196232export interface MediaAccess {
197233 dispose ( ) : void ;
198- }
234+ }
0 commit comments