@webex/calling 3.0.0-next.2 → 3.0.0-next.21
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/CHANGELOG.md +1403 -0
- package/dist/CallHistory/CallHistory.js +1 -3
- package/dist/CallHistory/CallHistory.js.map +1 -1
- package/dist/CallHistory/callHistoryFixtures.js +9 -0
- package/dist/CallHistory/callHistoryFixtures.js.map +1 -1
- package/dist/CallHistory/types.js.map +1 -1
- package/dist/CallSettings/CallSettings.js +0 -2
- package/dist/CallSettings/CallSettings.js.map +1 -1
- package/dist/CallSettings/types.js.map +1 -1
- package/dist/CallingClient/CallingClient.js +119 -62
- package/dist/CallingClient/CallingClient.js.map +1 -1
- package/dist/CallingClient/CallingClient.test.js +161 -102
- package/dist/CallingClient/CallingClient.test.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/index.js +3 -23
- package/dist/CallingClient/calling/CallerId/index.js.map +1 -1
- package/dist/CallingClient/calling/CallerId/types.js.map +1 -1
- package/dist/CallingClient/calling/call.js +78 -33
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +483 -351
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/callManager.js +0 -9
- package/dist/CallingClient/calling/callManager.js.map +1 -1
- package/dist/CallingClient/calling/callManager.test.js +1 -1
- package/dist/CallingClient/calling/callManager.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/CallingClient/callingClientFixtures.js +107 -1
- package/dist/CallingClient/callingClientFixtures.js.map +1 -1
- package/dist/CallingClient/constants.js +14 -6
- package/dist/CallingClient/constants.js.map +1 -1
- package/dist/CallingClient/line/index.js +12 -12
- package/dist/CallingClient/line/index.js.map +1 -1
- package/dist/CallingClient/line/line.test.js +9 -9
- package/dist/CallingClient/line/line.test.js.map +1 -1
- package/dist/CallingClient/line/types.js +4 -7
- package/dist/CallingClient/line/types.js.map +1 -1
- package/dist/CallingClient/registration/register.js +62 -80
- package/dist/CallingClient/registration/register.js.map +1 -1
- package/dist/CallingClient/registration/register.test.js +28 -28
- package/dist/CallingClient/registration/register.test.js.map +1 -1
- package/dist/CallingClient/registration/types.js.map +1 -1
- package/dist/CallingClient/types.js.map +1 -1
- package/dist/Contacts/ContactsClient.js +8 -2
- package/dist/Contacts/ContactsClient.js.map +1 -1
- package/dist/Contacts/types.js +3 -0
- package/dist/Contacts/types.js.map +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js +1 -1
- package/dist/Errors/catalog/CallingDeviceError.js.map +1 -1
- package/dist/Errors/catalog/LineError.js +2 -2
- package/dist/Errors/catalog/LineError.js.map +1 -1
- package/dist/Errors/index.js +7 -0
- package/dist/Errors/index.js.map +1 -1
- package/dist/Errors/types.js.map +1 -1
- package/dist/Events/types.js +0 -1
- package/dist/Events/types.js.map +1 -1
- package/dist/Metrics/index.test.js +1 -1
- package/dist/Metrics/index.test.js.map +1 -1
- package/dist/SDKConnector/types.js.map +1 -1
- package/dist/Voicemail/Voicemail.js +18 -21
- package/dist/Voicemail/Voicemail.js.map +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js +1 -1
- package/dist/Voicemail/WxCallBackendConnector.js.map +1 -1
- package/dist/Voicemail/types.js.map +1 -1
- package/dist/api.js +43 -20
- package/dist/api.js.map +1 -1
- package/dist/common/Utils.js +13 -18
- package/dist/common/Utils.js.map +1 -1
- package/dist/common/Utils.test.js +1 -1
- package/dist/common/Utils.test.js.map +1 -1
- package/dist/common/testUtil.js +2 -1
- package/dist/common/testUtil.js.map +1 -1
- package/dist/common/types.js +8 -7
- package/dist/common/types.js.map +1 -1
- package/dist/index.js +233 -0
- package/dist/index.js.map +1 -1
- package/dist/module/CallHistory/callHistoryFixtures.js +9 -0
- package/dist/module/CallingClient/CallingClient.js +59 -42
- package/dist/module/CallingClient/calling/CallerId/index.js +3 -23
- package/dist/module/CallingClient/calling/call.js +54 -17
- package/dist/module/CallingClient/calling/callManager.js +0 -6
- package/dist/module/CallingClient/callingClientFixtures.js +119 -1
- package/dist/module/CallingClient/constants.js +8 -4
- package/dist/module/CallingClient/line/index.js +7 -10
- package/dist/module/CallingClient/line/types.js +0 -5
- package/dist/module/CallingClient/registration/register.js +28 -20
- package/dist/module/Contacts/ContactsClient.js +3 -0
- package/dist/module/Errors/catalog/CallingDeviceError.js +2 -2
- package/dist/module/Errors/catalog/LineError.js +2 -2
- package/dist/module/Errors/index.js +1 -0
- package/dist/module/api.js +6 -5
- package/dist/module/common/Utils.js +14 -19
- package/dist/module/common/testUtil.js +2 -1
- package/dist/module/common/types.js +6 -5
- package/dist/module/index.js +7 -0
- package/dist/types/CallHistory/CallHistory.d.ts.map +1 -1
- package/dist/types/CallHistory/callHistoryFixtures.d.ts.map +1 -1
- package/dist/types/CallSettings/CallSettings.d.ts.map +1 -1
- package/dist/types/CallSettings/types.d.ts.map +1 -1
- package/dist/types/CallingClient/CallingClient.d.ts +2 -0
- package/dist/types/CallingClient/CallingClient.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/index.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/CallerId/types.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/call.d.ts +2 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/callManager.d.ts +0 -1
- package/dist/types/CallingClient/calling/callManager.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +30 -30
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts +69 -1
- package/dist/types/CallingClient/callingClientFixtures.d.ts.map +1 -1
- package/dist/types/CallingClient/constants.d.ts +7 -3
- package/dist/types/CallingClient/constants.d.ts.map +1 -1
- package/dist/types/CallingClient/line/index.d.ts +4 -5
- package/dist/types/CallingClient/line/index.d.ts.map +1 -1
- package/dist/types/CallingClient/line/types.d.ts +8 -13
- package/dist/types/CallingClient/line/types.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/register.d.ts +3 -3
- package/dist/types/CallingClient/registration/register.d.ts.map +1 -1
- package/dist/types/CallingClient/registration/types.d.ts +14 -14
- package/dist/types/CallingClient/registration/types.d.ts.map +1 -1
- package/dist/types/CallingClient/types.d.ts +6 -4
- package/dist/types/CallingClient/types.d.ts.map +1 -1
- package/dist/types/Contacts/ContactsClient.d.ts +3 -2
- package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
- package/dist/types/Contacts/types.d.ts +2 -0
- package/dist/types/Contacts/types.d.ts.map +1 -1
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts +4 -4
- package/dist/types/Errors/catalog/CallingDeviceError.d.ts.map +1 -1
- package/dist/types/Errors/catalog/LineError.d.ts +4 -4
- package/dist/types/Errors/catalog/LineError.d.ts.map +1 -1
- package/dist/types/Errors/index.d.ts +1 -0
- package/dist/types/Errors/index.d.ts.map +1 -1
- package/dist/types/Errors/types.d.ts +2 -3
- package/dist/types/Errors/types.d.ts.map +1 -1
- package/dist/types/Events/types.d.ts +11 -0
- package/dist/types/Events/types.d.ts.map +1 -1
- package/dist/types/SDKConnector/types.d.ts +2 -1
- package/dist/types/SDKConnector/types.d.ts.map +1 -1
- package/dist/types/Voicemail/UcmBackendConnector.d.ts +1 -1
- package/dist/types/Voicemail/Voicemail.d.ts.map +1 -1
- package/dist/types/Voicemail/WxCallBackendConnector.d.ts +1 -1
- package/dist/types/Voicemail/types.d.ts +10 -10
- package/dist/types/Voicemail/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +10 -10
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/common/Utils.d.ts.map +1 -1
- package/dist/types/common/testUtil.d.ts +1 -0
- package/dist/types/common/testUtil.d.ts.map +1 -1
- package/dist/types/common/types.d.ts +3 -2
- package/dist/types/common/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +6 -5
package/dist/api.js
CHANGED
|
@@ -37,13 +37,13 @@ _Object$defineProperty(exports, "CallingClient", {
|
|
|
37
37
|
_Object$defineProperty(exports, "Contact", {
|
|
38
38
|
enumerable: true,
|
|
39
39
|
get: function get() {
|
|
40
|
-
return
|
|
40
|
+
return _types6.Contact;
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
_Object$defineProperty(exports, "ContactGroup", {
|
|
44
44
|
enumerable: true,
|
|
45
45
|
get: function get() {
|
|
46
|
-
return
|
|
46
|
+
return _types6.ContactGroup;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
_Object$defineProperty(exports, "ContactsClient", {
|
|
@@ -64,12 +64,6 @@ _Object$defineProperty(exports, "ICallHistory", {
|
|
|
64
64
|
return _types.ICallHistory;
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
|
-
_Object$defineProperty(exports, "ICallManager", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function get() {
|
|
70
|
-
return _types3.ICallManager;
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
67
|
_Object$defineProperty(exports, "ICallSettings", {
|
|
74
68
|
enumerable: true,
|
|
75
69
|
get: function get() {
|
|
@@ -79,13 +73,13 @@ _Object$defineProperty(exports, "ICallSettings", {
|
|
|
79
73
|
_Object$defineProperty(exports, "ICallingClient", {
|
|
80
74
|
enumerable: true,
|
|
81
75
|
get: function get() {
|
|
82
|
-
return
|
|
76
|
+
return _types5.ICallingClient;
|
|
83
77
|
}
|
|
84
78
|
});
|
|
85
79
|
_Object$defineProperty(exports, "IContacts", {
|
|
86
80
|
enumerable: true,
|
|
87
81
|
get: function get() {
|
|
88
|
-
return
|
|
82
|
+
return _types6.IContacts;
|
|
89
83
|
}
|
|
90
84
|
});
|
|
91
85
|
_Object$defineProperty(exports, "ILine", {
|
|
@@ -94,22 +88,22 @@ _Object$defineProperty(exports, "ILine", {
|
|
|
94
88
|
return _types4.ILine;
|
|
95
89
|
}
|
|
96
90
|
});
|
|
97
|
-
_Object$defineProperty(exports, "
|
|
91
|
+
_Object$defineProperty(exports, "IVoicemail", {
|
|
98
92
|
enumerable: true,
|
|
99
93
|
get: function get() {
|
|
100
|
-
return
|
|
94
|
+
return _types7.IVoicemail;
|
|
101
95
|
}
|
|
102
96
|
});
|
|
103
|
-
_Object$defineProperty(exports, "
|
|
97
|
+
_Object$defineProperty(exports, "Voicemail", {
|
|
104
98
|
enumerable: true,
|
|
105
99
|
get: function get() {
|
|
106
|
-
return
|
|
100
|
+
return _Voicemail.Voicemail;
|
|
107
101
|
}
|
|
108
102
|
});
|
|
109
|
-
_Object$defineProperty(exports, "
|
|
103
|
+
_Object$defineProperty(exports, "VoicemailResponseEvent", {
|
|
110
104
|
enumerable: true,
|
|
111
105
|
get: function get() {
|
|
112
|
-
return
|
|
106
|
+
return _types7.VoicemailResponseEvent;
|
|
113
107
|
}
|
|
114
108
|
});
|
|
115
109
|
_Object$defineProperty(exports, "VoicemailSetting", {
|
|
@@ -118,6 +112,36 @@ _Object$defineProperty(exports, "VoicemailSetting", {
|
|
|
118
112
|
return _types2.VoicemailSetting;
|
|
119
113
|
}
|
|
120
114
|
});
|
|
115
|
+
_Object$defineProperty(exports, "createCallHistoryClient", {
|
|
116
|
+
enumerable: true,
|
|
117
|
+
get: function get() {
|
|
118
|
+
return _CallHistory.createCallHistoryClient;
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
_Object$defineProperty(exports, "createCallSettingsClient", {
|
|
122
|
+
enumerable: true,
|
|
123
|
+
get: function get() {
|
|
124
|
+
return _CallSettings.createCallSettingsClient;
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
_Object$defineProperty(exports, "createClient", {
|
|
128
|
+
enumerable: true,
|
|
129
|
+
get: function get() {
|
|
130
|
+
return _CallingClient.createClient;
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
_Object$defineProperty(exports, "createContactsClient", {
|
|
134
|
+
enumerable: true,
|
|
135
|
+
get: function get() {
|
|
136
|
+
return _ContactsClient.createContactsClient;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
_Object$defineProperty(exports, "createVoicemailClient", {
|
|
140
|
+
enumerable: true,
|
|
141
|
+
get: function get() {
|
|
142
|
+
return _Voicemail.createVoicemailClient;
|
|
143
|
+
}
|
|
144
|
+
});
|
|
121
145
|
var _CallHistory = require("./CallHistory/CallHistory");
|
|
122
146
|
var _types = require("./CallHistory/types");
|
|
123
147
|
var _CallSettings = require("./CallSettings/CallSettings");
|
|
@@ -125,10 +149,9 @@ var _types2 = require("./CallSettings/types");
|
|
|
125
149
|
var _CallingClient = require("./CallingClient/CallingClient");
|
|
126
150
|
var _types3 = require("./CallingClient/calling/types");
|
|
127
151
|
var _types4 = require("./CallingClient/line/types");
|
|
128
|
-
var _types5 = require("./CallingClient/
|
|
129
|
-
var _types6 = require("./CallingClient/types");
|
|
152
|
+
var _types5 = require("./CallingClient/types");
|
|
130
153
|
var _ContactsClient = require("./Contacts/ContactsClient");
|
|
131
|
-
var
|
|
154
|
+
var _types6 = require("./Contacts/types");
|
|
132
155
|
var _Voicemail = require("./Voicemail/Voicemail");
|
|
133
|
-
var
|
|
156
|
+
var _types7 = require("./Voicemail/types");
|
|
134
157
|
//# sourceMappingURL=api.js.map
|
package/dist/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_CallHistory","require","_types","_CallSettings","_types2","_CallingClient","_types3","_types4","_types5","
|
|
1
|
+
{"version":3,"names":["_CallHistory","require","_types","_CallSettings","_types2","_CallingClient","_types3","_types4","_types5","_ContactsClient","_types6","_Voicemail","_types7"],"sources":["api.ts"],"sourcesContent":["/* eslint-disable import/no-unresolved */\nimport {CallHistory, createCallHistoryClient} from './CallHistory/CallHistory';\nimport {ICallHistory} from './CallHistory/types';\nimport {CallSettings, createCallSettingsClient} from './CallSettings/CallSettings';\nimport {\n ICallSettings,\n CallForwardSetting,\n VoicemailSetting,\n CallForwardAlwaysSetting,\n} from './CallSettings/types';\n\nimport {CallingClient, createClient} from './CallingClient/CallingClient';\nimport {ICall} from './CallingClient/calling/types';\nimport {ILine} from './CallingClient/line/types';\nimport {ICallingClient} from './CallingClient/types';\nimport {ContactsClient, createContactsClient} from './Contacts/ContactsClient';\nimport {IContacts, Contact, ContactGroup} from './Contacts/types';\nimport {Voicemail, createVoicemailClient} from './Voicemail/Voicemail';\nimport {IVoicemail, VoicemailResponseEvent} from './Voicemail/types';\n\n// Interfaces\nexport {ILine, ICall, ICallHistory, ICallSettings, ICallingClient, IContacts, IVoicemail};\n\n// Classes\nexport {CallHistory, CallSettings, CallingClient, ContactsClient, Voicemail};\n\n// Types\nexport {\n ContactGroup,\n Contact,\n CallForwardSetting,\n CallForwardAlwaysSetting,\n VoicemailSetting,\n VoicemailResponseEvent,\n};\n\n// Methods\nexport {\n createCallHistoryClient,\n createCallSettingsClient,\n createClient,\n createContactsClient,\n createVoicemailClient,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAOA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAR,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA"}
|
package/dist/common/Utils.js
CHANGED
|
@@ -47,7 +47,6 @@ var _CallingDeviceError = require("../Errors/catalog/CallingDeviceError");
|
|
|
47
47
|
var _constants = require("../CallingClient/constants");
|
|
48
48
|
var _constants2 = require("./constants");
|
|
49
49
|
var _SDKConnector = _interopRequireDefault(require("../SDKConnector"));
|
|
50
|
-
var _types3 = require("../CallingClient/line/types");
|
|
51
50
|
var _LineError = require("../Errors/catalog/LineError");
|
|
52
51
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
53
52
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -186,8 +185,8 @@ function updateErrorContext(errContext, type, message, clientError) {
|
|
|
186
185
|
* @param file - File name from where error got reported.
|
|
187
186
|
*/
|
|
188
187
|
function emitFinalFailure(emitterCb, loggerContext) {
|
|
189
|
-
var clientError = (0, _LineError.createLineError)('', {}, _types.ERROR_TYPE.DEFAULT,
|
|
190
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.SERVICE_UNAVAILABLE, 'An unknown error occurred. Wait a moment and try again. Please contact the administrator if the problem persists.',
|
|
188
|
+
var clientError = (0, _LineError.createLineError)('', {}, _types.ERROR_TYPE.DEFAULT, _types2.RegistrationStatus.INACTIVE);
|
|
189
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.SERVICE_UNAVAILABLE, 'An unknown error occurred. Wait a moment and try again. Please contact the administrator if the problem persists.', _types2.RegistrationStatus.INACTIVE, clientError);
|
|
191
190
|
emitterCb(clientError);
|
|
192
191
|
}
|
|
193
192
|
|
|
@@ -223,7 +222,7 @@ function _handleRegistrationErrors() {
|
|
|
223
222
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
224
223
|
while (1) switch (_context.prev = _context.next) {
|
|
225
224
|
case 0:
|
|
226
|
-
lineError = (0, _LineError.createLineError)('', {}, _types.ERROR_TYPE.DEFAULT,
|
|
225
|
+
lineError = (0, _LineError.createLineError)('', {}, _types.ERROR_TYPE.DEFAULT, _types2.RegistrationStatus.INACTIVE);
|
|
227
226
|
errorCode = Number(err.statusCode);
|
|
228
227
|
finalError = false;
|
|
229
228
|
_Logger.default.warn("Status code: -> ".concat(errorCode), loggerContext);
|
|
@@ -234,17 +233,17 @@ function _handleRegistrationErrors() {
|
|
|
234
233
|
// Return it to the Caller
|
|
235
234
|
finalError = true;
|
|
236
235
|
_Logger.default.warn("401 Unauthorized", loggerContext);
|
|
237
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.TOKEN_ERROR, 'User is unauthorized due to an expired token. Sign out, then sign back in.',
|
|
236
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.TOKEN_ERROR, 'User is unauthorized due to an expired token. Sign out, then sign back in.', _types2.RegistrationStatus.INACTIVE, lineError);
|
|
238
237
|
emitterCb(lineError, finalError);
|
|
239
238
|
return _context.abrupt("break", 63);
|
|
240
239
|
case 12:
|
|
241
240
|
_Logger.default.warn("500 Internal Server Error", loggerContext);
|
|
242
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.SERVER_ERROR, 'An unknown error occurred while placing the request. Wait a moment and try again.',
|
|
241
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.SERVER_ERROR, 'An unknown error occurred while placing the request. Wait a moment and try again.', _types2.RegistrationStatus.INACTIVE, lineError);
|
|
243
242
|
emitterCb(lineError, finalError);
|
|
244
243
|
return _context.abrupt("break", 63);
|
|
245
244
|
case 16:
|
|
246
245
|
_Logger.default.warn("503 Service Unavailable", loggerContext);
|
|
247
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.SERVICE_UNAVAILABLE, 'An error occurred on the server while processing the request. Wait a moment and try again.',
|
|
246
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.SERVICE_UNAVAILABLE, 'An error occurred on the server while processing the request. Wait a moment and try again.', _types2.RegistrationStatus.INACTIVE, lineError);
|
|
248
247
|
emitterCb(lineError, finalError);
|
|
249
248
|
return _context.abrupt("break", 63);
|
|
250
249
|
case 20:
|
|
@@ -255,7 +254,7 @@ function _handleRegistrationErrors() {
|
|
|
255
254
|
break;
|
|
256
255
|
}
|
|
257
256
|
_Logger.default.warn('Error response has no body, throwing default error', loggerContext);
|
|
258
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, 'An unauthorized action has been received. This action has been blocked. Please contact the administrator if this persists.',
|
|
257
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, 'An unauthorized action has been received. This action has been blocked. Please contact the administrator if this persists.', _types2.RegistrationStatus.INACTIVE, lineError);
|
|
259
258
|
emitterCb(lineError, finalError);
|
|
260
259
|
return _context.abrupt("return", finalError);
|
|
261
260
|
case 27:
|
|
@@ -279,19 +278,19 @@ function _handleRegistrationErrors() {
|
|
|
279
278
|
case 39:
|
|
280
279
|
_errorMessage = 'User is not configured for WebRTC calling. Please contact the administrator to resolve this issue.';
|
|
281
280
|
finalError = true;
|
|
282
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage,
|
|
281
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage, _types2.RegistrationStatus.INACTIVE, lineError);
|
|
283
282
|
_Logger.default.warn(_errorMessage, loggerContext);
|
|
284
283
|
emitterCb(lineError, true);
|
|
285
284
|
return _context.abrupt("break", 54);
|
|
286
285
|
case 45:
|
|
287
286
|
_errorMessage2 = 'An unknown error occurred while provisioning the device. Wait a moment and try again.';
|
|
288
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage2,
|
|
287
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage2, _types2.RegistrationStatus.INACTIVE, lineError);
|
|
289
288
|
_Logger.default.warn(_errorMessage2, loggerContext);
|
|
290
289
|
emitterCb(lineError, finalError);
|
|
291
290
|
return _context.abrupt("break", 54);
|
|
292
291
|
case 50:
|
|
293
292
|
_errorMessage3 = 'An unknown error occurred. Wait a moment and try again. Please contact the administrator if the problem persists.';
|
|
294
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage3,
|
|
293
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.FORBIDDEN_ERROR, _errorMessage3, _types2.RegistrationStatus.INACTIVE, lineError);
|
|
295
294
|
_Logger.default.warn(_errorMessage3, loggerContext);
|
|
296
295
|
emitterCb(lineError, finalError);
|
|
297
296
|
case 54:
|
|
@@ -299,11 +298,11 @@ function _handleRegistrationErrors() {
|
|
|
299
298
|
case 55:
|
|
300
299
|
finalError = true;
|
|
301
300
|
_Logger.default.warn("404 Device Not Found", loggerContext);
|
|
302
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.NOT_FOUND, 'The client has unregistered. Please wait for the client to register before attempting the call. If error persists, sign out, sign back in and attempt the call.',
|
|
301
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.NOT_FOUND, 'The client has unregistered. Please wait for the client to register before attempting the call. If error persists, sign out, sign back in and attempt the call.', _types2.RegistrationStatus.INACTIVE, lineError);
|
|
303
302
|
emitterCb(lineError, finalError);
|
|
304
303
|
return _context.abrupt("break", 63);
|
|
305
304
|
case 60:
|
|
306
|
-
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.DEFAULT, 'Unknown error',
|
|
305
|
+
updateLineErrorContext(loggerContext, _types.ERROR_TYPE.DEFAULT, 'Unknown error', _types2.RegistrationStatus.INACTIVE, lineError);
|
|
307
306
|
_Logger.default.warn("Unknown Error", loggerContext);
|
|
308
307
|
emitterCb(lineError, finalError);
|
|
309
308
|
case 63:
|
|
@@ -337,7 +336,7 @@ function _handleCallingClientErrors() {
|
|
|
337
336
|
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
338
337
|
while (1) switch (_context2.prev = _context2.next) {
|
|
339
338
|
case 0:
|
|
340
|
-
clientError = (0, _CallingDeviceError.createClientError)('', {}, _types.ERROR_TYPE.DEFAULT, _types2.
|
|
339
|
+
clientError = (0, _CallingDeviceError.createClientError)('', {}, _types.ERROR_TYPE.DEFAULT, _types2.RegistrationStatus.INACTIVE);
|
|
341
340
|
errorCode = Number(err.statusCode);
|
|
342
341
|
finalError = false;
|
|
343
342
|
_Logger.default.warn("Status code: -> ".concat(errorCode), loggerContext);
|
|
@@ -1054,10 +1053,6 @@ function _resolveCallerIdDisplay() {
|
|
|
1054
1053
|
});
|
|
1055
1054
|
displayResult.avatarSrc = photo ? photo.value : 'unknown';
|
|
1056
1055
|
displayResult.id = scimResource.id;
|
|
1057
|
-
_Logger.default.info("Extracted details:- name: ".concat(displayResult.name, " , number: ").concat(displayResult.num, ", photo: ").concat(displayResult.avatarSrc, ", id: ").concat(displayResult.id), {
|
|
1058
|
-
file: _constants.UTILS_FILE,
|
|
1059
|
-
method: 'resolveCallerIdDisplay'
|
|
1060
|
-
});
|
|
1061
1056
|
}
|
|
1062
1057
|
return _context7.abrupt("return", displayResult);
|
|
1063
1058
|
case 15:
|