@twin.org/logging-service 0.0.1-next.10 → 0.0.1-next.11
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/dist/cjs/index.cjs
CHANGED
@@ -194,7 +194,6 @@ class LoggingService {
|
|
194
194
|
* @param pageSize The maximum number of entities in a page.
|
195
195
|
* @returns All the entities for the storage matching the conditions,
|
196
196
|
* and a cursor which can be used to request more entities.
|
197
|
-
* @throws NotImplementedError if the implementation does not support retrieval.
|
198
197
|
*/
|
199
198
|
async query(level, source, timeStart, timeEnd, cursor, pageSize) {
|
200
199
|
const condition = {
|
@@ -229,16 +228,11 @@ class LoggingService {
|
|
229
228
|
value: timeEnd
|
230
229
|
});
|
231
230
|
}
|
232
|
-
|
233
|
-
{
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
], undefined, cursor, pageSize);
|
238
|
-
return {
|
239
|
-
entities: result.entities,
|
240
|
-
cursor: result.cursor
|
241
|
-
};
|
231
|
+
if (core.Is.function(this._loggingConnector?.query)) {
|
232
|
+
const result = await this._loggingConnector.query(condition, [{ property: "ts", sortDirection: entity.SortDirection.Descending }], undefined, cursor, pageSize);
|
233
|
+
return { entities: result.entities, cursor: result.cursor };
|
234
|
+
}
|
235
|
+
return { entities: [] };
|
242
236
|
}
|
243
237
|
}
|
244
238
|
|
package/dist/esm/index.mjs
CHANGED
@@ -192,7 +192,6 @@ class LoggingService {
|
|
192
192
|
* @param pageSize The maximum number of entities in a page.
|
193
193
|
* @returns All the entities for the storage matching the conditions,
|
194
194
|
* and a cursor which can be used to request more entities.
|
195
|
-
* @throws NotImplementedError if the implementation does not support retrieval.
|
196
195
|
*/
|
197
196
|
async query(level, source, timeStart, timeEnd, cursor, pageSize) {
|
198
197
|
const condition = {
|
@@ -227,16 +226,11 @@ class LoggingService {
|
|
227
226
|
value: timeEnd
|
228
227
|
});
|
229
228
|
}
|
230
|
-
|
231
|
-
{
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
], undefined, cursor, pageSize);
|
236
|
-
return {
|
237
|
-
entities: result.entities,
|
238
|
-
cursor: result.cursor
|
239
|
-
};
|
229
|
+
if (Is.function(this._loggingConnector?.query)) {
|
230
|
+
const result = await this._loggingConnector.query(condition, [{ property: "ts", sortDirection: SortDirection.Descending }], undefined, cursor, pageSize);
|
231
|
+
return { entities: result.entities, cursor: result.cursor };
|
232
|
+
}
|
233
|
+
return { entities: [] };
|
240
234
|
}
|
241
235
|
}
|
242
236
|
|
@@ -33,7 +33,6 @@ export declare class LoggingService implements ILoggingComponent {
|
|
33
33
|
* @param pageSize The maximum number of entities in a page.
|
34
34
|
* @returns All the entities for the storage matching the conditions,
|
35
35
|
* and a cursor which can be used to request more entities.
|
36
|
-
* @throws NotImplementedError if the implementation does not support retrieval.
|
37
36
|
*/
|
38
37
|
query(level?: LogLevel, source?: string, timeStart?: number, timeEnd?: number, cursor?: string, pageSize?: number): Promise<{
|
39
38
|
/**
|
package/docs/changelog.md
CHANGED
@@ -125,10 +125,6 @@ The maximum number of entities in a page.
|
|
125
125
|
All the entities for the storage matching the conditions,
|
126
126
|
and a cursor which can be used to request more entities.
|
127
127
|
|
128
|
-
#### Throws
|
129
|
-
|
130
|
-
NotImplementedError if the implementation does not support retrieval.
|
131
|
-
|
132
128
|
#### Implementation of
|
133
129
|
|
134
130
|
`ILoggingComponent.query`
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# Function: generateRestRoutesLogging()
|
2
2
|
|
3
|
-
> **generateRestRoutesLogging**(`baseRouteName`, `componentName`): `IRestRoute`[]
|
3
|
+
> **generateRestRoutesLogging**(`baseRouteName`, `componentName`): `IRestRoute`\<`any`, `any`\>[]
|
4
4
|
|
5
5
|
The REST routes for logging.
|
6
6
|
|
@@ -20,6 +20,6 @@ The name of the component to use in the routes stored in the ComponentFactory.
|
|
20
20
|
|
21
21
|
## Returns
|
22
22
|
|
23
|
-
`IRestRoute`[]
|
23
|
+
`IRestRoute`\<`any`, `any`\>[]
|
24
24
|
|
25
25
|
The generated routes.
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@twin.org/logging-service",
|
3
|
-
"version": "0.0.1-next.
|
3
|
+
"version": "0.0.1-next.11",
|
4
4
|
"description": "Logging contract implementation and REST endpoint definitions",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"@twin.org/api-models": "next",
|
18
18
|
"@twin.org/core": "next",
|
19
19
|
"@twin.org/entity": "next",
|
20
|
-
"@twin.org/logging-models": "0.0.1-next.
|
20
|
+
"@twin.org/logging-models": "0.0.1-next.11",
|
21
21
|
"@twin.org/nameof": "next",
|
22
22
|
"@twin.org/web": "next"
|
23
23
|
},
|