attlaz-client 1.3.0 → 1.4.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.
@@ -4,6 +4,7 @@ exports.LogEndpoint = void 0;
4
4
  const Endpoint_1 = require("./Endpoint");
5
5
  const PagedResult_1 = require("../Model/PagedResult");
6
6
  const Log_1 = require("../Model/Log/Log");
7
+ const Utils_1 = require("../Utils");
7
8
  class LogEndpoint extends Endpoint_1.Endpoint {
8
9
  getLogs(logQuery) {
9
10
  return new Promise((resolve, reject) => {
@@ -33,7 +34,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
33
34
  const strTags = arrTags.join(',');
34
35
  arrQuery.push('tags=' + strTags);
35
36
  }
36
- let cmd = '/system/logs/?' + arrQuery.join('&');
37
+ let cmd = '/logstreams/' + Utils_1.Utils.base64encode(logQuery.logStreamId.id) + '/logs/?' + arrQuery.join('&');
37
38
  this.httpClient.request(cmd).then((rawLogs) => {
38
39
  let logs = [];
39
40
  for (let rawLog of rawLogs.data) {
@@ -51,7 +52,7 @@ class LogEndpoint extends Endpoint_1.Endpoint {
51
52
  }
52
53
  save(log) {
53
54
  return new Promise((resolve, reject) => {
54
- let cmd = '/system/logs/';
55
+ let cmd = '/logstreams/' + Utils_1.Utils.base64encode(log.logStream.id) + '/logs';
55
56
  this.httpClient.request(cmd, log, 'POST').then((rawSavedLog) => {
56
57
  resolve(Log_1.Log.parse(rawSavedLog));
57
58
  }).catch((reason) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",