Convert js files in `model/` to Typescript
Convert `JamiDaemon.js` to Typescript
Add `model/util.ts` containing some utility types.
Gitlab: #30
Change-Id: Ia5d120330011e89a0be28732965ae9814ab68d19
diff --git a/model/AccountDetails.ts b/model/AccountDetails.ts
new file mode 100644
index 0000000..e9514aa
--- /dev/null
+++ b/model/AccountDetails.ts
@@ -0,0 +1,169 @@
+/**
+ * Account parameters
+ *
+ * See `jami-daemon/src/account_schema.h`
+ */
+export default interface AccountDetails {
+ // Common account parameters
+ 'Account.type': string;
+ 'Account.alias': string;
+ 'Account.displayName': string;
+ 'Account.mailbox': string;
+ 'Account.enable': string;
+ 'Account.autoAnswer': string;
+ 'Account.sendReadReceipt': string;
+ 'Account.rendezVous': string;
+ 'Account.registrationExpire': string;
+ 'Account.dtmfType': string;
+ 'Account.ringtonePath': string;
+ 'Account.ringtoneEnabled': string;
+ 'Account.videoEnabled': string;
+ 'Account.keepAliveEnabled': string;
+ 'Account.presenceEnabled': string;
+ 'Account.presencePublishSupported': string;
+ 'Account.presenceSubscribeSupported': string;
+ 'Account.presenceStatus': string;
+ 'Account.presenceNote': string;
+
+ 'Account.hostname': string;
+ 'Account.username': string;
+ 'Account.routeset': string;
+ 'Account.allowIPAutoRewrite': string;
+ 'Account.password': string;
+ 'Account.realm': string;
+ 'Account.useragent': string;
+ 'Account.hasCustomUserAgent': string;
+ 'Account.audioPortMin': string;
+ 'Account.audioPortMax': string;
+ 'Account.videoPortMin': string;
+ 'Account.videoPortMax': string;
+
+ 'Account.bindAddress': string;
+ 'Account.localInterface': string;
+ 'Account.publishedSameAsLocal': string;
+ 'Account.localPort': string;
+ 'Account.publishedPort': string;
+ 'Account.publishedAddress': string;
+ 'Account.upnpEnabled': string;
+ 'Account.defaultModerators': string;
+ 'Account.localModeratorsEnabled': string;
+ 'Account.allModeratorEnabled': string;
+
+ // SIP specific parameters
+ 'STUN.server': string;
+ 'STUN.enable': string;
+ 'TURN.server': string;
+ 'TURN.enable': string;
+ 'TURN.username': string;
+ 'TURN.password': string;
+ 'TURN.realm': string;
+
+ // SRTP specific parameters
+ 'SRTP.enable': string;
+ 'SRTP.keyExchange': string;
+ 'SRTP.rtpFallback': string;
+
+ 'TLS.listenerPort': string;
+ 'TLS.enable': string;
+ 'TLS.certificateListFile': string;
+ 'TLS.certificateFile': string;
+ 'TLS.privateKeyFile': string;
+ 'TLS.password': string;
+ 'TLS.method': string;
+ 'TLS.ciphers': string;
+ 'TLS.serverName': string;
+ 'TLS.verifyServer': string;
+ 'TLS.verifyClient': string;
+ 'TLS.requireClientCertificate': string;
+ 'TLS.negotiationTimeoutSec': string;
+
+ // DHT specific parameters
+ 'DHT.port': string;
+ 'DHT.PublicInCalls': string;
+
+ // Volatile parameters
+ 'Account.registrationStatus': string;
+ 'Account.registrationCode': string;
+ 'Account.registrationDescription': string;
+ 'Transport.statusCode': string;
+ 'Transport.statusDescription': string;
+}
+
+/**
+ * Volatile properties
+ *
+ * See `jami-daemon/src/jami/account_const.h`
+ */
+export interface VolatileDetails {
+ 'Account.active': string;
+ 'Account.deviceAnnounced': string;
+ 'Account.registeredName': string;
+}
+
+/**
+ * See `ConfProperties` in `jami-daemon/src/jami/account_const.h
+ */
+export interface AccountConfig {
+ id?: string;
+ type?: string;
+ alias?: string;
+ displayName?: string;
+ enable?: boolean;
+ mailbox?: string;
+ dtmfType?: string;
+ autoAnswer?: boolean;
+ sendReadReceipt?: string;
+ rendezVous?: boolean;
+ activeCallLimit?: string;
+ hostname?: string;
+ username?: string;
+ bindAddress?: string;
+ routeset?: string;
+ password?: string;
+ realm?: string;
+ localInterface?: string;
+ publishedSameAsLocal?: boolean;
+ localPort?: string;
+ publishedPort?: string;
+ publishedAddress?: string;
+ useragent?: string;
+ upnpEnabled?: boolean;
+ hasCustomUserAgent?: string;
+ allowCertFromHistory?: string;
+ allowCertFromContact?: string;
+ allowCertFromTrusted?: string;
+ archivePassword?: string;
+ archiveHasPassword?: string;
+ archivePath?: string;
+ archivePIN?: string;
+ deviceID?: string;
+ deviceName?: string;
+ proxyEnabled?: boolean;
+ proxyServer?: string;
+ proxyPushToken?: string;
+ keepAliveEnabled?: boolean;
+ peerDiscovery?: string;
+ accountDiscovery?: string;
+ accountPublish?: string;
+ managerUri?: string;
+ managerUsername?: string;
+ bootstrapListUrl?: string;
+ dhtProxyListUrl?: string;
+ defaultModerators?: string;
+ localModeratorsEnabled?: boolean;
+ allModeratorsEnabled?: boolean;
+ allowIPAutoRewrite?: string;
+
+ // Audio
+ audioPortMax?: string;
+ audioPortMin?: string;
+
+ // Video
+ videoEnabled?: boolean;
+ videoPortMax?: boolean;
+ videoPortMin?: string;
+
+ // Ringtone
+ ringtonePath?: string;
+ ringtoneEnabled?: boolean;
+}