blob: 06dd6eda626b21957559217ca5310dcf71afbfca [file] [log] [blame]
Misha Krieger-Raynauldaddd6fe2022-10-22 12:46:04 -04001/*
2 * Copyright (C) 2022 Savoir-faire Linux Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Affero General Public License as
6 * published by the Free Software Foundation; either version 3 of the
7 * License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Affero General Public License for more details.
13 *
14 * You should have received a copy of the GNU Affero General Public
15 * License along with this program. If not, see
16 * <https://www.gnu.org/licenses/>.
17 */
Misha Krieger-Raynauld8a381da2022-11-03 17:37:51 -040018import { AccountDetails, Message, VolatileDetails } from 'jami-web-common';
Misha Krieger-Raynauld68a9b562022-10-28 19:47:46 -040019
20// These interfaces are used to hold all the parameters for signal handlers
21// These parameters' names and types can be found in daemon/bin/nodejs/callback.h
22// or in their relevant SWIG interface files (.i) in daemon/bin/nodejs
23
24export interface AccountDetailsChanged {
25 accountId: string;
26 details: AccountDetails;
27}
28
Misha Krieger-Raynauldaddd6fe2022-10-22 12:46:04 -040029export interface VolatileDetailsChanged {
30 accountId: string;
Misha Krieger-Raynauld68a9b562022-10-28 19:47:46 -040031 details: VolatileDetails;
Misha Krieger-Raynauldaddd6fe2022-10-22 12:46:04 -040032}
33
34export interface RegistrationStateChanged {
35 accountId: string;
36 state: string;
37 code: number;
38 details: string;
39}
40
41export interface NameRegistrationEnded {
42 accountId: string;
43 state: number;
44 username: string;
45}
46
47export interface RegisteredNameFound {
48 accountId: string;
49 state: number;
50 address: string;
51 username: string;
52}
Charlieb62c6782022-10-30 15:14:56 -040053
Misha Krieger-Raynauld68a9b562022-10-28 19:47:46 -040054export interface KnownDevicesChanged {
55 accountId: string;
56 devices: Record<string, string>;
57}
58
Charlieb62c6782022-10-30 15:14:56 -040059export interface IncomingAccountMessage {
60 accountId: string;
61 from: string;
62 message: Record<string, string>;
63}
Misha Krieger-Raynauld68a9b562022-10-28 19:47:46 -040064
65export interface ConversationReady {
66 accountId: string;
67 conversationId: string;
68}
69
70export interface ConversationRemoved {
71 accountId: string;
72 conversationId: string;
73}
74
75export interface ConversationLoaded {
76 id: number;
77 accountId: string;
78 conversationId: string;
Misha Krieger-Raynauld8a381da2022-11-03 17:37:51 -040079 messages: Message[];
Misha Krieger-Raynauld68a9b562022-10-28 19:47:46 -040080}
81
82export interface MessageReceived {
83 accountId: string;
84 conversationId: string;
Misha Krieger-Raynauld8a381da2022-11-03 17:37:51 -040085 message: Message;
Misha Krieger-Raynauld68a9b562022-10-28 19:47:46 -040086}