namirasoft-alarm 1.3.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.
- package/dist/NamirasoftAlarmServer.d.ts +17 -0
- package/dist/NamirasoftAlarmServer.js +23 -0
- package/dist/NamirasoftAlarmServer.js.map +1 -0
- package/dist/NamirasoftAlarmServerAlarm.d.ts +17 -0
- package/dist/NamirasoftAlarmServerAlarm.js +70 -0
- package/dist/NamirasoftAlarmServerAlarm.js.map +1 -0
- package/dist/NamirasoftAlarmServerAlarmCategory.d.ts +16 -0
- package/dist/NamirasoftAlarmServerAlarmCategory.js +62 -0
- package/dist/NamirasoftAlarmServerAlarmCategory.js.map +1 -0
- package/dist/NamirasoftAlarmServerAlarmField.d.ts +16 -0
- package/dist/NamirasoftAlarmServerAlarmField.js +62 -0
- package/dist/NamirasoftAlarmServerAlarmField.js.map +1 -0
- package/dist/NamirasoftAlarmServerAlarmTag.d.ts +16 -0
- package/dist/NamirasoftAlarmServerAlarmTag.js +62 -0
- package/dist/NamirasoftAlarmServerAlarmTag.js.map +1 -0
- package/dist/NamirasoftAlarmServerBase.d.ts +5 -0
- package/dist/NamirasoftAlarmServerBase.js +12 -0
- package/dist/NamirasoftAlarmServerBase.js.map +1 -0
- package/dist/NamirasoftAlarmServerHealthz.d.ts +6 -0
- package/dist/NamirasoftAlarmServerHealthz.js +28 -0
- package/dist/NamirasoftAlarmServerHealthz.js.map +1 -0
- package/dist/NamirasoftAlarmServerValue.d.ts +6 -0
- package/dist/NamirasoftAlarmServerValue.js +29 -0
- package/dist/NamirasoftAlarmServerValue.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/AlarmCommand.d.ts +4 -0
- package/dist/command/AlarmCommand.js +25 -0
- package/dist/command/AlarmCommand.js.map +1 -0
- package/dist/command/AlarmCreateCommand.d.ts +5 -0
- package/dist/command/AlarmCreateCommand.js +102 -0
- package/dist/command/AlarmCreateCommand.js.map +1 -0
- package/dist/command/AlarmDeleteCommand.d.ts +5 -0
- package/dist/command/AlarmDeleteCommand.js +37 -0
- package/dist/command/AlarmDeleteCommand.js.map +1 -0
- 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/AlarmGetCommand.d.ts +5 -0
- package/dist/command/AlarmGetCommand.js +37 -0
- package/dist/command/AlarmGetCommand.js.map +1 -0
- package/dist/command/AlarmListCommand.d.ts +5 -0
- package/dist/command/AlarmListCommand.js +37 -0
- package/dist/command/AlarmListCommand.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/AlarmTriggerCommand.d.ts +5 -0
- package/dist/command/AlarmTriggerCommand.js +48 -0
- package/dist/command/AlarmTriggerCommand.js.map +1 -0
- package/dist/command/AlarmUpdateCommand.d.ts +5 -0
- package/dist/command/AlarmUpdateCommand.js +102 -0
- package/dist/command/AlarmUpdateCommand.js.map +1 -0
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +37 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/ValueCommand.d.ts +4 -0
- package/dist/command/ValueCommand.js +15 -0
- package/dist/command/ValueCommand.js.map +1 -0
- package/dist/command/ValueListCommand.d.ts +5 -0
- package/dist/command/ValueListCommand.js +37 -0
- package/dist/command/ValueListCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +22 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +67 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/AlarmCategoryMetaTable.d.ts +10 -0
- package/dist/meta/AlarmCategoryMetaTable.js +18 -0
- package/dist/meta/AlarmCategoryMetaTable.js.map +1 -0
- package/dist/meta/AlarmFieldMetaTable.d.ts +12 -0
- package/dist/meta/AlarmFieldMetaTable.js +20 -0
- package/dist/meta/AlarmFieldMetaTable.js.map +1 -0
- package/dist/meta/AlarmMetaTable.d.ts +15 -0
- package/dist/meta/AlarmMetaTable.js +23 -0
- package/dist/meta/AlarmMetaTable.js.map +1 -0
- package/dist/meta/AlarmTagMetaTable.d.ts +12 -0
- package/dist/meta/AlarmTagMetaTable.js +20 -0
- package/dist/meta/AlarmTagMetaTable.js.map +1 -0
- package/dist/meta/MetaDatabase.d.ts +12 -0
- package/dist/meta/MetaDatabase.js +19 -0
- package/dist/meta/MetaDatabase.js.map +1 -0
- 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 +9 -0
- package/dist/row/AlarmInputRow.js +3 -0
- package/dist/row/AlarmInputRow.js.map +1 -0
- package/dist/row/AlarmRow.d.ts +11 -0
- package/dist/row/AlarmRow.js +3 -0
- package/dist/row/AlarmRow.js.map +1 -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/logo.png +0 -0
- package/package.json +28 -0
- package/src/NamirasoftAlarmServer.ts +48 -0
- package/src/NamirasoftAlarmServerAlarm.ts +75 -0
- package/src/NamirasoftAlarmServerAlarmCategory.ts +68 -0
- package/src/NamirasoftAlarmServerAlarmField.ts +68 -0
- package/src/NamirasoftAlarmServerAlarmTag.ts +68 -0
- package/src/NamirasoftAlarmServerBase.ts +30 -0
- package/src/NamirasoftAlarmServerHealthz.ts +36 -0
- package/src/NamirasoftAlarmServerValue.ts +37 -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/AlarmCommand.ts +42 -0
- package/src/command/AlarmCreateCommand.ts +109 -0
- package/src/command/AlarmDeleteCommand.ts +44 -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/AlarmGetCommand.ts +44 -0
- package/src/command/AlarmListCommand.ts +44 -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/AlarmTriggerCommand.ts +55 -0
- package/src/command/AlarmUpdateCommand.ts +109 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +44 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +44 -0
- package/src/command/cli.ts +41 -0
- package/src/index.ts +70 -0
- package/src/meta/AlarmCategoryMetaTable.ts +41 -0
- package/src/meta/AlarmFieldMetaTable.ts +45 -0
- package/src/meta/AlarmMetaTable.ts +51 -0
- package/src/meta/AlarmTagMetaTable.ts +45 -0
- package/src/meta/MetaDatabase.ts +40 -0
- package/src/row/AlarmCategoryRow.ts +27 -0
- package/src/row/AlarmFieldRow.ts +29 -0
- package/src/row/AlarmInputRow.ts +30 -0
- package/src/row/AlarmRow.ts +32 -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/tsconfig.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlarmCategoryRow.js","sourceRoot":"","sources":["../../src/row/AlarmCategoryRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlarmFieldRow.js","sourceRoot":"","sources":["../../src/row/AlarmFieldRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlarmInputRow.js","sourceRoot":"","sources":["../../src/row/AlarmInputRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type AlarmRow = {
|
|
2
|
+
id: string;
|
|
3
|
+
user_id: string;
|
|
4
|
+
product_id: string;
|
|
5
|
+
notification_sender_topic_id: string;
|
|
6
|
+
name: (string | null);
|
|
7
|
+
entity: (string | null);
|
|
8
|
+
action: (string | null);
|
|
9
|
+
filters: (string | null);
|
|
10
|
+
description: (string | null);
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlarmRow.js","sourceRoot":"","sources":["../../src/row/AlarmRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlarmTagRow.js","sourceRoot":"","sources":["../../src/row/AlarmTagRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityCategoryInputRow.js","sourceRoot":"","sources":["../../src/row/EntityCategoryInputRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityFieldInputRow.js","sourceRoot":"","sources":["../../src/row/EntityFieldInputRow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityTagInputRow.js","sourceRoot":"","sources":["../../src/row/EntityTagInputRow.ts"],"names":[],"mappings":""}
|
package/logo.png
ADDED
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "namirasoft-alarm",
|
|
3
|
+
"title": "Namirasoft Alarm NPM Package",
|
|
4
|
+
"description": "Namira Software Corporation Alarm NPM Package",
|
|
5
|
+
"icon": "logo.png",
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/alarm/logo/name.png",
|
|
7
|
+
"language": "ts",
|
|
8
|
+
"framework": "npm",
|
|
9
|
+
"application": "package",
|
|
10
|
+
"private": false,
|
|
11
|
+
"version": "1.3.0",
|
|
12
|
+
"author": "Amir Abolhasani",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"main": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": ""
|
|
18
|
+
},
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"namirasoft-core": "^1.3.67",
|
|
21
|
+
"namirasoft-site": "^1.3.4",
|
|
22
|
+
"namirasoft-node-cli": "^1.3.8",
|
|
23
|
+
"namirasoft-account": "^1.3.29"
|
|
24
|
+
},
|
|
25
|
+
"bin": {
|
|
26
|
+
"ns-alarm": "./dist/command/cli.js"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { NamirasoftAlarmServerAlarm } from "./NamirasoftAlarmServerAlarm";
|
|
22
|
+
import { NamirasoftAlarmServerAlarmCategory } from "./NamirasoftAlarmServerAlarmCategory";
|
|
23
|
+
import { NamirasoftAlarmServerAlarmField } from "./NamirasoftAlarmServerAlarmField";
|
|
24
|
+
import { NamirasoftAlarmServerAlarmTag } from "./NamirasoftAlarmServerAlarmTag";
|
|
25
|
+
import { NamirasoftAlarmServerHealthz } from "./NamirasoftAlarmServerHealthz";
|
|
26
|
+
import { NamirasoftAlarmServerValue } from "./NamirasoftAlarmServerValue";
|
|
27
|
+
import { TokenManager } from "namirasoft-account";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftAlarmServer
|
|
30
|
+
{
|
|
31
|
+
manager: TokenManager;
|
|
32
|
+
healthz: NamirasoftAlarmServerHealthz;
|
|
33
|
+
value: NamirasoftAlarmServerValue;
|
|
34
|
+
alarmcategory: NamirasoftAlarmServerAlarmCategory;
|
|
35
|
+
alarmfield: NamirasoftAlarmServerAlarmField;
|
|
36
|
+
alarmtag: NamirasoftAlarmServerAlarmTag;
|
|
37
|
+
alarm: NamirasoftAlarmServerAlarm;
|
|
38
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
39
|
+
{
|
|
40
|
+
this.manager = manager;
|
|
41
|
+
this.healthz = new NamirasoftAlarmServerHealthz(manager, onError);
|
|
42
|
+
this.value = new NamirasoftAlarmServerValue(manager, onError);
|
|
43
|
+
this.alarmcategory = new NamirasoftAlarmServerAlarmCategory(manager, onError);
|
|
44
|
+
this.alarmfield = new NamirasoftAlarmServerAlarmField(manager, onError);
|
|
45
|
+
this.alarmtag = new NamirasoftAlarmServerAlarmTag(manager, onError);
|
|
46
|
+
this.alarm = new NamirasoftAlarmServerAlarm(manager, onError);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
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 { AlarmInputRow } from "./row/AlarmInputRow";
|
|
22
|
+
import { AlarmRow } from "./row/AlarmRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { NamirasoftAlarmServerBase } from "./NamirasoftAlarmServerBase";
|
|
25
|
+
import { TokenManager } from "namirasoft-account";
|
|
26
|
+
|
|
27
|
+
export class NamirasoftAlarmServerAlarm extends NamirasoftAlarmServerBase
|
|
28
|
+
{
|
|
29
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
30
|
+
{
|
|
31
|
+
super(manager, onError);
|
|
32
|
+
this.List = this.List.bind(this);
|
|
33
|
+
this.Get = this.Get.bind(this);
|
|
34
|
+
this.Create = this.Create.bind(this);
|
|
35
|
+
this.Update = this.Update.bind(this);
|
|
36
|
+
this.Delete = this.Delete.bind(this);
|
|
37
|
+
this.Trigger = this.Trigger.bind(this);
|
|
38
|
+
}
|
|
39
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: AlarmRow[], count: (number | null) }>
|
|
40
|
+
{
|
|
41
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
42
|
+
let path = `/alarm/list`;
|
|
43
|
+
let { data } = await this._get<{ rows: AlarmRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
44
|
+
return data;
|
|
45
|
+
}
|
|
46
|
+
async Get(id: string): Promise<AlarmRow>
|
|
47
|
+
{
|
|
48
|
+
let path = `/alarm/${id}`;
|
|
49
|
+
let { data } = await this._get<AlarmRow>(path, {});
|
|
50
|
+
return data;
|
|
51
|
+
}
|
|
52
|
+
async Create(body: AlarmInputRow): Promise<AlarmRow>
|
|
53
|
+
{
|
|
54
|
+
let path = `/alarm`;
|
|
55
|
+
let { data } = await this._post<AlarmRow>(path, {}, body);
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
async Update(id: string, body: AlarmInputRow): Promise<AlarmRow>
|
|
59
|
+
{
|
|
60
|
+
let path = `/alarm/${id}`;
|
|
61
|
+
let { data } = await this._put<AlarmRow>(path, {}, body);
|
|
62
|
+
return data;
|
|
63
|
+
}
|
|
64
|
+
async Delete(id: string): Promise<void>
|
|
65
|
+
{
|
|
66
|
+
let path = `/alarm/${id}`;
|
|
67
|
+
await this._delete<void>(path, {});
|
|
68
|
+
}
|
|
69
|
+
async Trigger(id: string, body: any): Promise<AlarmRow>
|
|
70
|
+
{
|
|
71
|
+
let path = `/trigger/${id}`;
|
|
72
|
+
let { data } = await this._put<AlarmRow>(path, {}, body);
|
|
73
|
+
return data;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { NamirasoftAlarmServerBase } from "./NamirasoftAlarmServerBase";
|
|
25
|
+
import { TokenManager } from "namirasoft-account";
|
|
26
|
+
|
|
27
|
+
export class NamirasoftAlarmServerAlarmCategory extends NamirasoftAlarmServerBase
|
|
28
|
+
{
|
|
29
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
30
|
+
{
|
|
31
|
+
super(manager, onError);
|
|
32
|
+
this.Create = this.Create.bind(this);
|
|
33
|
+
this.Delete = this.Delete.bind(this);
|
|
34
|
+
this.Get = this.Get.bind(this);
|
|
35
|
+
this.List = this.List.bind(this);
|
|
36
|
+
this.Update = this.Update.bind(this);
|
|
37
|
+
}
|
|
38
|
+
async Create(body: EntityCategoryInputRow): Promise<AlarmCategoryRow>
|
|
39
|
+
{
|
|
40
|
+
let path = `alarm/category`;
|
|
41
|
+
let { data } = await this._post<AlarmCategoryRow>(path, {}, body);
|
|
42
|
+
return data;
|
|
43
|
+
}
|
|
44
|
+
async Delete(id: string): Promise<void>
|
|
45
|
+
{
|
|
46
|
+
let path = `alarm/category/${id}`;
|
|
47
|
+
await this._delete<void>(path, {});
|
|
48
|
+
}
|
|
49
|
+
async Get(id: string): Promise<AlarmCategoryRow>
|
|
50
|
+
{
|
|
51
|
+
let path = `alarm/category/${id}`;
|
|
52
|
+
let { data } = await this._get<AlarmCategoryRow>(path, {});
|
|
53
|
+
return data;
|
|
54
|
+
}
|
|
55
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: AlarmCategoryRow[], count: (number | null) }>
|
|
56
|
+
{
|
|
57
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
58
|
+
let path = `alarm/category/list`;
|
|
59
|
+
let { data } = await this._get<{ rows: AlarmCategoryRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
async Update(id: string, body: EntityCategoryInputRow): Promise<AlarmCategoryRow>
|
|
63
|
+
{
|
|
64
|
+
let path = `alarm/category/${id}`;
|
|
65
|
+
let { data } = await this._put<AlarmCategoryRow>(path, {}, body);
|
|
66
|
+
return data;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { NamirasoftAlarmServerBase } from "./NamirasoftAlarmServerBase";
|
|
25
|
+
import { TokenManager } from "namirasoft-account";
|
|
26
|
+
|
|
27
|
+
export class NamirasoftAlarmServerAlarmField extends NamirasoftAlarmServerBase
|
|
28
|
+
{
|
|
29
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
30
|
+
{
|
|
31
|
+
super(manager, onError);
|
|
32
|
+
this.Create = this.Create.bind(this);
|
|
33
|
+
this.Delete = this.Delete.bind(this);
|
|
34
|
+
this.Get = this.Get.bind(this);
|
|
35
|
+
this.List = this.List.bind(this);
|
|
36
|
+
this.Update = this.Update.bind(this);
|
|
37
|
+
}
|
|
38
|
+
async Create(body: EntityFieldInputRow): Promise<AlarmFieldRow>
|
|
39
|
+
{
|
|
40
|
+
let path = `alarm/field`;
|
|
41
|
+
let { data } = await this._post<AlarmFieldRow>(path, {}, body);
|
|
42
|
+
return data;
|
|
43
|
+
}
|
|
44
|
+
async Delete(id: string): Promise<void>
|
|
45
|
+
{
|
|
46
|
+
let path = `alarm/field/${id}`;
|
|
47
|
+
await this._delete<void>(path, {});
|
|
48
|
+
}
|
|
49
|
+
async Get(id: string): Promise<AlarmFieldRow>
|
|
50
|
+
{
|
|
51
|
+
let path = `alarm/field/${id}`;
|
|
52
|
+
let { data } = await this._get<AlarmFieldRow>(path, {});
|
|
53
|
+
return data;
|
|
54
|
+
}
|
|
55
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: AlarmFieldRow[], count: (number | null) }>
|
|
56
|
+
{
|
|
57
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
58
|
+
let path = `alarm/field/list`;
|
|
59
|
+
let { data } = await this._get<{ rows: AlarmFieldRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
async Update(id: string, body: EntityFieldInputRow): Promise<AlarmFieldRow>
|
|
63
|
+
{
|
|
64
|
+
let path = `alarm/field/${id}`;
|
|
65
|
+
let { data } = await this._put<AlarmFieldRow>(path, {}, body);
|
|
66
|
+
return data;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
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 { NamirasoftAlarmServerBase } from "./NamirasoftAlarmServerBase";
|
|
25
|
+
import { TokenManager } from "namirasoft-account";
|
|
26
|
+
|
|
27
|
+
export class NamirasoftAlarmServerAlarmTag extends NamirasoftAlarmServerBase
|
|
28
|
+
{
|
|
29
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
30
|
+
{
|
|
31
|
+
super(manager, onError);
|
|
32
|
+
this.Create = this.Create.bind(this);
|
|
33
|
+
this.Delete = this.Delete.bind(this);
|
|
34
|
+
this.Get = this.Get.bind(this);
|
|
35
|
+
this.List = this.List.bind(this);
|
|
36
|
+
this.Update = this.Update.bind(this);
|
|
37
|
+
}
|
|
38
|
+
async Create(body: EntityTagInputRow): Promise<AlarmTagRow>
|
|
39
|
+
{
|
|
40
|
+
let path = `alarm/tag`;
|
|
41
|
+
let { data } = await this._post<AlarmTagRow>(path, {}, body);
|
|
42
|
+
return data;
|
|
43
|
+
}
|
|
44
|
+
async Delete(id: string): Promise<void>
|
|
45
|
+
{
|
|
46
|
+
let path = `alarm/tag/${id}`;
|
|
47
|
+
await this._delete<void>(path, {});
|
|
48
|
+
}
|
|
49
|
+
async Get(id: string): Promise<AlarmTagRow>
|
|
50
|
+
{
|
|
51
|
+
let path = `alarm/tag/${id}`;
|
|
52
|
+
let { data } = await this._get<AlarmTagRow>(path, {});
|
|
53
|
+
return data;
|
|
54
|
+
}
|
|
55
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null)): Promise<{ rows: AlarmTagRow[], count: (number | null) }>
|
|
56
|
+
{
|
|
57
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
58
|
+
let path = `alarm/tag/list`;
|
|
59
|
+
let { data } = await this._get<{ rows: AlarmTagRow[], count: (number | null) }>(path, { filters: filters_string_value, page, size });
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
async Update(id: string, body: EntityTagInputRow): Promise<AlarmTagRow>
|
|
63
|
+
{
|
|
64
|
+
let path = `alarm/tag/${id}`;
|
|
65
|
+
let { data } = await this._put<AlarmTagRow>(path, {}, body);
|
|
66
|
+
return data;
|
|
67
|
+
}
|
|
68
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { NamirasoftServerBase } from "namirasoft-account";
|
|
22
|
+
import { TokenManager } from "namirasoft-account";
|
|
23
|
+
|
|
24
|
+
export class NamirasoftAlarmServerBase extends NamirasoftServerBase
|
|
25
|
+
{
|
|
26
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
27
|
+
{
|
|
28
|
+
super(`https://alarm.namirasoft.com/api/v1`, `1.3.0`, manager, onError);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { NamirasoftAlarmServerBase } from "./NamirasoftAlarmServerBase";
|
|
22
|
+
import { TokenManager } from "namirasoft-account";
|
|
23
|
+
|
|
24
|
+
export class NamirasoftAlarmServerHealthz extends NamirasoftAlarmServerBase
|
|
25
|
+
{
|
|
26
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
27
|
+
{
|
|
28
|
+
super(manager, onError);
|
|
29
|
+
this.Get = this.Get.bind(this);
|
|
30
|
+
}
|
|
31
|
+
async Get(): Promise<void>
|
|
32
|
+
{
|
|
33
|
+
let path = `/healthz`;
|
|
34
|
+
await this._get<void>(path, {});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { NamirasoftAlarmServerBase } from "./NamirasoftAlarmServerBase";
|
|
22
|
+
import { TokenManager } from "namirasoft-account";
|
|
23
|
+
|
|
24
|
+
export class NamirasoftAlarmServerValue extends NamirasoftAlarmServerBase
|
|
25
|
+
{
|
|
26
|
+
constructor(manager: TokenManager, onError: (error: Error) => void)
|
|
27
|
+
{
|
|
28
|
+
super(manager, onError);
|
|
29
|
+
this.List = this.List.bind(this);
|
|
30
|
+
}
|
|
31
|
+
async List(table: string, column: string): Promise<string[]>
|
|
32
|
+
{
|
|
33
|
+
let path = `/value/list/${table}/${column}`;
|
|
34
|
+
let { data } = await this._get<string[]>(path, {});
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -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
|
+
};
|