@vonage/client-sdk
Advanced tools
Comparing version 0.2.0-alpha.0 to 0.2.0-alpha.1
@@ -13,4 +13,2 @@ import vonage from '../utils/vonage'; | ||
export declare const SessionErrorReason: typeof vonage.SessionErrorReasonJS; | ||
export type ConversationState = vonage.ConversationStateJS; | ||
export declare const ConversationState: typeof vonage.ConversationStateJS; | ||
export declare const setVonageClientLoggingLevel: typeof vonage.setDefaultLoggingLevel; | ||
@@ -17,0 +15,0 @@ export declare class VonageClient extends vonage.CombinedClientJS { |
@@ -30,2 +30,4 @@ type Nullable<T> = T | null | undefined | ||
deleteConversation(cid: string): Promise<any>; | ||
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.ConversationsPageJS>; | ||
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>; | ||
setConfig(config: vonage.CoreClientConfigJS): void; | ||
@@ -98,2 +100,8 @@ createSession(token: string, sessionId: Nullable<string>): Promise<string>; | ||
} | ||
class ConversationsPageJS { | ||
private constructor(); | ||
get conversations(): Array<vonage.ConversationJS>; | ||
get previousCursor(): Nullable<string>; | ||
get nextCursor(): Nullable<string>; | ||
} | ||
class MemberJS { | ||
@@ -136,2 +144,8 @@ private constructor(); | ||
} | ||
class MembersPageJS { | ||
private constructor(); | ||
get members(): Array<vonage.MemberJS>; | ||
get previousCursor(): Nullable<string>; | ||
get nextCursor(): Nullable<string>; | ||
} | ||
class UserJS { | ||
@@ -249,2 +263,67 @@ private constructor(); | ||
export namespace vonage { | ||
const CSErrorCodesJS: { | ||
get CONVERSATION_DUPLICATE_NAME(): string; | ||
get MEMBER_ALREADY_JOINED(): string; | ||
get MEMBER_ALREADY_INVITED(): string; | ||
get CONVERSATION_NOT_FOUND(): string; | ||
get MEMBER_NOT_FOUND(): string; | ||
get USER_NOT_FOUND(): string; | ||
get INVALID_CURSOR(): string; | ||
get VALIDATION_FAIL(): string; | ||
get CONVERSATION_MAX_NUMBER_OF_MEMBERS(): string; | ||
}; | ||
const SessionErrorCodesJS: { | ||
get EMPTY_TOKEN(): string; | ||
get FORCED_DISCONNECT(): string; | ||
get TIMEOUT(): string; | ||
get INTERNAL_FAILURE(): string; | ||
get NO_ACTIVE_SESSION(): string; | ||
get ALREADY_ACTIVE_SESSION(): string; | ||
get INVALID_TOKEN(): string; | ||
get EXPIRED_TOKEN(): string; | ||
get INVALID_USER(): string; | ||
get AUTHORIZATION_ERROR(): string; | ||
get INVALID_SESSION(): string; | ||
get MAX_OPEN_SESSIONS(): string; | ||
get INVALID_SOCKET_TRANSPORT(): string; | ||
get CLIENT_DISCONNECT(): string; | ||
get PING_TIMEOUT_DISCONNECT(): string; | ||
get TRANSPORT_CLOSED_DISCONNECT(): string; | ||
}; | ||
} | ||
export namespace vonage { | ||
class VonageErrorJS extends Error { | ||
private constructor(); | ||
get type(): vonage.VonageErrorTypeJS; | ||
get code(): Nullable<string>; | ||
} | ||
abstract class VonageErrorTypeJS { | ||
private constructor(); | ||
static get CS_ERROR(): vonage.VonageErrorTypeJS & { | ||
get name(): "CS_ERROR"; | ||
get ordinal(): 0; | ||
}; | ||
static get HTTP_CLIENT_ERROR(): vonage.VonageErrorTypeJS & { | ||
get name(): "HTTP_CLIENT_ERROR"; | ||
get ordinal(): 1; | ||
}; | ||
static get SESSION_ERROR(): vonage.VonageErrorTypeJS & { | ||
get name(): "SESSION_ERROR"; | ||
get ordinal(): 2; | ||
}; | ||
static get INTERNAL_ERROR(): vonage.VonageErrorTypeJS & { | ||
get name(): "INTERNAL_ERROR"; | ||
get ordinal(): 3; | ||
}; | ||
static get UNKNOWN_ERROR(): vonage.VonageErrorTypeJS & { | ||
get name(): "UNKNOWN_ERROR"; | ||
get ordinal(): 4; | ||
}; | ||
static values(): Array<vonage.VonageErrorTypeJS>; | ||
static valueOf(value: string): vonage.VonageErrorTypeJS; | ||
get name(): "CS_ERROR" | "HTTP_CLIENT_ERROR" | "SESSION_ERROR" | "INTERNAL_ERROR" | "UNKNOWN_ERROR"; | ||
get ordinal(): 0 | 1 | 2 | 3 | 4; | ||
} | ||
} | ||
export namespace vonage { | ||
interface ChatEvents extends vonage.CoreClientEvents { | ||
@@ -264,2 +343,4 @@ reconnecting(): void; | ||
deleteConversation(cid: string): Promise<any>; | ||
getConversations(order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.ConversationsPageJS>; | ||
getConversationMembers(cid: string, order: Nullable<vonage.PresentingOrderJS>, pageSize: Nullable<number>, cursor: Nullable<string>): Promise<vonage.MembersPageJS>; | ||
setConfig(config: vonage.CoreClientConfigJS): void; | ||
@@ -449,3 +530,3 @@ createSession(token: string, sessionId: Nullable<string>): Promise<string>; | ||
interface HttpClientJS { | ||
request(verb: string, url: string, headers: Json, body: Nullable<string>, callback: (p0: Nullable<Error>, p1: Nullable<string>) => void): void; | ||
request(verb: string, url: string, headers: Json, body: Nullable<string>, callback: (p0: Nullable<vonage.HttpClientErrorJS>, p1: Nullable<string>) => void): void; | ||
} | ||
@@ -465,2 +546,3 @@ interface SocketClientJS { | ||
interface MediaClientJS { | ||
delegate: Nullable<vonage.MediaClientDelegateJS>; | ||
enableMediaOutbound(closure: (p0: any, p1: Nullable<string>, p2: (p0: string) => void) => void): void; | ||
@@ -473,10 +555,23 @@ enableMediaInbound(closure: (p0: any, p1: Nullable<string>) => void, offerSDP: string, rtcId: string): void; | ||
getPeerConnection(id: string): any; | ||
enableRtcStatsCollection(interval: any/* kotlin.Number */, mediaId: string): void; | ||
} | ||
interface MediaClientDelegateJS { | ||
onOffer(mediaId: string, streamId: string, sdp: string, callback: (p0: Nullable<string>) => void): void; | ||
onAnswer(mediaId: string, streamId: string, sdp: string, callback: (p0: Nullable<string>) => void): void; | ||
onError(mediaId: Nullable<string>, error: Error): void; | ||
onRtcStats(rtcStats: vonage.RTCStatsJS): void; | ||
} | ||
} | ||
export namespace vonage { | ||
class HttpClientErrorJS extends Error { | ||
constructor(message?: Nullable<string>, responseCode?: Nullable<number>, responseBody?: Nullable<string>, cause?: Nullable<Error>); | ||
get responseCode(): Nullable<number>; | ||
get responseBody(): Nullable<string>; | ||
get coreError(): any/* com.vonage.clientcore.core.middlewares.http.HTTPClientError */; | ||
component1(): Nullable<string>; | ||
component2(): Nullable<number>; | ||
component3(): Nullable<string>; | ||
component4(): Nullable<Error>; | ||
copy(message?: Nullable<string>, responseCode?: Nullable<number>, responseBody?: Nullable<string>, cause?: Nullable<Error>): vonage.HttpClientErrorJS; | ||
toString(): string; | ||
hashCode(): number; | ||
equals(other: Nullable<any>): boolean; | ||
} | ||
const SOCKET_CONNECTED: string; | ||
@@ -505,3 +600,30 @@ const SOCKET_RECONNECTING: string; | ||
} | ||
class RTCStatsJS { | ||
constructor(audioRecvPackets: any/* Nullable<kotlin.Number> */, audioRecvPacketsLost: any/* Nullable<kotlin.Number> */, audioRecvBytes: any/* Nullable<kotlin.Number> */, audioRecvJitter: any/* Nullable<kotlin.Number> */, audioSentPackets: any/* Nullable<kotlin.Number> */, audioSentBytes: any/* Nullable<kotlin.Number> */, audioSentPacketsLost: any/* Nullable<kotlin.Number> */, audioRtt: any/* Nullable<kotlin.Number> */, audioSentJitter: any/* Nullable<kotlin.Number> */, legId: string); | ||
get audioRecvPackets(): any/* Nullable<kotlin.Number> */; | ||
get audioRecvPacketsLost(): any/* Nullable<kotlin.Number> */; | ||
get audioRecvBytes(): any/* Nullable<kotlin.Number> */; | ||
get audioRecvJitter(): any/* Nullable<kotlin.Number> */; | ||
get audioSentPackets(): any/* Nullable<kotlin.Number> */; | ||
get audioSentBytes(): any/* Nullable<kotlin.Number> */; | ||
get audioSentPacketsLost(): any/* Nullable<kotlin.Number> */; | ||
get audioRtt(): any/* Nullable<kotlin.Number> */; | ||
get audioSentJitter(): any/* Nullable<kotlin.Number> */; | ||
get legId(): string; | ||
component1(): any/* Nullable<kotlin.Number> */; | ||
component2(): any/* Nullable<kotlin.Number> */; | ||
component3(): any/* Nullable<kotlin.Number> */; | ||
component4(): any/* Nullable<kotlin.Number> */; | ||
component5(): any/* Nullable<kotlin.Number> */; | ||
component6(): any/* Nullable<kotlin.Number> */; | ||
component7(): any/* Nullable<kotlin.Number> */; | ||
component8(): any/* Nullable<kotlin.Number> */; | ||
component9(): any/* Nullable<kotlin.Number> */; | ||
component10(): string; | ||
copy(audioRecvPackets?: any/* Nullable<kotlin.Number> */, audioRecvPacketsLost?: any/* Nullable<kotlin.Number> */, audioRecvBytes?: any/* Nullable<kotlin.Number> */, audioRecvJitter?: any/* Nullable<kotlin.Number> */, audioSentPackets?: any/* Nullable<kotlin.Number> */, audioSentBytes?: any/* Nullable<kotlin.Number> */, audioSentPacketsLost?: any/* Nullable<kotlin.Number> */, audioRtt?: any/* Nullable<kotlin.Number> */, audioSentJitter?: any/* Nullable<kotlin.Number> */, legId?: string): vonage.RTCStatsJS; | ||
toString(): string; | ||
hashCode(): number; | ||
equals(other: Nullable<any>): boolean; | ||
} | ||
} | ||
export as namespace clientsdk_clientcore_js; |
@@ -6,4 +6,4 @@ import * as KMPPackage from '../kotlin/clientsdk-clientcore_js'; | ||
private stringToVerb; | ||
request(verb: string, url: string, headers: HttpHeaders, body: string | null, callback: (p0: KMPPackage.Nullable<Error>, p1: KMPPackage.Nullable<string>) => void): Promise<void>; | ||
request(verb: string, url: string, headers: HttpHeaders, body: string | null, callback: (p0: KMPPackage.Nullable<vonage.HttpClientErrorJS>, p1: KMPPackage.Nullable<string>) => void): Promise<void>; | ||
} | ||
export default HttpClient; |
@@ -8,3 +8,5 @@ import * as KMPPackage from '../kotlin/clientsdk-clientcore_js'; | ||
private stream; | ||
private intervalId; | ||
constructor(); | ||
enableRtcStatsCollection(interval: number, mediaId: string): void; | ||
enableMediaInbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>) => void, offerSDP: string, rtcId: string): Promise<void>; | ||
@@ -11,0 +13,0 @@ enableMediaOutbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>, callback: (legId: string) => void) => void): Promise<void>; |
export { ClientConfig, ConfigRegion } from './ClientConfig'; | ||
export { LoggingLevel } from './logging'; | ||
export * from './ConversationModels'; | ||
export * from './ErrorModels'; |
{ | ||
"name": "@vonage/client-sdk", | ||
"version": "0.2.0-alpha.0", | ||
"version": "0.2.0-alpha.1", | ||
"description": "", | ||
@@ -51,3 +51,3 @@ "type": "module", | ||
"@swc/core": "^1.3.24", | ||
"@types/eslint": "^8.4.10", | ||
"@types/eslint": "^8.21.1", | ||
"@types/sdp-transform": "^2.4.5", | ||
@@ -58,3 +58,2 @@ "@types/socket.io-client": "^1.4.32", | ||
"@typescript-eslint/parser": "^5.11.0", | ||
"eslint": "^8.8.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
@@ -74,2 +73,3 @@ "eslint-plugin-prettier": "^4.0.0", | ||
"events": "^3.3.0", | ||
"rtc-stats-adapter": "^1.2.0", | ||
"sdp-transform": "^2.14.1", | ||
@@ -76,0 +76,0 @@ "socket.io-client": "^2.4.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11473797
22
25
250524
6
+ Addedrtc-stats-adapter@^1.2.0
+ Added@hapi/hoek@9.3.0(transitive)
+ Added@hapi/topo@5.1.0(transitive)
+ Added@sideway/address@4.1.5(transitive)
+ Added@sideway/formula@3.0.1(transitive)
+ Added@sideway/pinpoint@2.0.0(transitive)
+ Addedaxios@1.7.7(transitive)
+ Addedjoi@17.13.3(transitive)
+ Addedrtc-stats-adapter@1.2.0(transitive)
+ Addedsdp-transform@2.14.2(transitive)
- Removedaxios@1.7.8(transitive)
- Removedsdp-transform@2.15.0(transitive)