@zelloptt/react-native-zello-sdk 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/README.md +58 -15
  2. package/android/build.gradle +29 -10
  3. package/android/gradle.properties +4 -4
  4. package/android/src/main/java/com/zellosdk/ZelloAndroidSdkModule.kt +93 -68
  5. package/android/src/main/java/com/zellosdk/ZelloAndroidSdkModuleHelper.kt +25 -0
  6. package/ios/Extensions/ZelloContact+Extension.swift +26 -3
  7. package/ios/Extensions/ZelloHistoryVoiceMessage+Extension.swift +3 -0
  8. package/ios/Extensions/ZelloIOSSdkModule+Extension.swift +8 -2
  9. package/ios/Extensions/ZelloIncomingEmergency+Extension.swift +1 -0
  10. package/ios/Extensions/ZelloTranscription+Extension.swift +18 -0
  11. package/ios/ZelloIOSSdkModule.swift +24 -7
  12. package/ios/ZelloIOSSdkModuleBridge.m +1 -0
  13. package/ios/ZelloSdkModule.h +8 -0
  14. package/ios/ZelloSdkModule.mm +189 -0
  15. package/ios/ZelloSdkModuleImpl.swift +280 -0
  16. package/lib/commonjs/docs/assets/highlight.css +1 -1
  17. package/lib/commonjs/docs/assets/icons.js +1 -1
  18. package/lib/commonjs/docs/assets/icons.js.map +1 -1
  19. package/lib/commonjs/docs/assets/icons.svg +1 -1
  20. package/lib/commonjs/docs/assets/main.js +220 -288
  21. package/lib/commonjs/docs/assets/main.js.map +1 -1
  22. package/lib/commonjs/docs/assets/navigation.js +1 -1
  23. package/lib/commonjs/docs/assets/navigation.js.map +1 -1
  24. package/lib/commonjs/docs/assets/search.js +1 -1
  25. package/lib/commonjs/docs/assets/search.js.map +1 -1
  26. package/lib/commonjs/docs/assets/style.css +12 -4
  27. package/lib/commonjs/docs/classes/sdk.Zello.html +793 -97
  28. package/lib/commonjs/docs/classes/types.ZelloAlertMessage.html +122 -9
  29. package/lib/commonjs/docs/classes/types.ZelloChannel.html +155 -10
  30. package/lib/commonjs/docs/classes/types.ZelloChannelUser.html +86 -4
  31. package/lib/commonjs/docs/classes/types.ZelloDispatchCall.html +90 -6
  32. package/lib/commonjs/docs/classes/types.ZelloDispatchChannel.html +163 -11
  33. package/lib/commonjs/docs/classes/types.ZelloGroupConversation.html +178 -13
  34. package/lib/commonjs/docs/classes/types.ZelloHistoryAlertMessage.html +131 -10
  35. package/lib/commonjs/docs/classes/types.ZelloHistoryImageMessage.html +123 -9
  36. package/lib/commonjs/docs/classes/types.ZelloHistoryLocationMessage.html +155 -13
  37. package/lib/commonjs/docs/classes/types.ZelloHistoryTextMessage.html +131 -10
  38. package/lib/commonjs/docs/classes/types.ZelloHistoryVoiceMessage.html +145 -10
  39. package/lib/commonjs/docs/classes/types.ZelloImageMessage.html +130 -10
  40. package/lib/commonjs/docs/classes/types.ZelloIncomingEmergency.html +114 -9
  41. package/lib/commonjs/docs/classes/types.ZelloIncomingVoiceMessage.html +124 -8
  42. package/lib/commonjs/docs/classes/types.ZelloLocationMessage.html +146 -12
  43. package/lib/commonjs/docs/classes/types.ZelloOutgoingEmergency.html +98 -7
  44. package/lib/commonjs/docs/classes/types.ZelloOutgoingVoiceMessage.html +120 -9
  45. package/lib/commonjs/docs/classes/types.ZelloRecentEntry.html +114 -9
  46. package/lib/commonjs/docs/classes/types.ZelloTextMessage.html +122 -9
  47. package/lib/commonjs/docs/classes/types.ZelloTranscription.html +122 -0
  48. package/lib/commonjs/docs/classes/types.ZelloTranslation.html +91 -0
  49. package/lib/commonjs/docs/classes/types.ZelloUser.html +142 -11
  50. package/lib/commonjs/docs/classes/types.ZelloUserSupportedFeatures.html +82 -5
  51. package/lib/commonjs/docs/enums/events.ZelloEvent.html +563 -95
  52. package/lib/commonjs/docs/enums/types.ZelloAccountStatus.html +67 -5
  53. package/lib/commonjs/docs/enums/types.ZelloChannelAlertLevel.html +67 -5
  54. package/lib/commonjs/docs/enums/types.ZelloChannelConnectionStatus.html +68 -3
  55. package/lib/commonjs/docs/enums/types.ZelloChannelType.html +84 -0
  56. package/lib/commonjs/docs/enums/types.ZelloConnectionError.html +68 -3
  57. package/lib/commonjs/docs/enums/types.ZelloConnectionState.html +73 -3
  58. package/lib/commonjs/docs/enums/types.ZelloContactType.html +73 -3
  59. package/lib/commonjs/docs/enums/types.ZelloDispatchCallStatus.html +73 -3
  60. package/lib/commonjs/docs/enums/types.ZelloOutgoingVoiceMessageError.html +63 -3
  61. package/lib/commonjs/docs/enums/types.ZelloOutgoingVoiceMessageState.html +78 -3
  62. package/lib/commonjs/docs/enums/types.ZelloRecentEntryType.html +78 -3
  63. package/lib/commonjs/docs/enums/types.ZelloUserStatus.html +81 -7
  64. package/lib/commonjs/docs/hierarchy.html +29 -1
  65. package/lib/commonjs/docs/index.html +127 -29
  66. package/lib/commonjs/docs/interfaces/specs_NativeZelloSdk.Spec.html +504 -0
  67. package/lib/commonjs/docs/modules/events.html +37 -1
  68. package/lib/commonjs/docs/modules/index.html +37 -1
  69. package/lib/commonjs/docs/modules/sdk.html +37 -1
  70. package/lib/commonjs/docs/modules/specs_NativeZelloSdk.html +41 -0
  71. package/lib/commonjs/docs/modules/types.html +45 -1
  72. package/lib/commonjs/docs/modules.html +36 -1
  73. package/lib/commonjs/docs/types/types.ZelloChannelOptions.html +114 -9
  74. package/lib/commonjs/docs/types/types.ZelloConfig.html +86 -7
  75. package/lib/commonjs/docs/types/types.ZelloConsoleSettings.html +96 -9
  76. package/lib/commonjs/docs/types/types.ZelloContact.html +80 -6
  77. package/lib/commonjs/docs/types/types.ZelloCredentials.html +75 -6
  78. package/lib/commonjs/docs/types/types.ZelloHistoryMessage.html +97 -8
  79. package/lib/commonjs/docs/types/types.ZelloMessage.html +91 -7
  80. package/lib/commonjs/docs/variables/specs_NativeZelloSdk.default.html +34 -0
  81. package/lib/commonjs/events/index.js +217 -0
  82. package/lib/commonjs/events/index.js.map +1 -1
  83. package/lib/commonjs/sdk/index.js +731 -911
  84. package/lib/commonjs/sdk/index.js.map +1 -1
  85. package/lib/commonjs/specs/NativeZelloSdk.js +27 -0
  86. package/lib/commonjs/specs/NativeZelloSdk.js.map +1 -0
  87. package/lib/commonjs/types/index.js +423 -302
  88. package/lib/commonjs/types/index.js.map +1 -1
  89. package/lib/commonjs/utils/index.js +27 -4
  90. package/lib/commonjs/utils/index.js.map +1 -1
  91. package/lib/module/docs/assets/highlight.css +1 -1
  92. package/lib/module/docs/assets/icons.js +1 -1
  93. package/lib/module/docs/assets/icons.js.map +1 -1
  94. package/lib/module/docs/assets/icons.svg +1 -1
  95. package/lib/module/docs/assets/main.js +220 -288
  96. package/lib/module/docs/assets/main.js.map +1 -1
  97. package/lib/module/docs/assets/navigation.js +1 -1
  98. package/lib/module/docs/assets/navigation.js.map +1 -1
  99. package/lib/module/docs/assets/search.js +1 -1
  100. package/lib/module/docs/assets/search.js.map +1 -1
  101. package/lib/module/docs/assets/style.css +12 -4
  102. package/lib/module/docs/classes/sdk.Zello.html +793 -97
  103. package/lib/module/docs/classes/types.ZelloAlertMessage.html +122 -9
  104. package/lib/module/docs/classes/types.ZelloChannel.html +155 -10
  105. package/lib/module/docs/classes/types.ZelloChannelUser.html +86 -4
  106. package/lib/module/docs/classes/types.ZelloDispatchCall.html +90 -6
  107. package/lib/module/docs/classes/types.ZelloDispatchChannel.html +163 -11
  108. package/lib/module/docs/classes/types.ZelloGroupConversation.html +178 -13
  109. package/lib/module/docs/classes/types.ZelloHistoryAlertMessage.html +131 -10
  110. package/lib/module/docs/classes/types.ZelloHistoryImageMessage.html +123 -9
  111. package/lib/module/docs/classes/types.ZelloHistoryLocationMessage.html +155 -13
  112. package/lib/module/docs/classes/types.ZelloHistoryTextMessage.html +131 -10
  113. package/lib/module/docs/classes/types.ZelloHistoryVoiceMessage.html +145 -10
  114. package/lib/module/docs/classes/types.ZelloImageMessage.html +130 -10
  115. package/lib/module/docs/classes/types.ZelloIncomingEmergency.html +114 -9
  116. package/lib/module/docs/classes/types.ZelloIncomingVoiceMessage.html +124 -8
  117. package/lib/module/docs/classes/types.ZelloLocationMessage.html +146 -12
  118. package/lib/module/docs/classes/types.ZelloOutgoingEmergency.html +98 -7
  119. package/lib/module/docs/classes/types.ZelloOutgoingVoiceMessage.html +120 -9
  120. package/lib/module/docs/classes/types.ZelloRecentEntry.html +114 -9
  121. package/lib/module/docs/classes/types.ZelloTextMessage.html +122 -9
  122. package/lib/module/docs/classes/types.ZelloTranscription.html +122 -0
  123. package/lib/module/docs/classes/types.ZelloTranslation.html +91 -0
  124. package/lib/module/docs/classes/types.ZelloUser.html +142 -11
  125. package/lib/module/docs/classes/types.ZelloUserSupportedFeatures.html +82 -5
  126. package/lib/module/docs/enums/events.ZelloEvent.html +563 -95
  127. package/lib/module/docs/enums/types.ZelloAccountStatus.html +67 -5
  128. package/lib/module/docs/enums/types.ZelloChannelAlertLevel.html +67 -5
  129. package/lib/module/docs/enums/types.ZelloChannelConnectionStatus.html +68 -3
  130. package/lib/module/docs/enums/types.ZelloChannelType.html +84 -0
  131. package/lib/module/docs/enums/types.ZelloConnectionError.html +68 -3
  132. package/lib/module/docs/enums/types.ZelloConnectionState.html +73 -3
  133. package/lib/module/docs/enums/types.ZelloContactType.html +73 -3
  134. package/lib/module/docs/enums/types.ZelloDispatchCallStatus.html +73 -3
  135. package/lib/module/docs/enums/types.ZelloOutgoingVoiceMessageError.html +63 -3
  136. package/lib/module/docs/enums/types.ZelloOutgoingVoiceMessageState.html +78 -3
  137. package/lib/module/docs/enums/types.ZelloRecentEntryType.html +78 -3
  138. package/lib/module/docs/enums/types.ZelloUserStatus.html +81 -7
  139. package/lib/module/docs/hierarchy.html +29 -1
  140. package/lib/module/docs/index.html +127 -29
  141. package/lib/module/docs/interfaces/specs_NativeZelloSdk.Spec.html +504 -0
  142. package/lib/module/docs/modules/events.html +37 -1
  143. package/lib/module/docs/modules/index.html +37 -1
  144. package/lib/module/docs/modules/sdk.html +37 -1
  145. package/lib/module/docs/modules/specs_NativeZelloSdk.html +41 -0
  146. package/lib/module/docs/modules/types.html +45 -1
  147. package/lib/module/docs/modules.html +36 -1
  148. package/lib/module/docs/types/types.ZelloChannelOptions.html +114 -9
  149. package/lib/module/docs/types/types.ZelloConfig.html +86 -7
  150. package/lib/module/docs/types/types.ZelloConsoleSettings.html +96 -9
  151. package/lib/module/docs/types/types.ZelloContact.html +80 -6
  152. package/lib/module/docs/types/types.ZelloCredentials.html +75 -6
  153. package/lib/module/docs/types/types.ZelloHistoryMessage.html +97 -8
  154. package/lib/module/docs/types/types.ZelloMessage.html +91 -7
  155. package/lib/module/docs/variables/specs_NativeZelloSdk.default.html +34 -0
  156. package/lib/module/events/index.js +217 -0
  157. package/lib/module/events/index.js.map +1 -1
  158. package/lib/module/sdk/index.js +730 -912
  159. package/lib/module/sdk/index.js.map +1 -1
  160. package/lib/module/specs/NativeZelloSdk.js +25 -0
  161. package/lib/module/specs/NativeZelloSdk.js.map +1 -0
  162. package/lib/module/types/index.js +378 -301
  163. package/lib/module/types/index.js.map +1 -1
  164. package/lib/module/utils/index.js +27 -5
  165. package/lib/module/utils/index.js.map +1 -1
  166. package/lib/typescript/commonjs/src/events/index.d.ts +9 -0
  167. package/lib/typescript/commonjs/src/events/index.d.ts.map +1 -1
  168. package/lib/typescript/commonjs/src/sdk/index.d.ts +10 -0
  169. package/lib/typescript/commonjs/src/sdk/index.d.ts.map +1 -1
  170. package/lib/typescript/commonjs/src/specs/NativeZelloSdk.d.ts +55 -0
  171. package/lib/typescript/commonjs/src/specs/NativeZelloSdk.d.ts.map +1 -0
  172. package/lib/typescript/commonjs/src/types/index.d.ts +106 -4
  173. package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
  174. package/lib/typescript/commonjs/src/utils/index.d.ts +2 -1
  175. package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -1
  176. package/lib/typescript/module/src/events/index.d.ts +9 -0
  177. package/lib/typescript/module/src/events/index.d.ts.map +1 -1
  178. package/lib/typescript/module/src/index.d.ts +4 -4
  179. package/lib/typescript/module/src/index.d.ts.map +1 -1
  180. package/lib/typescript/module/src/sdk/index.d.ts +11 -1
  181. package/lib/typescript/module/src/sdk/index.d.ts.map +1 -1
  182. package/lib/typescript/module/src/specs/NativeZelloSdk.d.ts +55 -0
  183. package/lib/typescript/module/src/specs/NativeZelloSdk.d.ts.map +1 -0
  184. package/lib/typescript/module/src/types/index.d.ts +106 -4
  185. package/lib/typescript/module/src/types/index.d.ts.map +1 -1
  186. package/lib/typescript/module/src/utils/algorithms/index.d.ts +1 -1
  187. package/lib/typescript/module/src/utils/algorithms/index.d.ts.map +1 -1
  188. package/lib/typescript/module/src/utils/index.d.ts +2 -1
  189. package/lib/typescript/module/src/utils/index.d.ts.map +1 -1
  190. package/package.json +31 -15
  191. package/react-native-zello-sdk.podspec +26 -1
  192. package/src/events/index.ts +9 -0
  193. package/src/sdk/index.ts +106 -226
  194. package/src/specs/NativeZelloSdk.ts +89 -0
  195. package/src/types/index.ts +153 -6
  196. package/src/utils/index.ts +50 -3
