Create calls API routes
GitLab: #107
Change-Id: Ic1ff2bd7bf2af4d851eb04b6595f52713df9629f
diff --git a/server/src/jamid/jami-swig.ts b/server/src/jamid/jami-swig.ts
index b48db13..484aad1 100644
--- a/server/src/jamid/jami-swig.ts
+++ b/server/src/jamid/jami-swig.ts
@@ -93,6 +93,9 @@
sendMessage(accountId: string, conversationId: string, message: string, replyTo: string): void;
loadConversationMessages(accountId: string, conversationId: string, fromMessage: string, n: number): number;
+ getCallList(accountId: string): StringVect;
+ getCallDetails(accountId: string, callId: string): StringMap;
+
// IntVect: Constructable<IntVect>;
// UintVect: Constructable<UintVect>;
// FloatVect: Constructable<FloatVect>;
diff --git a/server/src/jamid/jamid.ts b/server/src/jamid/jamid.ts
index 858f4d5..957f370 100644
--- a/server/src/jamid/jamid.ts
+++ b/server/src/jamid/jamid.ts
@@ -292,6 +292,15 @@
this.jamiSwig.sendMessage(accountId, conversationId, message, replyTo || '');
}
+ getCallIds(accountId: string): string[] {
+ return stringVectToArray(this.jamiSwig.getCallList(accountId));
+ }
+
+ // TODO: Replace Record with interface
+ getCallDetails(accountId: string, callId: string): Record<string, string> {
+ return stringMapToRecord(this.jamiSwig.getCallDetails(accountId, callId));
+ }
+
getAccountIdFromUsername(username: string): string | undefined {
return this.usernamesToAccountIds.get(username);
}