attlaz-client 1.36.10 → 1.37.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.
@@ -1,12 +1,12 @@
1
- import { Endpoint } from './Endpoint.js';
2
- import { LogQuery } from '../Model/Log/LogQuery.js';
3
1
  import { Log } from '../Model/Log/Log.js';
2
+ import { LogItemFilter } from '../Model/Log/LogItemFilter.js';
3
+ import { LogQuery } from '../Model/Log/LogQuery.js';
4
+ import { LogStream } from '../Model/Log/LogStream.js';
4
5
  import { LogStreamId } from '../Model/Log/LogStreamId.js';
5
- import { CollectionResult } from '../Model/Result/CollectionResult.js';
6
6
  import { LogStreamInformation } from '../Model/Log/LogStreamInformation.js';
7
- import { LogStream } from '../Model/Log/LogStream.js';
8
7
  import { CursorPagination } from '../Model/Pagination/CursorPagination.js';
9
- import { LogItemFilter } from '../Model/Log/LogItemFilter.js';
8
+ import { CollectionResult } from '../Model/Result/CollectionResult.js';
9
+ import { Endpoint } from './Endpoint.js';
10
10
  export declare class LogEndpoint extends Endpoint {
11
11
  getLogs(logQuery: LogQuery): Promise<CollectionResult<Log>>;
12
12
  getCursoredLogEntries(logStreamId: LogStreamId, pagination: CursorPagination | null, filter: LogItemFilter | null): Promise<CollectionResult<Log>>;
@@ -1,10 +1,9 @@
1
- import { Endpoint } from './Endpoint.js';
1
+ import { QueryString } from '../Http/Data/QueryString.js';
2
2
  import { Log } from '../Model/Log/Log.js';
3
- import { Utils } from '../Utils.js';
3
+ import { LogStream } from '../Model/Log/LogStream.js';
4
4
  import { LogStreamId } from '../Model/Log/LogStreamId.js';
5
5
  import { LogStreamInformation } from '../Model/Log/LogStreamInformation.js';
6
- import { LogStream } from '../Model/Log/LogStream.js';
7
- import { QueryString } from '../Http/Data/QueryString.js';
6
+ import { Endpoint } from './Endpoint.js';
8
7
  export class LogEndpoint extends Endpoint {
9
8
  async getLogs(logQuery) {
10
9
  const arrQuery = [];
@@ -37,12 +36,12 @@ export class LogEndpoint extends Endpoint {
37
36
  const strTags = arrTags.join(',');
38
37
  arrQuery.push('tags=' + strTags);
39
38
  }
40
- const cmd = '/logstreams/' + Utils.base64encode(logQuery.logStreamId.toString()) + '/logs/?' + arrQuery.join('&');
39
+ const cmd = '/logstreams/' + logQuery.logStreamId.toString() + '/logs/?' + arrQuery.join('&');
41
40
  const result = await this.requestCollection(cmd, Log.parse);
42
41
  return result;
43
42
  }
44
43
  async getCursoredLogEntries(logStreamId, pagination, filter) {
45
- const queryString = new QueryString('/logstreams/' + Utils.base64encode(logStreamId.toString()) + '/logs');
44
+ const queryString = new QueryString('/logstreams/' + logStreamId.toString() + '/logs');
46
45
  queryString.addPagination(pagination);
47
46
  if (filter !== null && filter !== undefined) {
48
47
  if (filter.tags !== null && filter.tags.length > 0) {
@@ -64,7 +63,7 @@ export class LogEndpoint extends Endpoint {
64
63
  }
65
64
  async save(log) {
66
65
  try {
67
- const cmd = '/logstreams/' + Utils.base64encode(log.logStream.toString()) + '/logs';
66
+ const cmd = '/logstreams/' + log.logStream.toString() + '/logs';
68
67
  const result = await this.requestObject(cmd, log, Log.parse, 'POST');
69
68
  const updatedLogEntry = result.getData();
70
69
  if (updatedLogEntry === null) {
@@ -99,7 +98,7 @@ export class LogEndpoint extends Endpoint {
99
98
  }
100
99
  }
101
100
  async clear(logStreamId) {
102
- const cmd = '/logstreams/' + Utils.base64encode(logStreamId.toString()) + '/clear';
101
+ const cmd = '/logstreams/' + logStreamId.toString() + '/clear';
103
102
  try {
104
103
  const parser = (raw) => ({ cleared: raw.cleared });
105
104
  const result = await this.requestObject(cmd, null, parser, 'POST');
@@ -119,7 +118,7 @@ export class LogEndpoint extends Endpoint {
119
118
  }
120
119
  async getInformation(logStreamId) {
121
120
  try {
122
- const url = '/logstreams/' + Utils.base64encode(logStreamId.toString()) + '/info';
121
+ const url = '/logstreams/' + logStreamId.toString() + '/info';
123
122
  const result = await this.requestObject(url, null, LogStreamInformation.parse);
124
123
  return result.getData();
125
124
  }
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "1.36.9";
1
+ export declare const VERSION = "1.36.10";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.36.9";
1
+ export const VERSION = "1.36.10";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.36.10",
3
+ "version": "1.37.0",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",