@@ -5,13 +5,17 @@ import { RoomProps } from "../context/reducers/roomsReducer";
55import PackageJson from "../../package.json" ;
66import * as events from "../utils/events" ;
77
8- export interface InitiateProps {
8+ interface AuthKeyProps {
99 apiKey : string ;
1010 subscriptionKey : string ;
1111 projectName : string ;
1212}
1313
14- interface OnlineInfoProps extends InitiateProps {
14+ export interface InitiateProps extends AuthKeyProps {
15+ projectName : string ;
16+ }
17+
18+ interface OnlineInfoProps extends AuthKeyProps {
1519 userIds : string ;
1620 chatAuthId : string ; // for selfUser's chatAuthId
1721}
@@ -21,7 +25,7 @@ type OnlineInfoReturnProps = Pick<
2125 "chatAuthId" | "socketId" | "online"
2226> ;
2327
24- interface ReadTokenProps extends InitiateProps {
28+ interface ReadTokenProps extends AuthKeyProps {
2529 roomIds : string ;
2630 chatAuthId : string ; //selfUser's chatAuthId
2731}
@@ -41,7 +45,7 @@ interface HandleLoggerProps extends InitiateProps {
4145}
4246
4347const project = {
44- name : "React Native SDK" ,
48+ SDK : "React Native SDK" ,
4549 version : PackageJson . version ,
4650} ;
4751
@@ -52,8 +56,9 @@ export const initiate = async (props: InitiateProps) => {
5256 const response = await axios . get < ConfigsProps > ( `/api/v1/tenant/config/` , {
5357 params : {
5458 plugin : true , // This is for backend compatibility
55- project : project . name , // This is for backend compatibility & analytics
59+ SDK : project . SDK , // This is for backend compatibility & analytics
5660 version : project . version , // This is for backend compatibility & analytics
61+ name : projectName , // This is for backend compatibility & analytics
5762 } ,
5863 headers : {
5964 apiKey,
0 commit comments