blob: 29a24411a213a7a6436ed593c3e56b0c48b45987 [file] [log] [blame]
simon26e79f72022-10-05 22:16:08 -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-Raynauldcfa44302022-11-30 18:36:36 -050018import { IContact } from './contact';
19
20export interface IAccount {
21 id: string;
22 details: AccountDetails;
23 volatileDetails: VolatileDetails;
24 defaultModerators: IContact[];
25 devices: Devices;
26}
simon26e79f72022-10-05 22:16:08 -040027
simon06527b02022-10-01 15:01:47 -040028/**
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -050029 * Account details.
simon06527b02022-10-01 15:01:47 -040030 *
31 * See `jami-daemon/src/account_schema.h`
32 */
simon20076982022-10-11 15:04:13 -040033export interface AccountDetails {
simon06527b02022-10-01 15:01:47 -040034 // Common account parameters
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -050035 'Account.id': string;
simon06527b02022-10-01 15:01:47 -040036 'Account.type': string;
37 'Account.alias': string;
38 'Account.displayName': string;
39 'Account.mailbox': string;
40 'Account.enable': string;
41 'Account.autoAnswer': string;
42 'Account.sendReadReceipt': string;
43 'Account.rendezVous': string;
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -050044 'Account.activeCallLimit': string;
simon06527b02022-10-01 15:01:47 -040045 'Account.registrationExpire': string;
46 'Account.dtmfType': string;
47 'Account.ringtonePath': string;
48 'Account.ringtoneEnabled': string;
49 'Account.videoEnabled': string;
50 'Account.keepAliveEnabled': string;
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -050051 'Account.peerDiscovery': string;
52 'Account.accountDiscovery': string;
53 'Account.accountPublish': string;
simon06527b02022-10-01 15:01:47 -040054 'Account.presenceEnabled': string;
55 'Account.presencePublishSupported': string;
56 'Account.presenceSubscribeSupported': string;
57 'Account.presenceStatus': string;
58 'Account.presenceNote': string;
Issam E. Maghnib05ad992022-11-20 23:50:48 +000059 'Account.archivePassword': string;
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -050060 'Account.archiveHasPassword': string;
61 'Account.archivePath': string;
62 'Account.archivePIN': string;
63 'Account.deviceID': string;
64 'Account.deviceName': string;
65 'Account.proxyEnabled': string;
66 'Account.proxyServer': string;
67 'Account.proxyPushToken': string;
Issam E. Maghnib05ad992022-11-20 23:50:48 +000068 'Account.managerUri': string;
69 'Account.managerUsername': string;
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -050070 'Account.bootstrapListUrl': string;
71 'Account.dhtProxyListUrl': string;
simon06527b02022-10-01 15:01:47 -040072
73 'Account.hostname': string;
74 'Account.username': string;
75 'Account.routeset': string;
76 'Account.allowIPAutoRewrite': string;
77 'Account.password': string;
78 'Account.realm': string;
79 'Account.useragent': string;
80 'Account.hasCustomUserAgent': string;
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -050081 'Account.allowCertFromHistory': string;
82 'Account.allowCertFromContact': string;
83 'Account.allowCertFromTrusted': string;
simon06527b02022-10-01 15:01:47 -040084 'Account.audioPortMin': string;
85 'Account.audioPortMax': string;
86 'Account.videoPortMin': string;
87 'Account.videoPortMax': string;
88
89 'Account.bindAddress': string;
90 'Account.localInterface': string;
91 'Account.publishedSameAsLocal': string;
92 'Account.localPort': string;
93 'Account.publishedPort': string;
94 'Account.publishedAddress': string;
95 'Account.upnpEnabled': string;
96 'Account.defaultModerators': string;
97 'Account.localModeratorsEnabled': string;
98 'Account.allModeratorEnabled': string;
99
100 // SIP specific parameters
101 'STUN.server': string;
102 'STUN.enable': string;
103 'TURN.server': string;
104 'TURN.enable': string;
105 'TURN.username': string;
106 'TURN.password': string;
107 'TURN.realm': string;
108
109 // SRTP specific parameters
110 'SRTP.enable': string;
111 'SRTP.keyExchange': string;
112 'SRTP.rtpFallback': string;
113
114 'TLS.listenerPort': string;
115 'TLS.enable': string;
116 'TLS.certificateListFile': string;
117 'TLS.certificateFile': string;
118 'TLS.privateKeyFile': string;
119 'TLS.password': string;
120 'TLS.method': string;
121 'TLS.ciphers': string;
122 'TLS.serverName': string;
123 'TLS.verifyServer': string;
124 'TLS.verifyClient': string;
125 'TLS.requireClientCertificate': string;
126 'TLS.negotiationTimeoutSec': string;
127
128 // DHT specific parameters
129 'DHT.port': string;
130 'DHT.PublicInCalls': string;
131
132 // Volatile parameters
133 'Account.registrationStatus': string;
134 'Account.registrationCode': string;
135 'Account.registrationDescription': string;
136 'Transport.statusCode': string;
137 'Transport.statusDescription': string;
138}
139
140/**
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -0500141 * Volatile account details.
simon06527b02022-10-01 15:01:47 -0400142 *
143 * See `jami-daemon/src/jami/account_const.h`
144 */
145export interface VolatileDetails {
146 'Account.active': string;
147 'Account.deviceAnnounced': string;
148 'Account.registeredName': string;
149}
150
Misha Krieger-Raynauldcfa44302022-11-30 18:36:36 -0500151export type Devices = Record<string, string>;