@volorio/react-native-chat-callkit 0.2.0
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/README.md +7 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.js +19 -0
- package/dist/src/index.js.map +1 -0
- package/package.json +31 -0
package/README.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { VolorioReactNativeRoomClient } from "@volorio/react-native";
|
|
2
|
+
export interface VolorioReactNativeChatCallInvite {
|
|
3
|
+
conversationId: string;
|
|
4
|
+
senderId: string;
|
|
5
|
+
roomId: string;
|
|
6
|
+
mode: "voice" | "video";
|
|
7
|
+
}
|
|
8
|
+
export declare class VolorioReactNativeChatCallkitClient {
|
|
9
|
+
private readonly chat;
|
|
10
|
+
constructor(room: Pick<VolorioReactNativeRoomClient, "sendMessage">);
|
|
11
|
+
sendInvite(invite: VolorioReactNativeChatCallInvite): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VolorioReactNativeChatCallkitClient = void 0;
|
|
4
|
+
const react_native_chat_1 = require("@volorio/react-native-chat");
|
|
5
|
+
class VolorioReactNativeChatCallkitClient {
|
|
6
|
+
chat;
|
|
7
|
+
constructor(room) {
|
|
8
|
+
this.chat = new react_native_chat_1.VolorioReactNativeChatClient(room);
|
|
9
|
+
}
|
|
10
|
+
async sendInvite(invite) {
|
|
11
|
+
await this.chat.sendMessage({
|
|
12
|
+
conversationId: invite.conversationId,
|
|
13
|
+
senderId: invite.senderId,
|
|
14
|
+
text: JSON.stringify({ type: "volorio.rn.chat.call.invite", roomId: invite.roomId, mode: invite.mode }),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.VolorioReactNativeChatCallkitClient = VolorioReactNativeChatCallkitClient;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AACA,kEAA0E;AAS1E,MAAa,mCAAmC;IAC7B,IAAI,CAA+B;IAEpD,YAAY,IAAuD;QACjE,IAAI,CAAC,IAAI,GAAG,IAAI,gDAA4B,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAwC;QACvD,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YAC1B,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,6BAA6B,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;SACxG,CAAC,CAAC;IACL,CAAC;CACF;AAdD,kFAcC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@volorio/react-native-chat-callkit",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Volorio React Native chat call helpers for starting voice or video sessions from chat.",
|
|
6
|
+
"main": "dist/src/index.js",
|
|
7
|
+
"types": "dist/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/src/index.d.ts",
|
|
11
|
+
"default": "./dist/src/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist/src",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"publishConfig": {
|
|
19
|
+
"access": "public",
|
|
20
|
+
"registry": "https://registry.npmjs.org/"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"build": "tsc -p tsconfig.build.json",
|
|
24
|
+
"test": "pnpm build",
|
|
25
|
+
"pack:local": "pnpm build && npm pack --pack-destination dist"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@volorio/react-native": "^0.2.0",
|
|
29
|
+
"@volorio/react-native-chat": "^0.2.0"
|
|
30
|
+
}
|
|
31
|
+
}
|