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
|
@@ -0,0 +1,58 @@
|
|
|
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 { AlarmCategoryRow } from "./row/AlarmCategoryRow";
|
|
22
|
+
import { EntityCategoryInputRow } from "./row/EntityCategoryInputRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftLogServerAlarmCategory extends NamirasoftLogServerBase
|
|
27
|
+
{
|
|
28
|
+
async Create(body: EntityCategoryInputRow): Promise<AlarmCategoryRow>
|
|
29
|
+
{
|
|
30
|
+
let path = `alarm/category`;
|
|
31
|
+
let { data } = await this._post<AlarmCategoryRow>(path, {}, body);
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
async Delete(id: string): Promise<void>
|
|
35
|
+
{
|
|
36
|
+
let path = `alarm/category/${id}`;
|
|
37
|
+
await this._delete<void>(path, {});
|
|
38
|
+
}
|
|
39
|
+
async Get(id: string): Promise<AlarmCategoryRow>
|
|
40
|
+
{
|
|
41
|
+
let path = `alarm/category/${id}`;
|
|
42
|
+
let { data } = await this._get<AlarmCategoryRow>(path, {});
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: AlarmCategoryRow[], count: (number | null) }>
|
|
46
|
+
{
|
|
47
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
48
|
+
let path = `alarm/category/list`;
|
|
49
|
+
let { data } = await this._get<{ rows: AlarmCategoryRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
async Update(id: string, body: EntityCategoryInputRow): Promise<AlarmCategoryRow>
|
|
53
|
+
{
|
|
54
|
+
let path = `alarm/category/${id}`;
|
|
55
|
+
let { data } = await this._put<AlarmCategoryRow>(path, {}, body);
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { AlarmFieldRow } from "./row/AlarmFieldRow";
|
|
22
|
+
import { EntityFieldInputRow } from "./row/EntityFieldInputRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftLogServerAlarmField extends NamirasoftLogServerBase
|
|
27
|
+
{
|
|
28
|
+
async Create(body: EntityFieldInputRow): Promise<AlarmFieldRow>
|
|
29
|
+
{
|
|
30
|
+
let path = `alarm/field`;
|
|
31
|
+
let { data } = await this._post<AlarmFieldRow>(path, {}, body);
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
async Delete(id: string): Promise<void>
|
|
35
|
+
{
|
|
36
|
+
let path = `alarm/field/${id}`;
|
|
37
|
+
await this._delete<void>(path, {});
|
|
38
|
+
}
|
|
39
|
+
async Get(id: string): Promise<AlarmFieldRow>
|
|
40
|
+
{
|
|
41
|
+
let path = `alarm/field/${id}`;
|
|
42
|
+
let { data } = await this._get<AlarmFieldRow>(path, {});
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: AlarmFieldRow[], count: (number | null) }>
|
|
46
|
+
{
|
|
47
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
48
|
+
let path = `alarm/field/list`;
|
|
49
|
+
let { data } = await this._get<{ rows: AlarmFieldRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
async Update(id: string, body: EntityFieldInputRow): Promise<AlarmFieldRow>
|
|
53
|
+
{
|
|
54
|
+
let path = `alarm/field/${id}`;
|
|
55
|
+
let { data } = await this._put<AlarmFieldRow>(path, {}, body);
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { AlarmTagRow } from "./row/AlarmTagRow";
|
|
22
|
+
import { EntityTagInputRow } from "./row/EntityTagInputRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftLogServerAlarmTag extends NamirasoftLogServerBase
|
|
27
|
+
{
|
|
28
|
+
async Create(body: EntityTagInputRow): Promise<AlarmTagRow>
|
|
29
|
+
{
|
|
30
|
+
let path = `alarm/tag`;
|
|
31
|
+
let { data } = await this._post<AlarmTagRow>(path, {}, body);
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
async Delete(id: string): Promise<void>
|
|
35
|
+
{
|
|
36
|
+
let path = `alarm/tag/${id}`;
|
|
37
|
+
await this._delete<void>(path, {});
|
|
38
|
+
}
|
|
39
|
+
async Get(id: string): Promise<AlarmTagRow>
|
|
40
|
+
{
|
|
41
|
+
let path = `alarm/tag/${id}`;
|
|
42
|
+
let { data } = await this._get<AlarmTagRow>(path, {});
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: AlarmTagRow[], count: (number | null) }>
|
|
46
|
+
{
|
|
47
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
48
|
+
let path = `alarm/tag/list`;
|
|
49
|
+
let { data } = await this._get<{ rows: AlarmTagRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
async Update(id: string, body: EntityTagInputRow): Promise<AlarmTagRow>
|
|
53
|
+
{
|
|
54
|
+
let path = `alarm/tag/${id}`;
|
|
55
|
+
let { data } = await this._put<AlarmTagRow>(path, {}, body);
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -25,6 +25,6 @@ export class NamirasoftLogServerBase extends NamirasoftServerBase
|
|
|
25
25
|
{
|
|
26
26
|
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
27
27
|
{
|
|
28
|
-
super(`
|
|
28
|
+
super(`https://log.namirasoft.com/api/v1`, `1.3.23`, manager, onError);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { EntityCategoryInputRow } from "./row/EntityCategoryInputRow";
|
|
22
|
+
import { FilterItem } from "namirasoft-core";
|
|
23
|
+
import { LogGroupCategoryRow } from "./row/LogGroupCategoryRow";
|
|
24
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftLogServerLogGroupCategory extends NamirasoftLogServerBase
|
|
27
|
+
{
|
|
28
|
+
async Create(body: EntityCategoryInputRow): Promise<LogGroupCategoryRow>
|
|
29
|
+
{
|
|
30
|
+
let path = `log/group/category`;
|
|
31
|
+
let { data } = await this._post<LogGroupCategoryRow>(path, {}, body);
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
async Delete(id: string): Promise<void>
|
|
35
|
+
{
|
|
36
|
+
let path = `log/group/category/${id}`;
|
|
37
|
+
await this._delete<void>(path, {});
|
|
38
|
+
}
|
|
39
|
+
async Get(id: string): Promise<LogGroupCategoryRow>
|
|
40
|
+
{
|
|
41
|
+
let path = `log/group/category/${id}`;
|
|
42
|
+
let { data } = await this._get<LogGroupCategoryRow>(path, {});
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: LogGroupCategoryRow[], count: (number | null) }>
|
|
46
|
+
{
|
|
47
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
48
|
+
let path = `log/group/category/list`;
|
|
49
|
+
let { data } = await this._get<{ rows: LogGroupCategoryRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
async Update(id: string, body: EntityCategoryInputRow): Promise<LogGroupCategoryRow>
|
|
53
|
+
{
|
|
54
|
+
let path = `log/group/category/${id}`;
|
|
55
|
+
let { data } = await this._put<LogGroupCategoryRow>(path, {}, body);
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { EntityFieldInputRow } from "./row/EntityFieldInputRow";
|
|
22
|
+
import { FilterItem } from "namirasoft-core";
|
|
23
|
+
import { LogGroupFieldRow } from "./row/LogGroupFieldRow";
|
|
24
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftLogServerLogGroupField extends NamirasoftLogServerBase
|
|
27
|
+
{
|
|
28
|
+
async Create(body: EntityFieldInputRow): Promise<LogGroupFieldRow>
|
|
29
|
+
{
|
|
30
|
+
let path = `log/group/field`;
|
|
31
|
+
let { data } = await this._post<LogGroupFieldRow>(path, {}, body);
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
async Delete(id: string): Promise<void>
|
|
35
|
+
{
|
|
36
|
+
let path = `log/group/field/${id}`;
|
|
37
|
+
await this._delete<void>(path, {});
|
|
38
|
+
}
|
|
39
|
+
async Get(id: string): Promise<LogGroupFieldRow>
|
|
40
|
+
{
|
|
41
|
+
let path = `log/group/field/${id}`;
|
|
42
|
+
let { data } = await this._get<LogGroupFieldRow>(path, {});
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: LogGroupFieldRow[], count: (number | null) }>
|
|
46
|
+
{
|
|
47
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
48
|
+
let path = `log/group/field/list`;
|
|
49
|
+
let { data } = await this._get<{ rows: LogGroupFieldRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
async Update(id: string, body: EntityFieldInputRow): Promise<LogGroupFieldRow>
|
|
53
|
+
{
|
|
54
|
+
let path = `log/group/field/${id}`;
|
|
55
|
+
let { data } = await this._put<LogGroupFieldRow>(path, {}, body);
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { EntityTagInputRow } from "./row/EntityTagInputRow";
|
|
22
|
+
import { FilterItem } from "namirasoft-core";
|
|
23
|
+
import { LogGroupTagRow } from "./row/LogGroupTagRow";
|
|
24
|
+
import { NamirasoftLogServerBase } from "./NamirasoftLogServerBase";
|
|
25
|
+
|
|
26
|
+
export class NamirasoftLogServerLogGroupTag extends NamirasoftLogServerBase
|
|
27
|
+
{
|
|
28
|
+
async Create(body: EntityTagInputRow): Promise<LogGroupTagRow>
|
|
29
|
+
{
|
|
30
|
+
let path = `log/group/tag`;
|
|
31
|
+
let { data } = await this._post<LogGroupTagRow>(path, {}, body);
|
|
32
|
+
return data;
|
|
33
|
+
}
|
|
34
|
+
async Delete(id: string): Promise<void>
|
|
35
|
+
{
|
|
36
|
+
let path = `log/group/tag/${id}`;
|
|
37
|
+
await this._delete<void>(path, {});
|
|
38
|
+
}
|
|
39
|
+
async Get(id: string): Promise<LogGroupTagRow>
|
|
40
|
+
{
|
|
41
|
+
let path = `log/group/tag/${id}`;
|
|
42
|
+
let { data } = await this._get<LogGroupTagRow>(path, {});
|
|
43
|
+
return data;
|
|
44
|
+
}
|
|
45
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: LogGroupTagRow[], count: (number | null) }>
|
|
46
|
+
{
|
|
47
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
48
|
+
let path = `log/group/tag/list`;
|
|
49
|
+
let { data } = await this._get<{ rows: LogGroupTagRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
async Update(id: string, body: EntityTagInputRow): Promise<LogGroupTagRow>
|
|
53
|
+
{
|
|
54
|
+
let path = `log/group/tag/${id}`;
|
|
55
|
+
let { data } = await this._put<LogGroupTagRow>(path, {}, body);
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
@@ -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 { AlarmCategoryCreateCommand } from "./AlarmCategoryCreateCommand";
|
|
22
|
+
import { AlarmCategoryDeleteCommand } from "./AlarmCategoryDeleteCommand";
|
|
23
|
+
import { AlarmCategoryGetCommand } from "./AlarmCategoryGetCommand";
|
|
24
|
+
import { AlarmCategoryListCommand } from "./AlarmCategoryListCommand";
|
|
25
|
+
import { AlarmCategoryUpdateCommand } from "./AlarmCategoryUpdateCommand";
|
|
26
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
27
|
+
|
|
28
|
+
export class AlarmCategoryCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"create": AlarmCategoryCreateCommand,
|
|
34
|
+
"delete": AlarmCategoryDeleteCommand,
|
|
35
|
+
"get": AlarmCategoryGetCommand,
|
|
36
|
+
"list": AlarmCategoryListCommand,
|
|
37
|
+
"update": AlarmCategoryUpdateCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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 AlarmCategoryCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "category_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'category_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["category_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
}
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
override async exec()
|
|
42
|
+
{
|
|
43
|
+
let token = this.app.storage.getNSAToken();
|
|
44
|
+
if (token == null)
|
|
45
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
46
|
+
let storage = new IStorageMemory();
|
|
47
|
+
let manager = new TokenManager(storage, () => { });
|
|
48
|
+
manager.setValue(token, false);
|
|
49
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
50
|
+
let ans = await server.alarmcategory.Create({
|
|
51
|
+
category_id: this.option_values.category_id
|
|
52
|
+
});
|
|
53
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
@@ -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 AlarmCategoryDeleteCommand 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.alarmcategory.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 AlarmCategoryGetCommand 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.alarmcategory.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 AlarmCategoryListCommand 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.alarmcategory.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,55 @@
|
|
|
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 AlarmCategoryUpdateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "category_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'category_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["category_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
}
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
override async exec()
|
|
42
|
+
{
|
|
43
|
+
let token = this.app.storage.getNSAToken();
|
|
44
|
+
if (token == null)
|
|
45
|
+
throw new Error("Token is not available. Please login first using:\nns-log account config \nor \n{this.command} account login.");
|
|
46
|
+
let storage = new IStorageMemory();
|
|
47
|
+
let manager = new TokenManager(storage, () => { });
|
|
48
|
+
manager.setValue(token, false);
|
|
49
|
+
let server = new NamirasoftLogServer(manager, e => this.app.logger.error(e.message));
|
|
50
|
+
let ans = await server.alarmcategory.Update(this.arg_values[0], {
|
|
51
|
+
category_id: this.option_values.category_id
|
|
52
|
+
});
|
|
53
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
54
|
+
}
|
|
55
|
+
};
|