starta.apiclient 1.37.1021 → 1.37.1022
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/lib/services/chat.js +10 -0
- package/lib/services/index.js +1 -3
- package/package.json +1 -1
package/lib/services/chat.js
CHANGED
|
@@ -11,6 +11,11 @@ var Chat = /** @class */ (function () {
|
|
|
11
11
|
return this._requestRunner.performRequest({
|
|
12
12
|
url: "accounts/".concat(login, "/chatMessages"),
|
|
13
13
|
method: 'GET',
|
|
14
|
+
config: {
|
|
15
|
+
rewriteBaseUrl: function (url) {
|
|
16
|
+
return url.replace('/api', '/comm/api');
|
|
17
|
+
},
|
|
18
|
+
},
|
|
14
19
|
});
|
|
15
20
|
};
|
|
16
21
|
Chat.prototype.addMessage = function (login, _a) {
|
|
@@ -23,6 +28,11 @@ var Chat = /** @class */ (function () {
|
|
|
23
28
|
text: text
|
|
24
29
|
},
|
|
25
30
|
},
|
|
31
|
+
config: {
|
|
32
|
+
rewriteBaseUrl: function (url) {
|
|
33
|
+
return url.replace('/api', '/comm/api');
|
|
34
|
+
},
|
|
35
|
+
},
|
|
26
36
|
});
|
|
27
37
|
};
|
|
28
38
|
return Chat;
|
package/lib/services/index.js
CHANGED
|
@@ -74,9 +74,7 @@ var StartaApiClient = /** @class */ (function () {
|
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(StartaApiClient.prototype, "chat", {
|
|
76
76
|
get: function () {
|
|
77
|
-
|
|
78
|
-
chat.setRequestRunner(this._requestRunner.replaceBaseUrl(function (baseUrl) { return baseUrl.replace('/api', '/comm/api'); }));
|
|
79
|
-
return chat;
|
|
77
|
+
return new chat_1.default(this._requestRunner);
|
|
80
78
|
},
|
|
81
79
|
enumerable: false,
|
|
82
80
|
configurable: true
|