namirasoft-expert 1.4.2
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/NamirasoftExpertServer.d.ts +23 -0
- package/dist/NamirasoftExpertServer.js +30 -0
- package/dist/NamirasoftExpertServer.js.map +1 -0
- package/dist/NamirasoftExpertServerAgent.d.ts +18 -0
- package/dist/NamirasoftExpertServerAgent.js +64 -0
- package/dist/NamirasoftExpertServerAgent.js.map +1 -0
- package/dist/NamirasoftExpertServerAgentCategory.d.ts +17 -0
- package/dist/NamirasoftExpertServerAgentCategory.js +56 -0
- package/dist/NamirasoftExpertServerAgentCategory.js.map +1 -0
- package/dist/NamirasoftExpertServerAgentField.d.ts +18 -0
- package/dist/NamirasoftExpertServerAgentField.js +64 -0
- package/dist/NamirasoftExpertServerAgentField.js.map +1 -0
- package/dist/NamirasoftExpertServerAgentTag.d.ts +18 -0
- package/dist/NamirasoftExpertServerAgentTag.js +64 -0
- package/dist/NamirasoftExpertServerAgentTag.js.map +1 -0
- package/dist/NamirasoftExpertServerBase.d.ts +5 -0
- package/dist/NamirasoftExpertServerBase.js +11 -0
- package/dist/NamirasoftExpertServerBase.js.map +1 -0
- package/dist/NamirasoftExpertServerChat.d.ts +14 -0
- package/dist/NamirasoftExpertServerChat.js +41 -0
- package/dist/NamirasoftExpertServerChat.js.map +1 -0
- package/dist/NamirasoftExpertServerHealth.d.ts +8 -0
- package/dist/NamirasoftExpertServerHealth.js +35 -0
- package/dist/NamirasoftExpertServerHealth.js.map +1 -0
- package/dist/NamirasoftExpertServerHealthz.d.ts +7 -0
- package/dist/NamirasoftExpertServerHealthz.js +28 -0
- package/dist/NamirasoftExpertServerHealthz.js.map +1 -0
- package/dist/NamirasoftExpertServerMetrics.d.ts +7 -0
- package/dist/NamirasoftExpertServerMetrics.js +28 -0
- package/dist/NamirasoftExpertServerMetrics.js.map +1 -0
- package/dist/NamirasoftExpertServerValue.d.ts +7 -0
- package/dist/NamirasoftExpertServerValue.js +29 -0
- package/dist/NamirasoftExpertServerValue.js.map +1 -0
- package/dist/command/AgentCategoryCommand.d.ts +4 -0
- package/dist/command/AgentCategoryCommand.js +21 -0
- package/dist/command/AgentCategoryCommand.js.map +1 -0
- package/dist/command/AgentCategoryCreateCommand.d.ts +5 -0
- package/dist/command/AgentCategoryCreateCommand.js +58 -0
- package/dist/command/AgentCategoryCreateCommand.js.map +1 -0
- package/dist/command/AgentCategoryDeleteCommand.d.ts +5 -0
- package/dist/command/AgentCategoryDeleteCommand.js +38 -0
- package/dist/command/AgentCategoryDeleteCommand.js.map +1 -0
- package/dist/command/AgentCategoryGetCommand.d.ts +5 -0
- package/dist/command/AgentCategoryGetCommand.js +38 -0
- package/dist/command/AgentCategoryGetCommand.js.map +1 -0
- package/dist/command/AgentCategoryListCommand.d.ts +5 -0
- package/dist/command/AgentCategoryListCommand.js +38 -0
- package/dist/command/AgentCategoryListCommand.js.map +1 -0
- package/dist/command/AgentCommand.d.ts +4 -0
- package/dist/command/AgentCommand.js +23 -0
- package/dist/command/AgentCommand.js.map +1 -0
- package/dist/command/AgentCreateCommand.d.ts +5 -0
- package/dist/command/AgentCreateCommand.js +148 -0
- package/dist/command/AgentCreateCommand.js.map +1 -0
- package/dist/command/AgentDeleteCommand.d.ts +5 -0
- package/dist/command/AgentDeleteCommand.js +38 -0
- package/dist/command/AgentDeleteCommand.js.map +1 -0
- package/dist/command/AgentFieldCommand.d.ts +4 -0
- package/dist/command/AgentFieldCommand.js +23 -0
- package/dist/command/AgentFieldCommand.js.map +1 -0
- package/dist/command/AgentFieldCreateCommand.d.ts +5 -0
- package/dist/command/AgentFieldCreateCommand.js +67 -0
- package/dist/command/AgentFieldCreateCommand.js.map +1 -0
- package/dist/command/AgentFieldDeleteCommand.d.ts +5 -0
- package/dist/command/AgentFieldDeleteCommand.js +38 -0
- package/dist/command/AgentFieldDeleteCommand.js.map +1 -0
- package/dist/command/AgentFieldGetCommand.d.ts +5 -0
- package/dist/command/AgentFieldGetCommand.js +38 -0
- package/dist/command/AgentFieldGetCommand.js.map +1 -0
- package/dist/command/AgentFieldListCommand.d.ts +5 -0
- package/dist/command/AgentFieldListCommand.js +38 -0
- package/dist/command/AgentFieldListCommand.js.map +1 -0
- package/dist/command/AgentFieldUpdateCommand.d.ts +5 -0
- package/dist/command/AgentFieldUpdateCommand.js +67 -0
- package/dist/command/AgentFieldUpdateCommand.js.map +1 -0
- package/dist/command/AgentGetCommand.d.ts +5 -0
- package/dist/command/AgentGetCommand.js +38 -0
- package/dist/command/AgentGetCommand.js.map +1 -0
- package/dist/command/AgentListCommand.d.ts +5 -0
- package/dist/command/AgentListCommand.js +38 -0
- package/dist/command/AgentListCommand.js.map +1 -0
- package/dist/command/AgentTagCommand.d.ts +4 -0
- package/dist/command/AgentTagCommand.js +23 -0
- package/dist/command/AgentTagCommand.js.map +1 -0
- package/dist/command/AgentTagCreateCommand.d.ts +5 -0
- package/dist/command/AgentTagCreateCommand.js +67 -0
- package/dist/command/AgentTagCreateCommand.js.map +1 -0
- package/dist/command/AgentTagDeleteCommand.d.ts +5 -0
- package/dist/command/AgentTagDeleteCommand.js +38 -0
- package/dist/command/AgentTagDeleteCommand.js.map +1 -0
- package/dist/command/AgentTagGetCommand.d.ts +5 -0
- package/dist/command/AgentTagGetCommand.js +38 -0
- package/dist/command/AgentTagGetCommand.js.map +1 -0
- package/dist/command/AgentTagListCommand.d.ts +5 -0
- package/dist/command/AgentTagListCommand.js +38 -0
- package/dist/command/AgentTagListCommand.js.map +1 -0
- package/dist/command/AgentTagUpdateCommand.d.ts +5 -0
- package/dist/command/AgentTagUpdateCommand.js +67 -0
- package/dist/command/AgentTagUpdateCommand.js.map +1 -0
- package/dist/command/AgentUpdateCommand.d.ts +5 -0
- package/dist/command/AgentUpdateCommand.js +148 -0
- package/dist/command/AgentUpdateCommand.js.map +1 -0
- package/dist/command/ChatCommand.d.ts +4 -0
- package/dist/command/ChatCommand.js +17 -0
- package/dist/command/ChatCommand.js.map +1 -0
- package/dist/command/ChatGetCommand.d.ts +5 -0
- package/dist/command/ChatGetCommand.js +38 -0
- package/dist/command/ChatGetCommand.js.map +1 -0
- package/dist/command/ChatListCommand.d.ts +5 -0
- package/dist/command/ChatListCommand.js +38 -0
- package/dist/command/ChatListCommand.js.map +1 -0
- package/dist/command/HealthCommand.d.ts +4 -0
- package/dist/command/HealthCommand.js +17 -0
- package/dist/command/HealthCommand.js.map +1 -0
- package/dist/command/HealthLivenessCommand.d.ts +5 -0
- package/dist/command/HealthLivenessCommand.js +38 -0
- package/dist/command/HealthLivenessCommand.js.map +1 -0
- package/dist/command/HealthReadinessCommand.d.ts +5 -0
- package/dist/command/HealthReadinessCommand.js +38 -0
- package/dist/command/HealthReadinessCommand.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 +38 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/MetricsCommand.d.ts +4 -0
- package/dist/command/MetricsCommand.js +15 -0
- package/dist/command/MetricsCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.d.ts +5 -0
- package/dist/command/MetricsGetCommand.js +38 -0
- package/dist/command/MetricsGetCommand.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 +38 -0
- package/dist/command/ValueListCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +30 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/enum/ChatType.d.ts +6 -0
- package/dist/enum/ChatType.js +11 -0
- package/dist/enum/ChatType.js.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +79 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/AgentCategoryMetaTable.d.ts +15 -0
- package/dist/meta/AgentCategoryMetaTable.js +39 -0
- package/dist/meta/AgentCategoryMetaTable.js.map +1 -0
- package/dist/meta/AgentFieldMetaTable.d.ts +16 -0
- package/dist/meta/AgentFieldMetaTable.js +39 -0
- package/dist/meta/AgentFieldMetaTable.js.map +1 -0
- package/dist/meta/AgentMetaTable.d.ts +25 -0
- package/dist/meta/AgentMetaTable.js +48 -0
- package/dist/meta/AgentMetaTable.js.map +1 -0
- package/dist/meta/AgentTagMetaTable.d.ts +16 -0
- package/dist/meta/AgentTagMetaTable.js +39 -0
- package/dist/meta/AgentTagMetaTable.js.map +1 -0
- package/dist/meta/ChatMetaTable.d.ts +19 -0
- package/dist/meta/ChatMetaTable.js +44 -0
- package/dist/meta/ChatMetaTable.js.map +1 -0
- package/dist/meta/NamirasoftExpertMetaDatabase.d.ts +21 -0
- package/dist/meta/NamirasoftExpertMetaDatabase.js +35 -0
- package/dist/meta/NamirasoftExpertMetaDatabase.js.map +1 -0
- package/dist/row/AgentCategoryRow.d.ts +8 -0
- package/dist/row/AgentCategoryRow.js +3 -0
- package/dist/row/AgentCategoryRow.js.map +1 -0
- package/dist/row/AgentFieldRow.d.ts +9 -0
- package/dist/row/AgentFieldRow.js +3 -0
- package/dist/row/AgentFieldRow.js.map +1 -0
- package/dist/row/AgentInputRow.d.ts +14 -0
- package/dist/row/AgentInputRow.js +3 -0
- package/dist/row/AgentInputRow.js.map +1 -0
- package/dist/row/AgentRow.d.ts +18 -0
- package/dist/row/AgentRow.js +3 -0
- package/dist/row/AgentRow.js.map +1 -0
- package/dist/row/AgentTagRow.d.ts +9 -0
- package/dist/row/AgentTagRow.js +3 -0
- package/dist/row/AgentTagRow.js.map +1 -0
- package/dist/row/ChatRow.d.ts +13 -0
- package/dist/row/ChatRow.js +3 -0
- package/dist/row/ChatRow.js.map +1 -0
- package/dist/row/EntityCategoryInputRow.d.ts +4 -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/NamirasoftExpertServer.ts +57 -0
- package/src/NamirasoftExpertServerAgent.ts +71 -0
- package/src/NamirasoftExpertServerAgentCategory.ts +64 -0
- package/src/NamirasoftExpertServerAgentField.ts +71 -0
- package/src/NamirasoftExpertServerAgentTag.ts +71 -0
- package/src/NamirasoftExpertServerBase.ts +30 -0
- package/src/NamirasoftExpertServerChat.ts +50 -0
- package/src/NamirasoftExpertServerHealth.ts +43 -0
- package/src/NamirasoftExpertServerHealthz.ts +37 -0
- package/src/NamirasoftExpertServerMetrics.ts +37 -0
- package/src/NamirasoftExpertServerValue.ts +38 -0
- package/src/command/AgentCategoryCommand.ts +38 -0
- package/src/command/AgentCategoryCreateCommand.ts +65 -0
- package/src/command/AgentCategoryDeleteCommand.ts +45 -0
- package/src/command/AgentCategoryGetCommand.ts +45 -0
- package/src/command/AgentCategoryListCommand.ts +45 -0
- package/src/command/AgentCommand.ts +40 -0
- package/src/command/AgentCreateCommand.ts +155 -0
- package/src/command/AgentDeleteCommand.ts +45 -0
- package/src/command/AgentFieldCommand.ts +40 -0
- package/src/command/AgentFieldCreateCommand.ts +74 -0
- package/src/command/AgentFieldDeleteCommand.ts +45 -0
- package/src/command/AgentFieldGetCommand.ts +45 -0
- package/src/command/AgentFieldListCommand.ts +45 -0
- package/src/command/AgentFieldUpdateCommand.ts +74 -0
- package/src/command/AgentGetCommand.ts +45 -0
- package/src/command/AgentListCommand.ts +45 -0
- package/src/command/AgentTagCommand.ts +40 -0
- package/src/command/AgentTagCreateCommand.ts +74 -0
- package/src/command/AgentTagDeleteCommand.ts +45 -0
- package/src/command/AgentTagGetCommand.ts +45 -0
- package/src/command/AgentTagListCommand.ts +45 -0
- package/src/command/AgentTagUpdateCommand.ts +74 -0
- package/src/command/AgentUpdateCommand.ts +155 -0
- package/src/command/ChatCommand.ts +34 -0
- package/src/command/ChatGetCommand.ts +45 -0
- package/src/command/ChatListCommand.ts +45 -0
- package/src/command/HealthCommand.ts +34 -0
- package/src/command/HealthLivenessCommand.ts +45 -0
- package/src/command/HealthReadinessCommand.ts +45 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MetricsCommand.ts +32 -0
- package/src/command/MetricsGetCommand.ts +45 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +49 -0
- package/src/enum/ChatType.ts +27 -0
- package/src/index.ts +82 -0
- package/src/meta/AgentCategoryMetaTable.ts +60 -0
- package/src/meta/AgentFieldMetaTable.ts +61 -0
- package/src/meta/AgentMetaTable.ts +79 -0
- package/src/meta/AgentTagMetaTable.ts +61 -0
- package/src/meta/ChatMetaTable.ts +69 -0
- package/src/meta/NamirasoftExpertMetaDatabase.ts +63 -0
- package/src/row/AgentCategoryRow.ts +29 -0
- package/src/row/AgentFieldRow.ts +30 -0
- package/src/row/AgentInputRow.ts +35 -0
- package/src/row/AgentRow.ts +39 -0
- package/src/row/AgentTagRow.ts +30 -0
- package/src/row/ChatRow.ts +35 -0
- package/src/row/EntityCategoryInputRow.ts +25 -0
- package/src/row/EntityFieldInputRow.ts +26 -0
- package/src/row/EntityTagInputRow.ts +26 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1,71 @@
|
|
|
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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { AgentFieldRow } from "./row/AgentFieldRow";
|
|
22
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
23
|
+
import { EntityFieldInputRow } from "./row/EntityFieldInputRow";
|
|
24
|
+
import { FilterItem } from "namirasoft-core";
|
|
25
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
26
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
27
|
+
import { SortItem } from "namirasoft-core";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftExpertServerAgentField extends NamirasoftExpertServerBase
|
|
30
|
+
{
|
|
31
|
+
constructor(server: NamirasoftExpertServer)
|
|
32
|
+
{
|
|
33
|
+
super(server);
|
|
34
|
+
this.List = this.List.bind(this);
|
|
35
|
+
this.Get = this.Get.bind(this);
|
|
36
|
+
this.Create = this.Create.bind(this);
|
|
37
|
+
this.Update = this.Update.bind(this);
|
|
38
|
+
this.Delete = this.Delete.bind(this);
|
|
39
|
+
}
|
|
40
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: AgentFieldRow[], count: number }>
|
|
41
|
+
{
|
|
42
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
43
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
44
|
+
let path = `agent/field/list`;
|
|
45
|
+
let { data } = await this.server._get<{ rows: AgentFieldRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
46
|
+
return data;
|
|
47
|
+
}
|
|
48
|
+
async Get(id: string, config?: BaseServerConfig<any>): Promise<AgentFieldRow>
|
|
49
|
+
{
|
|
50
|
+
let path = `agent/field/${id}`;
|
|
51
|
+
let { data } = await this.server._get<AgentFieldRow>(path, {}, config);
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
async Create(body: EntityFieldInputRow, config?: BaseServerConfig<any>): Promise<AgentFieldRow>
|
|
55
|
+
{
|
|
56
|
+
let path = `agent/field`;
|
|
57
|
+
let { data } = await this.server._post<AgentFieldRow>(path, {}, body, config);
|
|
58
|
+
return data;
|
|
59
|
+
}
|
|
60
|
+
async Update(id: number, body: EntityFieldInputRow, config?: BaseServerConfig<any>): Promise<AgentFieldRow>
|
|
61
|
+
{
|
|
62
|
+
let path = `agent/field/${id}`;
|
|
63
|
+
let { data } = await this.server._put<AgentFieldRow>(path, {}, body, config);
|
|
64
|
+
return data;
|
|
65
|
+
}
|
|
66
|
+
async Delete(id: number, config?: BaseServerConfig<any>): Promise<void>
|
|
67
|
+
{
|
|
68
|
+
let path = `agent/field/${id}`;
|
|
69
|
+
await this.server._delete<void>(path, {}, config);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { AgentTagRow } from "./row/AgentTagRow";
|
|
22
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
23
|
+
import { EntityTagInputRow } from "./row/EntityTagInputRow";
|
|
24
|
+
import { FilterItem } from "namirasoft-core";
|
|
25
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
26
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
27
|
+
import { SortItem } from "namirasoft-core";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftExpertServerAgentTag extends NamirasoftExpertServerBase
|
|
30
|
+
{
|
|
31
|
+
constructor(server: NamirasoftExpertServer)
|
|
32
|
+
{
|
|
33
|
+
super(server);
|
|
34
|
+
this.List = this.List.bind(this);
|
|
35
|
+
this.Get = this.Get.bind(this);
|
|
36
|
+
this.Create = this.Create.bind(this);
|
|
37
|
+
this.Update = this.Update.bind(this);
|
|
38
|
+
this.Delete = this.Delete.bind(this);
|
|
39
|
+
}
|
|
40
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: AgentTagRow[], count: number }>
|
|
41
|
+
{
|
|
42
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
43
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
44
|
+
let path = `agent/tag/list`;
|
|
45
|
+
let { data } = await this.server._get<{ rows: AgentTagRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
46
|
+
return data;
|
|
47
|
+
}
|
|
48
|
+
async Get(id: string, config?: BaseServerConfig<any>): Promise<AgentTagRow>
|
|
49
|
+
{
|
|
50
|
+
let path = `agent/tag/${id}`;
|
|
51
|
+
let { data } = await this.server._get<AgentTagRow>(path, {}, config);
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
async Create(body: EntityTagInputRow, config?: BaseServerConfig<any>): Promise<AgentTagRow>
|
|
55
|
+
{
|
|
56
|
+
let path = `agent/tag`;
|
|
57
|
+
let { data } = await this.server._post<AgentTagRow>(path, {}, body, config);
|
|
58
|
+
return data;
|
|
59
|
+
}
|
|
60
|
+
async Update(id: number, body: EntityTagInputRow, config?: BaseServerConfig<any>): Promise<AgentTagRow>
|
|
61
|
+
{
|
|
62
|
+
let path = `agent/tag/${id}`;
|
|
63
|
+
let { data } = await this.server._put<AgentTagRow>(path, {}, body, config);
|
|
64
|
+
return data;
|
|
65
|
+
}
|
|
66
|
+
async Delete(id: number, config?: BaseServerConfig<any>): Promise<void>
|
|
67
|
+
{
|
|
68
|
+
let path = `agent/tag/${id}`;
|
|
69
|
+
await this.server._delete<void>(path, {}, config);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
@@ -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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
22
|
+
|
|
23
|
+
export class NamirasoftExpertServerBase
|
|
24
|
+
{
|
|
25
|
+
public server: NamirasoftExpertServer;
|
|
26
|
+
constructor(server: NamirasoftExpertServer)
|
|
27
|
+
{
|
|
28
|
+
this.server = server;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { ChatRow } from "./row/ChatRow";
|
|
23
|
+
import { FilterItem } from "namirasoft-core";
|
|
24
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
25
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
26
|
+
import { SortItem } from "namirasoft-core";
|
|
27
|
+
|
|
28
|
+
export class NamirasoftExpertServerChat extends NamirasoftExpertServerBase
|
|
29
|
+
{
|
|
30
|
+
constructor(server: NamirasoftExpertServer)
|
|
31
|
+
{
|
|
32
|
+
super(server);
|
|
33
|
+
this.Get = this.Get.bind(this);
|
|
34
|
+
this.List = this.List.bind(this);
|
|
35
|
+
}
|
|
36
|
+
async Get(id: (string | null), config?: BaseServerConfig<any>): Promise<ChatRow>
|
|
37
|
+
{
|
|
38
|
+
let path = `/chat/${id}`;
|
|
39
|
+
let { data } = await this.server._get<ChatRow>(path, {}, config);
|
|
40
|
+
return data;
|
|
41
|
+
}
|
|
42
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[], config?: BaseServerConfig<any>): Promise<{ rows: ChatRow[], count: number }>
|
|
43
|
+
{
|
|
44
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
45
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
46
|
+
let path = `/chat/list`;
|
|
47
|
+
let { data } = await this.server._get<{ rows: ChatRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value }, config);
|
|
48
|
+
return data;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
23
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftExpertServerHealth extends NamirasoftExpertServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftExpertServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.Liveness = this.Liveness.bind(this);
|
|
31
|
+
this.Readiness = this.Readiness.bind(this);
|
|
32
|
+
}
|
|
33
|
+
async Liveness(config?: BaseServerConfig<any>): Promise<void>
|
|
34
|
+
{
|
|
35
|
+
let path = `/health/liveness`;
|
|
36
|
+
await this.server._get<void>(path, {}, config);
|
|
37
|
+
}
|
|
38
|
+
async Readiness(config?: BaseServerConfig<any>): Promise<void>
|
|
39
|
+
{
|
|
40
|
+
let path = `/health/readiness`;
|
|
41
|
+
await this.server._get<void>(path, {}, config);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
@@ -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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
23
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftExpertServerHealthz extends NamirasoftExpertServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftExpertServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.Get = this.Get.bind(this);
|
|
31
|
+
}
|
|
32
|
+
async Get(config?: BaseServerConfig<any>): Promise<void>
|
|
33
|
+
{
|
|
34
|
+
let path = `/healthz`;
|
|
35
|
+
await this.server._get<void>(path, {}, config);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
23
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftExpertServerMetrics extends NamirasoftExpertServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftExpertServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.Get = this.Get.bind(this);
|
|
31
|
+
}
|
|
32
|
+
async Get(config?: BaseServerConfig<any>): Promise<void>
|
|
33
|
+
{
|
|
34
|
+
let path = `/metrics`;
|
|
35
|
+
await this.server._get<void>(path, {}, config);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { BaseServerConfig } from "namirasoft-core";
|
|
22
|
+
import { NamirasoftExpertServer } from "./NamirasoftExpertServer";
|
|
23
|
+
import { NamirasoftExpertServerBase } from "./NamirasoftExpertServerBase";
|
|
24
|
+
|
|
25
|
+
export class NamirasoftExpertServerValue extends NamirasoftExpertServerBase
|
|
26
|
+
{
|
|
27
|
+
constructor(server: NamirasoftExpertServer)
|
|
28
|
+
{
|
|
29
|
+
super(server);
|
|
30
|
+
this.List = this.List.bind(this);
|
|
31
|
+
}
|
|
32
|
+
async List(table: string, column: string, search: (string | null), field_id: (string | null), limit: (number | null), config?: BaseServerConfig<any>): Promise<string[]>
|
|
33
|
+
{
|
|
34
|
+
let path = `/value/list/${table}/${column}`;
|
|
35
|
+
let { data } = await this.server._get<string[]>(path, { search, field_id, limit }, config);
|
|
36
|
+
return data;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
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 change is required, ns-sdkg command must be used */
|
|
12
|
+
/* */
|
|
13
|
+
/****************************************************************/
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/* */
|
|
16
|
+
/* Namira Software Corporation */
|
|
17
|
+
/* https://namirasoft.com */
|
|
18
|
+
/* */
|
|
19
|
+
/****************************************************************/
|
|
20
|
+
|
|
21
|
+
import { AgentCategoryCreateCommand } from "./AgentCategoryCreateCommand";
|
|
22
|
+
import { AgentCategoryDeleteCommand } from "./AgentCategoryDeleteCommand";
|
|
23
|
+
import { AgentCategoryGetCommand } from "./AgentCategoryGetCommand";
|
|
24
|
+
import { AgentCategoryListCommand } from "./AgentCategoryListCommand";
|
|
25
|
+
import { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
26
|
+
|
|
27
|
+
export class AgentCategoryCommand extends BaseNavigatorCommand
|
|
28
|
+
{
|
|
29
|
+
constructor(argv: string[])
|
|
30
|
+
{
|
|
31
|
+
super(argv, {
|
|
32
|
+
"list": AgentCategoryListCommand,
|
|
33
|
+
"get": AgentCategoryGetCommand,
|
|
34
|
+
"create": AgentCategoryCreateCommand,
|
|
35
|
+
"delete": AgentCategoryDeleteCommand,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
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 change is required, 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 { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftExpertServer } from "../NamirasoftExpertServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AgentCategoryCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "entity_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'entity_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["entity_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "category_id",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'category_id' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["category_id"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
}
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
override async exec()
|
|
50
|
+
{
|
|
51
|
+
let token = this.app.storage.getNSAToken();
|
|
52
|
+
if (token == null)
|
|
53
|
+
throw new Error("Token is not available. Please login first using:\nns-expert account config \nor \nns-expert account login.");
|
|
54
|
+
let storage = new IStorageMemoryDedicated();
|
|
55
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
56
|
+
token_manager.setValue(token, false);
|
|
57
|
+
let url = this.app.storage.getItem("ns-expert-server-url");
|
|
58
|
+
let server = new NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
59
|
+
let ans = await server.agent_category.Create({
|
|
60
|
+
entity_id: this.option_values.entity_id,
|
|
61
|
+
category_id: this.option_values.category_id
|
|
62
|
+
});
|
|
63
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 change is required, 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 { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftExpertServer } from "../NamirasoftExpertServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AgentCategoryDeleteCommand 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-expert account config \nor \nns-expert account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
39
|
+
token_manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-expert-server-url");
|
|
41
|
+
let server = new NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.agent_category.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 change is required, 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 { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftExpertServer } from "../NamirasoftExpertServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AgentCategoryGetCommand 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-expert account config \nor \nns-expert account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
39
|
+
token_manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-expert-server-url");
|
|
41
|
+
let server = new NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.agent_category.Get(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
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 change is required, 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 { IStorageMemoryDedicated } from "namirasoft-core";
|
|
23
|
+
import { NamirasoftExpertServer } from "../NamirasoftExpertServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class AgentCategoryListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["filters", "page", "size", "sorts"], []);
|
|
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-expert account config \nor \nns-expert account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let token_manager = new TokenManager(storage, () => { });
|
|
39
|
+
token_manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-expert-server-url");
|
|
41
|
+
let server = new NamirasoftExpertServer(url, token_manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.agent_category.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|