@@ -3,20 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ZelloUserSupportedFeatures = exports.ZelloUserStatus = exports.ZelloUser = exports.ZelloTextMessage = exports.ZelloRecentEntryType = exports.ZelloRecentEntry = exports.ZelloOutgoingVoiceMessageState = exports.ZelloOutgoingVoiceMessageError = exports.ZelloOutgoingVoiceMessage = exports.ZelloOutgoingEmergency = exports.ZelloLocationMessage = exports.ZelloIncomingVoiceMessage = exports.ZelloIncomingEmergency = exports.ZelloImageMessage = exports.ZelloHistoryVoiceMessage = exports.ZelloHistoryTextMessage = exports.ZelloHistoryLocationMessage = exports.ZelloHistoryImageMessage = exports.ZelloHistoryAlertMessage = exports.ZelloGroupConversation = exports.ZelloDispatchChannel = exports.ZelloDispatchCallStatus = exports.ZelloDispatchCall = exports.ZelloContactType = exports.ZelloConnectionState = exports.ZelloConnectionError = exports.ZelloChannelUser = exports.ZelloChannelConnectionStatus = exports.ZelloChannelAlertLevel = exports.ZelloChannel = exports.ZelloAlertMessage = exports.ZelloAccountStatus = void 0;
7
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
- function _possibleConstructorReturn(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
9
- function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
10
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
11
- function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
12
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
13
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
14
- function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
15
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
+ exports.ZelloUserSupportedFeatures = exports.ZelloUserStatus = exports.ZelloUser = exports.ZelloTranslation = exports.ZelloTranscription = exports.ZelloTextMessage = exports.ZelloRecentEntryType = exports.ZelloRecentEntry = exports.ZelloOutgoingVoiceMessageState = exports.ZelloOutgoingVoiceMessageError = exports.ZelloOutgoingVoiceMessage = exports.ZelloOutgoingEmergency = exports.ZelloLocationMessage = exports.ZelloIncomingVoiceMessage = exports.ZelloIncomingEmergency = exports.ZelloImageMessage = exports.ZelloHistoryVoiceMessage = exports.ZelloHistoryTextMessage = exports.ZelloHistoryLocationMessage = exports.ZelloHistoryImageMessage = exports.ZelloHistoryAlertMessage = exports.ZelloGroupConversation = exports.ZelloDispatchChannel = exports.ZelloDispatchCallStatus = exports.ZelloDispatchCall = exports.ZelloContactType = exports.ZelloConnectionState = exports.ZelloConnectionError = exports.ZelloChannelUser = exports.ZelloChannelType = exports.ZelloChannelConnectionStatus = exports.ZelloChannelAlertLevel = exports.ZelloChannel = exports.ZelloAlertMessage = exports.ZelloAccountStatus = void 0;
20
7
  // noinspection JSUnusedGlobalSymbols
21
8
  /**
22
9
  * The parent type for all Zello contact types, including users and channels.
@@ -31,128 +18,177 @@ let ZelloContactType = exports.ZelloContactType = /*#__PURE__*/function (ZelloCo
31
18
  ZelloContactType["GroupConversation"] = "groupConversation";
32
19
  return ZelloContactType;
33
20
  }({});
21
+ /**
22
+ * The type of a {@link ZelloChannel}.
23
+ */
24
+ let ZelloChannelType = exports.ZelloChannelType = /*#__PURE__*/function (ZelloChannelType) {
25
+ /**
26
+ * A standard, dynamic Zello channel.
27
+ */
28
+ ZelloChannelType["Dynamic"] = "dynamic";
29
+ /**
30
+ * A dispatch channel. Dispatch channels carry calls between users and dispatchers and are surfaced as a {@link ZelloDispatchChannel}.
31
+ */
32
+ ZelloChannelType["Dispatch"] = "dispatch";
33
+ /**
34
+ * A team channel. Team channels allow private one-to-one direct messaging between users.
35
+ */
36
+ ZelloChannelType["Team"] = "team";
37
+ /**
38
+ * An ad-hoc group conversation provisioned by the end user, surfaced as a {@link ZelloGroupConversation}.
39
+ */
40
+ ZelloChannelType["GroupConversation"] = "groupConversation";
41
+ return ZelloChannelType;
42
+ }({});
34
43
  /**
35
44
  * The status of a {@link ZelloUser}.
36
45
  */
37
46
  let ZelloUserStatus = exports.ZelloUserStatus = /*#__PURE__*/function (ZelloUserStatus) {
47
+ /**
48
+ * The user is connected. Messages will play live.
49
+ */
38
50
  ZelloUserStatus["Available"] = "available";
51
+ /**
52
+ * The user is connected. Messages will not play live.
53
+ */
39
54
  ZelloUserStatus["Busy"] = "busy";
55
+ /**
56
+ * The user is disconnected. Messages will not play live.
57
+ * The user will download messages sent to them when they reconnect.
58
+ */
40
59
  ZelloUserStatus["Standby"] = "standby";
60
+ /**
61
+ * The user is disconnected and cannot receive messages.
62
+ */
41
63
  ZelloUserStatus["Offline"] = "offline";
42
64
  return ZelloUserStatus;
43
65
  }({});
44
66
  /**
45
67
  * A Zello user.
46
68
  */
47
- let ZelloUser = exports.ZelloUser = /*#__PURE__*/_createClass(function ZelloUser(name, displayName, isMuted, status, profilePictureUrl, profilePictureThumbnailUrl, supportedFeatures) {
48
- _classCallCheck(this, ZelloUser);
49
- _defineProperty(this, "name", void 0);
69
+ class ZelloUser {
50
70
  /**
51
71
  * The display name of the user. This should be used for UI purposes.
52
72
  * Display names are not unique.
53
73
  */
54
- _defineProperty(this, "displayName", void 0);
55
- _defineProperty(this, "type", void 0);
56
- _defineProperty(this, "isMuted", void 0);
57
- _defineProperty(this, "status", void 0);
74
+
58
75
  /**
59
76
  * The URL of the user's profile picture.
60
77
  */
61
- _defineProperty(this, "profilePictureUrl", void 0);
78
+
62
79
  /**
63
80
  * The URL of the user's profile picture thumbnail.
64
81
  * This can be used for displaying a smaller version of the profile picture (such as in a list).
65
82
  */
66
- _defineProperty(this, "profilePictureThumbnailUrl", void 0);
83
+
67
84
  /**
68
85
  * The supported features of the user.
69
86
  */
70
- _defineProperty(this, "supportedFeatures", void 0);
71
- this.name = name;
72
- this.type = ZelloContactType.User;
73
- this.displayName = displayName;
74
- this.isMuted = isMuted;
75
- this.status = status;
76
- this.profilePictureUrl = profilePictureUrl;
77
- this.profilePictureThumbnailUrl = profilePictureThumbnailUrl;
78
- this.supportedFeatures = supportedFeatures;
79
- });
87
+
88
+ constructor(name, displayName, isMuted, status, profilePictureUrl, profilePictureThumbnailUrl, supportedFeatures) {
89
+ this.name = name;
90
+ this.type = ZelloContactType.User;
91
+ this.displayName = displayName;
92
+ this.isMuted = isMuted;
93
+ this.status = status;
94
+ this.profilePictureUrl = profilePictureUrl;
95
+ this.profilePictureThumbnailUrl = profilePictureThumbnailUrl;
96
+ this.supportedFeatures = supportedFeatures;
97
+ }
98
+ }
99
+
80
100
  /**
81
101
  * The supported features of a {@link ZelloUser}.
82
102
  */
83
- let ZelloUserSupportedFeatures = exports.ZelloUserSupportedFeatures = /*#__PURE__*/_createClass(function ZelloUserSupportedFeatures(groupConversations) {
84
- _classCallCheck(this, ZelloUserSupportedFeatures);
103
+ exports.ZelloUser = ZelloUser;
104
+ class ZelloUserSupportedFeatures {
85
105
  /**
86
106
  * Whether the user supports group conversations.
87
107
  */
88
- _defineProperty(this, "groupConversations", void 0);
89
- this.groupConversations = groupConversations;
90
- });
108
+
109
+ constructor(groupConversations) {
110
+ this.groupConversations = groupConversations;
111
+ }
112
+ }
113
+
91
114
  /**
92
115
  * A Zello channel. A channel contains multiple users.
93
116
  */
94
- let ZelloChannel = exports.ZelloChannel = /*#__PURE__*/_createClass(function ZelloChannel(name, isMuted, connectionStatus, usersOnline, options) {
95
- _classCallCheck(this, ZelloChannel);
96
- _defineProperty(this, "name", void 0);
97
- _defineProperty(this, "type", void 0);
98
- _defineProperty(this, "isMuted", void 0);
117
+ exports.ZelloUserSupportedFeatures = ZelloUserSupportedFeatures;
118
+ class ZelloChannel {
99
119
  /**
100
120
  * The connection status of the channel. Connecting to a channel is asynchronous.
101
121
  */
102
- _defineProperty(this, "connectionStatus", void 0);
122
+
103
123
  /**
104
124
  * The number of users connected to the channel.
105
125
  */
106
- _defineProperty(this, "usersOnline", void 0);
126
+
107
127
  /**
108
128
  * The options of the channel.
109
129
  */
110
- _defineProperty(this, "options", void 0);
111
- this.name = name;
112
- this.type = ZelloContactType.Channel;
113
- this.isMuted = isMuted;
114
- this.connectionStatus = connectionStatus;
115
- this.usersOnline = usersOnline;
116
- this.options = options;
117
- });
130
+
131
+ /**
132
+ * The type of the channel.
133
+ */
134
+
135
+ /**
136
+ * Whether this channel has translations enabled.
137
+ * When true, incoming voice messages on this channel may be played as TTS in the listener's language.
138
+ * See {@link ZelloIncomingVoiceMessage#isTranslation} for the per-message signal.
139
+ */
140
+
141
+ constructor(name, isMuted, connectionStatus, usersOnline, options, channelType = ZelloChannelType.Dynamic, translationsEnabled = false) {
142
+ this.name = name;
143
+ this.type = ZelloContactType.Channel;
144
+ this.isMuted = isMuted;
145
+ this.connectionStatus = connectionStatus;
146
+ this.usersOnline = usersOnline;
147
+ this.options = options;
148
+ this.channelType = channelType;
149
+ this.translationsEnabled = translationsEnabled;
150
+ }
151
+ }
152
+
118
153
  /**
119
154
  * A Zello dispatch channel. A dispatch channel is a special type of channel that has calls between a user and a dispatcher.
120
155
  */
121
- let ZelloDispatchChannel = exports.ZelloDispatchChannel = /*#__PURE__*/function (_ZelloChannel2) {
122
- function ZelloDispatchChannel(name, isMuted, connectionStatus, usersOnline, options, currentCall) {
123
- var _this;
124
- _classCallCheck(this, ZelloDispatchChannel);
125
- _this = _callSuper(this, ZelloDispatchChannel, [name, isMuted, connectionStatus, usersOnline, options]);
126
- /**
127
- * The current call on the dispatch channel, if any.
128
- */
129
- _defineProperty(_this, "currentCall", void 0);
130
- _this.type = ZelloContactType.DispatchChannel;
131
- _this.currentCall = currentCall;
132
- return _this;
156
+ exports.ZelloChannel = ZelloChannel;
157
+ class ZelloDispatchChannel extends ZelloChannel {
158
+ /**
159
+ * The current call on the dispatch channel, if any.
160
+ */
161
+
162
+ constructor(name, isMuted, connectionStatus, usersOnline, options, currentCall, translationsEnabled = false) {
163
+ super(name, isMuted, connectionStatus, usersOnline, options, ZelloChannelType.Dispatch, translationsEnabled);
164
+ this.type = ZelloContactType.DispatchChannel;
165
+ this.currentCall = currentCall;
133
166
  }
134
- _inherits(ZelloDispatchChannel, _ZelloChannel2);
135
- return _createClass(ZelloDispatchChannel);
136
- }(ZelloChannel);
167
+ }
168
+
137
169
  /**
138
170
  * A Zello dispatch call. A dispatch call is a call between a user and a dispatcher.
139
171
  */
140
- let ZelloDispatchCall = exports.ZelloDispatchCall = /*#__PURE__*/_createClass(function ZelloDispatchCall(status, dispatcher) {
141
- _classCallCheck(this, ZelloDispatchCall);
172
+ exports.ZelloDispatchChannel = ZelloDispatchChannel;
173
+ class ZelloDispatchCall {
142
174
  /**
143
175
  * The status of the call.
144
176
  */
145
- _defineProperty(this, "status", void 0);
177
+
146
178
  /**
147
179
  * The name of the dispatcher who accepted the call. Null if the call is in the {@link ZelloDispatchCallStatus.Pending} state.
148
180
  */
149
- _defineProperty(this, "dispatcher", void 0);
150
- this.status = status;
151
- this.dispatcher = dispatcher;
152
- });
181
+
182
+ constructor(status, dispatcher) {
183
+ this.status = status;
184
+ this.dispatcher = dispatcher;
185
+ }
186
+ }
187
+
153
188
  /**
154
189
  * The status of a {@link ZelloDispatchCall}.
155
190
  */
191
+ exports.ZelloDispatchCall = ZelloDispatchCall;
156
192
  let ZelloDispatchCallStatus = exports.ZelloDispatchCallStatus = /*#__PURE__*/function (ZelloDispatchCallStatus) {
157
193
  ZelloDispatchCallStatus["Pending"] = "pending";
158
194
  ZelloDispatchCallStatus["Active"] = "active";
@@ -165,35 +201,32 @@ let ZelloDispatchCallStatus = exports.ZelloDispatchCallStatus = /*#__PURE__*/fun
165
201
  *
166
202
  * {@link ZelloGroupConversation}s are only possible when {@link ZelloConsoleSettings.allowGroupConversations} is true.
167
203
  */
168
- let ZelloGroupConversation = exports.ZelloGroupConversation = /*#__PURE__*/function (_ZelloChannel3) {
169
- function ZelloGroupConversation(name, isMuted, connectionStatus, usersOnline, options, displayName, users, onlineUsers) {
170
- var _this2;
171
- _classCallCheck(this, ZelloGroupConversation);
172
- _this2 = _callSuper(this, ZelloGroupConversation, [name, isMuted, connectionStatus, usersOnline, options]);
173
- /**
174
- * The display name of the group conversation. This should be used in the UI instead of {@link ZelloChannel#name}, as the {@link ZelloChannel#name} will be a uniquely hashed value starting with c##.
175
- */
176
- _defineProperty(_this2, "displayName", void 0);
177
- /**
178
- * The users in the group conversation.
179
- */
180
- _defineProperty(_this2, "users", void 0);
181
- /**
182
- * The users in the group conversation that are currently online.
183
- */
184
- _defineProperty(_this2, "onlineUsers", void 0);
185
- _this2.type = ZelloContactType.GroupConversation;
186
- _this2.displayName = displayName;
187
- _this2.users = users;
188
- _this2.onlineUsers = onlineUsers;
189
- return _this2;
204
+ class ZelloGroupConversation extends ZelloChannel {
205
+ /**
206
+ * The display name of the group conversation. This should be used in the UI instead of {@link ZelloChannel#name}, as the {@link ZelloChannel#name} will be a uniquely hashed value starting with c##.
207
+ */
208
+
209
+ /**
210
+ * The users in the group conversation.
211
+ */
212
+
213
+ /**
214
+ * The users in the group conversation that are currently online.
215
+ */
216
+
217
+ constructor(name, isMuted, connectionStatus, usersOnline, options, displayName, users, onlineUsers) {
218
+ super(name, isMuted, connectionStatus, usersOnline, options, ZelloChannelType.GroupConversation, false);
219
+ this.type = ZelloContactType.GroupConversation;
220
+ this.displayName = displayName;
221
+ this.users = users;
222
+ this.onlineUsers = onlineUsers;
190
223
  }
191
- _inherits(ZelloGroupConversation, _ZelloChannel3);
192
- return _createClass(ZelloGroupConversation);
193
- }(ZelloChannel);
224
+ }
225
+
194
226
  /**
195
227
  * The connection status of a {@link ZelloChannel}.
196
228
  */
229
+ exports.ZelloGroupConversation = ZelloGroupConversation;
197
230
  let ZelloChannelConnectionStatus = exports.ZelloChannelConnectionStatus = /*#__PURE__*/function (ZelloChannelConnectionStatus) {
198
231
  ZelloChannelConnectionStatus["Disconnected"] = "disconnected";
199
232
  ZelloChannelConnectionStatus["Connecting"] = "connecting";
@@ -206,16 +239,17 @@ let ZelloChannelConnectionStatus = exports.ZelloChannelConnectionStatus = /*#__P
206
239
  /**
207
240
  * A user in a {@link ZelloChannel}. A {@link ZelloChannelUser} may or may not be part of your contact list.
208
241
  */
209
- let ZelloChannelUser = exports.ZelloChannelUser = /*#__PURE__*/_createClass(function ZelloChannelUser(name, displayName) {
210
- _classCallCheck(this, ZelloChannelUser);
211
- _defineProperty(this, "name", void 0);
212
- _defineProperty(this, "displayName", void 0);
213
- this.name = name;
214
- this.displayName = displayName;
215
- });
242
+ class ZelloChannelUser {
243
+ constructor(name, displayName) {
244
+ this.name = name;
245
+ this.displayName = displayName;
246
+ }
247
+ }
248
+
216
249
  /**
217
250
  * The credentials required to connect to Zello.
218
251
  */
252
+ exports.ZelloChannelUser = ZelloChannelUser;
219
253
  /**
220
254
  * The connection state of the Zello SDK.
221
255
  */
@@ -247,7 +281,14 @@ let ZelloOutgoingVoiceMessageError = exports.ZelloOutgoingVoiceMessageError = /*
247
281
  * The status of the current account.
248
282
  */
249
283
  let ZelloAccountStatus = exports.ZelloAccountStatus = /*#__PURE__*/function (ZelloAccountStatus) {
284
+ /**
285
+ * The user is connected. Messages will play live.
286
+ */
250
287
  ZelloAccountStatus["Available"] = "available";
288
+ /**
289
+ * The user is connected. Messages will not play live.
290
+ * The received messages will be available in the history.
291
+ */
251
292
  ZelloAccountStatus["Busy"] = "busy";
252
293
  return ZelloAccountStatus;
253
294
  }({});
@@ -257,36 +298,44 @@ let ZelloAccountStatus = exports.ZelloAccountStatus = /*#__PURE__*/function (Zel
257
298
  /**
258
299
  * An incoming Zello voice message.
259
300
  */
260
- let ZelloIncomingVoiceMessage = exports.ZelloIncomingVoiceMessage = /*#__PURE__*/_createClass(function ZelloIncomingVoiceMessage(contact, channelUser, timestamp) {
261
- _classCallCheck(this, ZelloIncomingVoiceMessage);
262
- _defineProperty(this, "contact", void 0);
263
- _defineProperty(this, "channelUser", void 0);
264
- _defineProperty(this, "timestamp", void 0);
265
- _defineProperty(this, "incoming", true);
266
- this.contact = contact;
267
- this.channelUser = channelUser;
268
- this.timestamp = timestamp;
269
- });
301
+ class ZelloIncomingVoiceMessage {
302
+ incoming = true;
303
+ /**
304
+ * Whether this is a translation message.
305
+ * When true, the message will play as TTS in the listener's language as long as a valid translation arrives;
306
+ * if the translation fails, is empty, or TTS cannot be initiated, the original audio is played instead.
307
+ */
308
+
309
+ constructor(contact, channelUser, timestamp, isTranslation = false) {
310
+ this.contact = contact;
311
+ this.channelUser = channelUser;
312
+ this.timestamp = timestamp;
313
+ this.isTranslation = isTranslation;
314
+ }
315
+ }
316
+
270
317
  /**
271
318
  * An outgoing Zello voice message.
272
319
  */
273
- let ZelloOutgoingVoiceMessage = exports.ZelloOutgoingVoiceMessage = /*#__PURE__*/_createClass(function ZelloOutgoingVoiceMessage(contact, timestamp, state) {
274
- _classCallCheck(this, ZelloOutgoingVoiceMessage);
275
- _defineProperty(this, "contact", void 0);
276
- _defineProperty(this, "timestamp", void 0);
277
- _defineProperty(this, "channelUser", undefined);
278
- _defineProperty(this, "incoming", false);
320
+ exports.ZelloIncomingVoiceMessage = ZelloIncomingVoiceMessage;
321
+ class ZelloOutgoingVoiceMessage {
322
+ channelUser = undefined;
323
+ incoming = false;
279
324
  /**
280
325
  * The state of the message.
281
326
  */
282
- _defineProperty(this, "state", void 0);
283
- this.contact = contact;
284
- this.timestamp = timestamp;
285
- this.state = state;
286
- });
327
+
328
+ constructor(contact, timestamp, state) {
329
+ this.contact = contact;
330
+ this.timestamp = timestamp;
331
+ this.state = state;
332
+ }
333
+ }
334
+
287
335
  /**
288
336
  * The state of an outgoing Zello voice message.
289
337
  */
338
+ exports.ZelloOutgoingVoiceMessage = ZelloOutgoingVoiceMessage;
290
339
  let ZelloOutgoingVoiceMessageState = exports.ZelloOutgoingVoiceMessageState = /*#__PURE__*/function (ZelloOutgoingVoiceMessageState) {
291
340
  ZelloOutgoingVoiceMessageState["None"] = "none";
292
341
  ZelloOutgoingVoiceMessageState["Connecting"] = "connecting";
@@ -298,195 +347,207 @@ let ZelloOutgoingVoiceMessageState = exports.ZelloOutgoingVoiceMessageState = /*
298
347
  /**
299
348
  * A Zello image message.
300
349
  */
301
- let ZelloImageMessage = exports.ZelloImageMessage = /*#__PURE__*/_createClass(function ZelloImageMessage(contact, channelUser, incoming, timestamp, thumbnail, image) {
302
- _classCallCheck(this, ZelloImageMessage);
303
- _defineProperty(this, "contact", void 0);
304
- _defineProperty(this, "channelUser", void 0);
305
- _defineProperty(this, "incoming", void 0);
306
- _defineProperty(this, "timestamp", void 0);
350
+ class ZelloImageMessage {
307
351
  /**
308
352
  * Base64 encoded thumbnail image
309
353
  */
310
- _defineProperty(this, "thumbnail", void 0);
354
+
311
355
  /**
312
356
  * Base64 encoded full image
313
357
  */
314
- _defineProperty(this, "image", void 0);
315
- this.contact = contact;
316
- this.channelUser = channelUser;
317
- this.incoming = incoming;
318
- this.timestamp = timestamp;
319
- this.thumbnail = thumbnail;
320
- this.image = image;
321
- });
358
+
359
+ constructor(contact, channelUser, incoming, timestamp, thumbnail, image) {
360
+ this.contact = contact;
361
+ this.channelUser = channelUser;
362
+ this.incoming = incoming;
363
+ this.timestamp = timestamp;
364
+ this.thumbnail = thumbnail;
365
+ this.image = image;
366
+ }
367
+ }
368
+
322
369
  /**
323
370
  * A Zello alert message. Alert messages contain text and are typically used for important messages.
324
371
  * They will play a recurring sound until the user acknowledges them by bringing the app to the foreground.
325
372
  */
326
- let ZelloAlertMessage = exports.ZelloAlertMessage = /*#__PURE__*/_createClass(function ZelloAlertMessage(contact, channelUser, incoming, timestamp, text) {
327
- _classCallCheck(this, ZelloAlertMessage);
328
- _defineProperty(this, "contact", void 0);
329
- _defineProperty(this, "channelUser", void 0);
330
- _defineProperty(this, "incoming", void 0);
331
- _defineProperty(this, "timestamp", void 0);
373
+ exports.ZelloImageMessage = ZelloImageMessage;
374
+ class ZelloAlertMessage {
332
375
  /**
333
376
  * The text body of the message.
334
377
  */
335
- _defineProperty(this, "text", void 0);
336
- this.contact = contact;
337
- this.channelUser = channelUser;
338
- this.incoming = incoming;
339
- this.timestamp = timestamp;
340
- this.text = text;
341
- });
378
+
379
+ constructor(contact, channelUser, incoming, timestamp, text) {
380
+ this.contact = contact;
381
+ this.channelUser = channelUser;
382
+ this.incoming = incoming;
383
+ this.timestamp = timestamp;
384
+ this.text = text;
385
+ }
386
+ }
387
+
342
388
  /**
343
389
  * The level of user a channel alert message should be sent to.
344
390
  */
391
+ exports.ZelloAlertMessage = ZelloAlertMessage;
345
392
  let ZelloChannelAlertLevel = exports.ZelloChannelAlertLevel = /*#__PURE__*/function (ZelloChannelAlertLevel) {
393
+ /**
394
+ * Users currently connected to the channel.
395
+ */
346
396
  ZelloChannelAlertLevel["Connected"] = "connected";
397
+ /**
398
+ * All users part of the channel, whether they are connected or not.
399
+ * This will send as a push notification if the user is not connected to Zello.
400
+ */
347
401
  ZelloChannelAlertLevel["All"] = "all";
348
402
  return ZelloChannelAlertLevel;
349
403
  }({});
350
404
  /**
351
405
  * A Zello text message.
352
406
  */
353
- let ZelloTextMessage = exports.ZelloTextMessage = /*#__PURE__*/_createClass(function ZelloTextMessage(contact, channelUser, incoming, timestamp, text) {
354
- _classCallCheck(this, ZelloTextMessage);
355
- _defineProperty(this, "contact", void 0);
356
- _defineProperty(this, "channelUser", void 0);
357
- _defineProperty(this, "incoming", void 0);
358
- _defineProperty(this, "timestamp", void 0);
407
+ class ZelloTextMessage {
359
408
  /**
360
409
  * The text body of the message.
361
410
  */
362
- _defineProperty(this, "text", void 0);
363
- this.contact = contact;
364
- this.channelUser = channelUser;
365
- this.incoming = incoming;
366
- this.timestamp = timestamp;
367
- this.text = text;
368
- });
411
+
412
+ constructor(contact, channelUser, incoming, timestamp, text) {
413
+ this.contact = contact;
414
+ this.channelUser = channelUser;
415
+ this.incoming = incoming;
416
+ this.timestamp = timestamp;
417
+ this.text = text;
418
+ }
419
+ }
420
+
369
421
  /**
370
422
  * A Zello location message.
371
423
  */
372
- let ZelloLocationMessage = exports.ZelloLocationMessage = /*#__PURE__*/_createClass(function ZelloLocationMessage(contact, channelUser, incoming, timestamp, latitude, longitude, accuracy, address) {
373
- _classCallCheck(this, ZelloLocationMessage);
374
- _defineProperty(this, "contact", void 0);
375
- _defineProperty(this, "channelUser", void 0);
376
- _defineProperty(this, "incoming", void 0);
377
- _defineProperty(this, "timestamp", void 0);
424
+ exports.ZelloTextMessage = ZelloTextMessage;
425
+ class ZelloLocationMessage {
378
426
  /**
379
427
  * The latitude of the location.
380
428
  */
381
- _defineProperty(this, "latitude", void 0);
429
+
382
430
  /**
383
431
  * The longitude of the location.
384
432
  */
385
- _defineProperty(this, "longitude", void 0);
433
+
386
434
  /**
387
435
  * The horizontal accuracy of the location in meters.
388
436
  */
389
- _defineProperty(this, "accuracy", void 0);
437
+
390
438
  /**
391
439
  * The reverse-geolocation address, if available.
392
440
  */
393
- _defineProperty(this, "address", void 0);
394
- this.contact = contact;
395
- this.channelUser = channelUser;
396
- this.incoming = incoming;
397
- this.timestamp = timestamp;
398
- this.latitude = latitude;
399
- this.longitude = longitude;
400
- this.accuracy = accuracy;
401
- this.address = address;
402
- });
441
+
442
+ constructor(contact, channelUser, incoming, timestamp, latitude, longitude, accuracy, address) {
443
+ this.contact = contact;
444
+ this.channelUser = channelUser;
445
+ this.incoming = incoming;
446
+ this.timestamp = timestamp;
447
+ this.latitude = latitude;
448
+ this.longitude = longitude;
449
+ this.accuracy = accuracy;
450
+ this.address = address;
451
+ }
452
+ }
453
+
403
454
  /**
404
455
  * An incoming Zello emergency.
405
456
  */
406
- let ZelloIncomingEmergency = exports.ZelloIncomingEmergency = /*#__PURE__*/_createClass(function ZelloIncomingEmergency(channel, channelUser, emergencyId, startTimestamp, endTimestamp) {
407
- _classCallCheck(this, ZelloIncomingEmergency);
457
+ exports.ZelloLocationMessage = ZelloLocationMessage;
458
+ class ZelloIncomingEmergency {
408
459
  /**
409
460
  * The emergency channel.
410
461
  */
411
- _defineProperty(this, "channel", void 0);
462
+
412
463
  /**
413
464
  * The user that started the emergency.
414
465
  */
415
- _defineProperty(this, "channelUser", void 0);
466
+
416
467
  /**
417
468
  * The unique identifier of the emergency.
418
469
  */
419
- _defineProperty(this, "emergencyId", void 0);
470
+
420
471
  /**
421
472
  * The timestamp when the emergency started.
422
473
  */
423
- _defineProperty(this, "startTimestamp", void 0);
474
+
424
475
  /**
425
476
  * The timestamp when the emergency ended, or undefined if it's ongoing.
426
477
  */
427
- _defineProperty(this, "endTimestamp", void 0);
428
- this.channel = channel;
429
- this.channelUser = channelUser;
430
- this.emergencyId = emergencyId;
431
- this.startTimestamp = startTimestamp;
432
- this.endTimestamp = endTimestamp;
433
- });
478
+
479
+ constructor(channel, channelUser, emergencyId, startTimestamp, endTimestamp) {
480
+ this.channel = channel;
481
+ this.channelUser = channelUser;
482
+ this.emergencyId = emergencyId;
483
+ this.startTimestamp = startTimestamp;
484
+ this.endTimestamp = endTimestamp;
485
+ }
486
+ }
487
+
434
488
  /**
435
489
  * An outgoing Zello emergency.
436
490
  */
437
- let ZelloOutgoingEmergency = exports.ZelloOutgoingEmergency = /*#__PURE__*/_createClass(function ZelloOutgoingEmergency(channel, startTimestamp, endTimestamp) {
438
- _classCallCheck(this, ZelloOutgoingEmergency);
491
+ exports.ZelloIncomingEmergency = ZelloIncomingEmergency;
492
+ class ZelloOutgoingEmergency {
439
493
  /**
440
494
  * The emergency channel.
441
495
  */
442
- _defineProperty(this, "channel", void 0);
496
+
443
497
  /**
444
498
  * The timestamp when the emergency started.
445
499
  */
446
- _defineProperty(this, "startTimestamp", void 0);
500
+
447
501
  /**
448
502
  * The timestamp when the emergency ended, or undefined if it's ongoing.
449
503
  */
450
- _defineProperty(this, "endTimestamp", void 0);
451
- this.channel = channel;
452
- this.startTimestamp = startTimestamp;
453
- this.endTimestamp = endTimestamp;
454
- });
504
+
505
+ constructor(channel, startTimestamp, endTimestamp) {
506
+ this.channel = channel;
507
+ this.startTimestamp = startTimestamp;
508
+ this.endTimestamp = endTimestamp;
509
+ }
510
+ }
511
+
455
512
  /**
456
513
  * A Zello recent entry.
457
514
  */
458
- let ZelloRecentEntry = exports.ZelloRecentEntry = /*#__PURE__*/_createClass(function ZelloRecentEntry(contact, channelUser, timestamp, type, incoming) {
459
- _classCallCheck(this, ZelloRecentEntry);
515
+ exports.ZelloOutgoingEmergency = ZelloOutgoingEmergency;
516
+ class ZelloRecentEntry {
460
517
  /**
461
518
  * The contact that the recent entry is for.
462
519
  */
463
- _defineProperty(this, "contact", void 0);
520
+
464
521
  /**
465
522
  * If incoming, the author that sent the most recent message, if the message was sent in a channel.
466
523
  * If outgoing, undefined.
467
524
  */
468
- _defineProperty(this, "channelUser", void 0);
525
+
469
526
  /**
470
527
  * The timestamp of the most recent message.
471
528
  */
472
- _defineProperty(this, "timestamp", void 0);
529
+
473
530
  /**
474
531
  * The type of the most recent message.
475
532
  */
476
- _defineProperty(this, "type", void 0);
533
+
477
534
  /**
478
535
  * Whether the most recent message was incoming.
479
536
  */
480
- _defineProperty(this, "incoming", void 0);
481
- this.contact = contact;
482
- this.channelUser = channelUser;
483
- this.timestamp = timestamp;
484
- this.type = type;
485
- this.incoming = incoming;
486
- });
537
+
538
+ constructor(contact, channelUser, timestamp, type, incoming) {
539
+ this.contact = contact;
540
+ this.channelUser = channelUser;
541
+ this.timestamp = timestamp;
542
+ this.type = type;
543
+ this.incoming = incoming;
544
+ }
545
+ }
546
+
487
547
  /**
488
548
  * The type of {@link ZelloRecentEntry}.
489
549
  */
550
+ exports.ZelloRecentEntry = ZelloRecentEntry;
490
551
  let ZelloRecentEntryType = exports.ZelloRecentEntryType = /*#__PURE__*/function (ZelloRecentEntryType) {
491
552
  ZelloRecentEntryType["Voice"] = "voice";
492
553
  ZelloRecentEntryType["Image"] = "image";
@@ -498,127 +559,187 @@ let ZelloRecentEntryType = exports.ZelloRecentEntryType = /*#__PURE__*/function
498
559
  /**
499
560
  * The parent type for all Zello history messages.
500
561
  */
562
+ /**
563
+ * A translation of a {@link ZelloTranscription} into another language.
564
+ */
565
+ class ZelloTranslation {
566
+ /**
567
+ * The translated text.
568
+ */
569
+
570
+ /**
571
+ * Language tag of {@link text} as reported by the server (for example "en", "en-US", or "zh-Hans").
572
+ */
573
+
574
+ constructor(text, language) {
575
+ this.text = text;
576
+ this.language = language;
577
+ }
578
+ }
579
+
580
+ /**
581
+ * A successful transcription for a Zello voice history message.
582
+ *
583
+ * Transcriptions are produced asynchronously by the Zello server after a voice message
584
+ * has finished sending or receiving, so this object may not be available immediately when
585
+ * the history message is created. Surfaced on {@link ZelloHistoryVoiceMessage#transcription} and
586
+ * delivered via the {@link events.ZelloEvent.HISTORY_VOICE_MESSAGE_TRANSCRIPTION_AVAILABLE | HISTORY_VOICE_MESSAGE_TRANSCRIPTION_AVAILABLE} event.
587
+ */
588
+ exports.ZelloTranslation = ZelloTranslation;
589
+ class ZelloTranscription {
590
+ /**
591
+ * The transcribed text, in the language of the sender.
592
+ */
593
+
594
+ /**
595
+ * Language tag of {@link text} as reported by the server (for example "en", "en-US", or "zh-Hans"), or undefined if unknown.
596
+ */
597
+
598
+ /**
599
+ * Whether the server truncated {@link text} because the original audio was too long.
600
+ */
601
+
602
+ /**
603
+ * Server-reported confidence in {@link text}, in the range 0.0 to 1.0.
604
+ */
605
+
606
+ /**
607
+ * Available translations of {@link text} into other languages, or an empty array if none.
608
+ */
609
+
610
+ constructor(text, language, isTruncated, confidence, translations) {
611
+ this.text = text;
612
+ this.language = language;
613
+ this.isTruncated = isTruncated;
614
+ this.confidence = confidence;
615
+ this.translations = translations;
616
+ }
617
+ }
618
+
501
619
  /**
502
620
  * A Zello history voice message.
503
621
  * To play the message, use the {@link sdk.Zello#playHistoryMessage | Zello#playHistoryMessage} function.
504
622
  */
505
- let ZelloHistoryVoiceMessage = exports.ZelloHistoryVoiceMessage = /*#__PURE__*/_createClass(function ZelloHistoryVoiceMessage(contact, channelUser, timestamp, historyId, incoming, durationMs) {
506
- _classCallCheck(this, ZelloHistoryVoiceMessage);
507
- _defineProperty(this, "contact", void 0);
508
- _defineProperty(this, "channelUser", void 0);
509
- _defineProperty(this, "timestamp", void 0);
510
- _defineProperty(this, "historyId", void 0);
511
- _defineProperty(this, "incoming", void 0);
623
+ exports.ZelloTranscription = ZelloTranscription;
624
+ class ZelloHistoryVoiceMessage {
512
625
  /**
513
626
  * The duration of the voice message in milliseconds.
514
627
  */
515
- _defineProperty(this, "durationMs", void 0);
516
- this.contact = contact;
517
- this.channelUser = channelUser;
518
- this.timestamp = timestamp;
519
- this.historyId = historyId;
520
- this.incoming = incoming;
521
- this.durationMs = durationMs;
522
- });
628
+
629
+ /**
630
+ * The successful transcription for this voice message, or undefined if no transcription has been
631
+ * received yet or the server reported a transcription error.
632
+ *
633
+ * Transcriptions are produced asynchronously by the Zello server after a voice message finishes
634
+ * sending or receiving, so this may be undefined when the message first appears in history and
635
+ * populated later. Subscribe to the {@link events.ZelloEvent.HISTORY_VOICE_MESSAGE_TRANSCRIPTION_AVAILABLE | HISTORY_VOICE_MESSAGE_TRANSCRIPTION_AVAILABLE}
636
+ * event to be notified when a transcription arrives.
637
+ */
638
+
639
+ constructor(contact, channelUser, timestamp, historyId, incoming, durationMs, transcription = undefined) {
640
+ this.contact = contact;
641
+ this.channelUser = channelUser;
642
+ this.timestamp = timestamp;
643
+ this.historyId = historyId;
644
+ this.incoming = incoming;
645
+ this.durationMs = durationMs;
646
+ this.transcription = transcription;
647
+ }
648
+ }
649
+
523
650
  /**
524
651
  * A Zello history image message.
525
652
  * To retrieve the image data for the message, use the {@link sdk.Zello#getImageDataForHistoryImageMessage | Zello#getImageDataForHistoryImageMessage} method.
526
653
  */
527
- let ZelloHistoryImageMessage = exports.ZelloHistoryImageMessage = /*#__PURE__*/_createClass(function ZelloHistoryImageMessage(contact, channelUser, timestamp, historyId, incoming) {
528
- _classCallCheck(this, ZelloHistoryImageMessage);
529
- _defineProperty(this, "contact", void 0);
530
- _defineProperty(this, "channelUser", void 0);
531
- _defineProperty(this, "timestamp", void 0);
532
- _defineProperty(this, "historyId", void 0);
533
- _defineProperty(this, "incoming", void 0);
534
- this.contact = contact;
535
- this.channelUser = channelUser;
536
- this.timestamp = timestamp;
537
- this.historyId = historyId;
538
- this.incoming = incoming;
539
- });
654
+ exports.ZelloHistoryVoiceMessage = ZelloHistoryVoiceMessage;
655
+ class ZelloHistoryImageMessage {
656
+ constructor(contact, channelUser, timestamp, historyId, incoming) {
657
+ this.contact = contact;
658
+ this.channelUser = channelUser;
659
+ this.timestamp = timestamp;
660
+ this.historyId = historyId;
661
+ this.incoming = incoming;
662
+ }
663
+ }
664
+
540
665
  /**
541
666
  * A Zello history alert message.
542
667
  */
543
- let ZelloHistoryAlertMessage = exports.ZelloHistoryAlertMessage = /*#__PURE__*/_createClass(function ZelloHistoryAlertMessage(contact, channelUser, timestamp, historyId, incoming, text) {
544
- _classCallCheck(this, ZelloHistoryAlertMessage);
545
- _defineProperty(this, "contact", void 0);
546
- _defineProperty(this, "channelUser", void 0);
547
- _defineProperty(this, "timestamp", void 0);
548
- _defineProperty(this, "historyId", void 0);
549
- _defineProperty(this, "incoming", void 0);
668
+ exports.ZelloHistoryImageMessage = ZelloHistoryImageMessage;
669
+ class ZelloHistoryAlertMessage {
550
670
  /**
551
671
  * The text body of the message.
552
672
  */
553
- _defineProperty(this, "text", void 0);
554
- this.contact = contact;
555
- this.channelUser = channelUser;
556
- this.timestamp = timestamp;
557
- this.historyId = historyId;
558
- this.incoming = incoming;
559
- this.text = text;
560
- });
673
+
674
+ constructor(contact, channelUser, timestamp, historyId, incoming, text) {
675
+ this.contact = contact;
676
+ this.channelUser = channelUser;
677
+ this.timestamp = timestamp;
678
+ this.historyId = historyId;
679
+ this.incoming = incoming;
680
+ this.text = text;
681
+ }
682
+ }
683
+
561
684
  /**
562
685
  * A Zello history text message.
563
686
  */
564
- let ZelloHistoryTextMessage = exports.ZelloHistoryTextMessage = /*#__PURE__*/_createClass(function ZelloHistoryTextMessage(contact, channelUser, timestamp, historyId, incoming, text) {
565
- _classCallCheck(this, ZelloHistoryTextMessage);
566
- _defineProperty(this, "contact", void 0);
567
- _defineProperty(this, "channelUser", void 0);
568
- _defineProperty(this, "timestamp", void 0);
569
- _defineProperty(this, "historyId", void 0);
570
- _defineProperty(this, "incoming", void 0);
687
+ exports.ZelloHistoryAlertMessage = ZelloHistoryAlertMessage;
688
+ class ZelloHistoryTextMessage {
571
689
  /**
572
690
  * The text body of the message.
573
691
  */
574
- _defineProperty(this, "text", void 0);
575
- this.contact = contact;
576
- this.channelUser = channelUser;
577
- this.timestamp = timestamp;
578
- this.historyId = historyId;
579
- this.incoming = incoming;
580
- this.text = text;
581
- });
692
+
693
+ constructor(contact, channelUser, timestamp, historyId, incoming, text) {
694
+ this.contact = contact;
695
+ this.channelUser = channelUser;
696
+ this.timestamp = timestamp;
697
+ this.historyId = historyId;
698
+ this.incoming = incoming;
699
+ this.text = text;
700
+ }
701
+ }
702
+
582
703
  /**
583
704
  * A Zello history location message.
584
705
  */
585
- let ZelloHistoryLocationMessage = exports.ZelloHistoryLocationMessage = /*#__PURE__*/_createClass(function ZelloHistoryLocationMessage(contact, channelUser, timestamp, historyId, incoming, latitude, longitude, accuracy, address) {
586
- _classCallCheck(this, ZelloHistoryLocationMessage);
587
- _defineProperty(this, "contact", void 0);
588
- _defineProperty(this, "channelUser", void 0);
589
- _defineProperty(this, "timestamp", void 0);
590
- _defineProperty(this, "historyId", void 0);
591
- _defineProperty(this, "incoming", void 0);
706
+ exports.ZelloHistoryTextMessage = ZelloHistoryTextMessage;
707
+ class ZelloHistoryLocationMessage {
592
708
  /**
593
709
  * The latitude of the location.
594
710
  */
595
- _defineProperty(this, "latitude", void 0);
711
+
596
712
  /**
597
713
  * The longitude of the location.
598
714
  */
599
- _defineProperty(this, "longitude", void 0);
715
+
600
716
  /**
601
717
  * The horizontal accuracy of the location in meters.
602
718
  */
603
- _defineProperty(this, "accuracy", void 0);
719
+
604
720
  /**
605
721
  * The reverse-geolocation address, if available.
606
722
  */
607
- _defineProperty(this, "address", void 0);
608
- this.contact = contact;
609
- this.channelUser = channelUser;
610
- this.timestamp = timestamp;
611
- this.historyId = historyId;
612
- this.incoming = incoming;
613
- this.latitude = latitude;
614
- this.longitude = longitude;
615
- this.accuracy = accuracy;
616
- this.address = address;
617
- });
723
+
724
+ constructor(contact, channelUser, timestamp, historyId, incoming, latitude, longitude, accuracy, address) {
725
+ this.contact = contact;
726
+ this.channelUser = channelUser;
727
+ this.timestamp = timestamp;
728
+ this.historyId = historyId;
729
+ this.incoming = incoming;
730
+ this.latitude = latitude;
731
+ this.longitude = longitude;
732
+ this.accuracy = accuracy;
733
+ this.address = address;
734
+ }
735
+ }
736
+
618
737
  /**
619
738
  * The configuration for the Zello SDK.
620
739
  */
740
+
621
741
  /**
622
742
  * Settings for the network. These are configured via the Zello Work Administrative Console.
623
743
  */
744
+ exports.ZelloHistoryLocationMessage = ZelloHistoryLocationMessage;
624
745
  //# sourceMappingURL=index.js.map