@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.
- package/README.md +58 -15
- package/android/build.gradle +29 -10
- package/android/gradle.properties +4 -4
- package/android/src/main/java/com/zellosdk/ZelloAndroidSdkModule.kt +93 -68
- package/android/src/main/java/com/zellosdk/ZelloAndroidSdkModuleHelper.kt +25 -0
- package/ios/Extensions/ZelloContact+Extension.swift +26 -3
- package/ios/Extensions/ZelloHistoryVoiceMessage+Extension.swift +3 -0
- package/ios/Extensions/ZelloIOSSdkModule+Extension.swift +8 -2
- package/ios/Extensions/ZelloIncomingEmergency+Extension.swift +1 -0
- package/ios/Extensions/ZelloTranscription+Extension.swift +18 -0
- package/ios/ZelloIOSSdkModule.swift +24 -7
- package/ios/ZelloIOSSdkModuleBridge.m +1 -0
- package/ios/ZelloSdkModule.h +8 -0
- package/ios/ZelloSdkModule.mm +189 -0
- package/ios/ZelloSdkModuleImpl.swift +280 -0
- package/lib/commonjs/docs/assets/highlight.css +1 -1
- package/lib/commonjs/docs/assets/icons.js +1 -1
- package/lib/commonjs/docs/assets/icons.js.map +1 -1
- package/lib/commonjs/docs/assets/icons.svg +1 -1
- package/lib/commonjs/docs/assets/main.js +220 -288
- package/lib/commonjs/docs/assets/main.js.map +1 -1
- package/lib/commonjs/docs/assets/navigation.js +1 -1
- package/lib/commonjs/docs/assets/navigation.js.map +1 -1
- package/lib/commonjs/docs/assets/search.js +1 -1
- package/lib/commonjs/docs/assets/search.js.map +1 -1
- package/lib/commonjs/docs/assets/style.css +12 -4
- package/lib/commonjs/docs/classes/sdk.Zello.html +793 -97
- package/lib/commonjs/docs/classes/types.ZelloAlertMessage.html +122 -9
- package/lib/commonjs/docs/classes/types.ZelloChannel.html +155 -10
- package/lib/commonjs/docs/classes/types.ZelloChannelUser.html +86 -4
- package/lib/commonjs/docs/classes/types.ZelloDispatchCall.html +90 -6
- package/lib/commonjs/docs/classes/types.ZelloDispatchChannel.html +163 -11
- package/lib/commonjs/docs/classes/types.ZelloGroupConversation.html +178 -13
- package/lib/commonjs/docs/classes/types.ZelloHistoryAlertMessage.html +131 -10
- package/lib/commonjs/docs/classes/types.ZelloHistoryImageMessage.html +123 -9
- package/lib/commonjs/docs/classes/types.ZelloHistoryLocationMessage.html +155 -13
- package/lib/commonjs/docs/classes/types.ZelloHistoryTextMessage.html +131 -10
- package/lib/commonjs/docs/classes/types.ZelloHistoryVoiceMessage.html +145 -10
- package/lib/commonjs/docs/classes/types.ZelloImageMessage.html +130 -10
- package/lib/commonjs/docs/classes/types.ZelloIncomingEmergency.html +114 -9
- package/lib/commonjs/docs/classes/types.ZelloIncomingVoiceMessage.html +124 -8
- package/lib/commonjs/docs/classes/types.ZelloLocationMessage.html +146 -12
- package/lib/commonjs/docs/classes/types.ZelloOutgoingEmergency.html +98 -7
- package/lib/commonjs/docs/classes/types.ZelloOutgoingVoiceMessage.html +120 -9
- package/lib/commonjs/docs/classes/types.ZelloRecentEntry.html +114 -9
- package/lib/commonjs/docs/classes/types.ZelloTextMessage.html +122 -9
- package/lib/commonjs/docs/classes/types.ZelloTranscription.html +122 -0
- package/lib/commonjs/docs/classes/types.ZelloTranslation.html +91 -0
- package/lib/commonjs/docs/classes/types.ZelloUser.html +142 -11
- package/lib/commonjs/docs/classes/types.ZelloUserSupportedFeatures.html +82 -5
- package/lib/commonjs/docs/enums/events.ZelloEvent.html +563 -95
- package/lib/commonjs/docs/enums/types.ZelloAccountStatus.html +67 -5
- package/lib/commonjs/docs/enums/types.ZelloChannelAlertLevel.html +67 -5
- package/lib/commonjs/docs/enums/types.ZelloChannelConnectionStatus.html +68 -3
- package/lib/commonjs/docs/enums/types.ZelloChannelType.html +84 -0
- package/lib/commonjs/docs/enums/types.ZelloConnectionError.html +68 -3
- package/lib/commonjs/docs/enums/types.ZelloConnectionState.html +73 -3
- package/lib/commonjs/docs/enums/types.ZelloContactType.html +73 -3
- package/lib/commonjs/docs/enums/types.ZelloDispatchCallStatus.html +73 -3
- package/lib/commonjs/docs/enums/types.ZelloOutgoingVoiceMessageError.html +63 -3
- package/lib/commonjs/docs/enums/types.ZelloOutgoingVoiceMessageState.html +78 -3
- package/lib/commonjs/docs/enums/types.ZelloRecentEntryType.html +78 -3
- package/lib/commonjs/docs/enums/types.ZelloUserStatus.html +81 -7
- package/lib/commonjs/docs/hierarchy.html +29 -1
- package/lib/commonjs/docs/index.html +127 -29
- package/lib/commonjs/docs/interfaces/specs_NativeZelloSdk.Spec.html +504 -0
- package/lib/commonjs/docs/modules/events.html +37 -1
- package/lib/commonjs/docs/modules/index.html +37 -1
- package/lib/commonjs/docs/modules/sdk.html +37 -1
- package/lib/commonjs/docs/modules/specs_NativeZelloSdk.html +41 -0
- package/lib/commonjs/docs/modules/types.html +45 -1
- package/lib/commonjs/docs/modules.html +36 -1
- package/lib/commonjs/docs/types/types.ZelloChannelOptions.html +114 -9
- package/lib/commonjs/docs/types/types.ZelloConfig.html +86 -7
- package/lib/commonjs/docs/types/types.ZelloConsoleSettings.html +96 -9
- package/lib/commonjs/docs/types/types.ZelloContact.html +80 -6
- package/lib/commonjs/docs/types/types.ZelloCredentials.html +75 -6
- package/lib/commonjs/docs/types/types.ZelloHistoryMessage.html +97 -8
- package/lib/commonjs/docs/types/types.ZelloMessage.html +91 -7
- package/lib/commonjs/docs/variables/specs_NativeZelloSdk.default.html +34 -0
- package/lib/commonjs/events/index.js +217 -0
- package/lib/commonjs/events/index.js.map +1 -1
- package/lib/commonjs/sdk/index.js +731 -911
- package/lib/commonjs/sdk/index.js.map +1 -1
- package/lib/commonjs/specs/NativeZelloSdk.js +27 -0
- package/lib/commonjs/specs/NativeZelloSdk.js.map +1 -0
- package/lib/commonjs/types/index.js +423 -302
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/utils/index.js +27 -4
- package/lib/commonjs/utils/index.js.map +1 -1
- package/lib/module/docs/assets/highlight.css +1 -1
- package/lib/module/docs/assets/icons.js +1 -1
- package/lib/module/docs/assets/icons.js.map +1 -1
- package/lib/module/docs/assets/icons.svg +1 -1
- package/lib/module/docs/assets/main.js +220 -288
- package/lib/module/docs/assets/main.js.map +1 -1
- package/lib/module/docs/assets/navigation.js +1 -1
- package/lib/module/docs/assets/navigation.js.map +1 -1
- package/lib/module/docs/assets/search.js +1 -1
- package/lib/module/docs/assets/search.js.map +1 -1
- package/lib/module/docs/assets/style.css +12 -4
- package/lib/module/docs/classes/sdk.Zello.html +793 -97
- package/lib/module/docs/classes/types.ZelloAlertMessage.html +122 -9
- package/lib/module/docs/classes/types.ZelloChannel.html +155 -10
- package/lib/module/docs/classes/types.ZelloChannelUser.html +86 -4
- package/lib/module/docs/classes/types.ZelloDispatchCall.html +90 -6
- package/lib/module/docs/classes/types.ZelloDispatchChannel.html +163 -11
- package/lib/module/docs/classes/types.ZelloGroupConversation.html +178 -13
- package/lib/module/docs/classes/types.ZelloHistoryAlertMessage.html +131 -10
- package/lib/module/docs/classes/types.ZelloHistoryImageMessage.html +123 -9
- package/lib/module/docs/classes/types.ZelloHistoryLocationMessage.html +155 -13
- package/lib/module/docs/classes/types.ZelloHistoryTextMessage.html +131 -10
- package/lib/module/docs/classes/types.ZelloHistoryVoiceMessage.html +145 -10
- package/lib/module/docs/classes/types.ZelloImageMessage.html +130 -10
- package/lib/module/docs/classes/types.ZelloIncomingEmergency.html +114 -9
- package/lib/module/docs/classes/types.ZelloIncomingVoiceMessage.html +124 -8
- package/lib/module/docs/classes/types.ZelloLocationMessage.html +146 -12
- package/lib/module/docs/classes/types.ZelloOutgoingEmergency.html +98 -7
- package/lib/module/docs/classes/types.ZelloOutgoingVoiceMessage.html +120 -9
- package/lib/module/docs/classes/types.ZelloRecentEntry.html +114 -9
- package/lib/module/docs/classes/types.ZelloTextMessage.html +122 -9
- package/lib/module/docs/classes/types.ZelloTranscription.html +122 -0
- package/lib/module/docs/classes/types.ZelloTranslation.html +91 -0
- package/lib/module/docs/classes/types.ZelloUser.html +142 -11
- package/lib/module/docs/classes/types.ZelloUserSupportedFeatures.html +82 -5
- package/lib/module/docs/enums/events.ZelloEvent.html +563 -95
- package/lib/module/docs/enums/types.ZelloAccountStatus.html +67 -5
- package/lib/module/docs/enums/types.ZelloChannelAlertLevel.html +67 -5
- package/lib/module/docs/enums/types.ZelloChannelConnectionStatus.html +68 -3
- package/lib/module/docs/enums/types.ZelloChannelType.html +84 -0
- package/lib/module/docs/enums/types.ZelloConnectionError.html +68 -3
- package/lib/module/docs/enums/types.ZelloConnectionState.html +73 -3
- package/lib/module/docs/enums/types.ZelloContactType.html +73 -3
- package/lib/module/docs/enums/types.ZelloDispatchCallStatus.html +73 -3
- package/lib/module/docs/enums/types.ZelloOutgoingVoiceMessageError.html +63 -3
- package/lib/module/docs/enums/types.ZelloOutgoingVoiceMessageState.html +78 -3
- package/lib/module/docs/enums/types.ZelloRecentEntryType.html +78 -3
- package/lib/module/docs/enums/types.ZelloUserStatus.html +81 -7
- package/lib/module/docs/hierarchy.html +29 -1
- package/lib/module/docs/index.html +127 -29
- package/lib/module/docs/interfaces/specs_NativeZelloSdk.Spec.html +504 -0
- package/lib/module/docs/modules/events.html +37 -1
- package/lib/module/docs/modules/index.html +37 -1
- package/lib/module/docs/modules/sdk.html +37 -1
- package/lib/module/docs/modules/specs_NativeZelloSdk.html +41 -0
- package/lib/module/docs/modules/types.html +45 -1
- package/lib/module/docs/modules.html +36 -1
- package/lib/module/docs/types/types.ZelloChannelOptions.html +114 -9
- package/lib/module/docs/types/types.ZelloConfig.html +86 -7
- package/lib/module/docs/types/types.ZelloConsoleSettings.html +96 -9
- package/lib/module/docs/types/types.ZelloContact.html +80 -6
- package/lib/module/docs/types/types.ZelloCredentials.html +75 -6
- package/lib/module/docs/types/types.ZelloHistoryMessage.html +97 -8
- package/lib/module/docs/types/types.ZelloMessage.html +91 -7
- package/lib/module/docs/variables/specs_NativeZelloSdk.default.html +34 -0
- package/lib/module/events/index.js +217 -0
- package/lib/module/events/index.js.map +1 -1
- package/lib/module/sdk/index.js +730 -912
- package/lib/module/sdk/index.js.map +1 -1
- package/lib/module/specs/NativeZelloSdk.js +25 -0
- package/lib/module/specs/NativeZelloSdk.js.map +1 -0
- package/lib/module/types/index.js +378 -301
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/utils/index.js +27 -5
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/commonjs/src/events/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/events/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/sdk/index.d.ts +10 -0
- package/lib/typescript/commonjs/src/sdk/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/specs/NativeZelloSdk.d.ts +55 -0
- package/lib/typescript/commonjs/src/specs/NativeZelloSdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/index.d.ts +106 -4
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts +2 -1
- package/lib/typescript/commonjs/src/utils/index.d.ts.map +1 -1
- package/lib/typescript/module/src/events/index.d.ts +9 -0
- package/lib/typescript/module/src/events/index.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +4 -4
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/sdk/index.d.ts +11 -1
- package/lib/typescript/module/src/sdk/index.d.ts.map +1 -1
- package/lib/typescript/module/src/specs/NativeZelloSdk.d.ts +55 -0
- package/lib/typescript/module/src/specs/NativeZelloSdk.d.ts.map +1 -0
- package/lib/typescript/module/src/types/index.d.ts +106 -4
- package/lib/typescript/module/src/types/index.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/algorithms/index.d.ts +1 -1
- package/lib/typescript/module/src/utils/algorithms/index.d.ts.map +1 -1
- package/lib/typescript/module/src/utils/index.d.ts +2 -1
- package/lib/typescript/module/src/utils/index.d.ts.map +1 -1
- package/package.json +31 -15
- package/react-native-zello-sdk.podspec +26 -1
- package/src/events/index.ts +9 -0
- package/src/sdk/index.ts +106 -226
- package/src/specs/NativeZelloSdk.ts +89 -0
- package/src/types/index.ts +153 -6
- 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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
83
|
+
|
|
67
84
|
/**
|
|
68
85
|
* The supported features of the user.
|
|
69
86
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
84
|
-
|
|
103
|
+
exports.ZelloUser = ZelloUser;
|
|
104
|
+
class ZelloUserSupportedFeatures {
|
|
85
105
|
/**
|
|
86
106
|
* Whether the user supports group conversations.
|
|
87
107
|
*/
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
95
|
-
|
|
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
|
-
|
|
122
|
+
|
|
103
123
|
/**
|
|
104
124
|
* The number of users connected to the channel.
|
|
105
125
|
*/
|
|
106
|
-
|
|
126
|
+
|
|
107
127
|
/**
|
|
108
128
|
* The options of the channel.
|
|
109
129
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
-
|
|
135
|
-
|
|
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
|
-
|
|
141
|
-
|
|
172
|
+
exports.ZelloDispatchChannel = ZelloDispatchChannel;
|
|
173
|
+
class ZelloDispatchCall {
|
|
142
174
|
/**
|
|
143
175
|
* The status of the call.
|
|
144
176
|
*/
|
|
145
|
-
|
|
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
|
-
|
|
150
|
-
|
|
151
|
-
|
|
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
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
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
|
-
|
|
192
|
-
|
|
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
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
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
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
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
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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
|
-
|
|
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
|
-
|
|
354
|
+
|
|
311
355
|
/**
|
|
312
356
|
* Base64 encoded full image
|
|
313
357
|
*/
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
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
|
-
|
|
327
|
-
|
|
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
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
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
|
-
|
|
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
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
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
|
-
|
|
373
|
-
|
|
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
|
-
|
|
429
|
+
|
|
382
430
|
/**
|
|
383
431
|
* The longitude of the location.
|
|
384
432
|
*/
|
|
385
|
-
|
|
433
|
+
|
|
386
434
|
/**
|
|
387
435
|
* The horizontal accuracy of the location in meters.
|
|
388
436
|
*/
|
|
389
|
-
|
|
437
|
+
|
|
390
438
|
/**
|
|
391
439
|
* The reverse-geolocation address, if available.
|
|
392
440
|
*/
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
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
|
-
|
|
407
|
-
|
|
457
|
+
exports.ZelloLocationMessage = ZelloLocationMessage;
|
|
458
|
+
class ZelloIncomingEmergency {
|
|
408
459
|
/**
|
|
409
460
|
* The emergency channel.
|
|
410
461
|
*/
|
|
411
|
-
|
|
462
|
+
|
|
412
463
|
/**
|
|
413
464
|
* The user that started the emergency.
|
|
414
465
|
*/
|
|
415
|
-
|
|
466
|
+
|
|
416
467
|
/**
|
|
417
468
|
* The unique identifier of the emergency.
|
|
418
469
|
*/
|
|
419
|
-
|
|
470
|
+
|
|
420
471
|
/**
|
|
421
472
|
* The timestamp when the emergency started.
|
|
422
473
|
*/
|
|
423
|
-
|
|
474
|
+
|
|
424
475
|
/**
|
|
425
476
|
* The timestamp when the emergency ended, or undefined if it's ongoing.
|
|
426
477
|
*/
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
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
|
-
|
|
438
|
-
|
|
491
|
+
exports.ZelloIncomingEmergency = ZelloIncomingEmergency;
|
|
492
|
+
class ZelloOutgoingEmergency {
|
|
439
493
|
/**
|
|
440
494
|
* The emergency channel.
|
|
441
495
|
*/
|
|
442
|
-
|
|
496
|
+
|
|
443
497
|
/**
|
|
444
498
|
* The timestamp when the emergency started.
|
|
445
499
|
*/
|
|
446
|
-
|
|
500
|
+
|
|
447
501
|
/**
|
|
448
502
|
* The timestamp when the emergency ended, or undefined if it's ongoing.
|
|
449
503
|
*/
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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
|
-
|
|
459
|
-
|
|
515
|
+
exports.ZelloOutgoingEmergency = ZelloOutgoingEmergency;
|
|
516
|
+
class ZelloRecentEntry {
|
|
460
517
|
/**
|
|
461
518
|
* The contact that the recent entry is for.
|
|
462
519
|
*/
|
|
463
|
-
|
|
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
|
-
|
|
525
|
+
|
|
469
526
|
/**
|
|
470
527
|
* The timestamp of the most recent message.
|
|
471
528
|
*/
|
|
472
|
-
|
|
529
|
+
|
|
473
530
|
/**
|
|
474
531
|
* The type of the most recent message.
|
|
475
532
|
*/
|
|
476
|
-
|
|
533
|
+
|
|
477
534
|
/**
|
|
478
535
|
* Whether the most recent message was incoming.
|
|
479
536
|
*/
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
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
|
-
|
|
506
|
-
|
|
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
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
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
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
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
|
-
|
|
544
|
-
|
|
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
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
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
|
-
|
|
565
|
-
|
|
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
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
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
|
-
|
|
586
|
-
|
|
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
|
-
|
|
711
|
+
|
|
596
712
|
/**
|
|
597
713
|
* The longitude of the location.
|
|
598
714
|
*/
|
|
599
|
-
|
|
715
|
+
|
|
600
716
|
/**
|
|
601
717
|
* The horizontal accuracy of the location in meters.
|
|
602
718
|
*/
|
|
603
|
-
|
|
719
|
+
|
|
604
720
|
/**
|
|
605
721
|
* The reverse-geolocation address, if available.
|
|
606
722
|
*/
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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
|