namirasoft-log 1.3.21 → 1.3.23
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/NamirasoftLogServer.d.ts +12 -0
- package/dist/NamirasoftLogServer.js +12 -0
- package/dist/NamirasoftLogServer.js.map +1 -1
- package/dist/NamirasoftLogServerAlarmCategory.d.ts +14 -0
- package/dist/NamirasoftLogServerAlarmCategory.js +54 -0
- package/dist/NamirasoftLogServerAlarmCategory.js.map +1 -0
- package/dist/NamirasoftLogServerAlarmField.d.ts +14 -0
- package/dist/NamirasoftLogServerAlarmField.js +54 -0
- package/dist/NamirasoftLogServerAlarmField.js.map +1 -0
- package/dist/NamirasoftLogServerAlarmTag.d.ts +14 -0
- package/dist/NamirasoftLogServerAlarmTag.js +54 -0
- package/dist/NamirasoftLogServerAlarmTag.js.map +1 -0
- package/dist/NamirasoftLogServerBase.js +1 -1
- package/dist/NamirasoftLogServerBase.js.map +1 -1
- package/dist/NamirasoftLogServerLogGroupCategory.d.ts +14 -0
- package/dist/NamirasoftLogServerLogGroupCategory.js +54 -0
- package/dist/NamirasoftLogServerLogGroupCategory.js.map +1 -0
- package/dist/NamirasoftLogServerLogGroupField.d.ts +14 -0
- package/dist/NamirasoftLogServerLogGroupField.js +54 -0
- package/dist/NamirasoftLogServerLogGroupField.js.map +1 -0
- package/dist/NamirasoftLogServerLogGroupTag.d.ts +14 -0
- package/dist/NamirasoftLogServerLogGroupTag.js +54 -0
- package/dist/NamirasoftLogServerLogGroupTag.js.map +1 -0
- package/dist/command/AlarmCategoryCommand.d.ts +4 -0
- package/dist/command/AlarmCategoryCommand.js +23 -0
- package/dist/command/AlarmCategoryCommand.js.map +1 -0
- package/dist/command/AlarmCategoryCreateCommand.d.ts +5 -0
- package/dist/command/AlarmCategoryCreateCommand.js +48 -0
- package/dist/command/AlarmCategoryCreateCommand.js.map +1 -0
- package/dist/command/AlarmCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/AlarmCategoryDeleteCommand.js +37 -0
- package/dist/command/AlarmCategoryDeleteCommand.js.map +1 -0
- package/dist/command/AlarmCategoryGetCommand.d.ts +5 -0
- package/dist/command/AlarmCategoryGetCommand.js +37 -0
- package/dist/command/AlarmCategoryGetCommand.js.map +1 -0
- package/dist/command/AlarmCategoryListCommand.d.ts +5 -0
- package/dist/command/AlarmCategoryListCommand.js +37 -0
- package/dist/command/AlarmCategoryListCommand.js.map +1 -0
- package/dist/command/AlarmCategoryUpdateCommand.d.ts +5 -0
- package/dist/command/AlarmCategoryUpdateCommand.js +48 -0
- package/dist/command/AlarmCategoryUpdateCommand.js.map +1 -0
- package/dist/command/AlarmCreateCommand.js +18 -0
- package/dist/command/AlarmCreateCommand.js.map +1 -1
- package/dist/command/AlarmFieldCommand.d.ts +4 -0
- package/dist/command/AlarmFieldCommand.js +23 -0
- package/dist/command/AlarmFieldCommand.js.map +1 -0
- package/dist/command/AlarmFieldCreateCommand.d.ts +5 -0
- package/dist/command/AlarmFieldCreateCommand.js +66 -0
- package/dist/command/AlarmFieldCreateCommand.js.map +1 -0
- package/dist/command/AlarmFieldDeleteCommand.d.ts +5 -0
- package/dist/command/AlarmFieldDeleteCommand.js +37 -0
- package/dist/command/AlarmFieldDeleteCommand.js.map +1 -0
- package/dist/command/AlarmFieldGetCommand.d.ts +5 -0
- package/dist/command/AlarmFieldGetCommand.js +37 -0
- package/dist/command/AlarmFieldGetCommand.js.map +1 -0
- package/dist/command/AlarmFieldListCommand.d.ts +5 -0
- package/dist/command/AlarmFieldListCommand.js +37 -0
- package/dist/command/AlarmFieldListCommand.js.map +1 -0
- package/dist/command/AlarmFieldUpdateCommand.d.ts +5 -0
- package/dist/command/AlarmFieldUpdateCommand.js +66 -0
- package/dist/command/AlarmFieldUpdateCommand.js.map +1 -0
- package/dist/command/AlarmTagCommand.d.ts +4 -0
- package/dist/command/AlarmTagCommand.js +23 -0
- package/dist/command/AlarmTagCommand.js.map +1 -0
- package/dist/command/AlarmTagCreateCommand.d.ts +5 -0
- package/dist/command/AlarmTagCreateCommand.js +66 -0
- package/dist/command/AlarmTagCreateCommand.js.map +1 -0
- package/dist/command/AlarmTagDeleteCommand.d.ts +5 -0
- package/dist/command/AlarmTagDeleteCommand.js +37 -0
- package/dist/command/AlarmTagDeleteCommand.js.map +1 -0
- package/dist/command/AlarmTagGetCommand.d.ts +5 -0
- package/dist/command/AlarmTagGetCommand.js +37 -0
- package/dist/command/AlarmTagGetCommand.js.map +1 -0
- package/dist/command/AlarmTagListCommand.d.ts +5 -0
- package/dist/command/AlarmTagListCommand.js +37 -0
- package/dist/command/AlarmTagListCommand.js.map +1 -0
- package/dist/command/AlarmTagUpdateCommand.d.ts +5 -0
- package/dist/command/AlarmTagUpdateCommand.js +66 -0
- package/dist/command/AlarmTagUpdateCommand.js.map +1 -0
- package/dist/command/AlarmUpdateCommand.js +18 -0
- package/dist/command/AlarmUpdateCommand.js.map +1 -1
- package/dist/command/LogGroupCategoryCommand.d.ts +4 -0
- package/dist/command/LogGroupCategoryCommand.js +23 -0
- package/dist/command/LogGroupCategoryCommand.js.map +1 -0
- package/dist/command/LogGroupCategoryCreateCommand.d.ts +5 -0
- package/dist/command/LogGroupCategoryCreateCommand.js +48 -0
- package/dist/command/LogGroupCategoryCreateCommand.js.map +1 -0
- package/dist/command/LogGroupCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/LogGroupCategoryDeleteCommand.js +37 -0
- package/dist/command/LogGroupCategoryDeleteCommand.js.map +1 -0
- package/dist/command/LogGroupCategoryGetCommand.d.ts +5 -0
- package/dist/command/LogGroupCategoryGetCommand.js +37 -0
- package/dist/command/LogGroupCategoryGetCommand.js.map +1 -0
- package/dist/command/LogGroupCategoryListCommand.d.ts +5 -0
- package/dist/command/LogGroupCategoryListCommand.js +37 -0
- package/dist/command/LogGroupCategoryListCommand.js.map +1 -0
- package/dist/command/LogGroupCategoryUpdateCommand.d.ts +5 -0
- package/dist/command/LogGroupCategoryUpdateCommand.js +48 -0
- package/dist/command/LogGroupCategoryUpdateCommand.js.map +1 -0
- package/dist/command/LogGroupFieldCommand.d.ts +4 -0
- package/dist/command/LogGroupFieldCommand.js +23 -0
- package/dist/command/LogGroupFieldCommand.js.map +1 -0
- package/dist/command/LogGroupFieldCreateCommand.d.ts +5 -0
- package/dist/command/LogGroupFieldCreateCommand.js +66 -0
- package/dist/command/LogGroupFieldCreateCommand.js.map +1 -0
- package/dist/command/LogGroupFieldDeleteCommand.d.ts +5 -0
- package/dist/command/LogGroupFieldDeleteCommand.js +37 -0
- package/dist/command/LogGroupFieldDeleteCommand.js.map +1 -0
- package/dist/command/LogGroupFieldGetCommand.d.ts +5 -0
- package/dist/command/LogGroupFieldGetCommand.js +37 -0
- package/dist/command/LogGroupFieldGetCommand.js.map +1 -0
- package/dist/command/LogGroupFieldListCommand.d.ts +5 -0
- package/dist/command/LogGroupFieldListCommand.js +37 -0
- package/dist/command/LogGroupFieldListCommand.js.map +1 -0
- package/dist/command/LogGroupFieldUpdateCommand.d.ts +5 -0
- package/dist/command/LogGroupFieldUpdateCommand.js +66 -0
- package/dist/command/LogGroupFieldUpdateCommand.js.map +1 -0
- package/dist/command/LogGroupTagCommand.d.ts +4 -0
- package/dist/command/LogGroupTagCommand.js +23 -0
- package/dist/command/LogGroupTagCommand.js.map +1 -0
- package/dist/command/LogGroupTagCreateCommand.d.ts +5 -0
- package/dist/command/LogGroupTagCreateCommand.js +66 -0
- package/dist/command/LogGroupTagCreateCommand.js.map +1 -0
- package/dist/command/LogGroupTagDeleteCommand.d.ts +5 -0
- package/dist/command/LogGroupTagDeleteCommand.js +37 -0
- package/dist/command/LogGroupTagDeleteCommand.js.map +1 -0
- package/dist/command/LogGroupTagGetCommand.d.ts +5 -0
- package/dist/command/LogGroupTagGetCommand.js +37 -0
- package/dist/command/LogGroupTagGetCommand.js.map +1 -0
- package/dist/command/LogGroupTagListCommand.d.ts +5 -0
- package/dist/command/LogGroupTagListCommand.js +37 -0
- package/dist/command/LogGroupTagListCommand.js.map +1 -0
- package/dist/command/LogGroupTagUpdateCommand.d.ts +5 -0
- package/dist/command/LogGroupTagUpdateCommand.js +66 -0
- package/dist/command/LogGroupTagUpdateCommand.js.map +1 -0
- package/dist/command/cli.js +12 -0
- package/dist/command/cli.js.map +1 -1
- package/dist/index.d.ts +51 -0
- package/dist/index.js +51 -0
- package/dist/index.js.map +1 -1
- package/dist/row/AlarmCategoryRow.d.ts +6 -0
- package/dist/row/AlarmCategoryRow.js +3 -0
- package/dist/row/AlarmCategoryRow.js.map +1 -0
- package/dist/row/AlarmFieldRow.d.ts +8 -0
- package/dist/row/AlarmFieldRow.js +3 -0
- package/dist/row/AlarmFieldRow.js.map +1 -0
- package/dist/row/AlarmInputRow.d.ts +2 -0
- package/dist/row/AlarmRow.d.ts +2 -0
- package/dist/row/AlarmTagRow.d.ts +8 -0
- package/dist/row/AlarmTagRow.js +3 -0
- package/dist/row/AlarmTagRow.js.map +1 -0
- package/dist/row/EntityCategoryInputRow.d.ts +3 -0
- package/dist/row/EntityCategoryInputRow.js +3 -0
- package/dist/row/EntityCategoryInputRow.js.map +1 -0
- package/dist/row/EntityFieldInputRow.d.ts +5 -0
- package/dist/row/EntityFieldInputRow.js +3 -0
- package/dist/row/EntityFieldInputRow.js.map +1 -0
- package/dist/row/EntityTagInputRow.d.ts +5 -0
- package/dist/row/EntityTagInputRow.js +3 -0
- package/dist/row/EntityTagInputRow.js.map +1 -0
- package/dist/row/LogGroupCategoryRow.d.ts +6 -0
- package/dist/row/LogGroupCategoryRow.js +3 -0
- package/dist/row/LogGroupCategoryRow.js.map +1 -0
- package/dist/row/LogGroupFieldRow.d.ts +8 -0
- package/dist/row/LogGroupFieldRow.js +3 -0
- package/dist/row/LogGroupFieldRow.js.map +1 -0
- package/dist/row/LogGroupTagRow.d.ts +8 -0
- package/dist/row/LogGroupTagRow.js +3 -0
- package/dist/row/LogGroupTagRow.js.map +1 -0
- package/package.json +4 -4
- package/src/NamirasoftLogServer.ts +18 -0
- package/src/NamirasoftLogServerAlarmCategory.ts +58 -0
- package/src/NamirasoftLogServerAlarmField.ts +58 -0
- package/src/NamirasoftLogServerAlarmTag.ts +58 -0
- package/src/NamirasoftLogServerBase.ts +1 -1
- package/src/NamirasoftLogServerLogGroupCategory.ts +58 -0
- package/src/NamirasoftLogServerLogGroupField.ts +58 -0
- package/src/NamirasoftLogServerLogGroupTag.ts +58 -0
- package/src/command/AlarmCategoryCommand.ts +40 -0
- package/src/command/AlarmCategoryCreateCommand.ts +55 -0
- package/src/command/AlarmCategoryDeleteCommand.ts +44 -0
- package/src/command/AlarmCategoryGetCommand.ts +44 -0
- package/src/command/AlarmCategoryListCommand.ts +44 -0
- package/src/command/AlarmCategoryUpdateCommand.ts +55 -0
- package/src/command/AlarmCreateCommand.ts +18 -0
- package/src/command/AlarmFieldCommand.ts +40 -0
- package/src/command/AlarmFieldCreateCommand.ts +73 -0
- package/src/command/AlarmFieldDeleteCommand.ts +44 -0
- package/src/command/AlarmFieldGetCommand.ts +44 -0
- package/src/command/AlarmFieldListCommand.ts +44 -0
- package/src/command/AlarmFieldUpdateCommand.ts +73 -0
- package/src/command/AlarmTagCommand.ts +40 -0
- package/src/command/AlarmTagCreateCommand.ts +73 -0
- package/src/command/AlarmTagDeleteCommand.ts +44 -0
- package/src/command/AlarmTagGetCommand.ts +44 -0
- package/src/command/AlarmTagListCommand.ts +44 -0
- package/src/command/AlarmTagUpdateCommand.ts +73 -0
- package/src/command/AlarmUpdateCommand.ts +18 -0
- package/src/command/LogGroupCategoryCommand.ts +40 -0
- package/src/command/LogGroupCategoryCreateCommand.ts +55 -0
- package/src/command/LogGroupCategoryDeleteCommand.ts +44 -0
- package/src/command/LogGroupCategoryGetCommand.ts +44 -0
- package/src/command/LogGroupCategoryListCommand.ts +44 -0
- package/src/command/LogGroupCategoryUpdateCommand.ts +55 -0
- package/src/command/LogGroupFieldCommand.ts +40 -0
- package/src/command/LogGroupFieldCreateCommand.ts +73 -0
- package/src/command/LogGroupFieldDeleteCommand.ts +44 -0
- package/src/command/LogGroupFieldGetCommand.ts +44 -0
- package/src/command/LogGroupFieldListCommand.ts +44 -0
- package/src/command/LogGroupFieldUpdateCommand.ts +73 -0
- package/src/command/LogGroupTagCommand.ts +40 -0
- package/src/command/LogGroupTagCreateCommand.ts +73 -0
- package/src/command/LogGroupTagDeleteCommand.ts +44 -0
- package/src/command/LogGroupTagGetCommand.ts +44 -0
- package/src/command/LogGroupTagListCommand.ts +44 -0
- package/src/command/LogGroupTagUpdateCommand.ts +73 -0
- package/src/command/cli.ts +12 -0
- package/src/index.ts +51 -0
- package/src/row/AlarmCategoryRow.ts +27 -0
- package/src/row/AlarmFieldRow.ts +29 -0
- package/src/row/AlarmInputRow.ts +2 -0
- package/src/row/AlarmRow.ts +2 -0
- package/src/row/AlarmTagRow.ts +29 -0
- package/src/row/EntityCategoryInputRow.ts +24 -0
- package/src/row/EntityFieldInputRow.ts +26 -0
- package/src/row/EntityTagInputRow.ts +26 -0
- package/src/row/LogGroupCategoryRow.ts +27 -0
- package/src/row/LogGroupFieldRow.ts +29 -0
- package/src/row/LogGroupTagRow.ts +29 -0
|
@@ -28,6 +28,22 @@ export class AlarmCreateCommand extends BaseFinalCommand
|
|
|
28
28
|
constructor(argv: string[])
|
|
29
29
|
{
|
|
30
30
|
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "name",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'name' in body",
|
|
35
|
+
optional: true,
|
|
36
|
+
args: ["name"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "description",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'description' in body",
|
|
43
|
+
optional: true,
|
|
44
|
+
args: ["description"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
31
47
|
{
|
|
32
48
|
name: "filters",
|
|
33
49
|
short: "",
|
|
@@ -56,6 +72,8 @@ export class AlarmCreateCommand extends BaseFinalCommand
|
|
|
56
72
|
manager.setValue(token, false);
|
|
57
73
|
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
58
74
|
let ans = await server.alarm.Create({
|
|
75
|
+
name: this.option_values.name,
|
|
76
|
+
description: this.option_values.description,
|
|
59
77
|
filters: this.option_values.filters,
|
|
60
78
|
notification_sender_topic_id: this.option_values.notification_sender_topic_id
|
|
61
79
|
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { AlarmFieldCreateCommand } from "./AlarmFieldCreateCommand";
|
|
22
|
+
import { AlarmFieldDeleteCommand } from "./AlarmFieldDeleteCommand";
|
|
23
|
+
import { AlarmFieldGetCommand } from "./AlarmFieldGetCommand";
|
|
24
|
+
import { AlarmFieldListCommand } from "./AlarmFieldListCommand";
|
|
25
|
+
import { AlarmFieldUpdateCommand } from "./AlarmFieldUpdateCommand";
|
|
26
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
27
|
+
|
|
28
|
+
export class AlarmFieldCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"create": AlarmFieldCreateCommand,
|
|
34
|
+
"delete": AlarmFieldDeleteCommand,
|
|
35
|
+
"get": AlarmFieldGetCommand,
|
|
36
|
+
"list": AlarmFieldListCommand,
|
|
37
|
+
"update": AlarmFieldUpdateCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmFieldCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "field_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'field_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["field_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "value",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'value' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["value"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "description",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'description' in body",
|
|
51
|
+
optional: true,
|
|
52
|
+
args: ["description"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
override async exec()
|
|
58
|
+
{
|
|
59
|
+
let token = this.app.storage.getNSAToken();
|
|
60
|
+
if (token == null)
|
|
61
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
62
|
+
let storage = new IStorageMemory();
|
|
63
|
+
let manager = new TokenManager(storage, () => { });
|
|
64
|
+
manager.setValue(token, false);
|
|
65
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
66
|
+
let ans = await server.alarmfield.Create({
|
|
67
|
+
field_id: this.option_values.field_id,
|
|
68
|
+
value: this.option_values.value,
|
|
69
|
+
description: this.option_values.description
|
|
70
|
+
});
|
|
71
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmFieldDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
37
|
+
let storage = new IStorageMemory();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
41
|
+
let ans = await server.alarmfield.Delete(this.arg_values[0]);
|
|
42
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmFieldGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
37
|
+
let storage = new IStorageMemory();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
41
|
+
let ans = await server.alarmfield.Get(this.arg_values[0]);
|
|
42
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmFieldListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
37
|
+
let storage = new IStorageMemory();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
41
|
+
let ans = await server.alarmfield.List(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
|
|
42
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmFieldUpdateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "field_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'field_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["field_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "value",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'value' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["value"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "description",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'description' in body",
|
|
51
|
+
optional: true,
|
|
52
|
+
args: ["description"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
override async exec()
|
|
58
|
+
{
|
|
59
|
+
let token = this.app.storage.getNSAToken();
|
|
60
|
+
if (token == null)
|
|
61
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
62
|
+
let storage = new IStorageMemory();
|
|
63
|
+
let manager = new TokenManager(storage, () => { });
|
|
64
|
+
manager.setValue(token, false);
|
|
65
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
66
|
+
let ans = await server.alarmfield.Update(this.arg_values[0], {
|
|
67
|
+
field_id: this.option_values.field_id,
|
|
68
|
+
value: this.option_values.value,
|
|
69
|
+
description: this.option_values.description
|
|
70
|
+
});
|
|
71
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { AlarmTagCreateCommand } from "./AlarmTagCreateCommand";
|
|
22
|
+
import { AlarmTagDeleteCommand } from "./AlarmTagDeleteCommand";
|
|
23
|
+
import { AlarmTagGetCommand } from "./AlarmTagGetCommand";
|
|
24
|
+
import { AlarmTagListCommand } from "./AlarmTagListCommand";
|
|
25
|
+
import { AlarmTagUpdateCommand } from "./AlarmTagUpdateCommand";
|
|
26
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
27
|
+
|
|
28
|
+
export class AlarmTagCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"create": AlarmTagCreateCommand,
|
|
34
|
+
"delete": AlarmTagDeleteCommand,
|
|
35
|
+
"get": AlarmTagGetCommand,
|
|
36
|
+
"list": AlarmTagListCommand,
|
|
37
|
+
"update": AlarmTagUpdateCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmTagCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "name",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'name' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["name"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "value",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'value' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["value"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "description",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'description' in body",
|
|
51
|
+
optional: true,
|
|
52
|
+
args: ["description"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
override async exec()
|
|
58
|
+
{
|
|
59
|
+
let token = this.app.storage.getNSAToken();
|
|
60
|
+
if (token == null)
|
|
61
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
62
|
+
let storage = new IStorageMemory();
|
|
63
|
+
let manager = new TokenManager(storage, () => { });
|
|
64
|
+
manager.setValue(token, false);
|
|
65
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
66
|
+
let ans = await server.alarmtag.Create({
|
|
67
|
+
name: this.option_values.name,
|
|
68
|
+
value: this.option_values.value,
|
|
69
|
+
description: this.option_values.description
|
|
70
|
+
});
|
|
71
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
72
|
+
}
|
|
73
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmTagDeleteCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
37
|
+
let storage = new IStorageMemory();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
41
|
+
let ans = await server.alarmtag.Delete(this.arg_values[0]);
|
|
42
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmTagGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
37
|
+
let storage = new IStorageMemory();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
41
|
+
let ans = await server.alarmtag.Get(this.arg_values[0]);
|
|
42
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/****************************************************************/
|
|
2
|
+
/* */
|
|
3
|
+
/* This is an Auto-Generated File */
|
|
4
|
+
/* Made By */
|
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
6
|
+
/* */
|
|
7
|
+
/****************************************************************/
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/* */
|
|
10
|
+
/* Please do not make any change to this file */
|
|
11
|
+
/* If any changed is reqired, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseFinalCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { IStorageMemory } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftLogServer } from "../NamirasoftLogServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AlarmTagListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size"], []);
|
|
31
|
+
}
|
|
32
|
+
override async exec()
|
|
33
|
+
{
|
|
34
|
+
let token = this.app.storage.getNSAToken();
|
|
35
|
+
if (token == null)
|
|
36
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
37
|
+
let storage = new IStorageMemory();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
41
|
+
let ans = await server.alarmtag.List(this.arg_values[0], this.arg_values[1], this.arg_values[2]);
|
|
42
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
43
|
+
}
|
|
44
|
+
};
|