@vonage/client-sdk 2.3.0-alpha.0 → 2.3.1-alpha.1
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/api_docs/ts/assets/icons.js +15 -0
- package/api_docs/ts/assets/icons.svg +1 -0
- package/api_docs/ts/assets/main.js +4 -4
- package/api_docs/ts/assets/style.css +40 -22
- package/api_docs/ts/classes/ClientConfig.html +13 -13
- package/api_docs/ts/classes/ClientInitConfig.html +14 -14
- package/api_docs/ts/classes/VonageClient.html +228 -228
- package/api_docs/ts/enums/CallDisconnectReason.html +3 -3
- package/api_docs/ts/enums/CancelReason.html +6 -6
- package/api_docs/ts/enums/HangupReason.html +7 -7
- package/api_docs/ts/enums/LegStatus.html +5 -5
- package/api_docs/ts/enums/LoggingLevel.html +8 -8
- package/api_docs/ts/enums/MemberChannelType.html +13 -13
- package/api_docs/ts/enums/OrderBy.html +2 -2
- package/api_docs/ts/enums/PresentingOrder.html +7 -7
- package/api_docs/ts/enums/SessionErrorReason.html +5 -5
- package/api_docs/ts/enums/VoiceChannelType.html +6 -6
- package/api_docs/ts/enums/VonageErrorType.html +7 -7
- package/api_docs/ts/functions/none.html +2 -2
- package/api_docs/ts/functions/some.html +3 -3
- package/api_docs/ts/index.html +2 -2
- package/api_docs/ts/interfaces/CallSayParams.html +8 -8
- package/api_docs/ts/interfaces/Channel.html +6 -6
- package/api_docs/ts/interfaces/Conversation.html +20 -20
- package/api_docs/ts/interfaces/ConversationProperties.html +8 -8
- package/api_docs/ts/interfaces/ConversationTimestamp.html +5 -5
- package/api_docs/ts/interfaces/ConversationsPage.html +8 -8
- package/api_docs/ts/interfaces/CreateConversationParameters.html +14 -14
- package/api_docs/ts/interfaces/EmergencyCallData.html +6 -6
- package/api_docs/ts/interfaces/EmergencyCallOptions.html +4 -4
- package/api_docs/ts/interfaces/EphemeralConversationEvent.html +12 -12
- package/api_docs/ts/interfaces/EventsPage.html +8 -8
- package/api_docs/ts/interfaces/GetCallLegsParameters.html +8 -8
- package/api_docs/ts/interfaces/GetConversationEventsParameters.html +14 -14
- package/api_docs/ts/interfaces/GetConversationMembersParameters.html +8 -8
- package/api_docs/ts/interfaces/GetConversationsParameters.html +12 -12
- package/api_docs/ts/interfaces/Leg.html +21 -21
- package/api_docs/ts/interfaces/LegChannel.html +8 -8
- package/api_docs/ts/interfaces/LegsPage.html +8 -8
- package/api_docs/ts/interfaces/Location.html +6 -6
- package/api_docs/ts/interfaces/Member.html +12 -12
- package/api_docs/ts/interfaces/MemberChannel.html +8 -8
- package/api_docs/ts/interfaces/MemberEventBody.html +7 -7
- package/api_docs/ts/interfaces/MemberTimestamp.html +5 -5
- package/api_docs/ts/interfaces/MembersPage.html +8 -8
- package/api_docs/ts/interfaces/MessageAudioEventBody.html +5 -5
- package/api_docs/ts/interfaces/MessageCustomEventBody.html +5 -5
- package/api_docs/ts/interfaces/MessageFileEventBody.html +6 -6
- package/api_docs/ts/interfaces/MessageImageEventBody.html +6 -6
- package/api_docs/ts/interfaces/MessageLocationEventBody.html +6 -6
- package/api_docs/ts/interfaces/MessageTemplateEventBody.html +9 -9
- package/api_docs/ts/interfaces/MessageTextEventBody.html +6 -6
- package/api_docs/ts/interfaces/MessageVCardEventBody.html +6 -6
- package/api_docs/ts/interfaces/MessageVideoEventBody.html +6 -6
- package/api_docs/ts/interfaces/RTCQuality.html +11 -11
- package/api_docs/ts/interfaces/RtcStats.html +11 -11
- package/api_docs/ts/interfaces/Template.html +4 -4
- package/api_docs/ts/interfaces/UpdateConversationParameters.html +14 -14
- package/api_docs/ts/interfaces/User.html +16 -16
- package/api_docs/ts/interfaces/UserChannels.html +13 -13
- package/api_docs/ts/interfaces/UserTimestamp.html +5 -5
- package/api_docs/ts/interfaces/VonageError.html +9 -9
- package/api_docs/ts/interfaces/VonageEvent.html +21 -21
- package/api_docs/ts/interfaces/Whatsapp.html +4 -4
- package/api_docs/ts/modules.html +74 -74
- package/api_docs/ts/types/ClientConfigObject.html +2 -2
- package/api_docs/ts/types/ClientInitConfigObject.html +2 -2
- package/api_docs/ts/types/ConfigRegion.html +2 -2
- package/api_docs/ts/types/ConversationEvent.html +2 -2
- package/api_docs/ts/types/CustomData.html +2 -2
- package/api_docs/ts/types/Json.html +2 -2
- package/api_docs/ts/types/JsonValue.html +2 -2
- package/api_docs/ts/types/MemberStatus.html +2 -2
- package/api_docs/ts/types/Option.html +2 -2
- package/api_docs/ts/types/PersistentConversationEvent.html +2 -2
- package/api_docs/ts/types/Topics.html +2 -2
- package/api_docs/ts/types/VonageLogger.html +2 -2
- package/api_docs/ts/variables/Topics-1.html +2 -2
- package/api_docs/ts/variables/VonageError-1.html +2 -2
- package/dist/client/index.cjs +8314 -8091
- package/dist/client/index.mjs +8314 -8091
- package/dist/vonageClientSDK.js +10326 -10010
- package/dist/vonageClientSDK.min.js +27 -28
- package/dist/vonageClientSDK.min.mjs +27 -28
- package/dist/vonageClientSDK.mjs +10326 -10010
- package/eslint.config.js +44 -0
- package/package.json +19 -15
- package/rollup.config.js +2 -1
- package/dist/lib/HttpClient.d.ts +0 -7
- package/dist/lib/MediaClient.d.ts +0 -29
- package/dist/lib/SocketClient.d.ts +0 -17
- package/dist/lib/createRtcAudioConnection.d.ts +0 -5
package/eslint.config.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import tseslint from "typescript-eslint";
|
|
3
|
+
import prettier from "eslint-config-prettier";
|
|
4
|
+
import prettierPlugin from "eslint-plugin-prettier";
|
|
5
|
+
|
|
6
|
+
export default tseslint.config(
|
|
7
|
+
{
|
|
8
|
+
ignores: [
|
|
9
|
+
"node_modules/",
|
|
10
|
+
"dist/",
|
|
11
|
+
"src/kotlin/",
|
|
12
|
+
"api_docs/",
|
|
13
|
+
"scripts/",
|
|
14
|
+
"docs/",
|
|
15
|
+
"**/*.js",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
files: ["**/*.ts"],
|
|
20
|
+
extends: [eslint.configs.recommended, ...tseslint.configs.recommended],
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
files: ["**/*.ts"],
|
|
24
|
+
...prettier,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
files: ["**/*.ts"],
|
|
28
|
+
plugins: {
|
|
29
|
+
prettier: prettierPlugin,
|
|
30
|
+
},
|
|
31
|
+
rules: {
|
|
32
|
+
"@typescript-eslint/no-explicit-any": "error",
|
|
33
|
+
"@typescript-eslint/no-unused-vars": [
|
|
34
|
+
"error",
|
|
35
|
+
{
|
|
36
|
+
argsIgnorePattern: "^_",
|
|
37
|
+
varsIgnorePattern: "^_",
|
|
38
|
+
caughtErrorsIgnorePattern: "^_",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
"prettier/prettier": "error",
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonage/client-sdk",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1-alpha.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/client/index.mjs",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"start": "node dist/Client.js",
|
|
30
30
|
"build:watch": "tsc -w",
|
|
31
31
|
"check": "tsc --project ./examples/tsconfig.json --noEmit --skipLibCheck --strictNullChecks true",
|
|
32
|
-
"lint": "eslint .
|
|
33
|
-
"lint:fix": "eslint . --
|
|
32
|
+
"lint": "eslint .",
|
|
33
|
+
"lint:fix": "eslint . --fix",
|
|
34
34
|
"clean": "rm -Rf node_modules; rm -Rf dist/",
|
|
35
35
|
"build:docs": "typedoc --includeVersion --tsconfig ./tsconfig.json --out api_docs/ts src/client/index.ts --includes examples/snippets --disableSources",
|
|
36
36
|
"clean:doNotUseOrImplementIt": "node ./scripts/replaceAllDoNotUseOrImplement.js ./src/kotlin/clientsdk-clientcore_js.d.ts && node ./scripts/replaceAllDoNotUseOrImplement.js ./dist/kotlin/clientsdk-clientcore_js.d.ts"
|
|
@@ -49,39 +49,43 @@
|
|
|
49
49
|
"webRTC"
|
|
50
50
|
],
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@
|
|
52
|
+
"@eslint/js": "^9.39.2",
|
|
53
|
+
"@rollup/plugin-commonjs": "^28.0.9",
|
|
53
54
|
"@rollup/plugin-json": "^6.0.0",
|
|
54
|
-
"@rollup/plugin-multi-entry": "^
|
|
55
|
+
"@rollup/plugin-multi-entry": "^7.1.0",
|
|
55
56
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
56
57
|
"@rollup/plugin-terser": "^0.2.1",
|
|
57
58
|
"@swc/core": "^1.3.24",
|
|
58
|
-
"@types/eslint": "^8.21.1",
|
|
59
59
|
"@types/node": "^18.16.2",
|
|
60
60
|
"@types/sdp-transform": "^2.4.5",
|
|
61
61
|
"@types/socket.io-client": "^1.4.32",
|
|
62
62
|
"@types/util.promisify": "^1.0.4",
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"eslint-
|
|
66
|
-
"
|
|
67
|
-
"prettier": "^2.5.1",
|
|
63
|
+
"eslint": "^9.39.2",
|
|
64
|
+
"eslint-config-prettier": "^10.1.5",
|
|
65
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
66
|
+
"prettier": "^3.0.0",
|
|
68
67
|
"rollup": "^3.9.0",
|
|
69
|
-
"rollup-plugin-cjs-es": "^2.0.0",
|
|
70
68
|
"rollup-plugin-sizes": "^1.0.5",
|
|
71
69
|
"rollup-plugin-swc3": "^0.8.0",
|
|
72
70
|
"rollup-plugin-typescript2": "^0.34.1",
|
|
73
71
|
"tslib": "^2.4.1",
|
|
74
72
|
"typedoc": "^0.25.4",
|
|
75
|
-
"typescript": "^4.9.4"
|
|
73
|
+
"typescript": "^4.9.4",
|
|
74
|
+
"typescript-eslint": "^8.57.0"
|
|
76
75
|
},
|
|
77
76
|
"dependencies": {
|
|
78
77
|
"@js-joda/timezone": "^2.3.0",
|
|
79
78
|
"events": "^3.3.0",
|
|
80
79
|
"rtc-stats-adapter": "^1.2.0",
|
|
81
80
|
"sdp-transform": "^2.14.1",
|
|
82
|
-
"socket.io-client": "^4.
|
|
81
|
+
"socket.io-client": "^4.8.3",
|
|
83
82
|
"socketio-wildcard": "^2.0.0",
|
|
84
|
-
"typedoc-plugin-missing-exports": "^2.
|
|
83
|
+
"typedoc-plugin-missing-exports": "^2.3.0",
|
|
85
84
|
"webrtc-adapter": "^8.2.3"
|
|
85
|
+
},
|
|
86
|
+
"overrides": {
|
|
87
|
+
"serialize-javascript": "^7.0.5",
|
|
88
|
+
"picomatch": "^2.3.2",
|
|
89
|
+
"brace-expansion": "^1.1.13"
|
|
86
90
|
}
|
|
87
91
|
}
|
package/rollup.config.js
CHANGED
|
@@ -44,7 +44,7 @@ const browserBundles = [
|
|
|
44
44
|
browser: true
|
|
45
45
|
}),
|
|
46
46
|
commonjs(),
|
|
47
|
-
typescript()
|
|
47
|
+
typescript({ include: ['*.{ts,tsx}', '**/*.{ts,tsx}'] })
|
|
48
48
|
]
|
|
49
49
|
}
|
|
50
50
|
];
|
|
@@ -81,6 +81,7 @@ const npmBundles = [
|
|
|
81
81
|
nodeResolve({ preferBuiltins: false }),
|
|
82
82
|
commonjs(),
|
|
83
83
|
typescript({
|
|
84
|
+
include: ['*.{ts,tsx}', '**/*.{ts,tsx}'],
|
|
84
85
|
tsconfigOverride: {
|
|
85
86
|
compilerOptions: {
|
|
86
87
|
declaration: false
|
package/dist/lib/HttpClient.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as KMPPackage from '../kotlin/clientsdk-clientcore_js';
|
|
2
|
-
import vonage from '../utils/vonage';
|
|
3
|
-
type HttpHeaders = Record<string, string | number | boolean>;
|
|
4
|
-
declare class HttpClient implements vonage.HttpClientJS {
|
|
5
|
-
request(verb: 'get' | 'post' | 'patch' | 'put' | 'options' | 'delete', url: string, headers: HttpHeaders, body: KMPPackage.Nullable<string>, callback: (p0: KMPPackage.Nullable<vonage.HttpClientErrorJS>, p1: KMPPackage.Nullable<vonage.HttpClientResponseJS>) => void): Promise<void>;
|
|
6
|
-
}
|
|
7
|
-
export default HttpClient;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as KMPPackage from '../kotlin/clientsdk-clientcore_js';
|
|
2
|
-
import vonage from '../utils/vonage';
|
|
3
|
-
import 'webrtc-adapter';
|
|
4
|
-
type MediaResultClosure = (p0: KMPPackage.Nullable<vonage.MediaClientErrorJS>) => void;
|
|
5
|
-
declare class MediaClient implements vonage.MediaClientJS {
|
|
6
|
-
delegate: KMPPackage.Nullable<vonage.MediaClientDelegateJS>;
|
|
7
|
-
private pcs;
|
|
8
|
-
private audio;
|
|
9
|
-
private intervalId;
|
|
10
|
-
constructor();
|
|
11
|
-
enableRtcStatsCollection(id: string, interval: number, closure: MediaResultClosure): void;
|
|
12
|
-
enableMediaInbound(rtcId: string, offerSDP: string, closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>) => void): Promise<void>;
|
|
13
|
-
enableMediaOutbound(closure: (err: unknown, offerSDP: KMPPackage.Nullable<string>, callback: (legId: KMPPackage.Nullable<string>) => void) => void): Promise<void>;
|
|
14
|
-
private getNewPC;
|
|
15
|
-
mute(id: string, closure: MediaResultClosure): Promise<void>;
|
|
16
|
-
unmute(id: string, closure: MediaResultClosure): Promise<void>;
|
|
17
|
-
getAudioOutputElement(): HTMLAudioElement | undefined;
|
|
18
|
-
getPeerConnection(id: string): RTCPeerConnection | undefined;
|
|
19
|
-
getMediaConnectionState(id: string): string;
|
|
20
|
-
processAnswer(id: string, sdp: string, closure: MediaResultClosure): void;
|
|
21
|
-
disableMedia(id: string, closure: MediaResultClosure): void;
|
|
22
|
-
disableNoiseSuppression(id: string, closure: MediaResultClosure): void;
|
|
23
|
-
enableNoiseSuppression(id: string, closure: MediaResultClosure): void;
|
|
24
|
-
private closePeerConnection;
|
|
25
|
-
private setTrackMedia;
|
|
26
|
-
enableEarmuff(id: string, closure: MediaResultClosure): Promise<void>;
|
|
27
|
-
disableEarmuff(id: string, closure: MediaResultClosure): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
export default MediaClient;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as KMPPackage from '../kotlin/clientsdk-clientcore_js';
|
|
2
|
-
import vonage from '../utils/vonage';
|
|
3
|
-
declare class SocketClient implements vonage.SocketClientJS {
|
|
4
|
-
delegate: KMPPackage.Nullable<vonage.SocketClientDelegateJS>;
|
|
5
|
-
private socket;
|
|
6
|
-
private token;
|
|
7
|
-
private sessionId;
|
|
8
|
-
private setQuery;
|
|
9
|
-
emit(type: string, msg: unknown, _callback: (p0: KMPPackage.Nullable<Error>, p1: KMPPackage.Nullable<string>) => void): void;
|
|
10
|
-
connect(host: string, path: string, reconnectionAttempts: number, reconnectionDelay: number, randomizationFactor: number, token: string, sessionId: KMPPackage.Nullable<string>, query: string): void;
|
|
11
|
-
disconnect(): void;
|
|
12
|
-
startVerifyResponseTimer(milliseconds: number, callback: () => void): void;
|
|
13
|
-
setConnectParamsSocketConfig(sessionId: string, token: string): void;
|
|
14
|
-
setSocketSessionId(sessionId: string): void;
|
|
15
|
-
setSocketToken(token: string): void;
|
|
16
|
-
}
|
|
17
|
-
export default SocketClient;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
type CreateRtcAudioConnectionFunction = () => Promise<RTCPeerConnection>;
|
|
2
|
-
declare const createRtcAudioConnection: CreateRtcAudioConnectionFunction;
|
|
3
|
-
declare const createOffer: (peerConnection: RTCPeerConnection) => Promise<RTCSessionDescription['sdp']>;
|
|
4
|
-
declare const createAnswer: (peerConnection: RTCPeerConnection, sdp: string) => Promise<RTCSessionDescription['sdp']>;
|
|
5
|
-
export { createRtcAudioConnection, createOffer, createAnswer };
|