@vonage/client-sdk
Advanced tools
Comparing version 0.1.5 to 0.1.6-alpha.0
@@ -5,24 +5,274 @@ type Nullable<T> = T | null | undefined | ||
export namespace vonage { | ||
interface CoreClientEvents { | ||
reconnecting(): void; | ||
reconnection(): void; | ||
sessionError(reason: vonage.SessionErrorReasonJS): void; | ||
interface CombinedEvents extends vonage.VoiceEvents, vonage.ChatEvents { | ||
callInvite(callId: string, invite: vonage.VoiceInviteJS): void; | ||
callTransfer(callId: string, cid: vonage.ConversationJS, prevConversation: vonage.ConversationJS): void; | ||
callTransfer(callId: string, conversationId: string): void; | ||
mute(callId: string, legId: string, isMuted: boolean): void; | ||
earmuff(callId: string, legId: string, earmuffStatus: boolean): void; | ||
dtmf(callId: string, legId: string, digits: string): void; | ||
rtcHangup(callId: string, legId: string, callQuality: vonage.RTCQualityJS): void; | ||
callHangup(callId: string, callQuality: vonage.RTCQualityJS): void; | ||
legStatusUpdate(callId: string, legId: string, status: string): void; | ||
reconnecting(): void; | ||
reconnection(): void; | ||
sessionError(reason: vonage.SessionErrorReasonJS): void; | ||
} | ||
interface CallSayParams { | ||
readonly text: string; | ||
readonly level: Nullable<number>; | ||
readonly loop: Nullable<number>; | ||
readonly queue: Nullable<boolean>; | ||
readonly voiceName: Nullable<string>; | ||
readonly ssml: Nullable<boolean>; | ||
} | ||
export namespace vonage { | ||
class CombinedClientJS implements vonage.IChatClientJS, vonage.IVoiceClientJS { | ||
constructor(http: vonage.HttpClientJS, socket: vonage.SocketClientJS, media: vonage.MediaClientJS); | ||
get media(): vonage.MediaClientJS; | ||
get core(): any/* com.vonage.clientcore.core.CoreClientWithMedia */; | ||
get emitter(): Nullable<vonage.CombinedEvents>; | ||
set emitter(value: Nullable<vonage.CombinedEvents>); | ||
createConversation(name: Nullable<string>, displayName: Nullable<string>): Promise<string>; | ||
joinConversation(cid: string): Promise<string>; | ||
inviteToConversation(cid: string, username: string): Promise<string>; | ||
leaveConversation(cid: string): Promise<any>; | ||
deleteConversation(cid: string): Promise<any>; | ||
setConfig(config: vonage.CoreClientConfigJS): void; | ||
createSession(token: string, sessionId: Nullable<string>): Promise<string>; | ||
deleteSession(): Promise<any>; | ||
refreshSession(token: string): Promise<any>; | ||
getConversation(conversationId: string): Promise<vonage.ConversationJS>; | ||
getUser(userIdOrName: string): Promise<vonage.UserJS>; | ||
getPeerConnection(id: string): any; | ||
serverCall(context: Nullable<Json>): Promise<vonage.VoiceCallJS>; | ||
reconnectCall(legId: string): Promise<vonage.VoiceCallJS>; | ||
getLeg(legId: string): Promise<vonage.LegJS>; | ||
readonly __doNotUseIt: __doNotImplementIt; | ||
} | ||
} | ||
export namespace vonage { | ||
abstract class PresentingOrderJS { | ||
private constructor(); | ||
get corePresentingOrder(): any/* com.vonage.clientcore.core.api.models.PresentingOrder */; | ||
static get ASC(): vonage.PresentingOrderJS & { | ||
get name(): "ASC"; | ||
get ordinal(): 0; | ||
}; | ||
static get DESC(): vonage.PresentingOrderJS & { | ||
get name(): "DESC"; | ||
get ordinal(): 1; | ||
}; | ||
static values(): Array<vonage.PresentingOrderJS>; | ||
static valueOf(value: string): vonage.PresentingOrderJS; | ||
get name(): "ASC" | "DESC"; | ||
get ordinal(): 0 | 1; | ||
} | ||
class ConversationJS { | ||
private constructor(); | ||
get id(): string; | ||
get name(): string; | ||
get timestamp(): vonage.ConversationTimestampJS; | ||
get memberId(): Nullable<string>; | ||
get memberState(): Nullable<vonage.MemberStateJS>; | ||
get displayName(): Nullable<string>; | ||
get imageUrl(): Nullable<string>; | ||
get state(): Nullable<vonage.ConversationStateJS>; | ||
get customData(): Nullable<string>; | ||
} | ||
abstract class ConversationStateJS { | ||
private constructor(); | ||
static get ACTIVE(): vonage.ConversationStateJS & { | ||
get name(): "ACTIVE"; | ||
get ordinal(): 0; | ||
}; | ||
static get INACTIVE(): vonage.ConversationStateJS & { | ||
get name(): "INACTIVE"; | ||
get ordinal(): 1; | ||
}; | ||
static get DELETED(): vonage.ConversationStateJS & { | ||
get name(): "DELETED"; | ||
get ordinal(): 2; | ||
}; | ||
static values(): Array<vonage.ConversationStateJS>; | ||
static valueOf(value: string): vonage.ConversationStateJS; | ||
get name(): "ACTIVE" | "INACTIVE" | "DELETED"; | ||
get ordinal(): 0 | 1 | 2; | ||
} | ||
class ConversationTimestampJS { | ||
private constructor(); | ||
get created(): Nullable<string>; | ||
get updated(): Nullable<string>; | ||
get destroyed(): Nullable<string>; | ||
} | ||
class MemberJS { | ||
private constructor(); | ||
get id(): string; | ||
get state(): vonage.MemberStateJS; | ||
get user(): Nullable<vonage.UserJS>; | ||
get channel(): Nullable<vonage.MemberChannelJS>; | ||
get timestamp(): Nullable<vonage.MemberTimestampJS>; | ||
} | ||
abstract class MemberStateJS { | ||
private constructor(); | ||
static get INVITED(): vonage.MemberStateJS & { | ||
get name(): "INVITED"; | ||
get ordinal(): 0; | ||
}; | ||
static get JOINED(): vonage.MemberStateJS & { | ||
get name(): "JOINED"; | ||
get ordinal(): 1; | ||
}; | ||
static get LEFT(): vonage.MemberStateJS & { | ||
get name(): "LEFT"; | ||
get ordinal(): 2; | ||
}; | ||
static get UNKNOWN(): vonage.MemberStateJS & { | ||
get name(): "UNKNOWN"; | ||
get ordinal(): 3; | ||
}; | ||
static values(): Array<vonage.MemberStateJS>; | ||
static valueOf(value: string): vonage.MemberStateJS; | ||
get name(): "INVITED" | "JOINED" | "LEFT" | "UNKNOWN"; | ||
get ordinal(): 0 | 1 | 2 | 3; | ||
} | ||
class MemberTimestampJS { | ||
private constructor(); | ||
get invited(): Nullable<string>; | ||
get joined(): Nullable<string>; | ||
get left(): Nullable<string>; | ||
} | ||
class UserJS { | ||
private constructor(); | ||
get id(): string; | ||
get name(): string; | ||
get displayName(): Nullable<string>; | ||
get channels(): Nullable<vonage.UserChannelsJS>; | ||
get timestamp(): Nullable<vonage.UserTimestampJS>; | ||
get imageUrl(): Nullable<string>; | ||
get customData(): Nullable<string>; | ||
} | ||
class UserTimestampJS { | ||
private constructor(); | ||
get created(): Nullable<string>; | ||
get updated(): Nullable<string>; | ||
get destroyed(): Nullable<string>; | ||
} | ||
class UserChannelsJS { | ||
private constructor(); | ||
get app(): Nullable<Array<vonage.ChannelJS>>; | ||
get phone(): Nullable<Array<vonage.ChannelJS>>; | ||
get pstn(): Nullable<Array<vonage.ChannelJS>>; | ||
get sip(): Nullable<Array<vonage.ChannelJS>>; | ||
get vbc(): Nullable<Array<vonage.ChannelJS>>; | ||
get websocket(): Nullable<Array<vonage.ChannelJS>>; | ||
get sms(): Nullable<Array<vonage.ChannelJS>>; | ||
get mms(): Nullable<Array<vonage.ChannelJS>>; | ||
get whatsapp(): Nullable<Array<vonage.ChannelJS>>; | ||
get viber(): Nullable<Array<vonage.ChannelJS>>; | ||
get messenger(): Nullable<Array<vonage.ChannelJS>>; | ||
} | ||
class MemberChannelJS { | ||
private constructor(); | ||
get type(): vonage.ChannelTypeJS; | ||
get from(): Nullable<vonage.ChannelJS>; | ||
get to(): Nullable<vonage.ChannelJS>; | ||
} | ||
class ChannelJS { | ||
private constructor(); | ||
get id(): Nullable<string>; | ||
get number(): Nullable<string>; | ||
} | ||
class LegChannelJS { | ||
private constructor(); | ||
get type(): Nullable<string>; | ||
get user(): Nullable<string>; | ||
get number(): Nullable<string>; | ||
} | ||
class LegJS { | ||
private constructor(); | ||
get id(): string; | ||
get type(): string; | ||
get direction(): string; | ||
get conversationId(): string; | ||
get status(): string; | ||
get startTime(): string; | ||
get endTime(): string; | ||
get from(): vonage.LegChannelJS; | ||
get to(): vonage.LegChannelJS; | ||
} | ||
abstract class ChannelTypeJS { | ||
private constructor(); | ||
static get APP(): vonage.ChannelTypeJS & { | ||
get name(): "APP"; | ||
get ordinal(): 0; | ||
}; | ||
static get PHONE(): vonage.ChannelTypeJS & { | ||
get name(): "PHONE"; | ||
get ordinal(): 1; | ||
}; | ||
static get PSTN(): vonage.ChannelTypeJS & { | ||
get name(): "PSTN"; | ||
get ordinal(): 2; | ||
}; | ||
static get SIP(): vonage.ChannelTypeJS & { | ||
get name(): "SIP"; | ||
get ordinal(): 3; | ||
}; | ||
static get VBC(): vonage.ChannelTypeJS & { | ||
get name(): "VBC"; | ||
get ordinal(): 4; | ||
}; | ||
static get WEBSOCKET(): vonage.ChannelTypeJS & { | ||
get name(): "WEBSOCKET"; | ||
get ordinal(): 5; | ||
}; | ||
static get SMS(): vonage.ChannelTypeJS & { | ||
get name(): "SMS"; | ||
get ordinal(): 6; | ||
}; | ||
static get MMS(): vonage.ChannelTypeJS & { | ||
get name(): "MMS"; | ||
get ordinal(): 7; | ||
}; | ||
static get WHATSAPP(): vonage.ChannelTypeJS & { | ||
get name(): "WHATSAPP"; | ||
get ordinal(): 8; | ||
}; | ||
static get VIBER(): vonage.ChannelTypeJS & { | ||
get name(): "VIBER"; | ||
get ordinal(): 9; | ||
}; | ||
static get MESSENGER(): vonage.ChannelTypeJS & { | ||
get name(): "MESSENGER"; | ||
get ordinal(): 10; | ||
}; | ||
static values(): Array<vonage.ChannelTypeJS>; | ||
static valueOf(value: string): vonage.ChannelTypeJS; | ||
get name(): "APP" | "PHONE" | "PSTN" | "SIP" | "VBC" | "WEBSOCKET" | "SMS" | "MMS" | "WHATSAPP" | "VIBER" | "MESSENGER"; | ||
get ordinal(): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10; | ||
} | ||
} | ||
export namespace vonage { | ||
interface ChatEvents extends vonage.CoreClientEvents { | ||
reconnecting(): void; | ||
reconnection(): void; | ||
sessionError(reason: vonage.SessionErrorReasonJS): void; | ||
} | ||
} | ||
export namespace vonage { | ||
interface IChatClientJS extends vonage.ICoreClientJS { | ||
readonly core: any/* com.vonage.clientcore.core.CoreClient */; | ||
createConversation(name: Nullable<string>, displayName: Nullable<string>): Promise<string>; | ||
joinConversation(cid: string): Promise<string>; | ||
inviteToConversation(cid: string, username: string): Promise<string>; | ||
leaveConversation(cid: string): Promise<any>; | ||
deleteConversation(cid: string): Promise<any>; | ||
setConfig(config: vonage.CoreClientConfigJS): void; | ||
createSession(token: string, sessionId: Nullable<string>): Promise<string>; | ||
deleteSession(): Promise<any>; | ||
refreshSession(token: string): Promise<any>; | ||
getConversation(conversationId: string): Promise<vonage.ConversationJS>; | ||
getUser(userIdOrName: string): Promise<vonage.UserJS>; | ||
readonly __doNotUseIt: __doNotImplementIt; | ||
} | ||
} | ||
export namespace vonage { | ||
interface CoreClientEvents { | ||
reconnecting(): void; | ||
reconnection(): void; | ||
sessionError(reason: vonage.SessionErrorReasonJS): void; | ||
} | ||
} | ||
export namespace vonage { | ||
abstract class CoreClientConfigRegionJS { | ||
@@ -114,6 +364,4 @@ private constructor(); | ||
function setDefaultLoggingLevel(level: vonage.LoggingLevelJS): void; | ||
class CoreClientJS { | ||
constructor(http: vonage.HttpClientJS, socket: vonage.SocketClientJS, media: vonage.MediaClientJS); | ||
get emitter(): Nullable<vonage.CoreClientEvents>; | ||
set emitter(value: Nullable<vonage.CoreClientEvents>); | ||
interface ICoreClientJS { | ||
readonly core: any/* com.vonage.clientcore.core.CoreClient */; | ||
setConfig(config: vonage.CoreClientConfigJS): void; | ||
@@ -123,5 +371,44 @@ createSession(token: string, sessionId: Nullable<string>): Promise<string>; | ||
refreshSession(token: string): Promise<any>; | ||
getConversation(conversationId: string): Promise<vonage.ConversationJS>; | ||
getUser(userIdOrName: string): Promise<vonage.UserJS>; | ||
readonly __doNotUseIt: __doNotImplementIt; | ||
} | ||
} | ||
export namespace vonage { | ||
interface VoiceEvents extends vonage.CoreClientEvents { | ||
callInvite(callId: string, invite: vonage.VoiceInviteJS): void; | ||
callTransfer(callId: string, conversationId: string): void; | ||
mute(callId: string, legId: string, isMuted: boolean): void; | ||
earmuff(callId: string, legId: string, earmuffStatus: boolean): void; | ||
dtmf(callId: string, legId: string, digits: string): void; | ||
callHangup(callId: string, callQuality: vonage.RTCQualityJS): void; | ||
legStatusUpdate(callId: string, legId: string, status: string): void; | ||
reconnecting(): void; | ||
reconnection(): void; | ||
sessionError(reason: vonage.SessionErrorReasonJS): void; | ||
} | ||
interface CallSayParams { | ||
readonly text: string; | ||
readonly level: Nullable<number>; | ||
readonly loop: Nullable<number>; | ||
readonly queue: Nullable<boolean>; | ||
readonly voiceName: Nullable<string>; | ||
readonly ssml: Nullable<boolean>; | ||
} | ||
} | ||
export namespace vonage { | ||
interface IVoiceClientJS extends vonage.ICoreClientJS { | ||
readonly media: vonage.MediaClientJS; | ||
readonly core: any/* com.vonage.clientcore.core.CoreClientWithMedia */; | ||
getPeerConnection(id: string): any; | ||
serverCall(context: Nullable<Json>): Promise<vonage.VoiceCallJS>; | ||
reconnectCall(legId: string): Promise<vonage.VoiceCallJS>; | ||
getLeg(legId: string): Promise<vonage.LegJS>; | ||
setConfig(config: vonage.CoreClientConfigJS): void; | ||
createSession(token: string, sessionId: Nullable<string>): Promise<string>; | ||
deleteSession(): Promise<any>; | ||
refreshSession(token: string): Promise<any>; | ||
getConversation(conversationId: string): Promise<vonage.ConversationJS>; | ||
getUser(userIdOrName: string): Promise<vonage.UserJS>; | ||
readonly __doNotUseIt: __doNotImplementIt; | ||
} | ||
@@ -139,2 +426,13 @@ class VoiceCallJS { | ||
} | ||
class VoiceInviteFromInfoJS { | ||
constructor(id: Nullable<string>, type: string); | ||
get id(): Nullable<string>; | ||
get type(): string; | ||
component1(): Nullable<string>; | ||
component2(): string; | ||
copy(id?: Nullable<string>, type?: string): vonage.VoiceInviteFromInfoJS; | ||
toString(): string; | ||
hashCode(): number; | ||
equals(other: Nullable<any>): boolean; | ||
} | ||
class VoiceInviteJS { | ||
@@ -147,11 +445,2 @@ private constructor(); | ||
} | ||
class ConversationJS { | ||
private constructor(); | ||
get id(): string; | ||
set id(value: string); | ||
copy(conversation?: any/* com.vonage.clientcore.core.api.Conversation */): vonage.ConversationJS; | ||
toString(): string; | ||
hashCode(): number; | ||
equals(other: Nullable<any>): boolean; | ||
} | ||
} | ||
@@ -158,0 +447,0 @@ export namespace vonage { |
import * as KMPPackage from '../kotlin/clientsdk-clientcore_js'; | ||
import { vonage } from '../kotlin/clientsdk-clientcore_js'; | ||
import vonage from '../utils/vonage'; | ||
type HttpHeaders = Record<string, string | number | boolean>; | ||
@@ -4,0 +4,0 @@ declare class HttpClient implements vonage.HttpClientJS { |
import * as KMPPackage from '../kotlin/clientsdk-clientcore_js'; | ||
import { vonage } from '../kotlin/clientsdk-clientcore_js'; | ||
import vonage from '../utils/vonage'; | ||
declare class MediaClient implements vonage.MediaClientJS { | ||
@@ -4,0 +4,0 @@ delegate: KMPPackage.Nullable<vonage.MediaClientDelegateJS>; |
import * as KMPPackage from '../kotlin/clientsdk-clientcore_js'; | ||
import { vonage } from '../kotlin/clientsdk-clientcore_js'; | ||
import vonage from '../utils/vonage'; | ||
declare class SocketClient implements vonage.SocketClientJS { | ||
@@ -4,0 +4,0 @@ delegate: KMPPackage.Nullable<vonage.SocketClientDelegateJS>; |
{ | ||
"name": "@vonage/client-sdk", | ||
"version": "0.1.5", | ||
"version": "0.1.6-alpha.0", | ||
"description": "", | ||
"type": "module", | ||
"module": "dist/index.mjs", | ||
"main": "dist/index.cjs", | ||
"types": "dist/index.d.ts", | ||
"typesVersions": { | ||
"*": { | ||
"voice": [ | ||
"dist/voice/index.d.ts" | ||
] | ||
} | ||
}, | ||
"module": "dist/client/index.mjs", | ||
"main": "dist/client/index.cjs", | ||
"types": "dist/client/index.d.ts", | ||
"exports": { | ||
"./voice": { | ||
"types": "./dist/voice/index.d.ts", | ||
"import": "./dist/voice/index.mjs", | ||
"require": "./dist/voice/index.cjs" | ||
}, | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"types": "./dist/client/index.d.ts", | ||
"import": "./dist/client/index.mjs", | ||
"require": "./dist/client/index.cjs", | ||
"browser": "./dist/vonageClientSDK.js", | ||
"deno": "./dist/vonageClientSDK.mjs", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
"deno": "./dist/vonageClientSDK.mjs" | ||
} | ||
@@ -59,2 +47,3 @@ }, | ||
"@rollup/plugin-json": "^6.0.0", | ||
"@rollup/plugin-multi-entry": "^6.0.0", | ||
"@rollup/plugin-node-resolve": "^15.0.1", | ||
@@ -74,2 +63,4 @@ "@rollup/plugin-terser": "^0.2.1", | ||
"rollup": "^3.9.0", | ||
"rollup-plugin-cjs-es": "^2.0.0", | ||
"rollup-plugin-sizes": "^1.0.5", | ||
"rollup-plugin-swc3": "^0.8.0", | ||
@@ -76,0 +67,0 @@ "rollup-plugin-typescript2": "^0.34.1", |
@@ -6,2 +6,3 @@ import { nodeResolve } from '@rollup/plugin-node-resolve'; | ||
import terser from '@rollup/plugin-terser'; | ||
import sizes from 'rollup-plugin-sizes'; | ||
@@ -13,3 +14,3 @@ /** | ||
{ | ||
input: 'src/index.ts', | ||
input: 'src/client/index.ts', | ||
output: [ | ||
@@ -19,3 +20,4 @@ { | ||
file: 'dist/vonageClientSDK.js', | ||
format: 'umd' | ||
format: 'umd', | ||
exports: 'named' | ||
}, | ||
@@ -26,3 +28,4 @@ { | ||
format: 'umd', | ||
plugins: [terser()] | ||
plugins: [terser()], | ||
exports: 'named' | ||
}, | ||
@@ -58,3 +61,3 @@ { | ||
{ | ||
input: 'src/voice/index.ts', | ||
input: 'src/client/index.ts', | ||
external: [ | ||
@@ -67,5 +70,6 @@ 'axios', | ||
], | ||
treeshake: true, | ||
output: [ | ||
{ | ||
file: './dist/voice/index.mjs', | ||
file: './dist/client/index.mjs', | ||
format: 'es', | ||
@@ -75,3 +79,3 @@ exports: 'named' | ||
{ | ||
file: './dist/voice/index.cjs', | ||
file: './dist/client/index.cjs', | ||
format: 'cjs', | ||
@@ -91,28 +95,5 @@ exports: 'named' | ||
} | ||
}) | ||
}), | ||
sizes() | ||
] | ||
}, | ||
{ | ||
input: 'src/index.ts', | ||
external: [ | ||
'./voice', | ||
'axios', | ||
'socket.io-client', | ||
'socketio-wildcard', | ||
'sdp-transform', | ||
'events' | ||
], | ||
output: [ | ||
{ | ||
file: './dist/index.mjs', | ||
format: 'es', | ||
exports: 'named' | ||
}, | ||
{ | ||
file: './dist/index.cjs', | ||
format: 'cjs', | ||
exports: 'named' | ||
} | ||
], | ||
plugins: [typescript()] | ||
} | ||
@@ -119,0 +100,0 @@ ]; |
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
10671888
23
234106
23