starta.apiclient 1.37.1069 → 1.37.1076

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.
@@ -169,8 +169,13 @@ var Accounts = /** @class */ (function () {
169
169
  };
170
170
  Accounts.prototype.getNotifications = function (login) {
171
171
  return this._requestRunner.performRequest({
172
- url: "comm/accounts/".concat(login, "/notifications"),
172
+ url: "accounts/".concat(login, "/notifications"),
173
173
  method: 'GET',
174
+ config: {
175
+ rewriteBaseUrl: function (url) {
176
+ return url.replace('/api', '/comm/api');
177
+ },
178
+ },
174
179
  });
175
180
  };
176
181
  return Accounts;
@@ -2,7 +2,10 @@ import { StartaRequestRunner } from '../types';
2
2
  export default class Chats {
3
3
  private _requestRunner;
4
4
  constructor(requestRunner: StartaRequestRunner);
5
- getMessages(login: any, loginWith: any): Promise<import("../types").StartaResponse>;
5
+ get(login: any, loginWith: any): Promise<import("../types").StartaResponse>;
6
+ setLastSeenMessageId(login: any, loginWith: any, { messageId }: {
7
+ messageId: any;
8
+ }): Promise<import("../types").StartaResponse>;
6
9
  addMessage(login: any, loginWith: any, { message: { text } }: {
7
10
  message: {
8
11
  text: any;
@@ -4,9 +4,9 @@ var Chats = /** @class */ (function () {
4
4
  function Chats(requestRunner) {
5
5
  this._requestRunner = requestRunner;
6
6
  }
7
- Chats.prototype.getMessages = function (login, loginWith) {
7
+ Chats.prototype.get = function (login, loginWith) {
8
8
  return this._requestRunner.performRequest({
9
- url: "accounts/".concat(login, "/chats/").concat(loginWith, "/messages"),
9
+ url: "accounts/".concat(login, "/chats/").concat(loginWith),
10
10
  method: 'GET',
11
11
  config: {
12
12
  rewriteBaseUrl: function (url) {
@@ -15,6 +15,21 @@ var Chats = /** @class */ (function () {
15
15
  },
16
16
  });
17
17
  };
18
+ Chats.prototype.setLastSeenMessageId = function (login, loginWith, _a) {
19
+ var messageId = _a.messageId;
20
+ return this._requestRunner.performRequest({
21
+ url: "accounts/".concat(login, "/chats/").concat(loginWith),
22
+ method: 'PUT',
23
+ body: {
24
+ messageId: messageId
25
+ },
26
+ config: {
27
+ rewriteBaseUrl: function (url) {
28
+ return url.replace('/api', '/comm/api');
29
+ },
30
+ },
31
+ });
32
+ };
18
33
  Chats.prototype.addMessage = function (login, loginWith, _a) {
19
34
  var text = _a.message.text;
20
35
  return this._requestRunner.performRequest({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starta.apiclient",
3
- "version": "1.37.1069",
3
+ "version": "1.37.1076",
4
4
  "main": "./lib/index.js",
5
5
  "description": "Wrapper for starta.one api",
6
6
  "author": "Collaboracia OÜ",