@servicetitan/titan-chatbot-api 8.0.0 → 9.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/CHANGELOG.md +12 -0
- package/dist/api-client/__mocks__/chatbot-api-client.mock.d.ts +1 -0
- package/dist/api-client/__mocks__/chatbot-api-client.mock.d.ts.map +1 -1
- package/dist/api-client/__mocks__/chatbot-api-client.mock.js +1 -0
- package/dist/api-client/__mocks__/chatbot-api-client.mock.js.map +1 -1
- package/dist/api-client/base/chatbot-api-client.d.ts +7 -0
- package/dist/api-client/base/chatbot-api-client.d.ts.map +1 -1
- package/dist/api-client/base/chatbot-api-client.js.map +1 -1
- package/dist/api-client/index.d.ts +0 -1
- package/dist/api-client/index.d.ts.map +1 -1
- package/dist/api-client/index.js +0 -2
- package/dist/api-client/index.js.map +1 -1
- package/dist/api-client/titan-chat/__tests__/chatbot-api-client-stream.test.d.ts +2 -0
- package/dist/api-client/titan-chat/__tests__/chatbot-api-client-stream.test.d.ts.map +1 -0
- package/dist/api-client/titan-chat/__tests__/chatbot-api-client-stream.test.js +240 -0
- package/dist/api-client/titan-chat/__tests__/chatbot-api-client-stream.test.js.map +1 -0
- package/dist/api-client/titan-chat/chatbot-api-client.d.ts +11 -0
- package/dist/api-client/titan-chat/chatbot-api-client.d.ts.map +1 -1
- package/dist/api-client/titan-chat/chatbot-api-client.js +29 -0
- package/dist/api-client/titan-chat/chatbot-api-client.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/models/__tests__/chatbot-customizations.test.d.ts +2 -0
- package/dist/models/__tests__/chatbot-customizations.test.d.ts.map +1 -0
- package/dist/models/__tests__/chatbot-customizations.test.js +36 -0
- package/dist/models/__tests__/chatbot-customizations.test.js.map +1 -0
- package/dist/models/chatbot-customizations.d.ts +17 -0
- package/dist/models/chatbot-customizations.d.ts.map +1 -1
- package/dist/models/chatbot-customizations.js +6 -1
- package/dist/models/chatbot-customizations.js.map +1 -1
- package/dist/models/index.d.ts +1 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +1 -1
- package/dist/models/index.js.map +1 -1
- package/dist/stores/__tests__/chatbot-ui-backend.store.observability.test.d.ts +2 -0
- package/dist/stores/__tests__/chatbot-ui-backend.store.observability.test.d.ts.map +1 -0
- package/dist/stores/__tests__/chatbot-ui-backend.store.observability.test.js +107 -0
- package/dist/stores/__tests__/chatbot-ui-backend.store.observability.test.js.map +1 -0
- package/dist/stores/__tests__/chatbot-ui-backend.store.streaming.test.d.ts +2 -0
- package/dist/stores/__tests__/chatbot-ui-backend.store.streaming.test.d.ts.map +1 -0
- package/dist/stores/__tests__/chatbot-ui-backend.store.streaming.test.js +312 -0
- package/dist/stores/__tests__/chatbot-ui-backend.store.streaming.test.js.map +1 -0
- package/dist/stores/chatbot-ui-backend.store.d.ts +26 -2
- package/dist/stores/chatbot-ui-backend.store.d.ts.map +1 -1
- package/dist/stores/chatbot-ui-backend.store.js +129 -4
- package/dist/stores/chatbot-ui-backend.store.js.map +1 -1
- package/dist/streaming/__tests__/agent-stream.test.d.ts +2 -0
- package/dist/streaming/__tests__/agent-stream.test.d.ts.map +1 -0
- package/dist/streaming/__tests__/agent-stream.test.js +92 -0
- package/dist/streaming/__tests__/agent-stream.test.js.map +1 -0
- package/dist/streaming/agent-stream.d.ts +83 -0
- package/dist/streaming/agent-stream.d.ts.map +1 -0
- package/dist/streaming/agent-stream.js +28 -0
- package/dist/streaming/agent-stream.js.map +1 -0
- package/dist/streaming/index.d.ts +3 -0
- package/dist/streaming/index.d.ts.map +1 -0
- package/dist/streaming/index.js +4 -0
- package/dist/streaming/index.js.map +1 -0
- package/dist/streaming/run-agent-stream.d.ts +23 -0
- package/dist/streaming/run-agent-stream.d.ts.map +1 -0
- package/dist/streaming/run-agent-stream.js +83 -0
- package/dist/streaming/run-agent-stream.js.map +1 -0
- package/package.json +6 -3
- package/src/api-client/__mocks__/chatbot-api-client.mock.ts +1 -0
- package/src/api-client/base/chatbot-api-client.ts +11 -0
- package/src/api-client/index.ts +0 -1
- package/src/api-client/titan-chat/__tests__/chatbot-api-client-stream.test.ts +208 -0
- package/src/api-client/titan-chat/chatbot-api-client.ts +46 -0
- package/src/index.ts +6 -1
- package/src/models/__tests__/chatbot-customizations.test.ts +26 -0
- package/src/models/chatbot-customizations.ts +20 -0
- package/src/models/index.ts +1 -1
- package/src/stores/__tests__/chatbot-ui-backend.store.observability.test.ts +105 -0
- package/src/stores/__tests__/chatbot-ui-backend.store.streaming.test.ts +261 -0
- package/src/stores/chatbot-ui-backend.store.ts +179 -4
- package/src/streaming/__tests__/agent-stream.test.ts +80 -0
- package/src/streaming/agent-stream.ts +103 -0
- package/src/streaming/index.ts +2 -0
- package/src/streaming/run-agent-stream.ts +109 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/api-client/help-center/__tests__/converter-from-models.test.d.ts +0 -2
- package/dist/api-client/help-center/__tests__/converter-from-models.test.d.ts.map +0 -1
- package/dist/api-client/help-center/__tests__/converter-from-models.test.js +0 -67
- package/dist/api-client/help-center/__tests__/converter-from-models.test.js.map +0 -1
- package/dist/api-client/help-center/__tests__/converter-to-models.test.d.ts +0 -2
- package/dist/api-client/help-center/__tests__/converter-to-models.test.d.ts.map +0 -1
- package/dist/api-client/help-center/__tests__/converter-to-models.test.js +0 -83
- package/dist/api-client/help-center/__tests__/converter-to-models.test.js.map +0 -1
- package/dist/api-client/help-center/chatbot-api-client.d.ts +0 -32
- package/dist/api-client/help-center/chatbot-api-client.d.ts.map +0 -1
- package/dist/api-client/help-center/chatbot-api-client.js +0 -101
- package/dist/api-client/help-center/chatbot-api-client.js.map +0 -1
- package/dist/api-client/help-center/converter-from-models.d.ts +0 -13
- package/dist/api-client/help-center/converter-from-models.d.ts.map +0 -1
- package/dist/api-client/help-center/converter-from-models.js +0 -117
- package/dist/api-client/help-center/converter-from-models.js.map +0 -1
- package/dist/api-client/help-center/converter-to-models.d.ts +0 -13
- package/dist/api-client/help-center/converter-to-models.d.ts.map +0 -1
- package/dist/api-client/help-center/converter-to-models.js +0 -101
- package/dist/api-client/help-center/converter-to-models.js.map +0 -1
- package/dist/api-client/help-center/index.d.ts +0 -3
- package/dist/api-client/help-center/index.d.ts.map +0 -1
- package/dist/api-client/help-center/index.js +0 -3
- package/dist/api-client/help-center/index.js.map +0 -1
- package/dist/api-client/help-center/native-client.d.ts +0 -1268
- package/dist/api-client/help-center/native-client.d.ts.map +0 -1
- package/dist/api-client/help-center/native-client.js +0 -4550
- package/dist/api-client/help-center/native-client.js.map +0 -1
- package/src/api-client/help-center/__tests__/converter-from-models.test.ts +0 -41
- package/src/api-client/help-center/__tests__/converter-to-models.test.ts +0 -89
- package/src/api-client/help-center/chatbot-api-client.ts +0 -122
- package/src/api-client/help-center/converter-from-models.ts +0 -133
- package/src/api-client/help-center/converter-to-models.ts +0 -127
- package/src/api-client/help-center/index.ts +0 -2
- package/src/api-client/help-center/native-client.ts +0 -5727
|
@@ -1,4550 +0,0 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
//----------------------
|
|
15
|
-
// <auto-generated>
|
|
16
|
-
// Generated using the NSwag toolchain v14.0.2.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
|
|
17
|
-
// </auto-generated>
|
|
18
|
-
//----------------------
|
|
19
|
-
/* tslint:disable */ /* eslint-disable */ // ReSharper disable InconsistentNaming
|
|
20
|
-
import axios from 'axios';
|
|
21
|
-
export class ChatClient {
|
|
22
|
-
getSettings(signal) {
|
|
23
|
-
let url_ = this.baseUrl + "/api/Chat/settings";
|
|
24
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
25
|
-
let options_ = {
|
|
26
|
-
method: "GET",
|
|
27
|
-
url: url_,
|
|
28
|
-
headers: {
|
|
29
|
-
"Accept": "application/json"
|
|
30
|
-
},
|
|
31
|
-
signal
|
|
32
|
-
};
|
|
33
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
34
|
-
if (isAxiosError(_error) && _error.response) {
|
|
35
|
-
return _error.response;
|
|
36
|
-
} else {
|
|
37
|
-
throw _error;
|
|
38
|
-
}
|
|
39
|
-
}).then((_response)=>{
|
|
40
|
-
return this.processGetSettings(_response);
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
processGetSettings(response) {
|
|
44
|
-
const status = response.status;
|
|
45
|
-
let _headers = {};
|
|
46
|
-
if (response.headers && typeof response.headers === "object") {
|
|
47
|
-
for(const k in response.headers){
|
|
48
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
49
|
-
_headers[k] = response.headers[k];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (status === 200) {
|
|
54
|
-
const _responseText = response.data;
|
|
55
|
-
let result200 = null;
|
|
56
|
-
let resultData200 = _responseText;
|
|
57
|
-
result200 = ChatbotUserSettings.fromJS(resultData200);
|
|
58
|
-
return Promise.resolve(result200);
|
|
59
|
-
} else if (status !== 200 && status !== 204) {
|
|
60
|
-
const _responseText = response.data;
|
|
61
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
62
|
-
}
|
|
63
|
-
return Promise.resolve(null);
|
|
64
|
-
}
|
|
65
|
-
getFilterOptions(signal) {
|
|
66
|
-
let url_ = this.baseUrl + "/api/Chat/filter-options";
|
|
67
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
68
|
-
let options_ = {
|
|
69
|
-
method: "GET",
|
|
70
|
-
url: url_,
|
|
71
|
-
headers: {
|
|
72
|
-
"Accept": "application/json"
|
|
73
|
-
},
|
|
74
|
-
signal
|
|
75
|
-
};
|
|
76
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
77
|
-
if (isAxiosError(_error) && _error.response) {
|
|
78
|
-
return _error.response;
|
|
79
|
-
} else {
|
|
80
|
-
throw _error;
|
|
81
|
-
}
|
|
82
|
-
}).then((_response)=>{
|
|
83
|
-
return this.processGetFilterOptions(_response);
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
processGetFilterOptions(response) {
|
|
87
|
-
const status = response.status;
|
|
88
|
-
let _headers = {};
|
|
89
|
-
if (response.headers && typeof response.headers === "object") {
|
|
90
|
-
for(const k in response.headers){
|
|
91
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
92
|
-
_headers[k] = response.headers[k];
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (status === 200) {
|
|
97
|
-
const _responseText = response.data;
|
|
98
|
-
let result200 = null;
|
|
99
|
-
let resultData200 = _responseText;
|
|
100
|
-
result200 = FilterOptions.fromJS(resultData200);
|
|
101
|
-
return Promise.resolve(result200);
|
|
102
|
-
} else if (status !== 200 && status !== 204) {
|
|
103
|
-
const _responseText = response.data;
|
|
104
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
105
|
-
}
|
|
106
|
-
return Promise.resolve(null);
|
|
107
|
-
}
|
|
108
|
-
sendUserMessage(userMessage, signal) {
|
|
109
|
-
let url_ = this.baseUrl + "/api/Chat/user-message";
|
|
110
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
111
|
-
const content_ = JSON.stringify(userMessage);
|
|
112
|
-
let options_ = {
|
|
113
|
-
data: content_,
|
|
114
|
-
method: "POST",
|
|
115
|
-
url: url_,
|
|
116
|
-
headers: {
|
|
117
|
-
"Content-Type": "application/json",
|
|
118
|
-
"Accept": "application/json"
|
|
119
|
-
},
|
|
120
|
-
signal
|
|
121
|
-
};
|
|
122
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
123
|
-
if (isAxiosError(_error) && _error.response) {
|
|
124
|
-
return _error.response;
|
|
125
|
-
} else {
|
|
126
|
-
throw _error;
|
|
127
|
-
}
|
|
128
|
-
}).then((_response)=>{
|
|
129
|
-
return this.processSendUserMessage(_response);
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
processSendUserMessage(response) {
|
|
133
|
-
const status = response.status;
|
|
134
|
-
let _headers = {};
|
|
135
|
-
if (response.headers && typeof response.headers === "object") {
|
|
136
|
-
for(const k in response.headers){
|
|
137
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
138
|
-
_headers[k] = response.headers[k];
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
if (status === 200) {
|
|
143
|
-
const _responseText = response.data;
|
|
144
|
-
let result200 = null;
|
|
145
|
-
let resultData200 = _responseText;
|
|
146
|
-
result200 = BotMessage.fromJS(resultData200);
|
|
147
|
-
return Promise.resolve(result200);
|
|
148
|
-
} else if (status !== 200 && status !== 204) {
|
|
149
|
-
const _responseText = response.data;
|
|
150
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
151
|
-
}
|
|
152
|
-
return Promise.resolve(null);
|
|
153
|
-
}
|
|
154
|
-
sendBotMessageFeedback(sessionId, botMessageId, feedback, signal) {
|
|
155
|
-
let url_ = this.baseUrl + "/api/Chat/bot-message-feedback?";
|
|
156
|
-
if (sessionId === null) throw new Error("The parameter 'sessionId' cannot be null.");
|
|
157
|
-
else if (sessionId !== undefined) url_ += "sessionId=" + encodeURIComponent("" + sessionId) + "&";
|
|
158
|
-
if (botMessageId === null) throw new Error("The parameter 'botMessageId' cannot be null.");
|
|
159
|
-
else if (botMessageId !== undefined) url_ += "botMessageId=" + encodeURIComponent("" + botMessageId) + "&";
|
|
160
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
161
|
-
const content_ = JSON.stringify(feedback);
|
|
162
|
-
let options_ = {
|
|
163
|
-
data: content_,
|
|
164
|
-
method: "POST",
|
|
165
|
-
url: url_,
|
|
166
|
-
headers: {
|
|
167
|
-
"Content-Type": "application/json"
|
|
168
|
-
},
|
|
169
|
-
signal
|
|
170
|
-
};
|
|
171
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
172
|
-
if (isAxiosError(_error) && _error.response) {
|
|
173
|
-
return _error.response;
|
|
174
|
-
} else {
|
|
175
|
-
throw _error;
|
|
176
|
-
}
|
|
177
|
-
}).then((_response)=>{
|
|
178
|
-
return this.processSendBotMessageFeedback(_response);
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
processSendBotMessageFeedback(response) {
|
|
182
|
-
const status = response.status;
|
|
183
|
-
let _headers = {};
|
|
184
|
-
if (response.headers && typeof response.headers === "object") {
|
|
185
|
-
for(const k in response.headers){
|
|
186
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
187
|
-
_headers[k] = response.headers[k];
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
if (status === 200) {
|
|
192
|
-
const _responseText = response.data;
|
|
193
|
-
return Promise.resolve(null);
|
|
194
|
-
} else if (status !== 200 && status !== 204) {
|
|
195
|
-
const _responseText = response.data;
|
|
196
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
197
|
-
}
|
|
198
|
-
return Promise.resolve(null);
|
|
199
|
-
}
|
|
200
|
-
sendSessionFeedback(sessionId, feedback, signal) {
|
|
201
|
-
let url_ = this.baseUrl + "/api/Chat/session-feedback?";
|
|
202
|
-
if (sessionId === null) throw new Error("The parameter 'sessionId' cannot be null.");
|
|
203
|
-
else if (sessionId !== undefined) url_ += "sessionId=" + encodeURIComponent("" + sessionId) + "&";
|
|
204
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
205
|
-
const content_ = JSON.stringify(feedback);
|
|
206
|
-
let options_ = {
|
|
207
|
-
data: content_,
|
|
208
|
-
method: "POST",
|
|
209
|
-
url: url_,
|
|
210
|
-
headers: {
|
|
211
|
-
"Content-Type": "application/json"
|
|
212
|
-
},
|
|
213
|
-
signal
|
|
214
|
-
};
|
|
215
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
216
|
-
if (isAxiosError(_error) && _error.response) {
|
|
217
|
-
return _error.response;
|
|
218
|
-
} else {
|
|
219
|
-
throw _error;
|
|
220
|
-
}
|
|
221
|
-
}).then((_response)=>{
|
|
222
|
-
return this.processSendSessionFeedback(_response);
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
processSendSessionFeedback(response) {
|
|
226
|
-
const status = response.status;
|
|
227
|
-
let _headers = {};
|
|
228
|
-
if (response.headers && typeof response.headers === "object") {
|
|
229
|
-
for(const k in response.headers){
|
|
230
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
231
|
-
_headers[k] = response.headers[k];
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
if (status === 200) {
|
|
236
|
-
const _responseText = response.data;
|
|
237
|
-
return Promise.resolve(null);
|
|
238
|
-
} else if (status !== 200 && status !== 204) {
|
|
239
|
-
const _responseText = response.data;
|
|
240
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
241
|
-
}
|
|
242
|
-
return Promise.resolve(null);
|
|
243
|
-
}
|
|
244
|
-
updateSessionCategory(category, subCategory, sessionId, signal) {
|
|
245
|
-
let url_ = this.baseUrl + "/api/Chat/update-session-category?";
|
|
246
|
-
if (category === null) throw new Error("The parameter 'category' cannot be null.");
|
|
247
|
-
else if (category !== undefined) url_ += "category=" + encodeURIComponent("" + category) + "&";
|
|
248
|
-
if (subCategory === null) throw new Error("The parameter 'subCategory' cannot be null.");
|
|
249
|
-
else if (subCategory !== undefined) url_ += "subCategory=" + encodeURIComponent("" + subCategory) + "&";
|
|
250
|
-
if (sessionId === null) throw new Error("The parameter 'sessionId' cannot be null.");
|
|
251
|
-
else if (sessionId !== undefined) url_ += "sessionId=" + encodeURIComponent("" + sessionId) + "&";
|
|
252
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
253
|
-
let options_ = {
|
|
254
|
-
method: "POST",
|
|
255
|
-
url: url_,
|
|
256
|
-
headers: {},
|
|
257
|
-
signal
|
|
258
|
-
};
|
|
259
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
260
|
-
if (isAxiosError(_error) && _error.response) {
|
|
261
|
-
return _error.response;
|
|
262
|
-
} else {
|
|
263
|
-
throw _error;
|
|
264
|
-
}
|
|
265
|
-
}).then((_response)=>{
|
|
266
|
-
return this.processUpdateSessionCategory(_response);
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
processUpdateSessionCategory(response) {
|
|
270
|
-
const status = response.status;
|
|
271
|
-
let _headers = {};
|
|
272
|
-
if (response.headers && typeof response.headers === "object") {
|
|
273
|
-
for(const k in response.headers){
|
|
274
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
275
|
-
_headers[k] = response.headers[k];
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
if (status === 200) {
|
|
280
|
-
const _responseText = response.data;
|
|
281
|
-
return Promise.resolve(null);
|
|
282
|
-
} else if (status !== 200 && status !== 204) {
|
|
283
|
-
const _responseText = response.data;
|
|
284
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
285
|
-
}
|
|
286
|
-
return Promise.resolve(null);
|
|
287
|
-
}
|
|
288
|
-
createSession(sessionSource, signal) {
|
|
289
|
-
let url_ = this.baseUrl + "/api/Chat/create-session";
|
|
290
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
291
|
-
const content_ = JSON.stringify(sessionSource);
|
|
292
|
-
let options_ = {
|
|
293
|
-
data: content_,
|
|
294
|
-
method: "POST",
|
|
295
|
-
url: url_,
|
|
296
|
-
headers: {
|
|
297
|
-
"Content-Type": "application/json",
|
|
298
|
-
"Accept": "application/json"
|
|
299
|
-
},
|
|
300
|
-
signal
|
|
301
|
-
};
|
|
302
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
303
|
-
if (isAxiosError(_error) && _error.response) {
|
|
304
|
-
return _error.response;
|
|
305
|
-
} else {
|
|
306
|
-
throw _error;
|
|
307
|
-
}
|
|
308
|
-
}).then((_response)=>{
|
|
309
|
-
return this.processCreateSession(_response);
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
processCreateSession(response) {
|
|
313
|
-
const status = response.status;
|
|
314
|
-
let _headers = {};
|
|
315
|
-
if (response.headers && typeof response.headers === "object") {
|
|
316
|
-
for(const k in response.headers){
|
|
317
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
318
|
-
_headers[k] = response.headers[k];
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
if (status === 200) {
|
|
323
|
-
const _responseText = response.data;
|
|
324
|
-
let result200 = null;
|
|
325
|
-
let resultData200 = _responseText;
|
|
326
|
-
result200 = ChatbotSession.fromJS(resultData200);
|
|
327
|
-
return Promise.resolve(result200);
|
|
328
|
-
} else if (status !== 200 && status !== 204) {
|
|
329
|
-
const _responseText = response.data;
|
|
330
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
331
|
-
}
|
|
332
|
-
return Promise.resolve(null);
|
|
333
|
-
}
|
|
334
|
-
closeSession(sessionId, signal) {
|
|
335
|
-
let url_ = this.baseUrl + "/api/Chat/close-session?";
|
|
336
|
-
if (sessionId === null) throw new Error("The parameter 'sessionId' cannot be null.");
|
|
337
|
-
else if (sessionId !== undefined) url_ += "sessionId=" + encodeURIComponent("" + sessionId) + "&";
|
|
338
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
339
|
-
let options_ = {
|
|
340
|
-
method: "POST",
|
|
341
|
-
url: url_,
|
|
342
|
-
headers: {},
|
|
343
|
-
signal
|
|
344
|
-
};
|
|
345
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
346
|
-
if (isAxiosError(_error) && _error.response) {
|
|
347
|
-
return _error.response;
|
|
348
|
-
} else {
|
|
349
|
-
throw _error;
|
|
350
|
-
}
|
|
351
|
-
}).then((_response)=>{
|
|
352
|
-
return this.processCloseSession(_response);
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
processCloseSession(response) {
|
|
356
|
-
const status = response.status;
|
|
357
|
-
let _headers = {};
|
|
358
|
-
if (response.headers && typeof response.headers === "object") {
|
|
359
|
-
for(const k in response.headers){
|
|
360
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
361
|
-
_headers[k] = response.headers[k];
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
if (status === 200) {
|
|
366
|
-
const _responseText = response.data;
|
|
367
|
-
return Promise.resolve(null);
|
|
368
|
-
} else if (status !== 200 && status !== 204) {
|
|
369
|
-
const _responseText = response.data;
|
|
370
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
371
|
-
}
|
|
372
|
-
return Promise.resolve(null);
|
|
373
|
-
}
|
|
374
|
-
refreshAuthCookies(signal) {
|
|
375
|
-
let url_ = this.baseUrl + "/api/Chat/refresh-auth-cookies";
|
|
376
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
377
|
-
let options_ = {
|
|
378
|
-
responseType: "blob",
|
|
379
|
-
method: "POST",
|
|
380
|
-
url: url_,
|
|
381
|
-
headers: {
|
|
382
|
-
"Accept": "application/octet-stream"
|
|
383
|
-
},
|
|
384
|
-
signal
|
|
385
|
-
};
|
|
386
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
387
|
-
if (isAxiosError(_error) && _error.response) {
|
|
388
|
-
return _error.response;
|
|
389
|
-
} else {
|
|
390
|
-
throw _error;
|
|
391
|
-
}
|
|
392
|
-
}).then((_response)=>{
|
|
393
|
-
return this.processRefreshAuthCookies(_response);
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
processRefreshAuthCookies(response) {
|
|
397
|
-
const status = response.status;
|
|
398
|
-
let _headers = {};
|
|
399
|
-
if (response.headers && typeof response.headers === "object") {
|
|
400
|
-
for(const k in response.headers){
|
|
401
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
402
|
-
_headers[k] = response.headers[k];
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
if (status === 200 || status === 206) {
|
|
407
|
-
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
408
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
409
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
410
|
-
if (fileName) {
|
|
411
|
-
fileName = decodeURIComponent(fileName);
|
|
412
|
-
} else {
|
|
413
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
414
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
415
|
-
}
|
|
416
|
-
return Promise.resolve({
|
|
417
|
-
fileName: fileName,
|
|
418
|
-
status: status,
|
|
419
|
-
data: new Blob([
|
|
420
|
-
response.data
|
|
421
|
-
], {
|
|
422
|
-
type: response.headers["content-type"]
|
|
423
|
-
}),
|
|
424
|
-
headers: _headers
|
|
425
|
-
});
|
|
426
|
-
} else if (status !== 200 && status !== 204) {
|
|
427
|
-
const _responseText = response.data;
|
|
428
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
429
|
-
}
|
|
430
|
-
return Promise.resolve(null);
|
|
431
|
-
}
|
|
432
|
-
constructor(baseUrl, instance){
|
|
433
|
-
_define_property(this, "instance", void 0);
|
|
434
|
-
_define_property(this, "baseUrl", void 0);
|
|
435
|
-
_define_property(this, "jsonParseReviver", undefined);
|
|
436
|
-
this.instance = instance || axios.create();
|
|
437
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
export class ConfigurationClient {
|
|
441
|
-
getWidgetConfiguration(signal) {
|
|
442
|
-
let url_ = this.baseUrl + "/api/Configuration";
|
|
443
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
444
|
-
let options_ = {
|
|
445
|
-
method: "GET",
|
|
446
|
-
url: url_,
|
|
447
|
-
headers: {
|
|
448
|
-
"Accept": "application/json"
|
|
449
|
-
},
|
|
450
|
-
signal
|
|
451
|
-
};
|
|
452
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
453
|
-
if (isAxiosError(_error) && _error.response) {
|
|
454
|
-
return _error.response;
|
|
455
|
-
} else {
|
|
456
|
-
throw _error;
|
|
457
|
-
}
|
|
458
|
-
}).then((_response)=>{
|
|
459
|
-
return this.processGetWidgetConfiguration(_response);
|
|
460
|
-
});
|
|
461
|
-
}
|
|
462
|
-
processGetWidgetConfiguration(response) {
|
|
463
|
-
const status = response.status;
|
|
464
|
-
let _headers = {};
|
|
465
|
-
if (response.headers && typeof response.headers === "object") {
|
|
466
|
-
for(const k in response.headers){
|
|
467
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
468
|
-
_headers[k] = response.headers[k];
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
}
|
|
472
|
-
if (status === 200) {
|
|
473
|
-
const _responseText = response.data;
|
|
474
|
-
let result200 = null;
|
|
475
|
-
let resultData200 = _responseText;
|
|
476
|
-
result200 = WidgetConfiguration.fromJS(resultData200);
|
|
477
|
-
return Promise.resolve(result200);
|
|
478
|
-
} else if (status !== 200 && status !== 204) {
|
|
479
|
-
const _responseText = response.data;
|
|
480
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
481
|
-
}
|
|
482
|
-
return Promise.resolve(null);
|
|
483
|
-
}
|
|
484
|
-
getComponents(signal) {
|
|
485
|
-
let url_ = this.baseUrl + "/api/Configuration/components";
|
|
486
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
487
|
-
let options_ = {
|
|
488
|
-
method: "GET",
|
|
489
|
-
url: url_,
|
|
490
|
-
headers: {
|
|
491
|
-
"Accept": "application/json"
|
|
492
|
-
},
|
|
493
|
-
signal
|
|
494
|
-
};
|
|
495
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
496
|
-
if (isAxiosError(_error) && _error.response) {
|
|
497
|
-
return _error.response;
|
|
498
|
-
} else {
|
|
499
|
-
throw _error;
|
|
500
|
-
}
|
|
501
|
-
}).then((_response)=>{
|
|
502
|
-
return this.processGetComponents(_response);
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
processGetComponents(response) {
|
|
506
|
-
const status = response.status;
|
|
507
|
-
let _headers = {};
|
|
508
|
-
if (response.headers && typeof response.headers === "object") {
|
|
509
|
-
for(const k in response.headers){
|
|
510
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
511
|
-
_headers[k] = response.headers[k];
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
if (status === 200) {
|
|
516
|
-
const _responseText = response.data;
|
|
517
|
-
let result200 = null;
|
|
518
|
-
let resultData200 = _responseText;
|
|
519
|
-
result200 = SupportComponents.fromJS(resultData200);
|
|
520
|
-
return Promise.resolve(result200);
|
|
521
|
-
} else if (status !== 200 && status !== 204) {
|
|
522
|
-
const _responseText = response.data;
|
|
523
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
524
|
-
}
|
|
525
|
-
return Promise.resolve(null);
|
|
526
|
-
}
|
|
527
|
-
getInbentaToken(signal) {
|
|
528
|
-
let url_ = this.baseUrl + "/api/Configuration/inbenta-token";
|
|
529
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
530
|
-
let options_ = {
|
|
531
|
-
method: "GET",
|
|
532
|
-
url: url_,
|
|
533
|
-
headers: {
|
|
534
|
-
"Accept": "application/json"
|
|
535
|
-
},
|
|
536
|
-
signal
|
|
537
|
-
};
|
|
538
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
539
|
-
if (isAxiosError(_error) && _error.response) {
|
|
540
|
-
return _error.response;
|
|
541
|
-
} else {
|
|
542
|
-
throw _error;
|
|
543
|
-
}
|
|
544
|
-
}).then((_response)=>{
|
|
545
|
-
return this.processGetInbentaToken(_response);
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
processGetInbentaToken(response) {
|
|
549
|
-
const status = response.status;
|
|
550
|
-
let _headers = {};
|
|
551
|
-
if (response.headers && typeof response.headers === "object") {
|
|
552
|
-
for(const k in response.headers){
|
|
553
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
554
|
-
_headers[k] = response.headers[k];
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
if (status === 200) {
|
|
559
|
-
const _responseText = response.data;
|
|
560
|
-
let result200 = null;
|
|
561
|
-
let resultData200 = _responseText;
|
|
562
|
-
result200 = InbentaAccessToken.fromJS(resultData200);
|
|
563
|
-
return Promise.resolve(result200);
|
|
564
|
-
} else if (status !== 200 && status !== 204) {
|
|
565
|
-
const _responseText = response.data;
|
|
566
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
567
|
-
}
|
|
568
|
-
return Promise.resolve(null);
|
|
569
|
-
}
|
|
570
|
-
getContextHelp(signal) {
|
|
571
|
-
let url_ = this.baseUrl + "/api/Configuration/context-help";
|
|
572
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
573
|
-
let options_ = {
|
|
574
|
-
method: "GET",
|
|
575
|
-
url: url_,
|
|
576
|
-
headers: {
|
|
577
|
-
"Accept": "application/json"
|
|
578
|
-
},
|
|
579
|
-
signal
|
|
580
|
-
};
|
|
581
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
582
|
-
if (isAxiosError(_error) && _error.response) {
|
|
583
|
-
return _error.response;
|
|
584
|
-
} else {
|
|
585
|
-
throw _error;
|
|
586
|
-
}
|
|
587
|
-
}).then((_response)=>{
|
|
588
|
-
return this.processGetContextHelp(_response);
|
|
589
|
-
});
|
|
590
|
-
}
|
|
591
|
-
processGetContextHelp(response) {
|
|
592
|
-
const status = response.status;
|
|
593
|
-
let _headers = {};
|
|
594
|
-
if (response.headers && typeof response.headers === "object") {
|
|
595
|
-
for(const k in response.headers){
|
|
596
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
597
|
-
_headers[k] = response.headers[k];
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
if (status === 200) {
|
|
602
|
-
const _responseText = response.data;
|
|
603
|
-
let result200 = null;
|
|
604
|
-
let resultData200 = _responseText;
|
|
605
|
-
if (Array.isArray(resultData200)) {
|
|
606
|
-
result200 = [];
|
|
607
|
-
for (let item of resultData200)result200.push(PageRecommendations.fromJS(item));
|
|
608
|
-
} else {
|
|
609
|
-
result200 = null;
|
|
610
|
-
}
|
|
611
|
-
return Promise.resolve(result200);
|
|
612
|
-
} else if (status !== 200 && status !== 204) {
|
|
613
|
-
const _responseText = response.data;
|
|
614
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
615
|
-
}
|
|
616
|
-
return Promise.resolve(null);
|
|
617
|
-
}
|
|
618
|
-
testError(code, signal) {
|
|
619
|
-
let url_ = this.baseUrl + "/api/Configuration/test-error?";
|
|
620
|
-
if (code === null) throw new Error("The parameter 'code' cannot be null.");
|
|
621
|
-
else if (code !== undefined) url_ += "code=" + encodeURIComponent("" + code) + "&";
|
|
622
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
623
|
-
let options_ = {
|
|
624
|
-
responseType: "blob",
|
|
625
|
-
method: "GET",
|
|
626
|
-
url: url_,
|
|
627
|
-
headers: {
|
|
628
|
-
"Accept": "application/octet-stream"
|
|
629
|
-
},
|
|
630
|
-
signal
|
|
631
|
-
};
|
|
632
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
633
|
-
if (isAxiosError(_error) && _error.response) {
|
|
634
|
-
return _error.response;
|
|
635
|
-
} else {
|
|
636
|
-
throw _error;
|
|
637
|
-
}
|
|
638
|
-
}).then((_response)=>{
|
|
639
|
-
return this.processTestError(_response);
|
|
640
|
-
});
|
|
641
|
-
}
|
|
642
|
-
processTestError(response) {
|
|
643
|
-
const status = response.status;
|
|
644
|
-
let _headers = {};
|
|
645
|
-
if (response.headers && typeof response.headers === "object") {
|
|
646
|
-
for(const k in response.headers){
|
|
647
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
648
|
-
_headers[k] = response.headers[k];
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
if (status === 200 || status === 206) {
|
|
653
|
-
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
654
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
655
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
656
|
-
if (fileName) {
|
|
657
|
-
fileName = decodeURIComponent(fileName);
|
|
658
|
-
} else {
|
|
659
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
660
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
661
|
-
}
|
|
662
|
-
return Promise.resolve({
|
|
663
|
-
fileName: fileName,
|
|
664
|
-
status: status,
|
|
665
|
-
data: new Blob([
|
|
666
|
-
response.data
|
|
667
|
-
], {
|
|
668
|
-
type: response.headers["content-type"]
|
|
669
|
-
}),
|
|
670
|
-
headers: _headers
|
|
671
|
-
});
|
|
672
|
-
} else if (status !== 200 && status !== 204) {
|
|
673
|
-
const _responseText = response.data;
|
|
674
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
675
|
-
}
|
|
676
|
-
return Promise.resolve(null);
|
|
677
|
-
}
|
|
678
|
-
constructor(baseUrl, instance){
|
|
679
|
-
_define_property(this, "instance", void 0);
|
|
680
|
-
_define_property(this, "baseUrl", void 0);
|
|
681
|
-
_define_property(this, "jsonParseReviver", undefined);
|
|
682
|
-
this.instance = instance || axios.create();
|
|
683
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
export class EnterpriseHubClient {
|
|
687
|
-
getUserData(signal) {
|
|
688
|
-
let url_ = this.baseUrl + "/EnterpriseHub/user-data";
|
|
689
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
690
|
-
let options_ = {
|
|
691
|
-
method: "GET",
|
|
692
|
-
url: url_,
|
|
693
|
-
headers: {
|
|
694
|
-
"Accept": "application/json"
|
|
695
|
-
},
|
|
696
|
-
signal
|
|
697
|
-
};
|
|
698
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
699
|
-
if (isAxiosError(_error) && _error.response) {
|
|
700
|
-
return _error.response;
|
|
701
|
-
} else {
|
|
702
|
-
throw _error;
|
|
703
|
-
}
|
|
704
|
-
}).then((_response)=>{
|
|
705
|
-
return this.processGetUserData(_response);
|
|
706
|
-
});
|
|
707
|
-
}
|
|
708
|
-
processGetUserData(response) {
|
|
709
|
-
const status = response.status;
|
|
710
|
-
let _headers = {};
|
|
711
|
-
if (response.headers && typeof response.headers === "object") {
|
|
712
|
-
for(const k in response.headers){
|
|
713
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
714
|
-
_headers[k] = response.headers[k];
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
if (status === 200) {
|
|
719
|
-
const _responseText = response.data;
|
|
720
|
-
let result200 = null;
|
|
721
|
-
let resultData200 = _responseText;
|
|
722
|
-
result200 = HelpCenterUserData.fromJS(resultData200);
|
|
723
|
-
return Promise.resolve(result200);
|
|
724
|
-
} else if (status !== 200 && status !== 204) {
|
|
725
|
-
const _responseText = response.data;
|
|
726
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
727
|
-
}
|
|
728
|
-
return Promise.resolve(null);
|
|
729
|
-
}
|
|
730
|
-
getAuthToken(signal) {
|
|
731
|
-
let url_ = this.baseUrl + "/EnterpriseHub/getAuthToken";
|
|
732
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
733
|
-
let options_ = {
|
|
734
|
-
method: "GET",
|
|
735
|
-
url: url_,
|
|
736
|
-
headers: {
|
|
737
|
-
"Accept": "application/json"
|
|
738
|
-
},
|
|
739
|
-
signal
|
|
740
|
-
};
|
|
741
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
742
|
-
if (isAxiosError(_error) && _error.response) {
|
|
743
|
-
return _error.response;
|
|
744
|
-
} else {
|
|
745
|
-
throw _error;
|
|
746
|
-
}
|
|
747
|
-
}).then((_response)=>{
|
|
748
|
-
return this.processGetAuthToken(_response);
|
|
749
|
-
});
|
|
750
|
-
}
|
|
751
|
-
processGetAuthToken(response) {
|
|
752
|
-
const status = response.status;
|
|
753
|
-
let _headers = {};
|
|
754
|
-
if (response.headers && typeof response.headers === "object") {
|
|
755
|
-
for(const k in response.headers){
|
|
756
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
757
|
-
_headers[k] = response.headers[k];
|
|
758
|
-
}
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
if (status === 200) {
|
|
762
|
-
const _responseText = response.data;
|
|
763
|
-
let result200 = null;
|
|
764
|
-
let resultData200 = _responseText;
|
|
765
|
-
result200 = resultData200 !== undefined ? resultData200 : null;
|
|
766
|
-
return Promise.resolve(result200);
|
|
767
|
-
} else if (status !== 200 && status !== 204) {
|
|
768
|
-
const _responseText = response.data;
|
|
769
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
770
|
-
}
|
|
771
|
-
return Promise.resolve(null);
|
|
772
|
-
}
|
|
773
|
-
constructor(baseUrl, instance){
|
|
774
|
-
_define_property(this, "instance", void 0);
|
|
775
|
-
_define_property(this, "baseUrl", void 0);
|
|
776
|
-
_define_property(this, "jsonParseReviver", undefined);
|
|
777
|
-
this.instance = instance || axios.create();
|
|
778
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
export class SalesforceOpsClient {
|
|
782
|
-
generateCases(webRequest, signal) {
|
|
783
|
-
let url_ = this.baseUrl + "/salesforce-ops/generate-cases";
|
|
784
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
785
|
-
const content_ = JSON.stringify(webRequest);
|
|
786
|
-
let options_ = {
|
|
787
|
-
data: content_,
|
|
788
|
-
method: "POST",
|
|
789
|
-
url: url_,
|
|
790
|
-
headers: {
|
|
791
|
-
"Content-Type": "application/json",
|
|
792
|
-
"Accept": "application/json"
|
|
793
|
-
},
|
|
794
|
-
signal
|
|
795
|
-
};
|
|
796
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
797
|
-
if (isAxiosError(_error) && _error.response) {
|
|
798
|
-
return _error.response;
|
|
799
|
-
} else {
|
|
800
|
-
throw _error;
|
|
801
|
-
}
|
|
802
|
-
}).then((_response)=>{
|
|
803
|
-
return this.processGenerateCases(_response);
|
|
804
|
-
});
|
|
805
|
-
}
|
|
806
|
-
processGenerateCases(response) {
|
|
807
|
-
const status = response.status;
|
|
808
|
-
let _headers = {};
|
|
809
|
-
if (response.headers && typeof response.headers === "object") {
|
|
810
|
-
for(const k in response.headers){
|
|
811
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
812
|
-
_headers[k] = response.headers[k];
|
|
813
|
-
}
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
if (status === 200) {
|
|
817
|
-
const _responseText = response.data;
|
|
818
|
-
let result200 = null;
|
|
819
|
-
let resultData200 = _responseText;
|
|
820
|
-
result200 = CaseGenerationResponse.fromJS(resultData200);
|
|
821
|
-
return Promise.resolve(result200);
|
|
822
|
-
} else if (status === 400) {
|
|
823
|
-
const _responseText = response.data;
|
|
824
|
-
let result400 = null;
|
|
825
|
-
let resultData400 = _responseText;
|
|
826
|
-
result400 = CaseGenerationResponse.fromJS(resultData400);
|
|
827
|
-
return throwException("A server side error occurred.", status, _responseText, _headers, result400);
|
|
828
|
-
} else if (status !== 200 && status !== 204) {
|
|
829
|
-
const _responseText = response.data;
|
|
830
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
831
|
-
}
|
|
832
|
-
return Promise.resolve(null);
|
|
833
|
-
}
|
|
834
|
-
constructor(baseUrl, instance){
|
|
835
|
-
_define_property(this, "instance", void 0);
|
|
836
|
-
_define_property(this, "baseUrl", void 0);
|
|
837
|
-
_define_property(this, "jsonParseReviver", undefined);
|
|
838
|
-
this.instance = instance || axios.create();
|
|
839
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
export class SupportClient {
|
|
843
|
-
getCompanyCaseFilters(signal) {
|
|
844
|
-
let url_ = this.baseUrl + "/api/Support/company-case-filters";
|
|
845
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
846
|
-
let options_ = {
|
|
847
|
-
method: "GET",
|
|
848
|
-
url: url_,
|
|
849
|
-
headers: {
|
|
850
|
-
"Accept": "application/json"
|
|
851
|
-
},
|
|
852
|
-
signal
|
|
853
|
-
};
|
|
854
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
855
|
-
if (isAxiosError(_error) && _error.response) {
|
|
856
|
-
return _error.response;
|
|
857
|
-
} else {
|
|
858
|
-
throw _error;
|
|
859
|
-
}
|
|
860
|
-
}).then((_response)=>{
|
|
861
|
-
return this.processGetCompanyCaseFilters(_response);
|
|
862
|
-
});
|
|
863
|
-
}
|
|
864
|
-
processGetCompanyCaseFilters(response) {
|
|
865
|
-
const status = response.status;
|
|
866
|
-
let _headers = {};
|
|
867
|
-
if (response.headers && typeof response.headers === "object") {
|
|
868
|
-
for(const k in response.headers){
|
|
869
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
870
|
-
_headers[k] = response.headers[k];
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
}
|
|
874
|
-
if (status === 200) {
|
|
875
|
-
const _responseText = response.data;
|
|
876
|
-
let result200 = null;
|
|
877
|
-
let resultData200 = _responseText;
|
|
878
|
-
result200 = CaseFilters.fromJS(resultData200);
|
|
879
|
-
return Promise.resolve(result200);
|
|
880
|
-
} else if (status !== 200 && status !== 204) {
|
|
881
|
-
const _responseText = response.data;
|
|
882
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
883
|
-
}
|
|
884
|
-
return Promise.resolve(null);
|
|
885
|
-
}
|
|
886
|
-
getCompanyCases(statuses, contactIds, sorting, priorityToken, caseNumberToken, accountIds, signal) {
|
|
887
|
-
let url_ = this.baseUrl + "/api/Support/company-cases?";
|
|
888
|
-
if (statuses !== undefined && statuses !== null) statuses && statuses.forEach((item)=>{
|
|
889
|
-
url_ += "Statuses=" + encodeURIComponent("" + item) + "&";
|
|
890
|
-
});
|
|
891
|
-
if (contactIds !== undefined && contactIds !== null) contactIds && contactIds.forEach((item)=>{
|
|
892
|
-
url_ += "ContactIds=" + encodeURIComponent("" + item) + "&";
|
|
893
|
-
});
|
|
894
|
-
if (sorting === null) throw new Error("The parameter 'sorting' cannot be null.");
|
|
895
|
-
else if (sorting !== undefined) url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
896
|
-
if (priorityToken !== undefined && priorityToken !== null) url_ += "PriorityToken=" + encodeURIComponent("" + priorityToken) + "&";
|
|
897
|
-
if (caseNumberToken !== undefined && caseNumberToken !== null) url_ += "CaseNumberToken=" + encodeURIComponent("" + caseNumberToken) + "&";
|
|
898
|
-
if (accountIds !== undefined && accountIds !== null) accountIds && accountIds.forEach((item)=>{
|
|
899
|
-
url_ += "AccountIds=" + encodeURIComponent("" + item) + "&";
|
|
900
|
-
});
|
|
901
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
902
|
-
let options_ = {
|
|
903
|
-
method: "GET",
|
|
904
|
-
url: url_,
|
|
905
|
-
headers: {
|
|
906
|
-
"Accept": "application/json"
|
|
907
|
-
},
|
|
908
|
-
signal
|
|
909
|
-
};
|
|
910
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
911
|
-
if (isAxiosError(_error) && _error.response) {
|
|
912
|
-
return _error.response;
|
|
913
|
-
} else {
|
|
914
|
-
throw _error;
|
|
915
|
-
}
|
|
916
|
-
}).then((_response)=>{
|
|
917
|
-
return this.processGetCompanyCases(_response);
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
processGetCompanyCases(response) {
|
|
921
|
-
const status = response.status;
|
|
922
|
-
let _headers = {};
|
|
923
|
-
if (response.headers && typeof response.headers === "object") {
|
|
924
|
-
for(const k in response.headers){
|
|
925
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
926
|
-
_headers[k] = response.headers[k];
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
if (status === 200) {
|
|
931
|
-
const _responseText = response.data;
|
|
932
|
-
let result200 = null;
|
|
933
|
-
let resultData200 = _responseText;
|
|
934
|
-
result200 = CaseResults.fromJS(resultData200);
|
|
935
|
-
return Promise.resolve(result200);
|
|
936
|
-
} else if (status !== 200 && status !== 204) {
|
|
937
|
-
const _responseText = response.data;
|
|
938
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
939
|
-
}
|
|
940
|
-
return Promise.resolve(null);
|
|
941
|
-
}
|
|
942
|
-
getPersonalCaseFilters(signal) {
|
|
943
|
-
let url_ = this.baseUrl + "/api/Support/personal-case-filters";
|
|
944
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
945
|
-
let options_ = {
|
|
946
|
-
method: "GET",
|
|
947
|
-
url: url_,
|
|
948
|
-
headers: {
|
|
949
|
-
"Accept": "application/json"
|
|
950
|
-
},
|
|
951
|
-
signal
|
|
952
|
-
};
|
|
953
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
954
|
-
if (isAxiosError(_error) && _error.response) {
|
|
955
|
-
return _error.response;
|
|
956
|
-
} else {
|
|
957
|
-
throw _error;
|
|
958
|
-
}
|
|
959
|
-
}).then((_response)=>{
|
|
960
|
-
return this.processGetPersonalCaseFilters(_response);
|
|
961
|
-
});
|
|
962
|
-
}
|
|
963
|
-
processGetPersonalCaseFilters(response) {
|
|
964
|
-
const status = response.status;
|
|
965
|
-
let _headers = {};
|
|
966
|
-
if (response.headers && typeof response.headers === "object") {
|
|
967
|
-
for(const k in response.headers){
|
|
968
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
969
|
-
_headers[k] = response.headers[k];
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
if (status === 200) {
|
|
974
|
-
const _responseText = response.data;
|
|
975
|
-
let result200 = null;
|
|
976
|
-
let resultData200 = _responseText;
|
|
977
|
-
result200 = CaseFilters.fromJS(resultData200);
|
|
978
|
-
return Promise.resolve(result200);
|
|
979
|
-
} else if (status !== 200 && status !== 204) {
|
|
980
|
-
const _responseText = response.data;
|
|
981
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
982
|
-
}
|
|
983
|
-
return Promise.resolve(null);
|
|
984
|
-
}
|
|
985
|
-
getPersonalCases(statuses, contactIds, sorting, priorityToken, caseNumberToken, accountIds, signal) {
|
|
986
|
-
let url_ = this.baseUrl + "/api/Support/personal-cases?";
|
|
987
|
-
if (statuses !== undefined && statuses !== null) statuses && statuses.forEach((item)=>{
|
|
988
|
-
url_ += "Statuses=" + encodeURIComponent("" + item) + "&";
|
|
989
|
-
});
|
|
990
|
-
if (contactIds !== undefined && contactIds !== null) contactIds && contactIds.forEach((item)=>{
|
|
991
|
-
url_ += "ContactIds=" + encodeURIComponent("" + item) + "&";
|
|
992
|
-
});
|
|
993
|
-
if (sorting === null) throw new Error("The parameter 'sorting' cannot be null.");
|
|
994
|
-
else if (sorting !== undefined) url_ += "Sorting=" + encodeURIComponent("" + sorting) + "&";
|
|
995
|
-
if (priorityToken !== undefined && priorityToken !== null) url_ += "PriorityToken=" + encodeURIComponent("" + priorityToken) + "&";
|
|
996
|
-
if (caseNumberToken !== undefined && caseNumberToken !== null) url_ += "CaseNumberToken=" + encodeURIComponent("" + caseNumberToken) + "&";
|
|
997
|
-
if (accountIds !== undefined && accountIds !== null) accountIds && accountIds.forEach((item)=>{
|
|
998
|
-
url_ += "AccountIds=" + encodeURIComponent("" + item) + "&";
|
|
999
|
-
});
|
|
1000
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1001
|
-
let options_ = {
|
|
1002
|
-
method: "GET",
|
|
1003
|
-
url: url_,
|
|
1004
|
-
headers: {
|
|
1005
|
-
"Accept": "application/json"
|
|
1006
|
-
},
|
|
1007
|
-
signal
|
|
1008
|
-
};
|
|
1009
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1010
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1011
|
-
return _error.response;
|
|
1012
|
-
} else {
|
|
1013
|
-
throw _error;
|
|
1014
|
-
}
|
|
1015
|
-
}).then((_response)=>{
|
|
1016
|
-
return this.processGetPersonalCases(_response);
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
processGetPersonalCases(response) {
|
|
1020
|
-
const status = response.status;
|
|
1021
|
-
let _headers = {};
|
|
1022
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1023
|
-
for(const k in response.headers){
|
|
1024
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1025
|
-
_headers[k] = response.headers[k];
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
if (status === 200) {
|
|
1030
|
-
const _responseText = response.data;
|
|
1031
|
-
let result200 = null;
|
|
1032
|
-
let resultData200 = _responseText;
|
|
1033
|
-
result200 = CaseResults.fromJS(resultData200);
|
|
1034
|
-
return Promise.resolve(result200);
|
|
1035
|
-
} else if (status !== 200 && status !== 204) {
|
|
1036
|
-
const _responseText = response.data;
|
|
1037
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1038
|
-
}
|
|
1039
|
-
return Promise.resolve(null);
|
|
1040
|
-
}
|
|
1041
|
-
getCaseDetails(caseId, signal) {
|
|
1042
|
-
let url_ = this.baseUrl + "/api/Support/case-details?";
|
|
1043
|
-
if (caseId === null) throw new Error("The parameter 'caseId' cannot be null.");
|
|
1044
|
-
else if (caseId !== undefined) url_ += "caseId=" + encodeURIComponent("" + caseId) + "&";
|
|
1045
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1046
|
-
let options_ = {
|
|
1047
|
-
method: "GET",
|
|
1048
|
-
url: url_,
|
|
1049
|
-
headers: {
|
|
1050
|
-
"Accept": "application/json"
|
|
1051
|
-
},
|
|
1052
|
-
signal
|
|
1053
|
-
};
|
|
1054
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1055
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1056
|
-
return _error.response;
|
|
1057
|
-
} else {
|
|
1058
|
-
throw _error;
|
|
1059
|
-
}
|
|
1060
|
-
}).then((_response)=>{
|
|
1061
|
-
return this.processGetCaseDetails(_response);
|
|
1062
|
-
});
|
|
1063
|
-
}
|
|
1064
|
-
processGetCaseDetails(response) {
|
|
1065
|
-
const status = response.status;
|
|
1066
|
-
let _headers = {};
|
|
1067
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1068
|
-
for(const k in response.headers){
|
|
1069
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1070
|
-
_headers[k] = response.headers[k];
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
if (status === 200) {
|
|
1075
|
-
const _responseText = response.data;
|
|
1076
|
-
let result200 = null;
|
|
1077
|
-
let resultData200 = _responseText;
|
|
1078
|
-
result200 = CaseDetails.fromJS(resultData200);
|
|
1079
|
-
return Promise.resolve(result200);
|
|
1080
|
-
} else if (status !== 200 && status !== 204) {
|
|
1081
|
-
const _responseText = response.data;
|
|
1082
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1083
|
-
}
|
|
1084
|
-
return Promise.resolve(null);
|
|
1085
|
-
}
|
|
1086
|
-
sendEmailComment(caseId, replyRef, email, username, subject, body, attachments, signal) {
|
|
1087
|
-
let url_ = this.baseUrl + "/api/Support/send-email-comment";
|
|
1088
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1089
|
-
const content_ = new FormData();
|
|
1090
|
-
if (caseId !== null && caseId !== undefined) content_.append("CaseId", caseId.toString());
|
|
1091
|
-
if (replyRef !== null && replyRef !== undefined) content_.append("ReplyRef", replyRef.toString());
|
|
1092
|
-
if (email !== null && email !== undefined) content_.append("Email", email.toString());
|
|
1093
|
-
if (username !== null && username !== undefined) content_.append("Username", username.toString());
|
|
1094
|
-
if (subject !== null && subject !== undefined) content_.append("Subject", subject.toString());
|
|
1095
|
-
if (body !== null && body !== undefined) content_.append("Body", body.toString());
|
|
1096
|
-
if (attachments !== null && attachments !== undefined) attachments.forEach((item_)=>content_.append("Attachments", item_.data, item_.fileName ? item_.fileName : "Attachments"));
|
|
1097
|
-
let options_ = {
|
|
1098
|
-
data: content_,
|
|
1099
|
-
method: "POST",
|
|
1100
|
-
url: url_,
|
|
1101
|
-
headers: {
|
|
1102
|
-
"Accept": "application/json"
|
|
1103
|
-
},
|
|
1104
|
-
signal
|
|
1105
|
-
};
|
|
1106
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1107
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1108
|
-
return _error.response;
|
|
1109
|
-
} else {
|
|
1110
|
-
throw _error;
|
|
1111
|
-
}
|
|
1112
|
-
}).then((_response)=>{
|
|
1113
|
-
return this.processSendEmailComment(_response);
|
|
1114
|
-
});
|
|
1115
|
-
}
|
|
1116
|
-
processSendEmailComment(response) {
|
|
1117
|
-
const status = response.status;
|
|
1118
|
-
let _headers = {};
|
|
1119
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1120
|
-
for(const k in response.headers){
|
|
1121
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1122
|
-
_headers[k] = response.headers[k];
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
}
|
|
1126
|
-
if (status === 200) {
|
|
1127
|
-
const _responseText = response.data;
|
|
1128
|
-
let result200 = null;
|
|
1129
|
-
let resultData200 = _responseText;
|
|
1130
|
-
result200 = EmailResult.fromJS(resultData200);
|
|
1131
|
-
return Promise.resolve(result200);
|
|
1132
|
-
} else if (status === 400) {
|
|
1133
|
-
const _responseText = response.data;
|
|
1134
|
-
let result400 = null;
|
|
1135
|
-
let resultData400 = _responseText;
|
|
1136
|
-
result400 = EmailResult.fromJS(resultData400);
|
|
1137
|
-
return throwException("A server side error occurred.", status, _responseText, _headers, result400);
|
|
1138
|
-
} else if (status === 500) {
|
|
1139
|
-
const _responseText = response.data;
|
|
1140
|
-
return throwException("A server side error occurred.", status, _responseText, _headers);
|
|
1141
|
-
} else if (status !== 200 && status !== 204) {
|
|
1142
|
-
const _responseText = response.data;
|
|
1143
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1144
|
-
}
|
|
1145
|
-
return Promise.resolve(null);
|
|
1146
|
-
}
|
|
1147
|
-
sendEmail(caseTrackingId, username, description, htmlDescription, subject, email, componentId, chatbotSessionId, attachments, tenantId, externalUserId, recipients, signal) {
|
|
1148
|
-
let url_ = this.baseUrl + "/api/Support/send-email";
|
|
1149
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1150
|
-
const content_ = new FormData();
|
|
1151
|
-
if (caseTrackingId !== null && caseTrackingId !== undefined) content_.append("CaseTrackingId", caseTrackingId.toString());
|
|
1152
|
-
if (username !== null && username !== undefined) content_.append("Username", username.toString());
|
|
1153
|
-
if (description !== null && description !== undefined) content_.append("Description", description.toString());
|
|
1154
|
-
if (htmlDescription !== null && htmlDescription !== undefined) content_.append("HtmlDescription", htmlDescription.toString());
|
|
1155
|
-
if (subject !== null && subject !== undefined) content_.append("Subject", subject.toString());
|
|
1156
|
-
if (email !== null && email !== undefined) content_.append("Email", email.toString());
|
|
1157
|
-
if (componentId !== null && componentId !== undefined) content_.append("ComponentId", componentId.toString());
|
|
1158
|
-
if (chatbotSessionId !== null && chatbotSessionId !== undefined) content_.append("ChatbotSessionId", chatbotSessionId.toString());
|
|
1159
|
-
if (attachments !== null && attachments !== undefined) attachments.forEach((item_)=>content_.append("Attachments", item_.data, item_.fileName ? item_.fileName : "Attachments"));
|
|
1160
|
-
if (tenantId !== null && tenantId !== undefined) content_.append("TenantId", tenantId.toString());
|
|
1161
|
-
if (externalUserId !== null && externalUserId !== undefined) content_.append("ExternalUserId", externalUserId.toString());
|
|
1162
|
-
if (recipients !== null && recipients !== undefined) recipients.forEach((item_)=>content_.append("Recipients", item_.toString()));
|
|
1163
|
-
let options_ = {
|
|
1164
|
-
data: content_,
|
|
1165
|
-
method: "POST",
|
|
1166
|
-
url: url_,
|
|
1167
|
-
headers: {
|
|
1168
|
-
"Accept": "application/json"
|
|
1169
|
-
},
|
|
1170
|
-
signal
|
|
1171
|
-
};
|
|
1172
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1173
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1174
|
-
return _error.response;
|
|
1175
|
-
} else {
|
|
1176
|
-
throw _error;
|
|
1177
|
-
}
|
|
1178
|
-
}).then((_response)=>{
|
|
1179
|
-
return this.processSendEmail(_response);
|
|
1180
|
-
});
|
|
1181
|
-
}
|
|
1182
|
-
processSendEmail(response) {
|
|
1183
|
-
const status = response.status;
|
|
1184
|
-
let _headers = {};
|
|
1185
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1186
|
-
for(const k in response.headers){
|
|
1187
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1188
|
-
_headers[k] = response.headers[k];
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
if (status === 200) {
|
|
1193
|
-
const _responseText = response.data;
|
|
1194
|
-
let result200 = null;
|
|
1195
|
-
let resultData200 = _responseText;
|
|
1196
|
-
result200 = EmailResult.fromJS(resultData200);
|
|
1197
|
-
return Promise.resolve(result200);
|
|
1198
|
-
} else if (status !== 200 && status !== 204) {
|
|
1199
|
-
const _responseText = response.data;
|
|
1200
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1201
|
-
}
|
|
1202
|
-
return Promise.resolve(null);
|
|
1203
|
-
}
|
|
1204
|
-
getCallbackOnline(signal) {
|
|
1205
|
-
let url_ = this.baseUrl + "/api/Support/callback-online";
|
|
1206
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1207
|
-
let options_ = {
|
|
1208
|
-
method: "GET",
|
|
1209
|
-
url: url_,
|
|
1210
|
-
headers: {
|
|
1211
|
-
"Accept": "application/json"
|
|
1212
|
-
},
|
|
1213
|
-
signal
|
|
1214
|
-
};
|
|
1215
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1216
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1217
|
-
return _error.response;
|
|
1218
|
-
} else {
|
|
1219
|
-
throw _error;
|
|
1220
|
-
}
|
|
1221
|
-
}).then((_response)=>{
|
|
1222
|
-
return this.processGetCallbackOnline(_response);
|
|
1223
|
-
});
|
|
1224
|
-
}
|
|
1225
|
-
processGetCallbackOnline(response) {
|
|
1226
|
-
const status = response.status;
|
|
1227
|
-
let _headers = {};
|
|
1228
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1229
|
-
for(const k in response.headers){
|
|
1230
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1231
|
-
_headers[k] = response.headers[k];
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
if (status === 200) {
|
|
1236
|
-
const _responseText = response.data;
|
|
1237
|
-
let result200 = null;
|
|
1238
|
-
let resultData200 = _responseText;
|
|
1239
|
-
result200 = SupportOnline.fromJS(resultData200);
|
|
1240
|
-
return Promise.resolve(result200);
|
|
1241
|
-
} else if (status !== 200 && status !== 204) {
|
|
1242
|
-
const _responseText = response.data;
|
|
1243
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1244
|
-
}
|
|
1245
|
-
return Promise.resolve(null);
|
|
1246
|
-
}
|
|
1247
|
-
getChatOnline(signal) {
|
|
1248
|
-
let url_ = this.baseUrl + "/api/Support/chat-online";
|
|
1249
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1250
|
-
let options_ = {
|
|
1251
|
-
method: "GET",
|
|
1252
|
-
url: url_,
|
|
1253
|
-
headers: {
|
|
1254
|
-
"Accept": "application/json"
|
|
1255
|
-
},
|
|
1256
|
-
signal
|
|
1257
|
-
};
|
|
1258
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1259
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1260
|
-
return _error.response;
|
|
1261
|
-
} else {
|
|
1262
|
-
throw _error;
|
|
1263
|
-
}
|
|
1264
|
-
}).then((_response)=>{
|
|
1265
|
-
return this.processGetChatOnline(_response);
|
|
1266
|
-
});
|
|
1267
|
-
}
|
|
1268
|
-
processGetChatOnline(response) {
|
|
1269
|
-
const status = response.status;
|
|
1270
|
-
let _headers = {};
|
|
1271
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1272
|
-
for(const k in response.headers){
|
|
1273
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1274
|
-
_headers[k] = response.headers[k];
|
|
1275
|
-
}
|
|
1276
|
-
}
|
|
1277
|
-
}
|
|
1278
|
-
if (status === 200) {
|
|
1279
|
-
const _responseText = response.data;
|
|
1280
|
-
let result200 = null;
|
|
1281
|
-
let resultData200 = _responseText;
|
|
1282
|
-
result200 = SupportOnline.fromJS(resultData200);
|
|
1283
|
-
return Promise.resolve(result200);
|
|
1284
|
-
} else if (status !== 200 && status !== 204) {
|
|
1285
|
-
const _responseText = response.data;
|
|
1286
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1287
|
-
}
|
|
1288
|
-
return Promise.resolve(null);
|
|
1289
|
-
}
|
|
1290
|
-
isPhoneNumberValid(phoneNumber, signal) {
|
|
1291
|
-
let url_ = this.baseUrl + "/api/Support/is-phone-number-valid?";
|
|
1292
|
-
if (phoneNumber === null) throw new Error("The parameter 'phoneNumber' cannot be null.");
|
|
1293
|
-
else if (phoneNumber !== undefined) url_ += "phoneNumber=" + encodeURIComponent("" + phoneNumber) + "&";
|
|
1294
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1295
|
-
let options_ = {
|
|
1296
|
-
method: "GET",
|
|
1297
|
-
url: url_,
|
|
1298
|
-
headers: {
|
|
1299
|
-
"Accept": "application/json"
|
|
1300
|
-
},
|
|
1301
|
-
signal
|
|
1302
|
-
};
|
|
1303
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1304
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1305
|
-
return _error.response;
|
|
1306
|
-
} else {
|
|
1307
|
-
throw _error;
|
|
1308
|
-
}
|
|
1309
|
-
}).then((_response)=>{
|
|
1310
|
-
return this.processIsPhoneNumberValid(_response);
|
|
1311
|
-
});
|
|
1312
|
-
}
|
|
1313
|
-
processIsPhoneNumberValid(response) {
|
|
1314
|
-
const status = response.status;
|
|
1315
|
-
let _headers = {};
|
|
1316
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1317
|
-
for(const k in response.headers){
|
|
1318
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1319
|
-
_headers[k] = response.headers[k];
|
|
1320
|
-
}
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
if (status === 200) {
|
|
1324
|
-
const _responseText = response.data;
|
|
1325
|
-
let result200 = null;
|
|
1326
|
-
let resultData200 = _responseText;
|
|
1327
|
-
result200 = resultData200 !== undefined ? resultData200 : null;
|
|
1328
|
-
return Promise.resolve(result200);
|
|
1329
|
-
} else if (status !== 200 && status !== 204) {
|
|
1330
|
-
const _responseText = response.data;
|
|
1331
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1332
|
-
}
|
|
1333
|
-
return Promise.resolve(null);
|
|
1334
|
-
}
|
|
1335
|
-
requestCallback(reqRequest, signal) {
|
|
1336
|
-
let url_ = this.baseUrl + "/api/Support/request-callback";
|
|
1337
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1338
|
-
const content_ = JSON.stringify(reqRequest);
|
|
1339
|
-
let options_ = {
|
|
1340
|
-
data: content_,
|
|
1341
|
-
method: "POST",
|
|
1342
|
-
url: url_,
|
|
1343
|
-
headers: {
|
|
1344
|
-
"Content-Type": "application/json",
|
|
1345
|
-
"Accept": "application/json"
|
|
1346
|
-
},
|
|
1347
|
-
signal
|
|
1348
|
-
};
|
|
1349
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1350
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1351
|
-
return _error.response;
|
|
1352
|
-
} else {
|
|
1353
|
-
throw _error;
|
|
1354
|
-
}
|
|
1355
|
-
}).then((_response)=>{
|
|
1356
|
-
return this.processRequestCallback(_response);
|
|
1357
|
-
});
|
|
1358
|
-
}
|
|
1359
|
-
processRequestCallback(response) {
|
|
1360
|
-
const status = response.status;
|
|
1361
|
-
let _headers = {};
|
|
1362
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1363
|
-
for(const k in response.headers){
|
|
1364
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1365
|
-
_headers[k] = response.headers[k];
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
if (status === 200) {
|
|
1370
|
-
const _responseText = response.data;
|
|
1371
|
-
let result200 = null;
|
|
1372
|
-
let resultData200 = _responseText;
|
|
1373
|
-
result200 = CallbackResponse.fromJS(resultData200);
|
|
1374
|
-
return Promise.resolve(result200);
|
|
1375
|
-
} else if (status !== 200 && status !== 204) {
|
|
1376
|
-
const _responseText = response.data;
|
|
1377
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1378
|
-
}
|
|
1379
|
-
return Promise.resolve(null);
|
|
1380
|
-
}
|
|
1381
|
-
requestEmergencyCallback(reqRequest, signal) {
|
|
1382
|
-
let url_ = this.baseUrl + "/api/Support/request-emergency-callback";
|
|
1383
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1384
|
-
const content_ = JSON.stringify(reqRequest);
|
|
1385
|
-
let options_ = {
|
|
1386
|
-
data: content_,
|
|
1387
|
-
method: "POST",
|
|
1388
|
-
url: url_,
|
|
1389
|
-
headers: {
|
|
1390
|
-
"Content-Type": "application/json",
|
|
1391
|
-
"Accept": "application/json"
|
|
1392
|
-
},
|
|
1393
|
-
signal
|
|
1394
|
-
};
|
|
1395
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1396
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1397
|
-
return _error.response;
|
|
1398
|
-
} else {
|
|
1399
|
-
throw _error;
|
|
1400
|
-
}
|
|
1401
|
-
}).then((_response)=>{
|
|
1402
|
-
return this.processRequestEmergencyCallback(_response);
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
processRequestEmergencyCallback(response) {
|
|
1406
|
-
const status = response.status;
|
|
1407
|
-
let _headers = {};
|
|
1408
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1409
|
-
for(const k in response.headers){
|
|
1410
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1411
|
-
_headers[k] = response.headers[k];
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
}
|
|
1415
|
-
if (status === 200) {
|
|
1416
|
-
const _responseText = response.data;
|
|
1417
|
-
let result200 = null;
|
|
1418
|
-
let resultData200 = _responseText;
|
|
1419
|
-
result200 = CallbackResponse.fromJS(resultData200);
|
|
1420
|
-
return Promise.resolve(result200);
|
|
1421
|
-
} else if (status !== 200 && status !== 204) {
|
|
1422
|
-
const _responseText = response.data;
|
|
1423
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1424
|
-
}
|
|
1425
|
-
return Promise.resolve(null);
|
|
1426
|
-
}
|
|
1427
|
-
getTenantLevelImpersonationConsent(signal) {
|
|
1428
|
-
let url_ = this.baseUrl + "/api/Support/tenant-level-impersonation-consent";
|
|
1429
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1430
|
-
let options_ = {
|
|
1431
|
-
method: "GET",
|
|
1432
|
-
url: url_,
|
|
1433
|
-
headers: {
|
|
1434
|
-
"Accept": "application/json"
|
|
1435
|
-
},
|
|
1436
|
-
signal
|
|
1437
|
-
};
|
|
1438
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1439
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1440
|
-
return _error.response;
|
|
1441
|
-
} else {
|
|
1442
|
-
throw _error;
|
|
1443
|
-
}
|
|
1444
|
-
}).then((_response)=>{
|
|
1445
|
-
return this.processGetTenantLevelImpersonationConsent(_response);
|
|
1446
|
-
});
|
|
1447
|
-
}
|
|
1448
|
-
processGetTenantLevelImpersonationConsent(response) {
|
|
1449
|
-
const status = response.status;
|
|
1450
|
-
let _headers = {};
|
|
1451
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1452
|
-
for(const k in response.headers){
|
|
1453
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1454
|
-
_headers[k] = response.headers[k];
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
}
|
|
1458
|
-
if (status === 200) {
|
|
1459
|
-
const _responseText = response.data;
|
|
1460
|
-
let result200 = null;
|
|
1461
|
-
let resultData200 = _responseText;
|
|
1462
|
-
result200 = ImpersonationConsent.fromJS(resultData200);
|
|
1463
|
-
return Promise.resolve(result200);
|
|
1464
|
-
} else if (status !== 200 && status !== 204) {
|
|
1465
|
-
const _responseText = response.data;
|
|
1466
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1467
|
-
}
|
|
1468
|
-
return Promise.resolve(null);
|
|
1469
|
-
}
|
|
1470
|
-
provideTenantLevelImpersonationConsent(signal) {
|
|
1471
|
-
let url_ = this.baseUrl + "/api/Support/tenant-level-impersonation-consent";
|
|
1472
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1473
|
-
let options_ = {
|
|
1474
|
-
method: "PUT",
|
|
1475
|
-
url: url_,
|
|
1476
|
-
headers: {
|
|
1477
|
-
"Accept": "application/json"
|
|
1478
|
-
},
|
|
1479
|
-
signal
|
|
1480
|
-
};
|
|
1481
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1482
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1483
|
-
return _error.response;
|
|
1484
|
-
} else {
|
|
1485
|
-
throw _error;
|
|
1486
|
-
}
|
|
1487
|
-
}).then((_response)=>{
|
|
1488
|
-
return this.processProvideTenantLevelImpersonationConsent(_response);
|
|
1489
|
-
});
|
|
1490
|
-
}
|
|
1491
|
-
processProvideTenantLevelImpersonationConsent(response) {
|
|
1492
|
-
const status = response.status;
|
|
1493
|
-
let _headers = {};
|
|
1494
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1495
|
-
for(const k in response.headers){
|
|
1496
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1497
|
-
_headers[k] = response.headers[k];
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
}
|
|
1501
|
-
if (status === 200) {
|
|
1502
|
-
const _responseText = response.data;
|
|
1503
|
-
let result200 = null;
|
|
1504
|
-
let resultData200 = _responseText;
|
|
1505
|
-
result200 = ImpersonationConsent.fromJS(resultData200);
|
|
1506
|
-
return Promise.resolve(result200);
|
|
1507
|
-
} else if (status !== 200 && status !== 204) {
|
|
1508
|
-
const _responseText = response.data;
|
|
1509
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1510
|
-
}
|
|
1511
|
-
return Promise.resolve(null);
|
|
1512
|
-
}
|
|
1513
|
-
revokeTenantLevelImpersonationConsent(signal) {
|
|
1514
|
-
let url_ = this.baseUrl + "/api/Support/tenant-level-impersonation-consent";
|
|
1515
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1516
|
-
let options_ = {
|
|
1517
|
-
method: "DELETE",
|
|
1518
|
-
url: url_,
|
|
1519
|
-
headers: {
|
|
1520
|
-
"Accept": "application/json"
|
|
1521
|
-
},
|
|
1522
|
-
signal
|
|
1523
|
-
};
|
|
1524
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1525
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1526
|
-
return _error.response;
|
|
1527
|
-
} else {
|
|
1528
|
-
throw _error;
|
|
1529
|
-
}
|
|
1530
|
-
}).then((_response)=>{
|
|
1531
|
-
return this.processRevokeTenantLevelImpersonationConsent(_response);
|
|
1532
|
-
});
|
|
1533
|
-
}
|
|
1534
|
-
processRevokeTenantLevelImpersonationConsent(response) {
|
|
1535
|
-
const status = response.status;
|
|
1536
|
-
let _headers = {};
|
|
1537
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1538
|
-
for(const k in response.headers){
|
|
1539
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1540
|
-
_headers[k] = response.headers[k];
|
|
1541
|
-
}
|
|
1542
|
-
}
|
|
1543
|
-
}
|
|
1544
|
-
if (status === 200) {
|
|
1545
|
-
const _responseText = response.data;
|
|
1546
|
-
let result200 = null;
|
|
1547
|
-
let resultData200 = _responseText;
|
|
1548
|
-
result200 = ImpersonationConsent.fromJS(resultData200);
|
|
1549
|
-
return Promise.resolve(result200);
|
|
1550
|
-
} else if (status !== 200 && status !== 204) {
|
|
1551
|
-
const _responseText = response.data;
|
|
1552
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1553
|
-
}
|
|
1554
|
-
return Promise.resolve(null);
|
|
1555
|
-
}
|
|
1556
|
-
registerNewCase(reqRequest, signal) {
|
|
1557
|
-
let url_ = this.baseUrl + "/api/Support/register-new-case";
|
|
1558
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1559
|
-
const content_ = JSON.stringify(reqRequest);
|
|
1560
|
-
let options_ = {
|
|
1561
|
-
data: content_,
|
|
1562
|
-
method: "POST",
|
|
1563
|
-
url: url_,
|
|
1564
|
-
headers: {
|
|
1565
|
-
"Content-Type": "application/json",
|
|
1566
|
-
"Accept": "application/json"
|
|
1567
|
-
},
|
|
1568
|
-
signal
|
|
1569
|
-
};
|
|
1570
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1571
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1572
|
-
return _error.response;
|
|
1573
|
-
} else {
|
|
1574
|
-
throw _error;
|
|
1575
|
-
}
|
|
1576
|
-
}).then((_response)=>{
|
|
1577
|
-
return this.processRegisterNewCase(_response);
|
|
1578
|
-
});
|
|
1579
|
-
}
|
|
1580
|
-
processRegisterNewCase(response) {
|
|
1581
|
-
const status = response.status;
|
|
1582
|
-
let _headers = {};
|
|
1583
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1584
|
-
for(const k in response.headers){
|
|
1585
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1586
|
-
_headers[k] = response.headers[k];
|
|
1587
|
-
}
|
|
1588
|
-
}
|
|
1589
|
-
}
|
|
1590
|
-
if (status === 200) {
|
|
1591
|
-
const _responseText = response.data;
|
|
1592
|
-
let result200 = null;
|
|
1593
|
-
let resultData200 = _responseText;
|
|
1594
|
-
result200 = NewCaseResponse.fromJS(resultData200);
|
|
1595
|
-
return Promise.resolve(result200);
|
|
1596
|
-
} else if (status !== 200 && status !== 204) {
|
|
1597
|
-
const _responseText = response.data;
|
|
1598
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1599
|
-
}
|
|
1600
|
-
return Promise.resolve(null);
|
|
1601
|
-
}
|
|
1602
|
-
provideCaseLevelImpersonationConsent(caseId, signal) {
|
|
1603
|
-
let url_ = this.baseUrl + "/api/Support/case-level-impersonation-consent?";
|
|
1604
|
-
if (caseId === null) throw new Error("The parameter 'caseId' cannot be null.");
|
|
1605
|
-
else if (caseId !== undefined) url_ += "caseId=" + encodeURIComponent("" + caseId) + "&";
|
|
1606
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1607
|
-
let options_ = {
|
|
1608
|
-
method: "PUT",
|
|
1609
|
-
url: url_,
|
|
1610
|
-
headers: {
|
|
1611
|
-
"Accept": "application/json"
|
|
1612
|
-
},
|
|
1613
|
-
signal
|
|
1614
|
-
};
|
|
1615
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1616
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1617
|
-
return _error.response;
|
|
1618
|
-
} else {
|
|
1619
|
-
throw _error;
|
|
1620
|
-
}
|
|
1621
|
-
}).then((_response)=>{
|
|
1622
|
-
return this.processProvideCaseLevelImpersonationConsent(_response);
|
|
1623
|
-
});
|
|
1624
|
-
}
|
|
1625
|
-
processProvideCaseLevelImpersonationConsent(response) {
|
|
1626
|
-
const status = response.status;
|
|
1627
|
-
let _headers = {};
|
|
1628
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1629
|
-
for(const k in response.headers){
|
|
1630
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1631
|
-
_headers[k] = response.headers[k];
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
if (status === 200) {
|
|
1636
|
-
const _responseText = response.data;
|
|
1637
|
-
let result200 = null;
|
|
1638
|
-
let resultData200 = _responseText;
|
|
1639
|
-
result200 = ImpersonationConsent.fromJS(resultData200);
|
|
1640
|
-
return Promise.resolve(result200);
|
|
1641
|
-
} else if (status !== 200 && status !== 204) {
|
|
1642
|
-
const _responseText = response.data;
|
|
1643
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1644
|
-
}
|
|
1645
|
-
return Promise.resolve(null);
|
|
1646
|
-
}
|
|
1647
|
-
revokeCaseLevelImpersonationConsent(caseId, signal) {
|
|
1648
|
-
let url_ = this.baseUrl + "/api/Support/case-level-impersonation-consent?";
|
|
1649
|
-
if (caseId === null) throw new Error("The parameter 'caseId' cannot be null.");
|
|
1650
|
-
else if (caseId !== undefined) url_ += "caseId=" + encodeURIComponent("" + caseId) + "&";
|
|
1651
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1652
|
-
let options_ = {
|
|
1653
|
-
method: "DELETE",
|
|
1654
|
-
url: url_,
|
|
1655
|
-
headers: {
|
|
1656
|
-
"Accept": "application/json"
|
|
1657
|
-
},
|
|
1658
|
-
signal
|
|
1659
|
-
};
|
|
1660
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1661
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1662
|
-
return _error.response;
|
|
1663
|
-
} else {
|
|
1664
|
-
throw _error;
|
|
1665
|
-
}
|
|
1666
|
-
}).then((_response)=>{
|
|
1667
|
-
return this.processRevokeCaseLevelImpersonationConsent(_response);
|
|
1668
|
-
});
|
|
1669
|
-
}
|
|
1670
|
-
processRevokeCaseLevelImpersonationConsent(response) {
|
|
1671
|
-
const status = response.status;
|
|
1672
|
-
let _headers = {};
|
|
1673
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1674
|
-
for(const k in response.headers){
|
|
1675
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1676
|
-
_headers[k] = response.headers[k];
|
|
1677
|
-
}
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
if (status === 200) {
|
|
1681
|
-
const _responseText = response.data;
|
|
1682
|
-
let result200 = null;
|
|
1683
|
-
let resultData200 = _responseText;
|
|
1684
|
-
result200 = ImpersonationConsent.fromJS(resultData200);
|
|
1685
|
-
return Promise.resolve(result200);
|
|
1686
|
-
} else if (status !== 200 && status !== 204) {
|
|
1687
|
-
const _responseText = response.data;
|
|
1688
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1689
|
-
}
|
|
1690
|
-
return Promise.resolve(null);
|
|
1691
|
-
}
|
|
1692
|
-
registerImpersonationConsent(caseTitle, signal) {
|
|
1693
|
-
let url_ = this.baseUrl + "/api/Support/register-impersonation-consent";
|
|
1694
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1695
|
-
const content_ = JSON.stringify(caseTitle);
|
|
1696
|
-
let options_ = {
|
|
1697
|
-
data: content_,
|
|
1698
|
-
method: "POST",
|
|
1699
|
-
url: url_,
|
|
1700
|
-
headers: {
|
|
1701
|
-
"Content-Type": "application/json",
|
|
1702
|
-
"Accept": "application/json"
|
|
1703
|
-
},
|
|
1704
|
-
signal
|
|
1705
|
-
};
|
|
1706
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1707
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1708
|
-
return _error.response;
|
|
1709
|
-
} else {
|
|
1710
|
-
throw _error;
|
|
1711
|
-
}
|
|
1712
|
-
}).then((_response)=>{
|
|
1713
|
-
return this.processRegisterImpersonationConsent(_response);
|
|
1714
|
-
});
|
|
1715
|
-
}
|
|
1716
|
-
processRegisterImpersonationConsent(response) {
|
|
1717
|
-
const status = response.status;
|
|
1718
|
-
let _headers = {};
|
|
1719
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1720
|
-
for(const k in response.headers){
|
|
1721
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1722
|
-
_headers[k] = response.headers[k];
|
|
1723
|
-
}
|
|
1724
|
-
}
|
|
1725
|
-
}
|
|
1726
|
-
if (status === 200) {
|
|
1727
|
-
const _responseText = response.data;
|
|
1728
|
-
let result200 = null;
|
|
1729
|
-
let resultData200 = _responseText;
|
|
1730
|
-
result200 = ImpersonationConsentDto.fromJS(resultData200);
|
|
1731
|
-
return Promise.resolve(result200);
|
|
1732
|
-
} else if (status !== 200 && status !== 204) {
|
|
1733
|
-
const _responseText = response.data;
|
|
1734
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1735
|
-
}
|
|
1736
|
-
return Promise.resolve(null);
|
|
1737
|
-
}
|
|
1738
|
-
predictSupportComponent(sessionId, signal) {
|
|
1739
|
-
let url_ = this.baseUrl + "/api/Support/predict-support-component?";
|
|
1740
|
-
if (sessionId === null) throw new Error("The parameter 'sessionId' cannot be null.");
|
|
1741
|
-
else if (sessionId !== undefined) url_ += "sessionId=" + encodeURIComponent("" + sessionId) + "&";
|
|
1742
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1743
|
-
let options_ = {
|
|
1744
|
-
method: "GET",
|
|
1745
|
-
url: url_,
|
|
1746
|
-
headers: {
|
|
1747
|
-
"Accept": "application/json"
|
|
1748
|
-
},
|
|
1749
|
-
signal
|
|
1750
|
-
};
|
|
1751
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1752
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1753
|
-
return _error.response;
|
|
1754
|
-
} else {
|
|
1755
|
-
throw _error;
|
|
1756
|
-
}
|
|
1757
|
-
}).then((_response)=>{
|
|
1758
|
-
return this.processPredictSupportComponent(_response);
|
|
1759
|
-
});
|
|
1760
|
-
}
|
|
1761
|
-
processPredictSupportComponent(response) {
|
|
1762
|
-
const status = response.status;
|
|
1763
|
-
let _headers = {};
|
|
1764
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1765
|
-
for(const k in response.headers){
|
|
1766
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1767
|
-
_headers[k] = response.headers[k];
|
|
1768
|
-
}
|
|
1769
|
-
}
|
|
1770
|
-
}
|
|
1771
|
-
if (status === 200) {
|
|
1772
|
-
const _responseText = response.data;
|
|
1773
|
-
let result200 = null;
|
|
1774
|
-
let resultData200 = _responseText;
|
|
1775
|
-
result200 = resultData200 !== undefined ? resultData200 : null;
|
|
1776
|
-
return Promise.resolve(result200);
|
|
1777
|
-
} else if (status !== 200 && status !== 204) {
|
|
1778
|
-
const _responseText = response.data;
|
|
1779
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1780
|
-
}
|
|
1781
|
-
return Promise.resolve(null);
|
|
1782
|
-
}
|
|
1783
|
-
constructor(baseUrl, instance){
|
|
1784
|
-
_define_property(this, "instance", void 0);
|
|
1785
|
-
_define_property(this, "baseUrl", void 0);
|
|
1786
|
-
_define_property(this, "jsonParseReviver", undefined);
|
|
1787
|
-
this.instance = instance || axios.create();
|
|
1788
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
1789
|
-
}
|
|
1790
|
-
}
|
|
1791
|
-
export class TestOpsClient {
|
|
1792
|
-
makeToken(makeTokenRequest, signal) {
|
|
1793
|
-
let url_ = this.baseUrl + "/test-ops/make-jwt";
|
|
1794
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1795
|
-
const content_ = JSON.stringify(makeTokenRequest);
|
|
1796
|
-
let options_ = {
|
|
1797
|
-
data: content_,
|
|
1798
|
-
method: "POST",
|
|
1799
|
-
url: url_,
|
|
1800
|
-
headers: {
|
|
1801
|
-
"Content-Type": "application/json",
|
|
1802
|
-
"Accept": "application/json"
|
|
1803
|
-
},
|
|
1804
|
-
signal
|
|
1805
|
-
};
|
|
1806
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1807
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1808
|
-
return _error.response;
|
|
1809
|
-
} else {
|
|
1810
|
-
throw _error;
|
|
1811
|
-
}
|
|
1812
|
-
}).then((_response)=>{
|
|
1813
|
-
return this.processMakeToken(_response);
|
|
1814
|
-
});
|
|
1815
|
-
}
|
|
1816
|
-
processMakeToken(response) {
|
|
1817
|
-
const status = response.status;
|
|
1818
|
-
let _headers = {};
|
|
1819
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1820
|
-
for(const k in response.headers){
|
|
1821
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1822
|
-
_headers[k] = response.headers[k];
|
|
1823
|
-
}
|
|
1824
|
-
}
|
|
1825
|
-
}
|
|
1826
|
-
if (status === 200) {
|
|
1827
|
-
const _responseText = response.data;
|
|
1828
|
-
let result200 = null;
|
|
1829
|
-
let resultData200 = _responseText;
|
|
1830
|
-
result200 = CaseGenerationResponse.fromJS(resultData200);
|
|
1831
|
-
return Promise.resolve(result200);
|
|
1832
|
-
} else if (status !== 200 && status !== 204) {
|
|
1833
|
-
const _responseText = response.data;
|
|
1834
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1835
|
-
}
|
|
1836
|
-
return Promise.resolve(null);
|
|
1837
|
-
}
|
|
1838
|
-
testError(code, signal) {
|
|
1839
|
-
let url_ = this.baseUrl + "/test-ops/test-error?";
|
|
1840
|
-
if (code === null) throw new Error("The parameter 'code' cannot be null.");
|
|
1841
|
-
else if (code !== undefined) url_ += "code=" + encodeURIComponent("" + code) + "&";
|
|
1842
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1843
|
-
let options_ = {
|
|
1844
|
-
responseType: "blob",
|
|
1845
|
-
method: "GET",
|
|
1846
|
-
url: url_,
|
|
1847
|
-
headers: {
|
|
1848
|
-
"Accept": "application/octet-stream"
|
|
1849
|
-
},
|
|
1850
|
-
signal
|
|
1851
|
-
};
|
|
1852
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1853
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1854
|
-
return _error.response;
|
|
1855
|
-
} else {
|
|
1856
|
-
throw _error;
|
|
1857
|
-
}
|
|
1858
|
-
}).then((_response)=>{
|
|
1859
|
-
return this.processTestError(_response);
|
|
1860
|
-
});
|
|
1861
|
-
}
|
|
1862
|
-
processTestError(response) {
|
|
1863
|
-
const status = response.status;
|
|
1864
|
-
let _headers = {};
|
|
1865
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1866
|
-
for(const k in response.headers){
|
|
1867
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1868
|
-
_headers[k] = response.headers[k];
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
if (status === 200 || status === 206) {
|
|
1873
|
-
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
1874
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
1875
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
1876
|
-
if (fileName) {
|
|
1877
|
-
fileName = decodeURIComponent(fileName);
|
|
1878
|
-
} else {
|
|
1879
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1880
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1881
|
-
}
|
|
1882
|
-
return Promise.resolve({
|
|
1883
|
-
fileName: fileName,
|
|
1884
|
-
status: status,
|
|
1885
|
-
data: new Blob([
|
|
1886
|
-
response.data
|
|
1887
|
-
], {
|
|
1888
|
-
type: response.headers["content-type"]
|
|
1889
|
-
}),
|
|
1890
|
-
headers: _headers
|
|
1891
|
-
});
|
|
1892
|
-
} else if (status !== 200 && status !== 204) {
|
|
1893
|
-
const _responseText = response.data;
|
|
1894
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1895
|
-
}
|
|
1896
|
-
return Promise.resolve(null);
|
|
1897
|
-
}
|
|
1898
|
-
constructor(baseUrl, instance){
|
|
1899
|
-
_define_property(this, "instance", void 0);
|
|
1900
|
-
_define_property(this, "baseUrl", void 0);
|
|
1901
|
-
_define_property(this, "jsonParseReviver", undefined);
|
|
1902
|
-
this.instance = instance || axios.create();
|
|
1903
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
1904
|
-
}
|
|
1905
|
-
}
|
|
1906
|
-
export class UserClient {
|
|
1907
|
-
ensureCreated(signal) {
|
|
1908
|
-
let url_ = this.baseUrl + "/api/User";
|
|
1909
|
-
url_ = url_.replace(/[?&]$/, "");
|
|
1910
|
-
let options_ = {
|
|
1911
|
-
responseType: "blob",
|
|
1912
|
-
method: "PUT",
|
|
1913
|
-
url: url_,
|
|
1914
|
-
headers: {
|
|
1915
|
-
"Accept": "application/octet-stream"
|
|
1916
|
-
},
|
|
1917
|
-
signal
|
|
1918
|
-
};
|
|
1919
|
-
return this.instance.request(options_).catch((_error)=>{
|
|
1920
|
-
if (isAxiosError(_error) && _error.response) {
|
|
1921
|
-
return _error.response;
|
|
1922
|
-
} else {
|
|
1923
|
-
throw _error;
|
|
1924
|
-
}
|
|
1925
|
-
}).then((_response)=>{
|
|
1926
|
-
return this.processEnsureCreated(_response);
|
|
1927
|
-
});
|
|
1928
|
-
}
|
|
1929
|
-
processEnsureCreated(response) {
|
|
1930
|
-
const status = response.status;
|
|
1931
|
-
let _headers = {};
|
|
1932
|
-
if (response.headers && typeof response.headers === "object") {
|
|
1933
|
-
for(const k in response.headers){
|
|
1934
|
-
if (response.headers.hasOwnProperty(k)) {
|
|
1935
|
-
_headers[k] = response.headers[k];
|
|
1936
|
-
}
|
|
1937
|
-
}
|
|
1938
|
-
}
|
|
1939
|
-
if (status === 200 || status === 206) {
|
|
1940
|
-
const contentDisposition = response.headers ? response.headers["content-disposition"] : undefined;
|
|
1941
|
-
let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
|
|
1942
|
-
let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
|
|
1943
|
-
if (fileName) {
|
|
1944
|
-
fileName = decodeURIComponent(fileName);
|
|
1945
|
-
} else {
|
|
1946
|
-
fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
|
|
1947
|
-
fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
|
|
1948
|
-
}
|
|
1949
|
-
return Promise.resolve({
|
|
1950
|
-
fileName: fileName,
|
|
1951
|
-
status: status,
|
|
1952
|
-
data: new Blob([
|
|
1953
|
-
response.data
|
|
1954
|
-
], {
|
|
1955
|
-
type: response.headers["content-type"]
|
|
1956
|
-
}),
|
|
1957
|
-
headers: _headers
|
|
1958
|
-
});
|
|
1959
|
-
} else if (status !== 200 && status !== 204) {
|
|
1960
|
-
const _responseText = response.data;
|
|
1961
|
-
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
1962
|
-
}
|
|
1963
|
-
return Promise.resolve(null);
|
|
1964
|
-
}
|
|
1965
|
-
constructor(baseUrl, instance){
|
|
1966
|
-
_define_property(this, "instance", void 0);
|
|
1967
|
-
_define_property(this, "baseUrl", void 0);
|
|
1968
|
-
_define_property(this, "jsonParseReviver", undefined);
|
|
1969
|
-
this.instance = instance || axios.create();
|
|
1970
|
-
this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "";
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
export class ChatbotUserSettings {
|
|
1974
|
-
init(_data) {
|
|
1975
|
-
if (_data) {
|
|
1976
|
-
this.isInternal = _data["isInternal"];
|
|
1977
|
-
this.feedbackUrl = _data["feedbackUrl"];
|
|
1978
|
-
this.showFilters = _data["showFilters"];
|
|
1979
|
-
this.buildVersion = _data["buildVersion"] ? BuildVersion.fromJS(_data["buildVersion"]) : new BuildVersion();
|
|
1980
|
-
}
|
|
1981
|
-
}
|
|
1982
|
-
static fromJS(data) {
|
|
1983
|
-
data = typeof data === 'object' ? data : {};
|
|
1984
|
-
let result = new ChatbotUserSettings();
|
|
1985
|
-
result.init(data);
|
|
1986
|
-
return result;
|
|
1987
|
-
}
|
|
1988
|
-
toJSON(data) {
|
|
1989
|
-
data = typeof data === 'object' ? data : {};
|
|
1990
|
-
data["isInternal"] = this.isInternal;
|
|
1991
|
-
data["feedbackUrl"] = this.feedbackUrl;
|
|
1992
|
-
data["showFilters"] = this.showFilters;
|
|
1993
|
-
data["buildVersion"] = this.buildVersion ? this.buildVersion.toJSON() : undefined;
|
|
1994
|
-
return data;
|
|
1995
|
-
}
|
|
1996
|
-
constructor(data){
|
|
1997
|
-
_define_property(this, "isInternal", void 0);
|
|
1998
|
-
_define_property(this, "feedbackUrl", void 0);
|
|
1999
|
-
_define_property(this, "showFilters", void 0);
|
|
2000
|
-
_define_property(this, "buildVersion", void 0);
|
|
2001
|
-
if (data) {
|
|
2002
|
-
for(var property in data){
|
|
2003
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2004
|
-
}
|
|
2005
|
-
}
|
|
2006
|
-
if (!data) {
|
|
2007
|
-
this.buildVersion = new BuildVersion();
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
export class BuildVersion {
|
|
2012
|
-
init(_data) {
|
|
2013
|
-
if (_data) {
|
|
2014
|
-
this.number = _data["number"];
|
|
2015
|
-
this.date = _data["date"] ? new Date(_data["date"].toString()) : undefined;
|
|
2016
|
-
this.releaseNotesUrl = _data["releaseNotesUrl"];
|
|
2017
|
-
}
|
|
2018
|
-
}
|
|
2019
|
-
static fromJS(data) {
|
|
2020
|
-
data = typeof data === 'object' ? data : {};
|
|
2021
|
-
let result = new BuildVersion();
|
|
2022
|
-
result.init(data);
|
|
2023
|
-
return result;
|
|
2024
|
-
}
|
|
2025
|
-
toJSON(data) {
|
|
2026
|
-
data = typeof data === 'object' ? data : {};
|
|
2027
|
-
data["number"] = this.number;
|
|
2028
|
-
data["date"] = this.date ? this.date.toISOString() : undefined;
|
|
2029
|
-
data["releaseNotesUrl"] = this.releaseNotesUrl;
|
|
2030
|
-
return data;
|
|
2031
|
-
}
|
|
2032
|
-
constructor(data){
|
|
2033
|
-
_define_property(this, "number", void 0);
|
|
2034
|
-
_define_property(this, "date", void 0);
|
|
2035
|
-
_define_property(this, "releaseNotesUrl", void 0);
|
|
2036
|
-
if (data) {
|
|
2037
|
-
for(var property in data){
|
|
2038
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2039
|
-
}
|
|
2040
|
-
}
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
export class EmailMessage {
|
|
2044
|
-
init(_data) {
|
|
2045
|
-
if (_data) {
|
|
2046
|
-
this.caseTrackingId = _data["caseTrackingId"];
|
|
2047
|
-
this.username = _data["username"];
|
|
2048
|
-
this.description = _data["description"];
|
|
2049
|
-
this.htmlDescription = _data["htmlDescription"];
|
|
2050
|
-
this.subject = _data["subject"];
|
|
2051
|
-
this.email = _data["email"];
|
|
2052
|
-
this.componentId = _data["componentId"];
|
|
2053
|
-
this.chatbotSessionId = _data["chatbotSessionId"];
|
|
2054
|
-
if (Array.isArray(_data["attachments"])) {
|
|
2055
|
-
this.attachments = [];
|
|
2056
|
-
for (let item of _data["attachments"])this.attachments.push(item);
|
|
2057
|
-
}
|
|
2058
|
-
this.tenantId = _data["tenantId"];
|
|
2059
|
-
this.externalUserId = _data["externalUserId"];
|
|
2060
|
-
if (Array.isArray(_data["recipients"])) {
|
|
2061
|
-
this.recipients = [];
|
|
2062
|
-
for (let item of _data["recipients"])this.recipients.push(item);
|
|
2063
|
-
}
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
static fromJS(data) {
|
|
2067
|
-
data = typeof data === 'object' ? data : {};
|
|
2068
|
-
let result = new EmailMessage();
|
|
2069
|
-
result.init(data);
|
|
2070
|
-
return result;
|
|
2071
|
-
}
|
|
2072
|
-
toJSON(data) {
|
|
2073
|
-
data = typeof data === 'object' ? data : {};
|
|
2074
|
-
data["caseTrackingId"] = this.caseTrackingId;
|
|
2075
|
-
data["username"] = this.username;
|
|
2076
|
-
data["description"] = this.description;
|
|
2077
|
-
data["htmlDescription"] = this.htmlDescription;
|
|
2078
|
-
data["subject"] = this.subject;
|
|
2079
|
-
data["email"] = this.email;
|
|
2080
|
-
data["componentId"] = this.componentId;
|
|
2081
|
-
data["chatbotSessionId"] = this.chatbotSessionId;
|
|
2082
|
-
if (Array.isArray(this.attachments)) {
|
|
2083
|
-
data["attachments"] = [];
|
|
2084
|
-
for (let item of this.attachments)data["attachments"].push(item);
|
|
2085
|
-
}
|
|
2086
|
-
data["tenantId"] = this.tenantId;
|
|
2087
|
-
data["externalUserId"] = this.externalUserId;
|
|
2088
|
-
if (Array.isArray(this.recipients)) {
|
|
2089
|
-
data["recipients"] = [];
|
|
2090
|
-
for (let item of this.recipients)data["recipients"].push(item);
|
|
2091
|
-
}
|
|
2092
|
-
return data;
|
|
2093
|
-
}
|
|
2094
|
-
constructor(data){
|
|
2095
|
-
_define_property(this, "caseTrackingId", void 0);
|
|
2096
|
-
_define_property(this, "username", void 0);
|
|
2097
|
-
_define_property(this, "description", void 0);
|
|
2098
|
-
_define_property(this, "htmlDescription", void 0);
|
|
2099
|
-
_define_property(this, "subject", void 0);
|
|
2100
|
-
_define_property(this, "email", void 0);
|
|
2101
|
-
_define_property(this, "componentId", void 0);
|
|
2102
|
-
_define_property(this, "chatbotSessionId", void 0);
|
|
2103
|
-
_define_property(this, "attachments", void 0);
|
|
2104
|
-
_define_property(this, "tenantId", void 0);
|
|
2105
|
-
_define_property(this, "externalUserId", void 0);
|
|
2106
|
-
_define_property(this, "recipients", void 0);
|
|
2107
|
-
if (data) {
|
|
2108
|
-
for(var property in data){
|
|
2109
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
}
|
|
2113
|
-
}
|
|
2114
|
-
export class FilterOptions {
|
|
2115
|
-
init(_data) {
|
|
2116
|
-
if (_data) {
|
|
2117
|
-
if (Array.isArray(_data["contentTypes"])) {
|
|
2118
|
-
this.contentTypes = [];
|
|
2119
|
-
for (let item of _data["contentTypes"])this.contentTypes.push(FilterOption.fromJS(item));
|
|
2120
|
-
}
|
|
2121
|
-
if (Array.isArray(_data["productAreas"])) {
|
|
2122
|
-
this.productAreas = [];
|
|
2123
|
-
for (let item of _data["productAreas"])this.productAreas.push(FilterOption.fromJS(item));
|
|
2124
|
-
}
|
|
2125
|
-
if (Array.isArray(_data["sources"])) {
|
|
2126
|
-
this.sources = [];
|
|
2127
|
-
for (let item of _data["sources"])this.sources.push(FilterOption.fromJS(item));
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
static fromJS(data) {
|
|
2132
|
-
data = typeof data === 'object' ? data : {};
|
|
2133
|
-
let result = new FilterOptions();
|
|
2134
|
-
result.init(data);
|
|
2135
|
-
return result;
|
|
2136
|
-
}
|
|
2137
|
-
toJSON(data) {
|
|
2138
|
-
data = typeof data === 'object' ? data : {};
|
|
2139
|
-
if (Array.isArray(this.contentTypes)) {
|
|
2140
|
-
data["contentTypes"] = [];
|
|
2141
|
-
for (let item of this.contentTypes)data["contentTypes"].push(item.toJSON());
|
|
2142
|
-
}
|
|
2143
|
-
if (Array.isArray(this.productAreas)) {
|
|
2144
|
-
data["productAreas"] = [];
|
|
2145
|
-
for (let item of this.productAreas)data["productAreas"].push(item.toJSON());
|
|
2146
|
-
}
|
|
2147
|
-
if (Array.isArray(this.sources)) {
|
|
2148
|
-
data["sources"] = [];
|
|
2149
|
-
for (let item of this.sources)data["sources"].push(item.toJSON());
|
|
2150
|
-
}
|
|
2151
|
-
return data;
|
|
2152
|
-
}
|
|
2153
|
-
constructor(data){
|
|
2154
|
-
_define_property(this, "contentTypes", void 0);
|
|
2155
|
-
_define_property(this, "productAreas", void 0);
|
|
2156
|
-
_define_property(this, "sources", void 0);
|
|
2157
|
-
if (data) {
|
|
2158
|
-
for(var property in data){
|
|
2159
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2160
|
-
}
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
}
|
|
2164
|
-
export class FilterOption {
|
|
2165
|
-
init(_data) {
|
|
2166
|
-
if (_data) {
|
|
2167
|
-
this.id = _data["id"];
|
|
2168
|
-
this.displayName = _data["displayName"];
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
static fromJS(data) {
|
|
2172
|
-
data = typeof data === 'object' ? data : {};
|
|
2173
|
-
let result = new FilterOption();
|
|
2174
|
-
result.init(data);
|
|
2175
|
-
return result;
|
|
2176
|
-
}
|
|
2177
|
-
toJSON(data) {
|
|
2178
|
-
data = typeof data === 'object' ? data : {};
|
|
2179
|
-
data["id"] = this.id;
|
|
2180
|
-
data["displayName"] = this.displayName;
|
|
2181
|
-
return data;
|
|
2182
|
-
}
|
|
2183
|
-
constructor(data){
|
|
2184
|
-
_define_property(this, "id", void 0);
|
|
2185
|
-
_define_property(this, "displayName", void 0);
|
|
2186
|
-
if (data) {
|
|
2187
|
-
for(var property in data){
|
|
2188
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2189
|
-
}
|
|
2190
|
-
}
|
|
2191
|
-
}
|
|
2192
|
-
}
|
|
2193
|
-
export class Message {
|
|
2194
|
-
init(_data) {
|
|
2195
|
-
if (_data) {
|
|
2196
|
-
this.id = _data["id"];
|
|
2197
|
-
this.sessionId = _data["sessionId"];
|
|
2198
|
-
this.timestampUtc = _data["timestampUtc"] ? new Date(_data["timestampUtc"].toString()) : undefined;
|
|
2199
|
-
this.text = _data["text"];
|
|
2200
|
-
}
|
|
2201
|
-
}
|
|
2202
|
-
static fromJS(data) {
|
|
2203
|
-
data = typeof data === 'object' ? data : {};
|
|
2204
|
-
throw new Error("The abstract class 'Message' cannot be instantiated.");
|
|
2205
|
-
}
|
|
2206
|
-
toJSON(data) {
|
|
2207
|
-
data = typeof data === 'object' ? data : {};
|
|
2208
|
-
data["id"] = this.id;
|
|
2209
|
-
data["sessionId"] = this.sessionId;
|
|
2210
|
-
data["timestampUtc"] = this.timestampUtc ? this.timestampUtc.toISOString() : undefined;
|
|
2211
|
-
data["text"] = this.text;
|
|
2212
|
-
return data;
|
|
2213
|
-
}
|
|
2214
|
-
constructor(data){
|
|
2215
|
-
_define_property(this, "id", void 0);
|
|
2216
|
-
_define_property(this, "sessionId", void 0);
|
|
2217
|
-
_define_property(this, "timestampUtc", void 0);
|
|
2218
|
-
_define_property(this, "text", void 0);
|
|
2219
|
-
if (data) {
|
|
2220
|
-
for(var property in data){
|
|
2221
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2222
|
-
}
|
|
2223
|
-
}
|
|
2224
|
-
}
|
|
2225
|
-
}
|
|
2226
|
-
export class BotMessage extends Message {
|
|
2227
|
-
init(_data) {
|
|
2228
|
-
super.init(_data);
|
|
2229
|
-
if (_data) {
|
|
2230
|
-
this.error = _data["error"];
|
|
2231
|
-
this.isTransientError = _data["isTransientError"];
|
|
2232
|
-
this.retryAfter = _data["retryAfter"];
|
|
2233
|
-
this.guardFlag = _data["guardFlag"];
|
|
2234
|
-
this.isGuardrailed = _data["isGuardrailed"];
|
|
2235
|
-
if (Array.isArray(_data["scoredUrls"])) {
|
|
2236
|
-
this.scoredUrls = [];
|
|
2237
|
-
for (let item of _data["scoredUrls"])this.scoredUrls.push(ScoredUrl.fromJS(item));
|
|
2238
|
-
}
|
|
2239
|
-
this.botVersion = _data["botVersion"];
|
|
2240
|
-
this.metadata = _data["metadata"];
|
|
2241
|
-
this.userMessageId = _data["userMessageId"];
|
|
2242
|
-
}
|
|
2243
|
-
}
|
|
2244
|
-
static fromJS(data) {
|
|
2245
|
-
data = typeof data === 'object' ? data : {};
|
|
2246
|
-
let result = new BotMessage();
|
|
2247
|
-
result.init(data);
|
|
2248
|
-
return result;
|
|
2249
|
-
}
|
|
2250
|
-
toJSON(data) {
|
|
2251
|
-
data = typeof data === 'object' ? data : {};
|
|
2252
|
-
data["error"] = this.error;
|
|
2253
|
-
data["isTransientError"] = this.isTransientError;
|
|
2254
|
-
data["retryAfter"] = this.retryAfter;
|
|
2255
|
-
data["guardFlag"] = this.guardFlag;
|
|
2256
|
-
data["isGuardrailed"] = this.isGuardrailed;
|
|
2257
|
-
if (Array.isArray(this.scoredUrls)) {
|
|
2258
|
-
data["scoredUrls"] = [];
|
|
2259
|
-
for (let item of this.scoredUrls)data["scoredUrls"].push(item.toJSON());
|
|
2260
|
-
}
|
|
2261
|
-
data["botVersion"] = this.botVersion;
|
|
2262
|
-
data["metadata"] = this.metadata;
|
|
2263
|
-
data["userMessageId"] = this.userMessageId;
|
|
2264
|
-
super.toJSON(data);
|
|
2265
|
-
return data;
|
|
2266
|
-
}
|
|
2267
|
-
constructor(data){
|
|
2268
|
-
super(data), _define_property(this, "error", void 0), _define_property(this, "isTransientError", void 0), _define_property(this, "retryAfter", void 0), _define_property(this, "guardFlag", void 0), _define_property(this, "isGuardrailed", void 0), _define_property(this, "scoredUrls", void 0), _define_property(this, "botVersion", void 0), _define_property(this, "metadata", void 0), _define_property(this, "userMessageId", void 0);
|
|
2269
|
-
}
|
|
2270
|
-
}
|
|
2271
|
-
export class ScoredUrl {
|
|
2272
|
-
init(_data) {
|
|
2273
|
-
if (_data) {
|
|
2274
|
-
this.url = _data["url"];
|
|
2275
|
-
this.score = _data["score"];
|
|
2276
|
-
this.title = _data["title"];
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
static fromJS(data) {
|
|
2280
|
-
data = typeof data === 'object' ? data : {};
|
|
2281
|
-
let result = new ScoredUrl();
|
|
2282
|
-
result.init(data);
|
|
2283
|
-
return result;
|
|
2284
|
-
}
|
|
2285
|
-
toJSON(data) {
|
|
2286
|
-
data = typeof data === 'object' ? data : {};
|
|
2287
|
-
data["url"] = this.url;
|
|
2288
|
-
data["score"] = this.score;
|
|
2289
|
-
data["title"] = this.title;
|
|
2290
|
-
return data;
|
|
2291
|
-
}
|
|
2292
|
-
constructor(data){
|
|
2293
|
-
_define_property(this, "url", void 0);
|
|
2294
|
-
_define_property(this, "score", void 0);
|
|
2295
|
-
_define_property(this, "title", void 0);
|
|
2296
|
-
if (data) {
|
|
2297
|
-
for(var property in data){
|
|
2298
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2299
|
-
}
|
|
2300
|
-
}
|
|
2301
|
-
}
|
|
2302
|
-
}
|
|
2303
|
-
export class UserMessage extends Message {
|
|
2304
|
-
init(_data) {
|
|
2305
|
-
super.init(_data);
|
|
2306
|
-
if (_data) {
|
|
2307
|
-
if (_data["requestParams"]) {
|
|
2308
|
-
this.requestParams = {};
|
|
2309
|
-
for(let key in _data["requestParams"]){
|
|
2310
|
-
if (_data["requestParams"].hasOwnProperty(key)) this.requestParams[key] = _data["requestParams"][key];
|
|
2311
|
-
}
|
|
2312
|
-
}
|
|
2313
|
-
this.source = _data["source"] ? MessageSource.fromJS(_data["source"]) : undefined;
|
|
2314
|
-
this.isControlGroup = _data["isControlGroup"];
|
|
2315
|
-
this.filters = _data["filters"] ? FilterSelections.fromJS(_data["filters"]) : undefined;
|
|
2316
|
-
this.includeHistory = _data["includeHistory"];
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
static fromJS(data) {
|
|
2320
|
-
data = typeof data === 'object' ? data : {};
|
|
2321
|
-
let result = new UserMessage();
|
|
2322
|
-
result.init(data);
|
|
2323
|
-
return result;
|
|
2324
|
-
}
|
|
2325
|
-
toJSON(data) {
|
|
2326
|
-
data = typeof data === 'object' ? data : {};
|
|
2327
|
-
if (this.requestParams) {
|
|
2328
|
-
data["requestParams"] = {};
|
|
2329
|
-
for(let key in this.requestParams){
|
|
2330
|
-
if (this.requestParams.hasOwnProperty(key)) data["requestParams"][key] = this.requestParams[key];
|
|
2331
|
-
}
|
|
2332
|
-
}
|
|
2333
|
-
data["source"] = this.source ? this.source.toJSON() : undefined;
|
|
2334
|
-
data["isControlGroup"] = this.isControlGroup;
|
|
2335
|
-
data["filters"] = this.filters ? this.filters.toJSON() : undefined;
|
|
2336
|
-
data["includeHistory"] = this.includeHistory;
|
|
2337
|
-
super.toJSON(data);
|
|
2338
|
-
return data;
|
|
2339
|
-
}
|
|
2340
|
-
constructor(data){
|
|
2341
|
-
super(data), _define_property(this, "requestParams", void 0), _define_property(this, "source", void 0), _define_property(this, "isControlGroup", void 0), _define_property(this, "filters", void 0), _define_property(this, "includeHistory", void 0);
|
|
2342
|
-
}
|
|
2343
|
-
}
|
|
2344
|
-
export class MessageSource {
|
|
2345
|
-
init(_data) {
|
|
2346
|
-
if (_data) {
|
|
2347
|
-
this.area = _data["area"];
|
|
2348
|
-
}
|
|
2349
|
-
}
|
|
2350
|
-
static fromJS(data) {
|
|
2351
|
-
data = typeof data === 'object' ? data : {};
|
|
2352
|
-
let result = new MessageSource();
|
|
2353
|
-
result.init(data);
|
|
2354
|
-
return result;
|
|
2355
|
-
}
|
|
2356
|
-
toJSON(data) {
|
|
2357
|
-
data = typeof data === 'object' ? data : {};
|
|
2358
|
-
data["area"] = this.area;
|
|
2359
|
-
return data;
|
|
2360
|
-
}
|
|
2361
|
-
constructor(data){
|
|
2362
|
-
_define_property(this, "area", void 0);
|
|
2363
|
-
if (data) {
|
|
2364
|
-
for(var property in data){
|
|
2365
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
export class FilterSelections {
|
|
2371
|
-
init(_data) {
|
|
2372
|
-
if (_data) {
|
|
2373
|
-
if (Array.isArray(_data["contentTypes"])) {
|
|
2374
|
-
this.contentTypes = [];
|
|
2375
|
-
for (let item of _data["contentTypes"])this.contentTypes.push(item);
|
|
2376
|
-
}
|
|
2377
|
-
if (Array.isArray(_data["productAreas"])) {
|
|
2378
|
-
this.productAreas = [];
|
|
2379
|
-
for (let item of _data["productAreas"])this.productAreas.push(item);
|
|
2380
|
-
}
|
|
2381
|
-
if (Array.isArray(_data["sources"])) {
|
|
2382
|
-
this.sources = [];
|
|
2383
|
-
for (let item of _data["sources"])this.sources.push(item);
|
|
2384
|
-
}
|
|
2385
|
-
}
|
|
2386
|
-
}
|
|
2387
|
-
static fromJS(data) {
|
|
2388
|
-
data = typeof data === 'object' ? data : {};
|
|
2389
|
-
let result = new FilterSelections();
|
|
2390
|
-
result.init(data);
|
|
2391
|
-
return result;
|
|
2392
|
-
}
|
|
2393
|
-
toJSON(data) {
|
|
2394
|
-
data = typeof data === 'object' ? data : {};
|
|
2395
|
-
if (Array.isArray(this.contentTypes)) {
|
|
2396
|
-
data["contentTypes"] = [];
|
|
2397
|
-
for (let item of this.contentTypes)data["contentTypes"].push(item);
|
|
2398
|
-
}
|
|
2399
|
-
if (Array.isArray(this.productAreas)) {
|
|
2400
|
-
data["productAreas"] = [];
|
|
2401
|
-
for (let item of this.productAreas)data["productAreas"].push(item);
|
|
2402
|
-
}
|
|
2403
|
-
if (Array.isArray(this.sources)) {
|
|
2404
|
-
data["sources"] = [];
|
|
2405
|
-
for (let item of this.sources)data["sources"].push(item);
|
|
2406
|
-
}
|
|
2407
|
-
return data;
|
|
2408
|
-
}
|
|
2409
|
-
constructor(data){
|
|
2410
|
-
_define_property(this, "contentTypes", void 0);
|
|
2411
|
-
_define_property(this, "productAreas", void 0);
|
|
2412
|
-
_define_property(this, "sources", void 0);
|
|
2413
|
-
if (data) {
|
|
2414
|
-
for(var property in data){
|
|
2415
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
}
|
|
2419
|
-
}
|
|
2420
|
-
export class MessageFeedback {
|
|
2421
|
-
init(_data) {
|
|
2422
|
-
if (_data) {
|
|
2423
|
-
this.linkUrl = _data["linkUrl"];
|
|
2424
|
-
this.description = _data["description"];
|
|
2425
|
-
if (Array.isArray(_data["options"])) {
|
|
2426
|
-
this.options = [];
|
|
2427
|
-
for (let item of _data["options"])this.options.push(item);
|
|
2428
|
-
}
|
|
2429
|
-
this.rating = _data["rating"];
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
static fromJS(data) {
|
|
2433
|
-
data = typeof data === 'object' ? data : {};
|
|
2434
|
-
let result = new MessageFeedback();
|
|
2435
|
-
result.init(data);
|
|
2436
|
-
return result;
|
|
2437
|
-
}
|
|
2438
|
-
toJSON(data) {
|
|
2439
|
-
data = typeof data === 'object' ? data : {};
|
|
2440
|
-
data["linkUrl"] = this.linkUrl;
|
|
2441
|
-
data["description"] = this.description;
|
|
2442
|
-
if (Array.isArray(this.options)) {
|
|
2443
|
-
data["options"] = [];
|
|
2444
|
-
for (let item of this.options)data["options"].push(item);
|
|
2445
|
-
}
|
|
2446
|
-
data["rating"] = this.rating;
|
|
2447
|
-
return data;
|
|
2448
|
-
}
|
|
2449
|
-
constructor(data){
|
|
2450
|
-
_define_property(this, "linkUrl", void 0);
|
|
2451
|
-
_define_property(this, "description", void 0);
|
|
2452
|
-
_define_property(this, "options", void 0);
|
|
2453
|
-
_define_property(this, "rating", void 0);
|
|
2454
|
-
if (data) {
|
|
2455
|
-
for(var property in data){
|
|
2456
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2457
|
-
}
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
export var FeedbackOptions = /*#__PURE__*/ function(FeedbackOptions) {
|
|
2462
|
-
FeedbackOptions[FeedbackOptions["Other"] = 1] = "Other";
|
|
2463
|
-
FeedbackOptions[FeedbackOptions["Unrelated"] = 2] = "Unrelated";
|
|
2464
|
-
FeedbackOptions[FeedbackOptions["Unclear"] = 4] = "Unclear";
|
|
2465
|
-
FeedbackOptions[FeedbackOptions["Incomplete"] = 8] = "Incomplete";
|
|
2466
|
-
FeedbackOptions[FeedbackOptions["Incorrect"] = 16] = "Incorrect";
|
|
2467
|
-
return FeedbackOptions;
|
|
2468
|
-
}({});
|
|
2469
|
-
export var MessageFeedbackRatings = /*#__PURE__*/ function(MessageFeedbackRatings) {
|
|
2470
|
-
MessageFeedbackRatings[MessageFeedbackRatings["ThumbsDown"] = 0] = "ThumbsDown";
|
|
2471
|
-
MessageFeedbackRatings[MessageFeedbackRatings["ThumbsUp"] = 1] = "ThumbsUp";
|
|
2472
|
-
MessageFeedbackRatings[MessageFeedbackRatings["GuardrailFeedback"] = 2] = "GuardrailFeedback";
|
|
2473
|
-
return MessageFeedbackRatings;
|
|
2474
|
-
}({});
|
|
2475
|
-
export class SessionFeedback {
|
|
2476
|
-
init(_data) {
|
|
2477
|
-
if (_data) {
|
|
2478
|
-
this.description = _data["description"];
|
|
2479
|
-
this.rating = _data["rating"];
|
|
2480
|
-
}
|
|
2481
|
-
}
|
|
2482
|
-
static fromJS(data) {
|
|
2483
|
-
data = typeof data === 'object' ? data : {};
|
|
2484
|
-
let result = new SessionFeedback();
|
|
2485
|
-
result.init(data);
|
|
2486
|
-
return result;
|
|
2487
|
-
}
|
|
2488
|
-
toJSON(data) {
|
|
2489
|
-
data = typeof data === 'object' ? data : {};
|
|
2490
|
-
data["description"] = this.description;
|
|
2491
|
-
data["rating"] = this.rating;
|
|
2492
|
-
return data;
|
|
2493
|
-
}
|
|
2494
|
-
constructor(data){
|
|
2495
|
-
_define_property(this, "description", void 0);
|
|
2496
|
-
_define_property(this, "rating", void 0);
|
|
2497
|
-
if (data) {
|
|
2498
|
-
for(var property in data){
|
|
2499
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2500
|
-
}
|
|
2501
|
-
}
|
|
2502
|
-
}
|
|
2503
|
-
}
|
|
2504
|
-
export var SessionFeedbackRatings = /*#__PURE__*/ function(SessionFeedbackRatings) {
|
|
2505
|
-
SessionFeedbackRatings[SessionFeedbackRatings["ThumbsDown"] = 0] = "ThumbsDown";
|
|
2506
|
-
SessionFeedbackRatings[SessionFeedbackRatings["ThumbsUp"] = 1] = "ThumbsUp";
|
|
2507
|
-
return SessionFeedbackRatings;
|
|
2508
|
-
}({});
|
|
2509
|
-
export class ChatbotSession {
|
|
2510
|
-
init(_data) {
|
|
2511
|
-
if (_data) {
|
|
2512
|
-
this.id = _data["id"];
|
|
2513
|
-
this.createdUtc = _data["createdUtc"] ? new Date(_data["createdUtc"].toString()) : undefined;
|
|
2514
|
-
this.closedUtc = _data["closedUtc"] ? new Date(_data["closedUtc"].toString()) : undefined;
|
|
2515
|
-
this.botId = _data["botId"];
|
|
2516
|
-
this.source = _data["source"] ? SessionSource.fromJS(_data["source"]) : undefined;
|
|
2517
|
-
}
|
|
2518
|
-
}
|
|
2519
|
-
static fromJS(data) {
|
|
2520
|
-
data = typeof data === 'object' ? data : {};
|
|
2521
|
-
let result = new ChatbotSession();
|
|
2522
|
-
result.init(data);
|
|
2523
|
-
return result;
|
|
2524
|
-
}
|
|
2525
|
-
toJSON(data) {
|
|
2526
|
-
data = typeof data === 'object' ? data : {};
|
|
2527
|
-
data["id"] = this.id;
|
|
2528
|
-
data["createdUtc"] = this.createdUtc ? this.createdUtc.toISOString() : undefined;
|
|
2529
|
-
data["closedUtc"] = this.closedUtc ? this.closedUtc.toISOString() : undefined;
|
|
2530
|
-
data["botId"] = this.botId;
|
|
2531
|
-
data["source"] = this.source ? this.source.toJSON() : undefined;
|
|
2532
|
-
return data;
|
|
2533
|
-
}
|
|
2534
|
-
constructor(data){
|
|
2535
|
-
_define_property(this, "id", void 0);
|
|
2536
|
-
_define_property(this, "createdUtc", void 0);
|
|
2537
|
-
_define_property(this, "closedUtc", void 0);
|
|
2538
|
-
_define_property(this, "botId", void 0);
|
|
2539
|
-
_define_property(this, "source", void 0);
|
|
2540
|
-
if (data) {
|
|
2541
|
-
for(var property in data){
|
|
2542
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2543
|
-
}
|
|
2544
|
-
}
|
|
2545
|
-
}
|
|
2546
|
-
}
|
|
2547
|
-
export class SessionSource {
|
|
2548
|
-
init(_data) {
|
|
2549
|
-
if (_data) {
|
|
2550
|
-
this.instance = _data["instance"];
|
|
2551
|
-
this.category = _data["category"];
|
|
2552
|
-
this.subCategory = _data["subCategory"];
|
|
2553
|
-
this.fullstorySessionId = _data["fullstorySessionId"];
|
|
2554
|
-
}
|
|
2555
|
-
}
|
|
2556
|
-
static fromJS(data) {
|
|
2557
|
-
data = typeof data === 'object' ? data : {};
|
|
2558
|
-
let result = new SessionSource();
|
|
2559
|
-
result.init(data);
|
|
2560
|
-
return result;
|
|
2561
|
-
}
|
|
2562
|
-
toJSON(data) {
|
|
2563
|
-
data = typeof data === 'object' ? data : {};
|
|
2564
|
-
data["instance"] = this.instance;
|
|
2565
|
-
data["category"] = this.category;
|
|
2566
|
-
data["subCategory"] = this.subCategory;
|
|
2567
|
-
data["fullstorySessionId"] = this.fullstorySessionId;
|
|
2568
|
-
return data;
|
|
2569
|
-
}
|
|
2570
|
-
constructor(data){
|
|
2571
|
-
_define_property(this, "instance", void 0);
|
|
2572
|
-
_define_property(this, "category", void 0);
|
|
2573
|
-
_define_property(this, "subCategory", void 0);
|
|
2574
|
-
_define_property(this, "fullstorySessionId", void 0);
|
|
2575
|
-
if (data) {
|
|
2576
|
-
for(var property in data){
|
|
2577
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2578
|
-
}
|
|
2579
|
-
}
|
|
2580
|
-
}
|
|
2581
|
-
}
|
|
2582
|
-
export class WidgetConfiguration {
|
|
2583
|
-
init(_data) {
|
|
2584
|
-
if (_data) {
|
|
2585
|
-
this.analytics = _data["analytics"] ? AnalyticsSettings.fromJS(_data["analytics"]) : new AnalyticsSettings();
|
|
2586
|
-
this.chatbotConfiguration = _data["chatbotConfiguration"] ? ChatbotConfiguration.fromJS(_data["chatbotConfiguration"]) : new ChatbotConfiguration();
|
|
2587
|
-
this.chatbotVersion = _data["chatbotVersion"];
|
|
2588
|
-
this.contentful = _data["contentful"] ? ContentfulSettings.fromJS(_data["contentful"]) : new ContentfulSettings();
|
|
2589
|
-
this.featureFlags = _data["featureFlags"] ? FeatureFlags.fromJS(_data["featureFlags"]) : new FeatureFlags();
|
|
2590
|
-
this.environment = _data["environment"];
|
|
2591
|
-
this.freshdeskToken = _data["freshdeskToken"];
|
|
2592
|
-
this.salesforce = _data["salesforce"] ? SalesforceSettings.fromJS(_data["salesforce"]) : new SalesforceSettings();
|
|
2593
|
-
this.search = _data["search"] ? SearchSettings.fromJS(_data["search"]) : new SearchSettings();
|
|
2594
|
-
this.supportFlow = _data["supportFlow"] ? SupportFlowSettings.fromJS(_data["supportFlow"]) : new SupportFlowSettings();
|
|
2595
|
-
this.tenantState = _data["tenantState"];
|
|
2596
|
-
}
|
|
2597
|
-
}
|
|
2598
|
-
static fromJS(data) {
|
|
2599
|
-
data = typeof data === 'object' ? data : {};
|
|
2600
|
-
let result = new WidgetConfiguration();
|
|
2601
|
-
result.init(data);
|
|
2602
|
-
return result;
|
|
2603
|
-
}
|
|
2604
|
-
toJSON(data) {
|
|
2605
|
-
data = typeof data === 'object' ? data : {};
|
|
2606
|
-
data["analytics"] = this.analytics ? this.analytics.toJSON() : undefined;
|
|
2607
|
-
data["chatbotConfiguration"] = this.chatbotConfiguration ? this.chatbotConfiguration.toJSON() : undefined;
|
|
2608
|
-
data["chatbotVersion"] = this.chatbotVersion;
|
|
2609
|
-
data["contentful"] = this.contentful ? this.contentful.toJSON() : undefined;
|
|
2610
|
-
data["featureFlags"] = this.featureFlags ? this.featureFlags.toJSON() : undefined;
|
|
2611
|
-
data["environment"] = this.environment;
|
|
2612
|
-
data["freshdeskToken"] = this.freshdeskToken;
|
|
2613
|
-
data["salesforce"] = this.salesforce ? this.salesforce.toJSON() : undefined;
|
|
2614
|
-
data["search"] = this.search ? this.search.toJSON() : undefined;
|
|
2615
|
-
data["supportFlow"] = this.supportFlow ? this.supportFlow.toJSON() : undefined;
|
|
2616
|
-
data["tenantState"] = this.tenantState;
|
|
2617
|
-
return data;
|
|
2618
|
-
}
|
|
2619
|
-
constructor(data){
|
|
2620
|
-
_define_property(this, "analytics", void 0);
|
|
2621
|
-
_define_property(this, "chatbotConfiguration", void 0);
|
|
2622
|
-
_define_property(this, "chatbotVersion", void 0);
|
|
2623
|
-
_define_property(this, "contentful", void 0);
|
|
2624
|
-
_define_property(this, "featureFlags", void 0);
|
|
2625
|
-
_define_property(this, "environment", void 0);
|
|
2626
|
-
_define_property(this, "freshdeskToken", void 0);
|
|
2627
|
-
_define_property(this, "salesforce", void 0);
|
|
2628
|
-
_define_property(this, "search", void 0);
|
|
2629
|
-
_define_property(this, "supportFlow", void 0);
|
|
2630
|
-
_define_property(this, "tenantState", void 0);
|
|
2631
|
-
if (data) {
|
|
2632
|
-
for(var property in data){
|
|
2633
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2634
|
-
}
|
|
2635
|
-
}
|
|
2636
|
-
if (!data) {
|
|
2637
|
-
this.analytics = new AnalyticsSettings();
|
|
2638
|
-
this.chatbotConfiguration = new ChatbotConfiguration();
|
|
2639
|
-
this.contentful = new ContentfulSettings();
|
|
2640
|
-
this.featureFlags = new FeatureFlags();
|
|
2641
|
-
this.salesforce = new SalesforceSettings();
|
|
2642
|
-
this.search = new SearchSettings();
|
|
2643
|
-
this.supportFlow = new SupportFlowSettings();
|
|
2644
|
-
}
|
|
2645
|
-
}
|
|
2646
|
-
}
|
|
2647
|
-
export class AnalyticsSettings {
|
|
2648
|
-
init(_data) {
|
|
2649
|
-
if (_data) {
|
|
2650
|
-
this.gtag = _data["gtag"] ? GtagSettings.fromJS(_data["gtag"]) : new GtagSettings();
|
|
2651
|
-
}
|
|
2652
|
-
}
|
|
2653
|
-
static fromJS(data) {
|
|
2654
|
-
data = typeof data === 'object' ? data : {};
|
|
2655
|
-
let result = new AnalyticsSettings();
|
|
2656
|
-
result.init(data);
|
|
2657
|
-
return result;
|
|
2658
|
-
}
|
|
2659
|
-
toJSON(data) {
|
|
2660
|
-
data = typeof data === 'object' ? data : {};
|
|
2661
|
-
data["gtag"] = this.gtag ? this.gtag.toJSON() : undefined;
|
|
2662
|
-
return data;
|
|
2663
|
-
}
|
|
2664
|
-
constructor(data){
|
|
2665
|
-
_define_property(this, "gtag", void 0);
|
|
2666
|
-
if (data) {
|
|
2667
|
-
for(var property in data){
|
|
2668
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2669
|
-
}
|
|
2670
|
-
}
|
|
2671
|
-
if (!data) {
|
|
2672
|
-
this.gtag = new GtagSettings();
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
}
|
|
2676
|
-
export class GtagSettings {
|
|
2677
|
-
init(_data) {
|
|
2678
|
-
if (_data) {
|
|
2679
|
-
this.contentGroup = _data["contentGroup"];
|
|
2680
|
-
this.referrer = _data["referrer"];
|
|
2681
|
-
}
|
|
2682
|
-
}
|
|
2683
|
-
static fromJS(data) {
|
|
2684
|
-
data = typeof data === 'object' ? data : {};
|
|
2685
|
-
let result = new GtagSettings();
|
|
2686
|
-
result.init(data);
|
|
2687
|
-
return result;
|
|
2688
|
-
}
|
|
2689
|
-
toJSON(data) {
|
|
2690
|
-
data = typeof data === 'object' ? data : {};
|
|
2691
|
-
data["contentGroup"] = this.contentGroup;
|
|
2692
|
-
data["referrer"] = this.referrer;
|
|
2693
|
-
return data;
|
|
2694
|
-
}
|
|
2695
|
-
constructor(data){
|
|
2696
|
-
_define_property(this, "contentGroup", void 0);
|
|
2697
|
-
_define_property(this, "referrer", void 0);
|
|
2698
|
-
if (data) {
|
|
2699
|
-
for(var property in data){
|
|
2700
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2701
|
-
}
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
}
|
|
2705
|
-
export class ChatbotConfiguration {
|
|
2706
|
-
init(_data) {
|
|
2707
|
-
if (_data) {
|
|
2708
|
-
this.area = _data["area"];
|
|
2709
|
-
}
|
|
2710
|
-
}
|
|
2711
|
-
static fromJS(data) {
|
|
2712
|
-
data = typeof data === 'object' ? data : {};
|
|
2713
|
-
let result = new ChatbotConfiguration();
|
|
2714
|
-
result.init(data);
|
|
2715
|
-
return result;
|
|
2716
|
-
}
|
|
2717
|
-
toJSON(data) {
|
|
2718
|
-
data = typeof data === 'object' ? data : {};
|
|
2719
|
-
data["area"] = this.area;
|
|
2720
|
-
return data;
|
|
2721
|
-
}
|
|
2722
|
-
constructor(data){
|
|
2723
|
-
_define_property(this, "area", void 0);
|
|
2724
|
-
if (data) {
|
|
2725
|
-
for(var property in data){
|
|
2726
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
|
-
}
|
|
2730
|
-
}
|
|
2731
|
-
export var ChatbotEnabledArea = /*#__PURE__*/ function(ChatbotEnabledArea) {
|
|
2732
|
-
ChatbotEnabledArea["None"] = "None";
|
|
2733
|
-
ChatbotEnabledArea["SupportFlow"] = "SupportFlow";
|
|
2734
|
-
return ChatbotEnabledArea;
|
|
2735
|
-
}({});
|
|
2736
|
-
export var ChatbotVersion = /*#__PURE__*/ function(ChatbotVersion) {
|
|
2737
|
-
ChatbotVersion[ChatbotVersion["None"] = 0] = "None";
|
|
2738
|
-
ChatbotVersion[ChatbotVersion["Inbenta"] = 1] = "Inbenta";
|
|
2739
|
-
ChatbotVersion[ChatbotVersion["GptV1"] = 2] = "GptV1";
|
|
2740
|
-
return ChatbotVersion;
|
|
2741
|
-
}({});
|
|
2742
|
-
export class ContentfulSettings {
|
|
2743
|
-
init(_data) {
|
|
2744
|
-
if (_data) {
|
|
2745
|
-
this.space = _data["space"];
|
|
2746
|
-
this.accessToken = _data["accessToken"];
|
|
2747
|
-
this.environment = _data["environment"];
|
|
2748
|
-
this.host = _data["host"];
|
|
2749
|
-
}
|
|
2750
|
-
}
|
|
2751
|
-
static fromJS(data) {
|
|
2752
|
-
data = typeof data === 'object' ? data : {};
|
|
2753
|
-
let result = new ContentfulSettings();
|
|
2754
|
-
result.init(data);
|
|
2755
|
-
return result;
|
|
2756
|
-
}
|
|
2757
|
-
toJSON(data) {
|
|
2758
|
-
data = typeof data === 'object' ? data : {};
|
|
2759
|
-
data["space"] = this.space;
|
|
2760
|
-
data["accessToken"] = this.accessToken;
|
|
2761
|
-
data["environment"] = this.environment;
|
|
2762
|
-
data["host"] = this.host;
|
|
2763
|
-
return data;
|
|
2764
|
-
}
|
|
2765
|
-
constructor(data){
|
|
2766
|
-
_define_property(this, "space", void 0);
|
|
2767
|
-
_define_property(this, "accessToken", void 0);
|
|
2768
|
-
_define_property(this, "environment", void 0);
|
|
2769
|
-
_define_property(this, "host", void 0);
|
|
2770
|
-
if (data) {
|
|
2771
|
-
for(var property in data){
|
|
2772
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2773
|
-
}
|
|
2774
|
-
}
|
|
2775
|
-
}
|
|
2776
|
-
}
|
|
2777
|
-
export class FeatureFlags {
|
|
2778
|
-
init(_data) {
|
|
2779
|
-
if (_data) {
|
|
2780
|
-
this.enableQuickAnswerModernDesign = _data["enableQuickAnswerModernDesign"];
|
|
2781
|
-
this.quickAnswerConfiguration = _data["quickAnswerConfiguration"] ? QuickAnswerConfiguration.fromJS(_data["quickAnswerConfiguration"]) : new QuickAnswerConfiguration();
|
|
2782
|
-
this.enablePreSupportChatbot = _data["enablePreSupportChatbot"];
|
|
2783
|
-
this.impersonationControlPhase2 = _data["impersonationControlPhase2"];
|
|
2784
|
-
this.newExcitingFeature = _data["newExcitingFeature"];
|
|
2785
|
-
this.askSupportButtonText = _data["askSupportButtonText"];
|
|
2786
|
-
this.showOnboardingMessage = _data["showOnboardingMessage"];
|
|
2787
|
-
this.enableCategoryDetection = _data["enableCategoryDetection"];
|
|
2788
|
-
this.showSupportChatTimeoutNotification = _data["showSupportChatTimeoutNotification"];
|
|
2789
|
-
}
|
|
2790
|
-
}
|
|
2791
|
-
static fromJS(data) {
|
|
2792
|
-
data = typeof data === 'object' ? data : {};
|
|
2793
|
-
let result = new FeatureFlags();
|
|
2794
|
-
result.init(data);
|
|
2795
|
-
return result;
|
|
2796
|
-
}
|
|
2797
|
-
toJSON(data) {
|
|
2798
|
-
data = typeof data === 'object' ? data : {};
|
|
2799
|
-
data["enableQuickAnswerModernDesign"] = this.enableQuickAnswerModernDesign;
|
|
2800
|
-
data["quickAnswerConfiguration"] = this.quickAnswerConfiguration ? this.quickAnswerConfiguration.toJSON() : undefined;
|
|
2801
|
-
data["enablePreSupportChatbot"] = this.enablePreSupportChatbot;
|
|
2802
|
-
data["impersonationControlPhase2"] = this.impersonationControlPhase2;
|
|
2803
|
-
data["newExcitingFeature"] = this.newExcitingFeature;
|
|
2804
|
-
data["askSupportButtonText"] = this.askSupportButtonText;
|
|
2805
|
-
data["showOnboardingMessage"] = this.showOnboardingMessage;
|
|
2806
|
-
data["enableCategoryDetection"] = this.enableCategoryDetection;
|
|
2807
|
-
data["showSupportChatTimeoutNotification"] = this.showSupportChatTimeoutNotification;
|
|
2808
|
-
return data;
|
|
2809
|
-
}
|
|
2810
|
-
constructor(data){
|
|
2811
|
-
_define_property(this, "enableQuickAnswerModernDesign", void 0);
|
|
2812
|
-
_define_property(this, "quickAnswerConfiguration", void 0);
|
|
2813
|
-
_define_property(this, "enablePreSupportChatbot", void 0);
|
|
2814
|
-
_define_property(this, "impersonationControlPhase2", void 0);
|
|
2815
|
-
_define_property(this, "newExcitingFeature", void 0);
|
|
2816
|
-
_define_property(this, "askSupportButtonText", void 0);
|
|
2817
|
-
_define_property(this, "showOnboardingMessage", void 0);
|
|
2818
|
-
_define_property(this, "enableCategoryDetection", void 0);
|
|
2819
|
-
_define_property(this, "showSupportChatTimeoutNotification", void 0);
|
|
2820
|
-
if (data) {
|
|
2821
|
-
for(var property in data){
|
|
2822
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2823
|
-
}
|
|
2824
|
-
}
|
|
2825
|
-
if (!data) {
|
|
2826
|
-
this.quickAnswerConfiguration = new QuickAnswerConfiguration();
|
|
2827
|
-
}
|
|
2828
|
-
}
|
|
2829
|
-
}
|
|
2830
|
-
export class QuickAnswerConfiguration {
|
|
2831
|
-
init(_data) {
|
|
2832
|
-
if (_data) {
|
|
2833
|
-
this.multiTurnEnabled = _data["multiTurnEnabled"];
|
|
2834
|
-
this.multiTurnButtonIcon = _data["multiTurnButtonIcon"];
|
|
2835
|
-
this.multiTurnButtonText = _data["multiTurnButtonText"];
|
|
2836
|
-
}
|
|
2837
|
-
}
|
|
2838
|
-
static fromJS(data) {
|
|
2839
|
-
data = typeof data === 'object' ? data : {};
|
|
2840
|
-
let result = new QuickAnswerConfiguration();
|
|
2841
|
-
result.init(data);
|
|
2842
|
-
return result;
|
|
2843
|
-
}
|
|
2844
|
-
toJSON(data) {
|
|
2845
|
-
data = typeof data === 'object' ? data : {};
|
|
2846
|
-
data["multiTurnEnabled"] = this.multiTurnEnabled;
|
|
2847
|
-
data["multiTurnButtonIcon"] = this.multiTurnButtonIcon;
|
|
2848
|
-
data["multiTurnButtonText"] = this.multiTurnButtonText;
|
|
2849
|
-
return data;
|
|
2850
|
-
}
|
|
2851
|
-
constructor(data){
|
|
2852
|
-
_define_property(this, "multiTurnEnabled", void 0);
|
|
2853
|
-
_define_property(this, "multiTurnButtonIcon", void 0);
|
|
2854
|
-
_define_property(this, "multiTurnButtonText", void 0);
|
|
2855
|
-
if (data) {
|
|
2856
|
-
for(var property in data){
|
|
2857
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
}
|
|
2861
|
-
}
|
|
2862
|
-
export var ServiceEnvironment = /*#__PURE__*/ function(ServiceEnvironment) {
|
|
2863
|
-
ServiceEnvironment[ServiceEnvironment["Undefined"] = 0] = "Undefined";
|
|
2864
|
-
ServiceEnvironment[ServiceEnvironment["Production"] = 1] = "Production";
|
|
2865
|
-
ServiceEnvironment[ServiceEnvironment["Practice"] = 2] = "Practice";
|
|
2866
|
-
ServiceEnvironment[ServiceEnvironment["Next"] = 3] = "Next";
|
|
2867
|
-
ServiceEnvironment[ServiceEnvironment["Stage"] = 4] = "Stage";
|
|
2868
|
-
ServiceEnvironment[ServiceEnvironment["Development"] = 5] = "Development";
|
|
2869
|
-
return ServiceEnvironment;
|
|
2870
|
-
}({});
|
|
2871
|
-
export class SalesforceSettings {
|
|
2872
|
-
init(_data) {
|
|
2873
|
-
if (_data) {
|
|
2874
|
-
this.orgId = _data["orgId"];
|
|
2875
|
-
this.chatButtonId = _data["chatButtonId"];
|
|
2876
|
-
this.chatDeploymentId = _data["chatDeploymentId"];
|
|
2877
|
-
this.chatDeploymentUri = _data["chatDeploymentUri"];
|
|
2878
|
-
this.chatUri = _data["chatUri"];
|
|
2879
|
-
this.chatProxyUri = _data["chatProxyUri"];
|
|
2880
|
-
this.chatEmbeddedUri = _data["chatEmbeddedUri"];
|
|
2881
|
-
}
|
|
2882
|
-
}
|
|
2883
|
-
static fromJS(data) {
|
|
2884
|
-
data = typeof data === 'object' ? data : {};
|
|
2885
|
-
let result = new SalesforceSettings();
|
|
2886
|
-
result.init(data);
|
|
2887
|
-
return result;
|
|
2888
|
-
}
|
|
2889
|
-
toJSON(data) {
|
|
2890
|
-
data = typeof data === 'object' ? data : {};
|
|
2891
|
-
data["orgId"] = this.orgId;
|
|
2892
|
-
data["chatButtonId"] = this.chatButtonId;
|
|
2893
|
-
data["chatDeploymentId"] = this.chatDeploymentId;
|
|
2894
|
-
data["chatDeploymentUri"] = this.chatDeploymentUri;
|
|
2895
|
-
data["chatUri"] = this.chatUri;
|
|
2896
|
-
data["chatProxyUri"] = this.chatProxyUri;
|
|
2897
|
-
data["chatEmbeddedUri"] = this.chatEmbeddedUri;
|
|
2898
|
-
return data;
|
|
2899
|
-
}
|
|
2900
|
-
constructor(data){
|
|
2901
|
-
_define_property(this, "orgId", void 0);
|
|
2902
|
-
_define_property(this, "chatButtonId", void 0);
|
|
2903
|
-
_define_property(this, "chatDeploymentId", void 0);
|
|
2904
|
-
_define_property(this, "chatDeploymentUri", void 0);
|
|
2905
|
-
_define_property(this, "chatUri", void 0);
|
|
2906
|
-
_define_property(this, "chatProxyUri", void 0);
|
|
2907
|
-
_define_property(this, "chatEmbeddedUri", void 0);
|
|
2908
|
-
if (data) {
|
|
2909
|
-
for(var property in data){
|
|
2910
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2911
|
-
}
|
|
2912
|
-
}
|
|
2913
|
-
}
|
|
2914
|
-
}
|
|
2915
|
-
export class SearchSettings {
|
|
2916
|
-
init(_data) {
|
|
2917
|
-
if (_data) {
|
|
2918
|
-
this.sessionSource = _data["sessionSource"];
|
|
2919
|
-
if (Array.isArray(_data["sources"])) {
|
|
2920
|
-
this.sources = [];
|
|
2921
|
-
for (let item of _data["sources"])this.sources.push(SearchSource.fromJS(item));
|
|
2922
|
-
}
|
|
2923
|
-
}
|
|
2924
|
-
}
|
|
2925
|
-
static fromJS(data) {
|
|
2926
|
-
data = typeof data === 'object' ? data : {};
|
|
2927
|
-
let result = new SearchSettings();
|
|
2928
|
-
result.init(data);
|
|
2929
|
-
return result;
|
|
2930
|
-
}
|
|
2931
|
-
toJSON(data) {
|
|
2932
|
-
data = typeof data === 'object' ? data : {};
|
|
2933
|
-
data["sessionSource"] = this.sessionSource;
|
|
2934
|
-
if (Array.isArray(this.sources)) {
|
|
2935
|
-
data["sources"] = [];
|
|
2936
|
-
for (let item of this.sources)data["sources"].push(item.toJSON());
|
|
2937
|
-
}
|
|
2938
|
-
return data;
|
|
2939
|
-
}
|
|
2940
|
-
constructor(data){
|
|
2941
|
-
_define_property(this, "sessionSource", void 0);
|
|
2942
|
-
_define_property(this, "sources", void 0);
|
|
2943
|
-
if (data) {
|
|
2944
|
-
for(var property in data){
|
|
2945
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2946
|
-
}
|
|
2947
|
-
}
|
|
2948
|
-
if (!data) {
|
|
2949
|
-
this.sources = [];
|
|
2950
|
-
}
|
|
2951
|
-
}
|
|
2952
|
-
}
|
|
2953
|
-
export class SearchSource {
|
|
2954
|
-
init(_data) {
|
|
2955
|
-
if (_data) {
|
|
2956
|
-
this.id = _data["id"];
|
|
2957
|
-
this.name = _data["name"];
|
|
2958
|
-
this.title = _data["title"];
|
|
2959
|
-
this.url = _data["url"];
|
|
2960
|
-
}
|
|
2961
|
-
}
|
|
2962
|
-
static fromJS(data) {
|
|
2963
|
-
data = typeof data === 'object' ? data : {};
|
|
2964
|
-
let result = new SearchSource();
|
|
2965
|
-
result.init(data);
|
|
2966
|
-
return result;
|
|
2967
|
-
}
|
|
2968
|
-
toJSON(data) {
|
|
2969
|
-
data = typeof data === 'object' ? data : {};
|
|
2970
|
-
data["id"] = this.id;
|
|
2971
|
-
data["name"] = this.name;
|
|
2972
|
-
data["title"] = this.title;
|
|
2973
|
-
data["url"] = this.url;
|
|
2974
|
-
return data;
|
|
2975
|
-
}
|
|
2976
|
-
constructor(data){
|
|
2977
|
-
_define_property(this, "id", void 0);
|
|
2978
|
-
_define_property(this, "name", void 0);
|
|
2979
|
-
_define_property(this, "title", void 0);
|
|
2980
|
-
_define_property(this, "url", void 0);
|
|
2981
|
-
if (data) {
|
|
2982
|
-
for(var property in data){
|
|
2983
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
2984
|
-
}
|
|
2985
|
-
}
|
|
2986
|
-
}
|
|
2987
|
-
}
|
|
2988
|
-
export class SupportFlowSettings {
|
|
2989
|
-
init(_data) {
|
|
2990
|
-
if (_data) {
|
|
2991
|
-
this.enableChatQueuePosition = _data["enableChatQueuePosition"];
|
|
2992
|
-
this.helpCenterPendoGuidesEnabled = _data["helpCenterPendoGuidesEnabled"];
|
|
2993
|
-
this.helpCenterFloatingChatEnabled = _data["helpCenterFloatingChatEnabled"];
|
|
2994
|
-
this.enableHelpCenterLiveAgentChatV2 = _data["enableHelpCenterLiveAgentChatV2"];
|
|
2995
|
-
this.enableVisualIvr = _data["enableVisualIvr"];
|
|
2996
|
-
this.showCompanyCases = _data["showCompanyCases"];
|
|
2997
|
-
this.isEnterpriseHub = _data["isEnterpriseHub"];
|
|
2998
|
-
this.showPersonalCases = _data["showPersonalCases"];
|
|
2999
|
-
this.supportFlowSoftTimeout = _data["supportFlowSoftTimeout"];
|
|
3000
|
-
this.supportFlowHardTimeout = _data["supportFlowHardTimeout"];
|
|
3001
|
-
this.impersonationConsentDurationHours = _data["impersonationConsentDurationHours"];
|
|
3002
|
-
this.contactField = _data["contactField"];
|
|
3003
|
-
this.contactId = _data["contactId"];
|
|
3004
|
-
this.supportFlowVersion = _data["supportFlowVersion"];
|
|
3005
|
-
this.supportType = _data["supportType"];
|
|
3006
|
-
this.supportWorkingHours = _data["supportWorkingHours"] ? SupportWorkingHours.fromJS(_data["supportWorkingHours"]) : new SupportWorkingHours();
|
|
3007
|
-
this.helpCenterChatbotQuickAnswer = _data["helpCenterChatbotQuickAnswer"] ? HelpCenterChatbotQuickAnswer.fromJS(_data["helpCenterChatbotQuickAnswer"]) : undefined;
|
|
3008
|
-
this.enableEmailComposer = _data["enableEmailComposer"];
|
|
3009
|
-
this.helpCenterSupportFlowStepOrder = _data["helpCenterSupportFlowStepOrder"];
|
|
3010
|
-
}
|
|
3011
|
-
}
|
|
3012
|
-
static fromJS(data) {
|
|
3013
|
-
data = typeof data === 'object' ? data : {};
|
|
3014
|
-
let result = new SupportFlowSettings();
|
|
3015
|
-
result.init(data);
|
|
3016
|
-
return result;
|
|
3017
|
-
}
|
|
3018
|
-
toJSON(data) {
|
|
3019
|
-
data = typeof data === 'object' ? data : {};
|
|
3020
|
-
data["enableChatQueuePosition"] = this.enableChatQueuePosition;
|
|
3021
|
-
data["helpCenterPendoGuidesEnabled"] = this.helpCenterPendoGuidesEnabled;
|
|
3022
|
-
data["helpCenterFloatingChatEnabled"] = this.helpCenterFloatingChatEnabled;
|
|
3023
|
-
data["enableHelpCenterLiveAgentChatV2"] = this.enableHelpCenterLiveAgentChatV2;
|
|
3024
|
-
data["enableVisualIvr"] = this.enableVisualIvr;
|
|
3025
|
-
data["showCompanyCases"] = this.showCompanyCases;
|
|
3026
|
-
data["isEnterpriseHub"] = this.isEnterpriseHub;
|
|
3027
|
-
data["showPersonalCases"] = this.showPersonalCases;
|
|
3028
|
-
data["supportFlowSoftTimeout"] = this.supportFlowSoftTimeout;
|
|
3029
|
-
data["supportFlowHardTimeout"] = this.supportFlowHardTimeout;
|
|
3030
|
-
data["impersonationConsentDurationHours"] = this.impersonationConsentDurationHours;
|
|
3031
|
-
data["contactField"] = this.contactField;
|
|
3032
|
-
data["contactId"] = this.contactId;
|
|
3033
|
-
data["supportFlowVersion"] = this.supportFlowVersion;
|
|
3034
|
-
data["supportType"] = this.supportType;
|
|
3035
|
-
data["supportWorkingHours"] = this.supportWorkingHours ? this.supportWorkingHours.toJSON() : undefined;
|
|
3036
|
-
data["helpCenterChatbotQuickAnswer"] = this.helpCenterChatbotQuickAnswer ? this.helpCenterChatbotQuickAnswer.toJSON() : undefined;
|
|
3037
|
-
data["enableEmailComposer"] = this.enableEmailComposer;
|
|
3038
|
-
data["helpCenterSupportFlowStepOrder"] = this.helpCenterSupportFlowStepOrder;
|
|
3039
|
-
return data;
|
|
3040
|
-
}
|
|
3041
|
-
constructor(data){
|
|
3042
|
-
_define_property(this, "enableChatQueuePosition", void 0);
|
|
3043
|
-
_define_property(this, "helpCenterPendoGuidesEnabled", void 0);
|
|
3044
|
-
_define_property(this, "helpCenterFloatingChatEnabled", void 0);
|
|
3045
|
-
_define_property(this, "enableHelpCenterLiveAgentChatV2", void 0);
|
|
3046
|
-
_define_property(this, "enableVisualIvr", void 0);
|
|
3047
|
-
_define_property(this, "showCompanyCases", void 0);
|
|
3048
|
-
_define_property(this, "isEnterpriseHub", void 0);
|
|
3049
|
-
_define_property(this, "showPersonalCases", void 0);
|
|
3050
|
-
_define_property(this, "supportFlowSoftTimeout", void 0);
|
|
3051
|
-
_define_property(this, "supportFlowHardTimeout", void 0);
|
|
3052
|
-
_define_property(this, "impersonationConsentDurationHours", void 0);
|
|
3053
|
-
_define_property(this, "contactField", void 0);
|
|
3054
|
-
_define_property(this, "contactId", void 0);
|
|
3055
|
-
_define_property(this, "supportFlowVersion", void 0);
|
|
3056
|
-
_define_property(this, "supportType", void 0);
|
|
3057
|
-
_define_property(this, "supportWorkingHours", void 0);
|
|
3058
|
-
_define_property(this, "helpCenterChatbotQuickAnswer", void 0);
|
|
3059
|
-
_define_property(this, "enableEmailComposer", void 0);
|
|
3060
|
-
_define_property(this, "helpCenterSupportFlowStepOrder", void 0);
|
|
3061
|
-
if (data) {
|
|
3062
|
-
for(var property in data){
|
|
3063
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3064
|
-
}
|
|
3065
|
-
}
|
|
3066
|
-
if (!data) {
|
|
3067
|
-
this.supportWorkingHours = new SupportWorkingHours();
|
|
3068
|
-
}
|
|
3069
|
-
}
|
|
3070
|
-
}
|
|
3071
|
-
export var SupportFlow = /*#__PURE__*/ function(SupportFlow) {
|
|
3072
|
-
SupportFlow[SupportFlow["IssueFirst2"] = 2] = "IssueFirst2";
|
|
3073
|
-
return SupportFlow;
|
|
3074
|
-
}({});
|
|
3075
|
-
export var SupportTypeMode = /*#__PURE__*/ function(SupportTypeMode) {
|
|
3076
|
-
SupportTypeMode[SupportTypeMode["ServicetitanSalesforce"] = 0] = "ServicetitanSalesforce";
|
|
3077
|
-
SupportTypeMode[SupportTypeMode["ZorwareZendesk"] = 1] = "ZorwareZendesk";
|
|
3078
|
-
SupportTypeMode[SupportTypeMode["Freshdesk"] = 2] = "Freshdesk";
|
|
3079
|
-
return SupportTypeMode;
|
|
3080
|
-
}({});
|
|
3081
|
-
export class SupportWorkingHours {
|
|
3082
|
-
init(_data) {
|
|
3083
|
-
if (_data) {
|
|
3084
|
-
this.callback = _data["callback"] ? WorkingHoursSchedule.fromJS(_data["callback"]) : new WorkingHoursSchedule();
|
|
3085
|
-
this.chat = _data["chat"] ? WorkingHoursSchedule.fromJS(_data["chat"]) : new WorkingHoursSchedule();
|
|
3086
|
-
}
|
|
3087
|
-
}
|
|
3088
|
-
static fromJS(data) {
|
|
3089
|
-
data = typeof data === 'object' ? data : {};
|
|
3090
|
-
let result = new SupportWorkingHours();
|
|
3091
|
-
result.init(data);
|
|
3092
|
-
return result;
|
|
3093
|
-
}
|
|
3094
|
-
toJSON(data) {
|
|
3095
|
-
data = typeof data === 'object' ? data : {};
|
|
3096
|
-
data["callback"] = this.callback ? this.callback.toJSON() : undefined;
|
|
3097
|
-
data["chat"] = this.chat ? this.chat.toJSON() : undefined;
|
|
3098
|
-
return data;
|
|
3099
|
-
}
|
|
3100
|
-
constructor(data){
|
|
3101
|
-
_define_property(this, "callback", void 0);
|
|
3102
|
-
_define_property(this, "chat", void 0);
|
|
3103
|
-
if (data) {
|
|
3104
|
-
for(var property in data){
|
|
3105
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3106
|
-
}
|
|
3107
|
-
}
|
|
3108
|
-
if (!data) {
|
|
3109
|
-
this.callback = new WorkingHoursSchedule();
|
|
3110
|
-
this.chat = new WorkingHoursSchedule();
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
}
|
|
3114
|
-
export class WorkingHoursSchedule {
|
|
3115
|
-
init(_data) {
|
|
3116
|
-
if (_data) {
|
|
3117
|
-
if (_data["workingHours"]) {
|
|
3118
|
-
this.workingHours = {};
|
|
3119
|
-
for(let key in _data["workingHours"]){
|
|
3120
|
-
if (_data["workingHours"].hasOwnProperty(key)) this.workingHours[key] = _data["workingHours"][key] ? WorkingHours.fromJS(_data["workingHours"][key]) : new WorkingHours();
|
|
3121
|
-
}
|
|
3122
|
-
}
|
|
3123
|
-
this.message = _data["message"];
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
static fromJS(data) {
|
|
3127
|
-
data = typeof data === 'object' ? data : {};
|
|
3128
|
-
let result = new WorkingHoursSchedule();
|
|
3129
|
-
result.init(data);
|
|
3130
|
-
return result;
|
|
3131
|
-
}
|
|
3132
|
-
toJSON(data) {
|
|
3133
|
-
data = typeof data === 'object' ? data : {};
|
|
3134
|
-
if (this.workingHours) {
|
|
3135
|
-
data["workingHours"] = {};
|
|
3136
|
-
for(let key in this.workingHours){
|
|
3137
|
-
if (this.workingHours.hasOwnProperty(key)) data["workingHours"][key] = this.workingHours[key] ? this.workingHours[key].toJSON() : undefined;
|
|
3138
|
-
}
|
|
3139
|
-
}
|
|
3140
|
-
data["message"] = this.message;
|
|
3141
|
-
return data;
|
|
3142
|
-
}
|
|
3143
|
-
constructor(data){
|
|
3144
|
-
_define_property(this, "workingHours", void 0);
|
|
3145
|
-
_define_property(this, "message", void 0);
|
|
3146
|
-
if (data) {
|
|
3147
|
-
for(var property in data){
|
|
3148
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3149
|
-
}
|
|
3150
|
-
}
|
|
3151
|
-
if (!data) {
|
|
3152
|
-
this.workingHours = {};
|
|
3153
|
-
}
|
|
3154
|
-
}
|
|
3155
|
-
}
|
|
3156
|
-
export class WorkingHours {
|
|
3157
|
-
init(_data) {
|
|
3158
|
-
if (_data) {
|
|
3159
|
-
this.start = _data["start"];
|
|
3160
|
-
this.finish = _data["finish"];
|
|
3161
|
-
}
|
|
3162
|
-
}
|
|
3163
|
-
static fromJS(data) {
|
|
3164
|
-
data = typeof data === 'object' ? data : {};
|
|
3165
|
-
let result = new WorkingHours();
|
|
3166
|
-
result.init(data);
|
|
3167
|
-
return result;
|
|
3168
|
-
}
|
|
3169
|
-
toJSON(data) {
|
|
3170
|
-
data = typeof data === 'object' ? data : {};
|
|
3171
|
-
data["start"] = this.start;
|
|
3172
|
-
data["finish"] = this.finish;
|
|
3173
|
-
return data;
|
|
3174
|
-
}
|
|
3175
|
-
constructor(data){
|
|
3176
|
-
_define_property(this, "start", void 0);
|
|
3177
|
-
_define_property(this, "finish", void 0);
|
|
3178
|
-
if (data) {
|
|
3179
|
-
for(var property in data){
|
|
3180
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3181
|
-
}
|
|
3182
|
-
}
|
|
3183
|
-
}
|
|
3184
|
-
}
|
|
3185
|
-
export class HelpCenterChatbotQuickAnswer {
|
|
3186
|
-
init(_data) {
|
|
3187
|
-
if (_data) {
|
|
3188
|
-
this.enabled = _data["enabled"];
|
|
3189
|
-
}
|
|
3190
|
-
}
|
|
3191
|
-
static fromJS(data) {
|
|
3192
|
-
data = typeof data === 'object' ? data : {};
|
|
3193
|
-
let result = new HelpCenterChatbotQuickAnswer();
|
|
3194
|
-
result.init(data);
|
|
3195
|
-
return result;
|
|
3196
|
-
}
|
|
3197
|
-
toJSON(data) {
|
|
3198
|
-
data = typeof data === 'object' ? data : {};
|
|
3199
|
-
data["enabled"] = this.enabled;
|
|
3200
|
-
return data;
|
|
3201
|
-
}
|
|
3202
|
-
constructor(data){
|
|
3203
|
-
_define_property(this, "enabled", void 0);
|
|
3204
|
-
if (data) {
|
|
3205
|
-
for(var property in data){
|
|
3206
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3207
|
-
}
|
|
3208
|
-
}
|
|
3209
|
-
}
|
|
3210
|
-
}
|
|
3211
|
-
export var SupportFlowStepOrder = /*#__PURE__*/ function(SupportFlowStepOrder) {
|
|
3212
|
-
SupportFlowStepOrder[SupportFlowStepOrder["CategoryFirst"] = 0] = "CategoryFirst";
|
|
3213
|
-
SupportFlowStepOrder[SupportFlowStepOrder["DescriptionFirst"] = 1] = "DescriptionFirst";
|
|
3214
|
-
return SupportFlowStepOrder;
|
|
3215
|
-
}({});
|
|
3216
|
-
export class SupportComponents {
|
|
3217
|
-
init(_data) {
|
|
3218
|
-
if (_data) {
|
|
3219
|
-
if (Array.isArray(_data["items"])) {
|
|
3220
|
-
this.items = [];
|
|
3221
|
-
for (let item of _data["items"])this.items.push(SupportComponent.fromJS(item));
|
|
3222
|
-
}
|
|
3223
|
-
if (Array.isArray(_data["categoryTopicMapping"])) {
|
|
3224
|
-
this.categoryTopicMapping = [];
|
|
3225
|
-
for (let item of _data["categoryTopicMapping"])this.categoryTopicMapping.push(SupportCategoryTopicMapping.fromJS(item));
|
|
3226
|
-
}
|
|
3227
|
-
}
|
|
3228
|
-
}
|
|
3229
|
-
static fromJS(data) {
|
|
3230
|
-
data = typeof data === 'object' ? data : {};
|
|
3231
|
-
let result = new SupportComponents();
|
|
3232
|
-
result.init(data);
|
|
3233
|
-
return result;
|
|
3234
|
-
}
|
|
3235
|
-
toJSON(data) {
|
|
3236
|
-
data = typeof data === 'object' ? data : {};
|
|
3237
|
-
if (Array.isArray(this.items)) {
|
|
3238
|
-
data["items"] = [];
|
|
3239
|
-
for (let item of this.items)data["items"].push(item.toJSON());
|
|
3240
|
-
}
|
|
3241
|
-
if (Array.isArray(this.categoryTopicMapping)) {
|
|
3242
|
-
data["categoryTopicMapping"] = [];
|
|
3243
|
-
for (let item of this.categoryTopicMapping)data["categoryTopicMapping"].push(item.toJSON());
|
|
3244
|
-
}
|
|
3245
|
-
return data;
|
|
3246
|
-
}
|
|
3247
|
-
constructor(data){
|
|
3248
|
-
_define_property(this, "items", void 0);
|
|
3249
|
-
_define_property(this, "categoryTopicMapping", void 0);
|
|
3250
|
-
if (data) {
|
|
3251
|
-
for(var property in data){
|
|
3252
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
if (!data) {
|
|
3256
|
-
this.items = [];
|
|
3257
|
-
this.categoryTopicMapping = [];
|
|
3258
|
-
}
|
|
3259
|
-
}
|
|
3260
|
-
}
|
|
3261
|
-
export class SupportComponent {
|
|
3262
|
-
init(_data) {
|
|
3263
|
-
if (_data) {
|
|
3264
|
-
this.id = _data["id"];
|
|
3265
|
-
this.name = _data["name"];
|
|
3266
|
-
this.button = _data["button"];
|
|
3267
|
-
this.context = _data["context"];
|
|
3268
|
-
if (Array.isArray(_data["channels"])) {
|
|
3269
|
-
this.channels = [];
|
|
3270
|
-
for (let item of _data["channels"])this.channels.push(item);
|
|
3271
|
-
}
|
|
3272
|
-
if (Array.isArray(_data["subComponents"])) {
|
|
3273
|
-
this.subComponents = [];
|
|
3274
|
-
for (let item of _data["subComponents"])this.subComponents.push(SupportComponent.fromJS(item));
|
|
3275
|
-
}
|
|
3276
|
-
}
|
|
3277
|
-
}
|
|
3278
|
-
static fromJS(data) {
|
|
3279
|
-
data = typeof data === 'object' ? data : {};
|
|
3280
|
-
let result = new SupportComponent();
|
|
3281
|
-
result.init(data);
|
|
3282
|
-
return result;
|
|
3283
|
-
}
|
|
3284
|
-
toJSON(data) {
|
|
3285
|
-
data = typeof data === 'object' ? data : {};
|
|
3286
|
-
data["id"] = this.id;
|
|
3287
|
-
data["name"] = this.name;
|
|
3288
|
-
data["button"] = this.button;
|
|
3289
|
-
data["context"] = this.context;
|
|
3290
|
-
if (Array.isArray(this.channels)) {
|
|
3291
|
-
data["channels"] = [];
|
|
3292
|
-
for (let item of this.channels)data["channels"].push(item);
|
|
3293
|
-
}
|
|
3294
|
-
if (Array.isArray(this.subComponents)) {
|
|
3295
|
-
data["subComponents"] = [];
|
|
3296
|
-
for (let item of this.subComponents)data["subComponents"].push(item.toJSON());
|
|
3297
|
-
}
|
|
3298
|
-
return data;
|
|
3299
|
-
}
|
|
3300
|
-
constructor(data){
|
|
3301
|
-
_define_property(this, "id", void 0);
|
|
3302
|
-
_define_property(this, "name", void 0);
|
|
3303
|
-
_define_property(this, "button", void 0);
|
|
3304
|
-
_define_property(this, "context", void 0);
|
|
3305
|
-
_define_property(this, "channels", void 0);
|
|
3306
|
-
_define_property(this, "subComponents", void 0);
|
|
3307
|
-
if (data) {
|
|
3308
|
-
for(var property in data){
|
|
3309
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3310
|
-
}
|
|
3311
|
-
}
|
|
3312
|
-
}
|
|
3313
|
-
}
|
|
3314
|
-
export var SupportChannel = /*#__PURE__*/ function(SupportChannel) {
|
|
3315
|
-
SupportChannel[SupportChannel["Unknown"] = 0] = "Unknown";
|
|
3316
|
-
SupportChannel[SupportChannel["Email"] = 1] = "Email";
|
|
3317
|
-
SupportChannel[SupportChannel["Chat"] = 2] = "Chat";
|
|
3318
|
-
SupportChannel[SupportChannel["Callback"] = 3] = "Callback";
|
|
3319
|
-
SupportChannel[SupportChannel["EmergencyCallback"] = 4] = "EmergencyCallback";
|
|
3320
|
-
SupportChannel[SupportChannel["SpecialistCallback"] = 5] = "SpecialistCallback";
|
|
3321
|
-
return SupportChannel;
|
|
3322
|
-
}({});
|
|
3323
|
-
export class SupportCategoryTopicMapping {
|
|
3324
|
-
init(_data) {
|
|
3325
|
-
if (_data) {
|
|
3326
|
-
this.id = _data["id"];
|
|
3327
|
-
this.label = _data["label"];
|
|
3328
|
-
this.description = _data["description"];
|
|
3329
|
-
if (Array.isArray(_data["topics"])) {
|
|
3330
|
-
this.topics = [];
|
|
3331
|
-
for (let item of _data["topics"])this.topics.push(item);
|
|
3332
|
-
}
|
|
3333
|
-
}
|
|
3334
|
-
}
|
|
3335
|
-
static fromJS(data) {
|
|
3336
|
-
data = typeof data === 'object' ? data : {};
|
|
3337
|
-
let result = new SupportCategoryTopicMapping();
|
|
3338
|
-
result.init(data);
|
|
3339
|
-
return result;
|
|
3340
|
-
}
|
|
3341
|
-
toJSON(data) {
|
|
3342
|
-
data = typeof data === 'object' ? data : {};
|
|
3343
|
-
data["id"] = this.id;
|
|
3344
|
-
data["label"] = this.label;
|
|
3345
|
-
data["description"] = this.description;
|
|
3346
|
-
if (Array.isArray(this.topics)) {
|
|
3347
|
-
data["topics"] = [];
|
|
3348
|
-
for (let item of this.topics)data["topics"].push(item);
|
|
3349
|
-
}
|
|
3350
|
-
return data;
|
|
3351
|
-
}
|
|
3352
|
-
constructor(data){
|
|
3353
|
-
_define_property(this, "id", void 0);
|
|
3354
|
-
_define_property(this, "label", void 0);
|
|
3355
|
-
_define_property(this, "description", void 0);
|
|
3356
|
-
_define_property(this, "topics", void 0);
|
|
3357
|
-
if (data) {
|
|
3358
|
-
for(var property in data){
|
|
3359
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3360
|
-
}
|
|
3361
|
-
}
|
|
3362
|
-
if (!data) {
|
|
3363
|
-
this.topics = [];
|
|
3364
|
-
}
|
|
3365
|
-
}
|
|
3366
|
-
}
|
|
3367
|
-
export class InbentaAccessToken {
|
|
3368
|
-
init(_data) {
|
|
3369
|
-
if (_data) {
|
|
3370
|
-
this.accessToken = _data["accessToken"];
|
|
3371
|
-
this.expiration = _data["expiration"];
|
|
3372
|
-
this.expires_in = _data["expires_in"];
|
|
3373
|
-
this.apis = _data["apis"] ? InbentaApis.fromJS(_data["apis"]) : new InbentaApis();
|
|
3374
|
-
this.apiKey = _data["apiKey"];
|
|
3375
|
-
}
|
|
3376
|
-
}
|
|
3377
|
-
static fromJS(data) {
|
|
3378
|
-
data = typeof data === 'object' ? data : {};
|
|
3379
|
-
let result = new InbentaAccessToken();
|
|
3380
|
-
result.init(data);
|
|
3381
|
-
return result;
|
|
3382
|
-
}
|
|
3383
|
-
toJSON(data) {
|
|
3384
|
-
data = typeof data === 'object' ? data : {};
|
|
3385
|
-
data["accessToken"] = this.accessToken;
|
|
3386
|
-
data["expiration"] = this.expiration;
|
|
3387
|
-
data["expires_in"] = this.expires_in;
|
|
3388
|
-
data["apis"] = this.apis ? this.apis.toJSON() : undefined;
|
|
3389
|
-
data["apiKey"] = this.apiKey;
|
|
3390
|
-
return data;
|
|
3391
|
-
}
|
|
3392
|
-
constructor(data){
|
|
3393
|
-
_define_property(this, "accessToken", void 0);
|
|
3394
|
-
_define_property(this, "expiration", void 0);
|
|
3395
|
-
_define_property(this, "expires_in", void 0);
|
|
3396
|
-
_define_property(this, "apis", void 0);
|
|
3397
|
-
_define_property(this, "apiKey", void 0);
|
|
3398
|
-
if (data) {
|
|
3399
|
-
for(var property in data){
|
|
3400
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3401
|
-
}
|
|
3402
|
-
}
|
|
3403
|
-
if (!data) {
|
|
3404
|
-
this.apis = new InbentaApis();
|
|
3405
|
-
}
|
|
3406
|
-
}
|
|
3407
|
-
}
|
|
3408
|
-
export class InbentaApis {
|
|
3409
|
-
init(_data) {
|
|
3410
|
-
if (_data) {
|
|
3411
|
-
this.knowledge = _data["knowledge"];
|
|
3412
|
-
this.search = _data["search"];
|
|
3413
|
-
this.ticketing = _data["ticketing"];
|
|
3414
|
-
}
|
|
3415
|
-
}
|
|
3416
|
-
static fromJS(data) {
|
|
3417
|
-
data = typeof data === 'object' ? data : {};
|
|
3418
|
-
let result = new InbentaApis();
|
|
3419
|
-
result.init(data);
|
|
3420
|
-
return result;
|
|
3421
|
-
}
|
|
3422
|
-
toJSON(data) {
|
|
3423
|
-
data = typeof data === 'object' ? data : {};
|
|
3424
|
-
data["knowledge"] = this.knowledge;
|
|
3425
|
-
data["search"] = this.search;
|
|
3426
|
-
data["ticketing"] = this.ticketing;
|
|
3427
|
-
return data;
|
|
3428
|
-
}
|
|
3429
|
-
constructor(data){
|
|
3430
|
-
_define_property(this, "knowledge", void 0);
|
|
3431
|
-
_define_property(this, "search", void 0);
|
|
3432
|
-
_define_property(this, "ticketing", void 0);
|
|
3433
|
-
if (data) {
|
|
3434
|
-
for(var property in data){
|
|
3435
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3436
|
-
}
|
|
3437
|
-
}
|
|
3438
|
-
}
|
|
3439
|
-
}
|
|
3440
|
-
export class PageRecommendations {
|
|
3441
|
-
init(_data) {
|
|
3442
|
-
if (_data) {
|
|
3443
|
-
this.path = _data["path"];
|
|
3444
|
-
this.exact = _data["exact"];
|
|
3445
|
-
if (Array.isArray(_data["recommendations"])) {
|
|
3446
|
-
this.recommendations = [];
|
|
3447
|
-
for (let item of _data["recommendations"])this.recommendations.push(Recommendation.fromJS(item));
|
|
3448
|
-
}
|
|
3449
|
-
}
|
|
3450
|
-
}
|
|
3451
|
-
static fromJS(data) {
|
|
3452
|
-
data = typeof data === 'object' ? data : {};
|
|
3453
|
-
let result = new PageRecommendations();
|
|
3454
|
-
result.init(data);
|
|
3455
|
-
return result;
|
|
3456
|
-
}
|
|
3457
|
-
toJSON(data) {
|
|
3458
|
-
data = typeof data === 'object' ? data : {};
|
|
3459
|
-
data["path"] = this.path;
|
|
3460
|
-
data["exact"] = this.exact;
|
|
3461
|
-
if (Array.isArray(this.recommendations)) {
|
|
3462
|
-
data["recommendations"] = [];
|
|
3463
|
-
for (let item of this.recommendations)data["recommendations"].push(item.toJSON());
|
|
3464
|
-
}
|
|
3465
|
-
return data;
|
|
3466
|
-
}
|
|
3467
|
-
constructor(data){
|
|
3468
|
-
_define_property(this, "path", void 0);
|
|
3469
|
-
_define_property(this, "exact", void 0);
|
|
3470
|
-
_define_property(this, "recommendations", void 0);
|
|
3471
|
-
if (data) {
|
|
3472
|
-
for(var property in data){
|
|
3473
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3474
|
-
}
|
|
3475
|
-
}
|
|
3476
|
-
if (!data) {
|
|
3477
|
-
this.recommendations = [];
|
|
3478
|
-
}
|
|
3479
|
-
}
|
|
3480
|
-
}
|
|
3481
|
-
export class Recommendation {
|
|
3482
|
-
init(_data) {
|
|
3483
|
-
if (_data) {
|
|
3484
|
-
this.resource = _data["resource"] ? Resource.fromJS(_data["resource"]) : new Resource();
|
|
3485
|
-
if (Array.isArray(_data["links"])) {
|
|
3486
|
-
this.links = [];
|
|
3487
|
-
for (let item of _data["links"])this.links.push(Link.fromJS(item));
|
|
3488
|
-
}
|
|
3489
|
-
}
|
|
3490
|
-
}
|
|
3491
|
-
static fromJS(data) {
|
|
3492
|
-
data = typeof data === 'object' ? data : {};
|
|
3493
|
-
let result = new Recommendation();
|
|
3494
|
-
result.init(data);
|
|
3495
|
-
return result;
|
|
3496
|
-
}
|
|
3497
|
-
toJSON(data) {
|
|
3498
|
-
data = typeof data === 'object' ? data : {};
|
|
3499
|
-
data["resource"] = this.resource ? this.resource.toJSON() : undefined;
|
|
3500
|
-
if (Array.isArray(this.links)) {
|
|
3501
|
-
data["links"] = [];
|
|
3502
|
-
for (let item of this.links)data["links"].push(item.toJSON());
|
|
3503
|
-
}
|
|
3504
|
-
return data;
|
|
3505
|
-
}
|
|
3506
|
-
constructor(data){
|
|
3507
|
-
_define_property(this, "resource", void 0);
|
|
3508
|
-
_define_property(this, "links", void 0);
|
|
3509
|
-
if (data) {
|
|
3510
|
-
for(var property in data){
|
|
3511
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3512
|
-
}
|
|
3513
|
-
}
|
|
3514
|
-
if (!data) {
|
|
3515
|
-
this.resource = new Resource();
|
|
3516
|
-
this.links = [];
|
|
3517
|
-
}
|
|
3518
|
-
}
|
|
3519
|
-
}
|
|
3520
|
-
export class Resource {
|
|
3521
|
-
init(_data) {
|
|
3522
|
-
if (_data) {
|
|
3523
|
-
this.name = _data["name"];
|
|
3524
|
-
this.title = _data["title"];
|
|
3525
|
-
this.url = _data["url"];
|
|
3526
|
-
}
|
|
3527
|
-
}
|
|
3528
|
-
static fromJS(data) {
|
|
3529
|
-
data = typeof data === 'object' ? data : {};
|
|
3530
|
-
let result = new Resource();
|
|
3531
|
-
result.init(data);
|
|
3532
|
-
return result;
|
|
3533
|
-
}
|
|
3534
|
-
toJSON(data) {
|
|
3535
|
-
data = typeof data === 'object' ? data : {};
|
|
3536
|
-
data["name"] = this.name;
|
|
3537
|
-
data["title"] = this.title;
|
|
3538
|
-
data["url"] = this.url;
|
|
3539
|
-
return data;
|
|
3540
|
-
}
|
|
3541
|
-
constructor(data){
|
|
3542
|
-
_define_property(this, "name", void 0);
|
|
3543
|
-
_define_property(this, "title", void 0);
|
|
3544
|
-
_define_property(this, "url", void 0);
|
|
3545
|
-
if (data) {
|
|
3546
|
-
for(var property in data){
|
|
3547
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3548
|
-
}
|
|
3549
|
-
}
|
|
3550
|
-
}
|
|
3551
|
-
}
|
|
3552
|
-
export class Link {
|
|
3553
|
-
init(_data) {
|
|
3554
|
-
if (_data) {
|
|
3555
|
-
this.title = _data["title"];
|
|
3556
|
-
this.url = _data["url"];
|
|
3557
|
-
this.articleId = _data["articleId"];
|
|
3558
|
-
this.scrollTo = _data["scrollTo"];
|
|
3559
|
-
}
|
|
3560
|
-
}
|
|
3561
|
-
static fromJS(data) {
|
|
3562
|
-
data = typeof data === 'object' ? data : {};
|
|
3563
|
-
let result = new Link();
|
|
3564
|
-
result.init(data);
|
|
3565
|
-
return result;
|
|
3566
|
-
}
|
|
3567
|
-
toJSON(data) {
|
|
3568
|
-
data = typeof data === 'object' ? data : {};
|
|
3569
|
-
data["title"] = this.title;
|
|
3570
|
-
data["url"] = this.url;
|
|
3571
|
-
data["articleId"] = this.articleId;
|
|
3572
|
-
data["scrollTo"] = this.scrollTo;
|
|
3573
|
-
return data;
|
|
3574
|
-
}
|
|
3575
|
-
constructor(data){
|
|
3576
|
-
_define_property(this, "title", void 0);
|
|
3577
|
-
_define_property(this, "url", void 0);
|
|
3578
|
-
_define_property(this, "articleId", void 0);
|
|
3579
|
-
_define_property(this, "scrollTo", void 0);
|
|
3580
|
-
if (data) {
|
|
3581
|
-
for(var property in data){
|
|
3582
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3583
|
-
}
|
|
3584
|
-
}
|
|
3585
|
-
}
|
|
3586
|
-
}
|
|
3587
|
-
export class HelpCenterUserData {
|
|
3588
|
-
init(_data) {
|
|
3589
|
-
if (_data) {
|
|
3590
|
-
this.name = _data["name"];
|
|
3591
|
-
this.email = _data["email"];
|
|
3592
|
-
if (Array.isArray(_data["users"])) {
|
|
3593
|
-
this.users = [];
|
|
3594
|
-
for (let item of _data["users"])this.users.push(HelpCenterUserModel.fromJS(item));
|
|
3595
|
-
}
|
|
3596
|
-
}
|
|
3597
|
-
}
|
|
3598
|
-
static fromJS(data) {
|
|
3599
|
-
data = typeof data === 'object' ? data : {};
|
|
3600
|
-
let result = new HelpCenterUserData();
|
|
3601
|
-
result.init(data);
|
|
3602
|
-
return result;
|
|
3603
|
-
}
|
|
3604
|
-
toJSON(data) {
|
|
3605
|
-
data = typeof data === 'object' ? data : {};
|
|
3606
|
-
data["name"] = this.name;
|
|
3607
|
-
data["email"] = this.email;
|
|
3608
|
-
if (Array.isArray(this.users)) {
|
|
3609
|
-
data["users"] = [];
|
|
3610
|
-
for (let item of this.users)data["users"].push(item.toJSON());
|
|
3611
|
-
}
|
|
3612
|
-
return data;
|
|
3613
|
-
}
|
|
3614
|
-
constructor(data){
|
|
3615
|
-
_define_property(this, "name", void 0);
|
|
3616
|
-
_define_property(this, "email", void 0);
|
|
3617
|
-
_define_property(this, "users", void 0);
|
|
3618
|
-
if (data) {
|
|
3619
|
-
for(var property in data){
|
|
3620
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3621
|
-
}
|
|
3622
|
-
}
|
|
3623
|
-
}
|
|
3624
|
-
}
|
|
3625
|
-
export class HelpCenterUserModel {
|
|
3626
|
-
init(_data) {
|
|
3627
|
-
if (_data) {
|
|
3628
|
-
this.tenantId = _data["tenantId"];
|
|
3629
|
-
this.tenantName = _data["tenantName"];
|
|
3630
|
-
this.globalUserId = _data["globalUserId"];
|
|
3631
|
-
}
|
|
3632
|
-
}
|
|
3633
|
-
static fromJS(data) {
|
|
3634
|
-
data = typeof data === 'object' ? data : {};
|
|
3635
|
-
let result = new HelpCenterUserModel();
|
|
3636
|
-
result.init(data);
|
|
3637
|
-
return result;
|
|
3638
|
-
}
|
|
3639
|
-
toJSON(data) {
|
|
3640
|
-
data = typeof data === 'object' ? data : {};
|
|
3641
|
-
data["tenantId"] = this.tenantId;
|
|
3642
|
-
data["tenantName"] = this.tenantName;
|
|
3643
|
-
data["globalUserId"] = this.globalUserId;
|
|
3644
|
-
return data;
|
|
3645
|
-
}
|
|
3646
|
-
constructor(data){
|
|
3647
|
-
_define_property(this, "tenantId", void 0);
|
|
3648
|
-
_define_property(this, "tenantName", void 0);
|
|
3649
|
-
_define_property(this, "globalUserId", void 0);
|
|
3650
|
-
if (data) {
|
|
3651
|
-
for(var property in data){
|
|
3652
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3653
|
-
}
|
|
3654
|
-
}
|
|
3655
|
-
}
|
|
3656
|
-
}
|
|
3657
|
-
export class CaseGenerationResponse {
|
|
3658
|
-
init(_data) {
|
|
3659
|
-
if (_data) {
|
|
3660
|
-
this.createdCount = _data["createdCount"];
|
|
3661
|
-
this.error = _data["error"];
|
|
3662
|
-
}
|
|
3663
|
-
}
|
|
3664
|
-
static fromJS(data) {
|
|
3665
|
-
data = typeof data === 'object' ? data : {};
|
|
3666
|
-
let result = new CaseGenerationResponse();
|
|
3667
|
-
result.init(data);
|
|
3668
|
-
return result;
|
|
3669
|
-
}
|
|
3670
|
-
toJSON(data) {
|
|
3671
|
-
data = typeof data === 'object' ? data : {};
|
|
3672
|
-
data["createdCount"] = this.createdCount;
|
|
3673
|
-
data["error"] = this.error;
|
|
3674
|
-
return data;
|
|
3675
|
-
}
|
|
3676
|
-
constructor(data){
|
|
3677
|
-
_define_property(this, "createdCount", void 0);
|
|
3678
|
-
_define_property(this, "error", void 0);
|
|
3679
|
-
if (data) {
|
|
3680
|
-
for(var property in data){
|
|
3681
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3682
|
-
}
|
|
3683
|
-
}
|
|
3684
|
-
}
|
|
3685
|
-
}
|
|
3686
|
-
export class CaseGenerationRequest {
|
|
3687
|
-
init(_data) {
|
|
3688
|
-
if (_data) {
|
|
3689
|
-
this.newCount = _data["newCount"];
|
|
3690
|
-
this.pendingCount = _data["pendingCount"];
|
|
3691
|
-
this.solvedCount = _data["solvedCount"];
|
|
3692
|
-
this.closedCount = _data["closedCount"];
|
|
3693
|
-
}
|
|
3694
|
-
}
|
|
3695
|
-
static fromJS(data) {
|
|
3696
|
-
data = typeof data === 'object' ? data : {};
|
|
3697
|
-
let result = new CaseGenerationRequest();
|
|
3698
|
-
result.init(data);
|
|
3699
|
-
return result;
|
|
3700
|
-
}
|
|
3701
|
-
toJSON(data) {
|
|
3702
|
-
data = typeof data === 'object' ? data : {};
|
|
3703
|
-
data["newCount"] = this.newCount;
|
|
3704
|
-
data["pendingCount"] = this.pendingCount;
|
|
3705
|
-
data["solvedCount"] = this.solvedCount;
|
|
3706
|
-
data["closedCount"] = this.closedCount;
|
|
3707
|
-
return data;
|
|
3708
|
-
}
|
|
3709
|
-
constructor(data){
|
|
3710
|
-
_define_property(this, "newCount", void 0);
|
|
3711
|
-
_define_property(this, "pendingCount", void 0);
|
|
3712
|
-
_define_property(this, "solvedCount", void 0);
|
|
3713
|
-
_define_property(this, "closedCount", void 0);
|
|
3714
|
-
if (data) {
|
|
3715
|
-
for(var property in data){
|
|
3716
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3717
|
-
}
|
|
3718
|
-
}
|
|
3719
|
-
}
|
|
3720
|
-
}
|
|
3721
|
-
export class CaseFilters {
|
|
3722
|
-
init(_data) {
|
|
3723
|
-
if (_data) {
|
|
3724
|
-
if (Array.isArray(_data["contacts"])) {
|
|
3725
|
-
this.contacts = [];
|
|
3726
|
-
for (let item of _data["contacts"])this.contacts.push(CaseContactFilter.fromJS(item));
|
|
3727
|
-
}
|
|
3728
|
-
if (Array.isArray(_data["statuses"])) {
|
|
3729
|
-
this.statuses = [];
|
|
3730
|
-
for (let item of _data["statuses"])this.statuses.push(item);
|
|
3731
|
-
}
|
|
3732
|
-
if (Array.isArray(_data["accounts"])) {
|
|
3733
|
-
this.accounts = [];
|
|
3734
|
-
for (let item of _data["accounts"])this.accounts.push(CaseAccount.fromJS(item));
|
|
3735
|
-
}
|
|
3736
|
-
}
|
|
3737
|
-
}
|
|
3738
|
-
static fromJS(data) {
|
|
3739
|
-
data = typeof data === 'object' ? data : {};
|
|
3740
|
-
let result = new CaseFilters();
|
|
3741
|
-
result.init(data);
|
|
3742
|
-
return result;
|
|
3743
|
-
}
|
|
3744
|
-
toJSON(data) {
|
|
3745
|
-
data = typeof data === 'object' ? data : {};
|
|
3746
|
-
if (Array.isArray(this.contacts)) {
|
|
3747
|
-
data["contacts"] = [];
|
|
3748
|
-
for (let item of this.contacts)data["contacts"].push(item.toJSON());
|
|
3749
|
-
}
|
|
3750
|
-
if (Array.isArray(this.statuses)) {
|
|
3751
|
-
data["statuses"] = [];
|
|
3752
|
-
for (let item of this.statuses)data["statuses"].push(item);
|
|
3753
|
-
}
|
|
3754
|
-
if (Array.isArray(this.accounts)) {
|
|
3755
|
-
data["accounts"] = [];
|
|
3756
|
-
for (let item of this.accounts)data["accounts"].push(item.toJSON());
|
|
3757
|
-
}
|
|
3758
|
-
return data;
|
|
3759
|
-
}
|
|
3760
|
-
constructor(data){
|
|
3761
|
-
_define_property(this, "contacts", void 0);
|
|
3762
|
-
_define_property(this, "statuses", void 0);
|
|
3763
|
-
_define_property(this, "accounts", void 0);
|
|
3764
|
-
if (data) {
|
|
3765
|
-
for(var property in data){
|
|
3766
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3767
|
-
}
|
|
3768
|
-
}
|
|
3769
|
-
if (!data) {
|
|
3770
|
-
this.statuses = [];
|
|
3771
|
-
}
|
|
3772
|
-
}
|
|
3773
|
-
}
|
|
3774
|
-
export class CaseContactFilter {
|
|
3775
|
-
init(_data) {
|
|
3776
|
-
if (_data) {
|
|
3777
|
-
if (Array.isArray(_data["contactIds"])) {
|
|
3778
|
-
this.contactIds = [];
|
|
3779
|
-
for (let item of _data["contactIds"])this.contactIds.push(item);
|
|
3780
|
-
}
|
|
3781
|
-
this.name = _data["name"];
|
|
3782
|
-
}
|
|
3783
|
-
}
|
|
3784
|
-
static fromJS(data) {
|
|
3785
|
-
data = typeof data === 'object' ? data : {};
|
|
3786
|
-
let result = new CaseContactFilter();
|
|
3787
|
-
result.init(data);
|
|
3788
|
-
return result;
|
|
3789
|
-
}
|
|
3790
|
-
toJSON(data) {
|
|
3791
|
-
data = typeof data === 'object' ? data : {};
|
|
3792
|
-
if (Array.isArray(this.contactIds)) {
|
|
3793
|
-
data["contactIds"] = [];
|
|
3794
|
-
for (let item of this.contactIds)data["contactIds"].push(item);
|
|
3795
|
-
}
|
|
3796
|
-
data["name"] = this.name;
|
|
3797
|
-
return data;
|
|
3798
|
-
}
|
|
3799
|
-
constructor(data){
|
|
3800
|
-
_define_property(this, "contactIds", void 0);
|
|
3801
|
-
_define_property(this, "name", void 0);
|
|
3802
|
-
if (data) {
|
|
3803
|
-
for(var property in data){
|
|
3804
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3805
|
-
}
|
|
3806
|
-
}
|
|
3807
|
-
if (!data) {
|
|
3808
|
-
this.contactIds = [];
|
|
3809
|
-
}
|
|
3810
|
-
}
|
|
3811
|
-
}
|
|
3812
|
-
export class CaseAccount {
|
|
3813
|
-
init(_data) {
|
|
3814
|
-
if (_data) {
|
|
3815
|
-
this.id = _data["id"];
|
|
3816
|
-
this.tenantName = _data["tenantName"];
|
|
3817
|
-
}
|
|
3818
|
-
}
|
|
3819
|
-
static fromJS(data) {
|
|
3820
|
-
data = typeof data === 'object' ? data : {};
|
|
3821
|
-
let result = new CaseAccount();
|
|
3822
|
-
result.init(data);
|
|
3823
|
-
return result;
|
|
3824
|
-
}
|
|
3825
|
-
toJSON(data) {
|
|
3826
|
-
data = typeof data === 'object' ? data : {};
|
|
3827
|
-
data["id"] = this.id;
|
|
3828
|
-
data["tenantName"] = this.tenantName;
|
|
3829
|
-
return data;
|
|
3830
|
-
}
|
|
3831
|
-
constructor(data){
|
|
3832
|
-
_define_property(this, "id", void 0);
|
|
3833
|
-
_define_property(this, "tenantName", void 0);
|
|
3834
|
-
if (data) {
|
|
3835
|
-
for(var property in data){
|
|
3836
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3837
|
-
}
|
|
3838
|
-
}
|
|
3839
|
-
}
|
|
3840
|
-
}
|
|
3841
|
-
export class CaseResults {
|
|
3842
|
-
init(_data) {
|
|
3843
|
-
if (_data) {
|
|
3844
|
-
this.anyOpen = _data["anyOpen"];
|
|
3845
|
-
if (Array.isArray(_data["items"])) {
|
|
3846
|
-
this.items = [];
|
|
3847
|
-
for (let item of _data["items"])this.items.push(CaseResultItem.fromJS(item));
|
|
3848
|
-
}
|
|
3849
|
-
this.done = _data["done"];
|
|
3850
|
-
this.priorityToken = _data["priorityToken"];
|
|
3851
|
-
this.caseNumberToken = _data["caseNumberToken"];
|
|
3852
|
-
}
|
|
3853
|
-
}
|
|
3854
|
-
static fromJS(data) {
|
|
3855
|
-
data = typeof data === 'object' ? data : {};
|
|
3856
|
-
let result = new CaseResults();
|
|
3857
|
-
result.init(data);
|
|
3858
|
-
return result;
|
|
3859
|
-
}
|
|
3860
|
-
toJSON(data) {
|
|
3861
|
-
data = typeof data === 'object' ? data : {};
|
|
3862
|
-
data["anyOpen"] = this.anyOpen;
|
|
3863
|
-
if (Array.isArray(this.items)) {
|
|
3864
|
-
data["items"] = [];
|
|
3865
|
-
for (let item of this.items)data["items"].push(item.toJSON());
|
|
3866
|
-
}
|
|
3867
|
-
data["done"] = this.done;
|
|
3868
|
-
data["priorityToken"] = this.priorityToken;
|
|
3869
|
-
data["caseNumberToken"] = this.caseNumberToken;
|
|
3870
|
-
return data;
|
|
3871
|
-
}
|
|
3872
|
-
constructor(data){
|
|
3873
|
-
_define_property(this, "anyOpen", void 0);
|
|
3874
|
-
_define_property(this, "items", void 0);
|
|
3875
|
-
_define_property(this, "done", void 0);
|
|
3876
|
-
_define_property(this, "priorityToken", void 0);
|
|
3877
|
-
_define_property(this, "caseNumberToken", void 0);
|
|
3878
|
-
if (data) {
|
|
3879
|
-
for(var property in data){
|
|
3880
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3881
|
-
}
|
|
3882
|
-
}
|
|
3883
|
-
if (!data) {
|
|
3884
|
-
this.items = [];
|
|
3885
|
-
}
|
|
3886
|
-
}
|
|
3887
|
-
}
|
|
3888
|
-
export class CaseResultItem {
|
|
3889
|
-
init(_data) {
|
|
3890
|
-
if (_data) {
|
|
3891
|
-
this.id = _data["id"];
|
|
3892
|
-
this.caseNumber = _data["caseNumber"];
|
|
3893
|
-
this.origin = _data["origin"];
|
|
3894
|
-
this.channel = _data["channel"];
|
|
3895
|
-
this.status = _data["status"];
|
|
3896
|
-
this.priority = _data["priority"];
|
|
3897
|
-
this.subject = _data["subject"];
|
|
3898
|
-
this.component = _data["component"];
|
|
3899
|
-
this.createdDate = _data["createdDate"] ? new Date(_data["createdDate"].toString()) : undefined;
|
|
3900
|
-
this.contact = _data["contact"] ? CaseContact.fromJS(_data["contact"]) : new CaseContact();
|
|
3901
|
-
this.account = _data["account"] ? CaseAccount.fromJS(_data["account"]) : new CaseAccount();
|
|
3902
|
-
this.impersonationConsent = _data["impersonationConsent"] ? ImpersonationConsent.fromJS(_data["impersonationConsent"]) : new ImpersonationConsent();
|
|
3903
|
-
this.surveyUrl = _data["surveyUrl"];
|
|
3904
|
-
}
|
|
3905
|
-
}
|
|
3906
|
-
static fromJS(data) {
|
|
3907
|
-
data = typeof data === 'object' ? data : {};
|
|
3908
|
-
let result = new CaseResultItem();
|
|
3909
|
-
result.init(data);
|
|
3910
|
-
return result;
|
|
3911
|
-
}
|
|
3912
|
-
toJSON(data) {
|
|
3913
|
-
data = typeof data === 'object' ? data : {};
|
|
3914
|
-
data["id"] = this.id;
|
|
3915
|
-
data["caseNumber"] = this.caseNumber;
|
|
3916
|
-
data["origin"] = this.origin;
|
|
3917
|
-
data["channel"] = this.channel;
|
|
3918
|
-
data["status"] = this.status;
|
|
3919
|
-
data["priority"] = this.priority;
|
|
3920
|
-
data["subject"] = this.subject;
|
|
3921
|
-
data["component"] = this.component;
|
|
3922
|
-
data["createdDate"] = this.createdDate ? this.createdDate.toISOString() : undefined;
|
|
3923
|
-
data["contact"] = this.contact ? this.contact.toJSON() : undefined;
|
|
3924
|
-
data["account"] = this.account ? this.account.toJSON() : undefined;
|
|
3925
|
-
data["impersonationConsent"] = this.impersonationConsent ? this.impersonationConsent.toJSON() : undefined;
|
|
3926
|
-
data["surveyUrl"] = this.surveyUrl;
|
|
3927
|
-
return data;
|
|
3928
|
-
}
|
|
3929
|
-
constructor(data){
|
|
3930
|
-
_define_property(this, "id", void 0);
|
|
3931
|
-
_define_property(this, "caseNumber", void 0);
|
|
3932
|
-
_define_property(this, "origin", void 0);
|
|
3933
|
-
_define_property(this, "channel", void 0);
|
|
3934
|
-
_define_property(this, "status", void 0);
|
|
3935
|
-
_define_property(this, "priority", void 0);
|
|
3936
|
-
_define_property(this, "subject", void 0);
|
|
3937
|
-
_define_property(this, "component", void 0);
|
|
3938
|
-
_define_property(this, "createdDate", void 0);
|
|
3939
|
-
_define_property(this, "contact", void 0);
|
|
3940
|
-
_define_property(this, "account", void 0);
|
|
3941
|
-
_define_property(this, "impersonationConsent", void 0);
|
|
3942
|
-
_define_property(this, "surveyUrl", void 0);
|
|
3943
|
-
if (data) {
|
|
3944
|
-
for(var property in data){
|
|
3945
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3946
|
-
}
|
|
3947
|
-
}
|
|
3948
|
-
if (!data) {
|
|
3949
|
-
this.contact = new CaseContact();
|
|
3950
|
-
this.account = new CaseAccount();
|
|
3951
|
-
this.impersonationConsent = new ImpersonationConsent();
|
|
3952
|
-
}
|
|
3953
|
-
}
|
|
3954
|
-
}
|
|
3955
|
-
export var CasePriority = /*#__PURE__*/ function(CasePriority) {
|
|
3956
|
-
CasePriority[CasePriority["Closed"] = 0] = "Closed";
|
|
3957
|
-
CasePriority[CasePriority["Normal"] = 1] = "Normal";
|
|
3958
|
-
CasePriority[CasePriority["High"] = 2] = "High";
|
|
3959
|
-
return CasePriority;
|
|
3960
|
-
}({});
|
|
3961
|
-
export class CaseContact {
|
|
3962
|
-
init(_data) {
|
|
3963
|
-
if (_data) {
|
|
3964
|
-
this.id = _data["id"];
|
|
3965
|
-
this.name = _data["name"];
|
|
3966
|
-
}
|
|
3967
|
-
}
|
|
3968
|
-
static fromJS(data) {
|
|
3969
|
-
data = typeof data === 'object' ? data : {};
|
|
3970
|
-
let result = new CaseContact();
|
|
3971
|
-
result.init(data);
|
|
3972
|
-
return result;
|
|
3973
|
-
}
|
|
3974
|
-
toJSON(data) {
|
|
3975
|
-
data = typeof data === 'object' ? data : {};
|
|
3976
|
-
data["id"] = this.id;
|
|
3977
|
-
data["name"] = this.name;
|
|
3978
|
-
return data;
|
|
3979
|
-
}
|
|
3980
|
-
constructor(data){
|
|
3981
|
-
_define_property(this, "id", void 0);
|
|
3982
|
-
_define_property(this, "name", void 0);
|
|
3983
|
-
if (data) {
|
|
3984
|
-
for(var property in data){
|
|
3985
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
3986
|
-
}
|
|
3987
|
-
}
|
|
3988
|
-
}
|
|
3989
|
-
}
|
|
3990
|
-
export class ImpersonationConsent {
|
|
3991
|
-
init(_data) {
|
|
3992
|
-
if (_data) {
|
|
3993
|
-
this.isPermitted = _data["isPermitted"];
|
|
3994
|
-
this.expiredAt = _data["expiredAt"] ? new Date(_data["expiredAt"].toString()) : undefined;
|
|
3995
|
-
this.error = _data["error"];
|
|
3996
|
-
}
|
|
3997
|
-
}
|
|
3998
|
-
static fromJS(data) {
|
|
3999
|
-
data = typeof data === 'object' ? data : {};
|
|
4000
|
-
let result = new ImpersonationConsent();
|
|
4001
|
-
result.init(data);
|
|
4002
|
-
return result;
|
|
4003
|
-
}
|
|
4004
|
-
toJSON(data) {
|
|
4005
|
-
data = typeof data === 'object' ? data : {};
|
|
4006
|
-
data["isPermitted"] = this.isPermitted;
|
|
4007
|
-
data["expiredAt"] = this.expiredAt ? this.expiredAt.toISOString() : undefined;
|
|
4008
|
-
data["error"] = this.error;
|
|
4009
|
-
return data;
|
|
4010
|
-
}
|
|
4011
|
-
constructor(data){
|
|
4012
|
-
_define_property(this, "isPermitted", void 0);
|
|
4013
|
-
_define_property(this, "expiredAt", void 0);
|
|
4014
|
-
_define_property(this, "error", void 0);
|
|
4015
|
-
if (data) {
|
|
4016
|
-
for(var property in data){
|
|
4017
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4018
|
-
}
|
|
4019
|
-
}
|
|
4020
|
-
}
|
|
4021
|
-
}
|
|
4022
|
-
export var CaseSortingPriority = /*#__PURE__*/ function(CaseSortingPriority) {
|
|
4023
|
-
CaseSortingPriority[CaseSortingPriority["Pending"] = 0] = "Pending";
|
|
4024
|
-
CaseSortingPriority[CaseSortingPriority["Other"] = 1] = "Other";
|
|
4025
|
-
CaseSortingPriority[CaseSortingPriority["Solved"] = 2] = "Solved";
|
|
4026
|
-
CaseSortingPriority[CaseSortingPriority["Closed"] = 3] = "Closed";
|
|
4027
|
-
return CaseSortingPriority;
|
|
4028
|
-
}({});
|
|
4029
|
-
export var SortingOption = /*#__PURE__*/ function(SortingOption) {
|
|
4030
|
-
SortingOption[SortingOption["NewestFirst"] = 0] = "NewestFirst";
|
|
4031
|
-
SortingOption[SortingOption["OldestFirst"] = 1] = "OldestFirst";
|
|
4032
|
-
SortingOption[SortingOption["Priority"] = 2] = "Priority";
|
|
4033
|
-
return SortingOption;
|
|
4034
|
-
}({});
|
|
4035
|
-
export class CaseDetails {
|
|
4036
|
-
init(_data) {
|
|
4037
|
-
if (_data) {
|
|
4038
|
-
this.id = _data["id"];
|
|
4039
|
-
this.caseNumber = _data["caseNumber"];
|
|
4040
|
-
this.origin = _data["origin"];
|
|
4041
|
-
this.channel = _data["channel"];
|
|
4042
|
-
this.status = _data["status"];
|
|
4043
|
-
this.priority = _data["priority"];
|
|
4044
|
-
this.subject = _data["subject"];
|
|
4045
|
-
this.description = _data["description"];
|
|
4046
|
-
this.htmlDescription = _data["htmlDescription"];
|
|
4047
|
-
this.component = _data["component"];
|
|
4048
|
-
this.createdDate = _data["createdDate"] ? new Date(_data["createdDate"].toString()) : undefined;
|
|
4049
|
-
this.lastModifiedDate = _data["lastModifiedDate"] ? new Date(_data["lastModifiedDate"].toString()) : undefined;
|
|
4050
|
-
this.contact = _data["contact"] ? CaseContact.fromJS(_data["contact"]) : new CaseContact();
|
|
4051
|
-
this.owner = _data["owner"] ? CaseOwner.fromJS(_data["owner"]) : new CaseOwner();
|
|
4052
|
-
if (Array.isArray(_data["messages"])) {
|
|
4053
|
-
this.messages = [];
|
|
4054
|
-
for (let item of _data["messages"])this.messages.push(CaseMessage.fromJS(item));
|
|
4055
|
-
}
|
|
4056
|
-
this.chatTranscript = _data["chatTranscript"];
|
|
4057
|
-
this.commentingOptions = _data["commentingOptions"];
|
|
4058
|
-
this.replySubject = _data["replySubject"];
|
|
4059
|
-
this.replyRef = _data["replyRef"];
|
|
4060
|
-
this.account = _data["account"] ? CaseAccount.fromJS(_data["account"]) : new CaseAccount();
|
|
4061
|
-
this.impersonationConsent = _data["impersonationConsent"] ? ImpersonationConsent.fromJS(_data["impersonationConsent"]) : new ImpersonationConsent();
|
|
4062
|
-
this.surveyUrl = _data["surveyUrl"];
|
|
4063
|
-
}
|
|
4064
|
-
}
|
|
4065
|
-
static fromJS(data) {
|
|
4066
|
-
data = typeof data === 'object' ? data : {};
|
|
4067
|
-
let result = new CaseDetails();
|
|
4068
|
-
result.init(data);
|
|
4069
|
-
return result;
|
|
4070
|
-
}
|
|
4071
|
-
toJSON(data) {
|
|
4072
|
-
data = typeof data === 'object' ? data : {};
|
|
4073
|
-
data["id"] = this.id;
|
|
4074
|
-
data["caseNumber"] = this.caseNumber;
|
|
4075
|
-
data["origin"] = this.origin;
|
|
4076
|
-
data["channel"] = this.channel;
|
|
4077
|
-
data["status"] = this.status;
|
|
4078
|
-
data["priority"] = this.priority;
|
|
4079
|
-
data["subject"] = this.subject;
|
|
4080
|
-
data["description"] = this.description;
|
|
4081
|
-
data["htmlDescription"] = this.htmlDescription;
|
|
4082
|
-
data["component"] = this.component;
|
|
4083
|
-
data["createdDate"] = this.createdDate ? this.createdDate.toISOString() : undefined;
|
|
4084
|
-
data["lastModifiedDate"] = this.lastModifiedDate ? this.lastModifiedDate.toISOString() : undefined;
|
|
4085
|
-
data["contact"] = this.contact ? this.contact.toJSON() : undefined;
|
|
4086
|
-
data["owner"] = this.owner ? this.owner.toJSON() : undefined;
|
|
4087
|
-
if (Array.isArray(this.messages)) {
|
|
4088
|
-
data["messages"] = [];
|
|
4089
|
-
for (let item of this.messages)data["messages"].push(item.toJSON());
|
|
4090
|
-
}
|
|
4091
|
-
data["chatTranscript"] = this.chatTranscript;
|
|
4092
|
-
data["commentingOptions"] = this.commentingOptions;
|
|
4093
|
-
data["replySubject"] = this.replySubject;
|
|
4094
|
-
data["replyRef"] = this.replyRef;
|
|
4095
|
-
data["account"] = this.account ? this.account.toJSON() : undefined;
|
|
4096
|
-
data["impersonationConsent"] = this.impersonationConsent ? this.impersonationConsent.toJSON() : undefined;
|
|
4097
|
-
data["surveyUrl"] = this.surveyUrl;
|
|
4098
|
-
return data;
|
|
4099
|
-
}
|
|
4100
|
-
constructor(data){
|
|
4101
|
-
_define_property(this, "id", void 0);
|
|
4102
|
-
_define_property(this, "caseNumber", void 0);
|
|
4103
|
-
_define_property(this, "origin", void 0);
|
|
4104
|
-
_define_property(this, "channel", void 0);
|
|
4105
|
-
_define_property(this, "status", void 0);
|
|
4106
|
-
_define_property(this, "priority", void 0);
|
|
4107
|
-
_define_property(this, "subject", void 0);
|
|
4108
|
-
_define_property(this, "description", void 0);
|
|
4109
|
-
_define_property(this, "htmlDescription", void 0);
|
|
4110
|
-
_define_property(this, "component", void 0);
|
|
4111
|
-
_define_property(this, "createdDate", void 0);
|
|
4112
|
-
_define_property(this, "lastModifiedDate", void 0);
|
|
4113
|
-
_define_property(this, "contact", void 0);
|
|
4114
|
-
_define_property(this, "owner", void 0);
|
|
4115
|
-
_define_property(this, "messages", void 0);
|
|
4116
|
-
_define_property(this, "chatTranscript", void 0);
|
|
4117
|
-
_define_property(this, "commentingOptions", void 0);
|
|
4118
|
-
_define_property(this, "replySubject", void 0);
|
|
4119
|
-
_define_property(this, "replyRef", void 0);
|
|
4120
|
-
_define_property(this, "account", void 0);
|
|
4121
|
-
_define_property(this, "impersonationConsent", void 0);
|
|
4122
|
-
_define_property(this, "surveyUrl", void 0);
|
|
4123
|
-
if (data) {
|
|
4124
|
-
for(var property in data){
|
|
4125
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4126
|
-
}
|
|
4127
|
-
}
|
|
4128
|
-
if (!data) {
|
|
4129
|
-
this.contact = new CaseContact();
|
|
4130
|
-
this.owner = new CaseOwner();
|
|
4131
|
-
this.account = new CaseAccount();
|
|
4132
|
-
this.impersonationConsent = new ImpersonationConsent();
|
|
4133
|
-
}
|
|
4134
|
-
}
|
|
4135
|
-
}
|
|
4136
|
-
export class CaseOwner {
|
|
4137
|
-
init(_data) {
|
|
4138
|
-
if (_data) {
|
|
4139
|
-
this.name = _data["name"];
|
|
4140
|
-
}
|
|
4141
|
-
}
|
|
4142
|
-
static fromJS(data) {
|
|
4143
|
-
data = typeof data === 'object' ? data : {};
|
|
4144
|
-
let result = new CaseOwner();
|
|
4145
|
-
result.init(data);
|
|
4146
|
-
return result;
|
|
4147
|
-
}
|
|
4148
|
-
toJSON(data) {
|
|
4149
|
-
data = typeof data === 'object' ? data : {};
|
|
4150
|
-
data["name"] = this.name;
|
|
4151
|
-
return data;
|
|
4152
|
-
}
|
|
4153
|
-
constructor(data){
|
|
4154
|
-
_define_property(this, "name", void 0);
|
|
4155
|
-
if (data) {
|
|
4156
|
-
for(var property in data){
|
|
4157
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4158
|
-
}
|
|
4159
|
-
}
|
|
4160
|
-
}
|
|
4161
|
-
}
|
|
4162
|
-
export class CaseMessage {
|
|
4163
|
-
init(_data) {
|
|
4164
|
-
if (_data) {
|
|
4165
|
-
this.isAgent = _data["isAgent"];
|
|
4166
|
-
this.name = _data["name"];
|
|
4167
|
-
this.body = _data["body"];
|
|
4168
|
-
this.htmlBody = _data["htmlBody"];
|
|
4169
|
-
if (Array.isArray(_data["attachments"])) {
|
|
4170
|
-
this.attachments = [];
|
|
4171
|
-
for (let item of _data["attachments"])this.attachments.push(CaseAttachment.fromJS(item));
|
|
4172
|
-
}
|
|
4173
|
-
this.messageDate = _data["messageDate"] ? new Date(_data["messageDate"].toString()) : undefined;
|
|
4174
|
-
}
|
|
4175
|
-
}
|
|
4176
|
-
static fromJS(data) {
|
|
4177
|
-
data = typeof data === 'object' ? data : {};
|
|
4178
|
-
let result = new CaseMessage();
|
|
4179
|
-
result.init(data);
|
|
4180
|
-
return result;
|
|
4181
|
-
}
|
|
4182
|
-
toJSON(data) {
|
|
4183
|
-
data = typeof data === 'object' ? data : {};
|
|
4184
|
-
data["isAgent"] = this.isAgent;
|
|
4185
|
-
data["name"] = this.name;
|
|
4186
|
-
data["body"] = this.body;
|
|
4187
|
-
data["htmlBody"] = this.htmlBody;
|
|
4188
|
-
if (Array.isArray(this.attachments)) {
|
|
4189
|
-
data["attachments"] = [];
|
|
4190
|
-
for (let item of this.attachments)data["attachments"].push(item.toJSON());
|
|
4191
|
-
}
|
|
4192
|
-
data["messageDate"] = this.messageDate ? this.messageDate.toISOString() : undefined;
|
|
4193
|
-
return data;
|
|
4194
|
-
}
|
|
4195
|
-
constructor(data){
|
|
4196
|
-
_define_property(this, "isAgent", void 0);
|
|
4197
|
-
_define_property(this, "name", void 0);
|
|
4198
|
-
_define_property(this, "body", void 0);
|
|
4199
|
-
_define_property(this, "htmlBody", void 0);
|
|
4200
|
-
_define_property(this, "attachments", void 0);
|
|
4201
|
-
_define_property(this, "messageDate", void 0);
|
|
4202
|
-
if (data) {
|
|
4203
|
-
for(var property in data){
|
|
4204
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4205
|
-
}
|
|
4206
|
-
}
|
|
4207
|
-
}
|
|
4208
|
-
}
|
|
4209
|
-
export class CaseAttachment {
|
|
4210
|
-
init(_data) {
|
|
4211
|
-
if (_data) {
|
|
4212
|
-
this.name = _data["name"];
|
|
4213
|
-
this.downloadUrl = _data["downloadUrl"];
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
static fromJS(data) {
|
|
4217
|
-
data = typeof data === 'object' ? data : {};
|
|
4218
|
-
let result = new CaseAttachment();
|
|
4219
|
-
result.init(data);
|
|
4220
|
-
return result;
|
|
4221
|
-
}
|
|
4222
|
-
toJSON(data) {
|
|
4223
|
-
data = typeof data === 'object' ? data : {};
|
|
4224
|
-
data["name"] = this.name;
|
|
4225
|
-
data["downloadUrl"] = this.downloadUrl;
|
|
4226
|
-
return data;
|
|
4227
|
-
}
|
|
4228
|
-
constructor(data){
|
|
4229
|
-
_define_property(this, "name", void 0);
|
|
4230
|
-
_define_property(this, "downloadUrl", void 0);
|
|
4231
|
-
if (data) {
|
|
4232
|
-
for(var property in data){
|
|
4233
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4234
|
-
}
|
|
4235
|
-
}
|
|
4236
|
-
}
|
|
4237
|
-
}
|
|
4238
|
-
export var CommentingOptions = /*#__PURE__*/ function(CommentingOptions) {
|
|
4239
|
-
CommentingOptions[CommentingOptions["None"] = 0] = "None";
|
|
4240
|
-
CommentingOptions[CommentingOptions["Allowed"] = 1] = "Allowed";
|
|
4241
|
-
CommentingOptions[CommentingOptions["WaitingAgent"] = 2] = "WaitingAgent";
|
|
4242
|
-
CommentingOptions[CommentingOptions["Closed"] = 3] = "Closed";
|
|
4243
|
-
return CommentingOptions;
|
|
4244
|
-
}({});
|
|
4245
|
-
export class EmailResult {
|
|
4246
|
-
init(_data) {
|
|
4247
|
-
if (_data) {
|
|
4248
|
-
this.succeeded = _data["succeeded"];
|
|
4249
|
-
this.error = _data["error"];
|
|
4250
|
-
}
|
|
4251
|
-
}
|
|
4252
|
-
static fromJS(data) {
|
|
4253
|
-
data = typeof data === 'object' ? data : {};
|
|
4254
|
-
let result = new EmailResult();
|
|
4255
|
-
result.init(data);
|
|
4256
|
-
return result;
|
|
4257
|
-
}
|
|
4258
|
-
toJSON(data) {
|
|
4259
|
-
data = typeof data === 'object' ? data : {};
|
|
4260
|
-
data["succeeded"] = this.succeeded;
|
|
4261
|
-
data["error"] = this.error;
|
|
4262
|
-
return data;
|
|
4263
|
-
}
|
|
4264
|
-
constructor(data){
|
|
4265
|
-
_define_property(this, "succeeded", void 0);
|
|
4266
|
-
_define_property(this, "error", void 0);
|
|
4267
|
-
if (data) {
|
|
4268
|
-
for(var property in data){
|
|
4269
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4270
|
-
}
|
|
4271
|
-
}
|
|
4272
|
-
}
|
|
4273
|
-
}
|
|
4274
|
-
export class SupportOnline {
|
|
4275
|
-
init(_data) {
|
|
4276
|
-
if (_data) {
|
|
4277
|
-
this.isOnline = _data["isOnline"];
|
|
4278
|
-
this.changeStatusTimeInSeconds = _data["changeStatusTimeInSeconds"];
|
|
4279
|
-
}
|
|
4280
|
-
}
|
|
4281
|
-
static fromJS(data) {
|
|
4282
|
-
data = typeof data === 'object' ? data : {};
|
|
4283
|
-
let result = new SupportOnline();
|
|
4284
|
-
result.init(data);
|
|
4285
|
-
return result;
|
|
4286
|
-
}
|
|
4287
|
-
toJSON(data) {
|
|
4288
|
-
data = typeof data === 'object' ? data : {};
|
|
4289
|
-
data["isOnline"] = this.isOnline;
|
|
4290
|
-
data["changeStatusTimeInSeconds"] = this.changeStatusTimeInSeconds;
|
|
4291
|
-
return data;
|
|
4292
|
-
}
|
|
4293
|
-
constructor(data){
|
|
4294
|
-
_define_property(this, "isOnline", void 0);
|
|
4295
|
-
_define_property(this, "changeStatusTimeInSeconds", void 0);
|
|
4296
|
-
if (data) {
|
|
4297
|
-
for(var property in data){
|
|
4298
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4299
|
-
}
|
|
4300
|
-
}
|
|
4301
|
-
}
|
|
4302
|
-
}
|
|
4303
|
-
export class CallbackResponse {
|
|
4304
|
-
init(_data) {
|
|
4305
|
-
if (_data) {
|
|
4306
|
-
this.success = _data["success"];
|
|
4307
|
-
this.error = _data["error"];
|
|
4308
|
-
}
|
|
4309
|
-
}
|
|
4310
|
-
static fromJS(data) {
|
|
4311
|
-
data = typeof data === 'object' ? data : {};
|
|
4312
|
-
let result = new CallbackResponse();
|
|
4313
|
-
result.init(data);
|
|
4314
|
-
return result;
|
|
4315
|
-
}
|
|
4316
|
-
toJSON(data) {
|
|
4317
|
-
data = typeof data === 'object' ? data : {};
|
|
4318
|
-
data["success"] = this.success;
|
|
4319
|
-
data["error"] = this.error;
|
|
4320
|
-
return data;
|
|
4321
|
-
}
|
|
4322
|
-
constructor(data){
|
|
4323
|
-
_define_property(this, "success", void 0);
|
|
4324
|
-
_define_property(this, "error", void 0);
|
|
4325
|
-
if (data) {
|
|
4326
|
-
for(var property in data){
|
|
4327
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4328
|
-
}
|
|
4329
|
-
}
|
|
4330
|
-
}
|
|
4331
|
-
}
|
|
4332
|
-
export class CallbackRequest {
|
|
4333
|
-
init(_data) {
|
|
4334
|
-
if (_data) {
|
|
4335
|
-
this.caseTrackingId = _data["caseTrackingId"];
|
|
4336
|
-
this.componentId = _data["componentId"];
|
|
4337
|
-
this.callbackNumber = _data["callbackNumber"];
|
|
4338
|
-
this.name = _data["name"];
|
|
4339
|
-
this.subject = _data["subject"];
|
|
4340
|
-
this.description = _data["description"];
|
|
4341
|
-
this.chatbotSessionId = _data["chatbotSessionId"];
|
|
4342
|
-
this.externalUserId = _data["externalUserId"];
|
|
4343
|
-
}
|
|
4344
|
-
}
|
|
4345
|
-
static fromJS(data) {
|
|
4346
|
-
data = typeof data === 'object' ? data : {};
|
|
4347
|
-
let result = new CallbackRequest();
|
|
4348
|
-
result.init(data);
|
|
4349
|
-
return result;
|
|
4350
|
-
}
|
|
4351
|
-
toJSON(data) {
|
|
4352
|
-
data = typeof data === 'object' ? data : {};
|
|
4353
|
-
data["caseTrackingId"] = this.caseTrackingId;
|
|
4354
|
-
data["componentId"] = this.componentId;
|
|
4355
|
-
data["callbackNumber"] = this.callbackNumber;
|
|
4356
|
-
data["name"] = this.name;
|
|
4357
|
-
data["subject"] = this.subject;
|
|
4358
|
-
data["description"] = this.description;
|
|
4359
|
-
data["chatbotSessionId"] = this.chatbotSessionId;
|
|
4360
|
-
data["externalUserId"] = this.externalUserId;
|
|
4361
|
-
return data;
|
|
4362
|
-
}
|
|
4363
|
-
constructor(data){
|
|
4364
|
-
_define_property(this, "caseTrackingId", void 0);
|
|
4365
|
-
_define_property(this, "componentId", void 0);
|
|
4366
|
-
_define_property(this, "callbackNumber", void 0);
|
|
4367
|
-
_define_property(this, "name", void 0);
|
|
4368
|
-
_define_property(this, "subject", void 0);
|
|
4369
|
-
_define_property(this, "description", void 0);
|
|
4370
|
-
_define_property(this, "chatbotSessionId", void 0);
|
|
4371
|
-
_define_property(this, "externalUserId", void 0);
|
|
4372
|
-
if (data) {
|
|
4373
|
-
for(var property in data){
|
|
4374
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4375
|
-
}
|
|
4376
|
-
}
|
|
4377
|
-
}
|
|
4378
|
-
}
|
|
4379
|
-
export class NewCaseResponse {
|
|
4380
|
-
init(_data) {
|
|
4381
|
-
if (_data) {
|
|
4382
|
-
this.caseTrackingId = _data["caseTrackingId"];
|
|
4383
|
-
}
|
|
4384
|
-
}
|
|
4385
|
-
static fromJS(data) {
|
|
4386
|
-
data = typeof data === 'object' ? data : {};
|
|
4387
|
-
let result = new NewCaseResponse();
|
|
4388
|
-
result.init(data);
|
|
4389
|
-
return result;
|
|
4390
|
-
}
|
|
4391
|
-
toJSON(data) {
|
|
4392
|
-
data = typeof data === 'object' ? data : {};
|
|
4393
|
-
data["caseTrackingId"] = this.caseTrackingId;
|
|
4394
|
-
return data;
|
|
4395
|
-
}
|
|
4396
|
-
constructor(data){
|
|
4397
|
-
_define_property(this, "caseTrackingId", void 0);
|
|
4398
|
-
if (data) {
|
|
4399
|
-
for(var property in data){
|
|
4400
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4401
|
-
}
|
|
4402
|
-
}
|
|
4403
|
-
}
|
|
4404
|
-
}
|
|
4405
|
-
export class NewCaseRequest {
|
|
4406
|
-
init(_data) {
|
|
4407
|
-
if (_data) {
|
|
4408
|
-
this.chatbotSessionId = _data["chatbotSessionId"];
|
|
4409
|
-
this.impersonationAccess = _data["impersonationAccess"];
|
|
4410
|
-
}
|
|
4411
|
-
}
|
|
4412
|
-
static fromJS(data) {
|
|
4413
|
-
data = typeof data === 'object' ? data : {};
|
|
4414
|
-
let result = new NewCaseRequest();
|
|
4415
|
-
result.init(data);
|
|
4416
|
-
return result;
|
|
4417
|
-
}
|
|
4418
|
-
toJSON(data) {
|
|
4419
|
-
data = typeof data === 'object' ? data : {};
|
|
4420
|
-
data["chatbotSessionId"] = this.chatbotSessionId;
|
|
4421
|
-
data["impersonationAccess"] = this.impersonationAccess;
|
|
4422
|
-
return data;
|
|
4423
|
-
}
|
|
4424
|
-
constructor(data){
|
|
4425
|
-
_define_property(this, "chatbotSessionId", void 0);
|
|
4426
|
-
_define_property(this, "impersonationAccess", void 0);
|
|
4427
|
-
if (data) {
|
|
4428
|
-
for(var property in data){
|
|
4429
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4430
|
-
}
|
|
4431
|
-
}
|
|
4432
|
-
}
|
|
4433
|
-
}
|
|
4434
|
-
export class ImpersonationConsentDto {
|
|
4435
|
-
init(_data) {
|
|
4436
|
-
if (_data) {
|
|
4437
|
-
this.id = _data["id"];
|
|
4438
|
-
this.active = _data["active"];
|
|
4439
|
-
this.type = _data["type"];
|
|
4440
|
-
this.userId = _data["userId"];
|
|
4441
|
-
this.expiredAt = _data["expiredAt"] ? new Date(_data["expiredAt"].toString()) : undefined;
|
|
4442
|
-
if (Array.isArray(_data["impersonators"])) {
|
|
4443
|
-
this.impersonators = [];
|
|
4444
|
-
for (let item of _data["impersonators"])this.impersonators.push(item);
|
|
4445
|
-
}
|
|
4446
|
-
this.comment = _data["comment"];
|
|
4447
|
-
}
|
|
4448
|
-
}
|
|
4449
|
-
static fromJS(data) {
|
|
4450
|
-
data = typeof data === 'object' ? data : {};
|
|
4451
|
-
let result = new ImpersonationConsentDto();
|
|
4452
|
-
result.init(data);
|
|
4453
|
-
return result;
|
|
4454
|
-
}
|
|
4455
|
-
toJSON(data) {
|
|
4456
|
-
data = typeof data === 'object' ? data : {};
|
|
4457
|
-
data["id"] = this.id;
|
|
4458
|
-
data["active"] = this.active;
|
|
4459
|
-
data["type"] = this.type;
|
|
4460
|
-
data["userId"] = this.userId;
|
|
4461
|
-
data["expiredAt"] = this.expiredAt ? this.expiredAt.toISOString() : undefined;
|
|
4462
|
-
if (Array.isArray(this.impersonators)) {
|
|
4463
|
-
data["impersonators"] = [];
|
|
4464
|
-
for (let item of this.impersonators)data["impersonators"].push(item);
|
|
4465
|
-
}
|
|
4466
|
-
data["comment"] = this.comment;
|
|
4467
|
-
return data;
|
|
4468
|
-
}
|
|
4469
|
-
constructor(data){
|
|
4470
|
-
_define_property(this, "id", void 0);
|
|
4471
|
-
_define_property(this, "active", void 0);
|
|
4472
|
-
_define_property(this, "type", void 0);
|
|
4473
|
-
_define_property(this, "userId", void 0);
|
|
4474
|
-
_define_property(this, "expiredAt", void 0);
|
|
4475
|
-
_define_property(this, "impersonators", void 0);
|
|
4476
|
-
_define_property(this, "comment", void 0);
|
|
4477
|
-
if (data) {
|
|
4478
|
-
for(var property in data){
|
|
4479
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4480
|
-
}
|
|
4481
|
-
}
|
|
4482
|
-
}
|
|
4483
|
-
}
|
|
4484
|
-
export var ImpersonationConsentType = /*#__PURE__*/ function(ImpersonationConsentType) {
|
|
4485
|
-
ImpersonationConsentType[ImpersonationConsentType["Unknown"] = 0] = "Unknown";
|
|
4486
|
-
ImpersonationConsentType[ImpersonationConsentType["TenantLevel"] = 10] = "TenantLevel";
|
|
4487
|
-
ImpersonationConsentType[ImpersonationConsentType["CaseLevel"] = 20] = "CaseLevel";
|
|
4488
|
-
return ImpersonationConsentType;
|
|
4489
|
-
}({});
|
|
4490
|
-
export class MakeTokenRequest {
|
|
4491
|
-
init(_data) {
|
|
4492
|
-
if (_data) {
|
|
4493
|
-
this.validity = _data["validity"];
|
|
4494
|
-
if (_data["claims"]) {
|
|
4495
|
-
this.claims = {};
|
|
4496
|
-
for(let key in _data["claims"]){
|
|
4497
|
-
if (_data["claims"].hasOwnProperty(key)) this.claims[key] = _data["claims"][key];
|
|
4498
|
-
}
|
|
4499
|
-
}
|
|
4500
|
-
}
|
|
4501
|
-
}
|
|
4502
|
-
static fromJS(data) {
|
|
4503
|
-
data = typeof data === 'object' ? data : {};
|
|
4504
|
-
let result = new MakeTokenRequest();
|
|
4505
|
-
result.init(data);
|
|
4506
|
-
return result;
|
|
4507
|
-
}
|
|
4508
|
-
toJSON(data) {
|
|
4509
|
-
data = typeof data === 'object' ? data : {};
|
|
4510
|
-
data["validity"] = this.validity;
|
|
4511
|
-
if (this.claims) {
|
|
4512
|
-
data["claims"] = {};
|
|
4513
|
-
for(let key in this.claims){
|
|
4514
|
-
if (this.claims.hasOwnProperty(key)) data["claims"][key] = this.claims[key];
|
|
4515
|
-
}
|
|
4516
|
-
}
|
|
4517
|
-
return data;
|
|
4518
|
-
}
|
|
4519
|
-
constructor(data){
|
|
4520
|
-
_define_property(this, "validity", void 0);
|
|
4521
|
-
_define_property(this, "claims", void 0);
|
|
4522
|
-
if (data) {
|
|
4523
|
-
for(var property in data){
|
|
4524
|
-
if (data.hasOwnProperty(property)) this[property] = data[property];
|
|
4525
|
-
}
|
|
4526
|
-
}
|
|
4527
|
-
}
|
|
4528
|
-
}
|
|
4529
|
-
export class ApiException extends Error {
|
|
4530
|
-
static isApiException(obj) {
|
|
4531
|
-
return obj.isApiException === true;
|
|
4532
|
-
}
|
|
4533
|
-
constructor(message, status, response, headers, result){
|
|
4534
|
-
super(), _define_property(this, "message", void 0), _define_property(this, "status", void 0), _define_property(this, "response", void 0), _define_property(this, "headers", void 0), _define_property(this, "result", void 0), _define_property(this, "isApiException", true);
|
|
4535
|
-
this.message = message;
|
|
4536
|
-
this.status = status;
|
|
4537
|
-
this.response = response;
|
|
4538
|
-
this.headers = headers;
|
|
4539
|
-
this.result = result;
|
|
4540
|
-
}
|
|
4541
|
-
}
|
|
4542
|
-
function throwException(message, status, response, headers, result) {
|
|
4543
|
-
if (result !== null && result !== undefined) throw result;
|
|
4544
|
-
else throw new ApiException(message, status, response, headers, null);
|
|
4545
|
-
}
|
|
4546
|
-
function isAxiosError(obj) {
|
|
4547
|
-
return obj && obj.isAxiosError === true;
|
|
4548
|
-
}
|
|
4549
|
-
|
|
4550
|
-
//# sourceMappingURL=native-client.js.map
|