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