simon | 26e79f7 | 2022-10-05 22:16:08 -0400 | [diff] [blame] | 1 | /* |
| 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-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 18 | import { IContact } from './contact'; |
| 19 | |
| 20 | export interface IAccount { |
| 21 | id: string; |
| 22 | details: AccountDetails; |
| 23 | volatileDetails: VolatileDetails; |
| 24 | defaultModerators: IContact[]; |
| 25 | devices: Devices; |
| 26 | } |
simon | 26e79f7 | 2022-10-05 22:16:08 -0400 | [diff] [blame] | 27 | |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 28 | /** |
Misha Krieger-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 29 | * Account details. |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 30 | * |
| 31 | * See `jami-daemon/src/account_schema.h` |
| 32 | */ |
simon | 2007698 | 2022-10-11 15:04:13 -0400 | [diff] [blame] | 33 | export interface AccountDetails { |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 34 | // Common account parameters |
Misha Krieger-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 35 | 'Account.id': string; |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 36 | '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-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 44 | 'Account.activeCallLimit': string; |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 45 | '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-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 51 | 'Account.peerDiscovery': string; |
| 52 | 'Account.accountDiscovery': string; |
| 53 | 'Account.accountPublish': string; |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 54 | 'Account.presenceEnabled': string; |
| 55 | 'Account.presencePublishSupported': string; |
| 56 | 'Account.presenceSubscribeSupported': string; |
| 57 | 'Account.presenceStatus': string; |
| 58 | 'Account.presenceNote': string; |
Issam E. Maghni | b05ad99 | 2022-11-20 23:50:48 +0000 | [diff] [blame] | 59 | 'Account.archivePassword': string; |
Misha Krieger-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 60 | '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. Maghni | b05ad99 | 2022-11-20 23:50:48 +0000 | [diff] [blame] | 68 | 'Account.managerUri': string; |
| 69 | 'Account.managerUsername': string; |
Misha Krieger-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 70 | 'Account.bootstrapListUrl': string; |
| 71 | 'Account.dhtProxyListUrl': string; |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 72 | |
| 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-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 81 | 'Account.allowCertFromHistory': string; |
| 82 | 'Account.allowCertFromContact': string; |
| 83 | 'Account.allowCertFromTrusted': string; |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 84 | '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-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 141 | * Volatile account details. |
simon | 06527b0 | 2022-10-01 15:01:47 -0400 | [diff] [blame] | 142 | * |
| 143 | * See `jami-daemon/src/jami/account_const.h` |
| 144 | */ |
| 145 | export interface VolatileDetails { |
| 146 | 'Account.active': string; |
| 147 | 'Account.deviceAnnounced': string; |
| 148 | 'Account.registeredName': string; |
| 149 | } |
| 150 | |
Misha Krieger-Raynauld | cfa4430 | 2022-11-30 18:36:36 -0500 | [diff] [blame] | 151 | export type Devices = Record<string, string>; |