namirasoft-support 1.4.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/NamirasoftSupportServer.d.ts +15 -0
- package/dist/NamirasoftSupportServer.js +22 -0
- package/dist/NamirasoftSupportServer.js.map +1 -0
- package/dist/NamirasoftSupportServerBase.d.ts +5 -0
- package/dist/NamirasoftSupportServerBase.js +11 -0
- package/dist/NamirasoftSupportServerBase.js.map +1 -0
- package/dist/NamirasoftSupportServerCategory.d.ts +13 -0
- package/dist/NamirasoftSupportServerCategory.js +41 -0
- package/dist/NamirasoftSupportServerCategory.js.map +1 -0
- package/dist/NamirasoftSupportServerHealthz.d.ts +6 -0
- package/dist/NamirasoftSupportServerHealthz.js +28 -0
- package/dist/NamirasoftSupportServerHealthz.js.map +1 -0
- package/dist/NamirasoftSupportServerMessage.d.ts +17 -0
- package/dist/NamirasoftSupportServerMessage.js +64 -0
- package/dist/NamirasoftSupportServerMessage.js.map +1 -0
- package/dist/NamirasoftSupportServerTicket.d.ts +17 -0
- package/dist/NamirasoftSupportServerTicket.js +64 -0
- package/dist/NamirasoftSupportServerTicket.js.map +1 -0
- package/dist/NamirasoftSupportServerValue.d.ts +6 -0
- package/dist/NamirasoftSupportServerValue.js +29 -0
- package/dist/NamirasoftSupportServerValue.js.map +1 -0
- package/dist/command/CategoryCommand.d.ts +4 -0
- package/dist/command/CategoryCommand.js +17 -0
- package/dist/command/CategoryCommand.js.map +1 -0
- package/dist/command/CategoryGetCommand.d.ts +5 -0
- package/dist/command/CategoryGetCommand.js +38 -0
- package/dist/command/CategoryGetCommand.js.map +1 -0
- package/dist/command/CategoryListCommand.d.ts +5 -0
- package/dist/command/CategoryListCommand.js +38 -0
- package/dist/command/CategoryListCommand.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/MessageCommand.d.ts +4 -0
- package/dist/command/MessageCommand.js +23 -0
- package/dist/command/MessageCommand.js.map +1 -0
- package/dist/command/MessageCreateCommand.d.ts +5 -0
- package/dist/command/MessageCreateCommand.js +67 -0
- package/dist/command/MessageCreateCommand.js.map +1 -0
- package/dist/command/MessageDeleteCommand.d.ts +5 -0
- package/dist/command/MessageDeleteCommand.js +38 -0
- package/dist/command/MessageDeleteCommand.js.map +1 -0
- package/dist/command/MessageGetCommand.d.ts +5 -0
- package/dist/command/MessageGetCommand.js +38 -0
- package/dist/command/MessageGetCommand.js.map +1 -0
- package/dist/command/MessageListCommand.d.ts +5 -0
- package/dist/command/MessageListCommand.js +38 -0
- package/dist/command/MessageListCommand.js.map +1 -0
- package/dist/command/MessageUpdateCommand.d.ts +5 -0
- package/dist/command/MessageUpdateCommand.js +67 -0
- package/dist/command/MessageUpdateCommand.js.map +1 -0
- package/dist/command/TicketCommand.d.ts +4 -0
- package/dist/command/TicketCommand.js +23 -0
- package/dist/command/TicketCommand.js.map +1 -0
- package/dist/command/TicketCreateCommand.d.ts +5 -0
- package/dist/command/TicketCreateCommand.js +94 -0
- package/dist/command/TicketCreateCommand.js.map +1 -0
- package/dist/command/TicketDeleteCommand.d.ts +5 -0
- package/dist/command/TicketDeleteCommand.js +38 -0
- package/dist/command/TicketDeleteCommand.js.map +1 -0
- package/dist/command/TicketGetCommand.d.ts +5 -0
- package/dist/command/TicketGetCommand.js +38 -0
- package/dist/command/TicketGetCommand.js.map +1 -0
- package/dist/command/TicketListCommand.d.ts +5 -0
- package/dist/command/TicketListCommand.js +38 -0
- package/dist/command/TicketListCommand.js.map +1 -0
- package/dist/command/TicketUpdateCommand.d.ts +5 -0
- package/dist/command/TicketUpdateCommand.js +94 -0
- package/dist/command/TicketUpdateCommand.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 +22 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/enum/TicketAssignee.d.ts +3 -0
- package/dist/enum/TicketAssignee.js +8 -0
- package/dist/enum/TicketAssignee.js.map +1 -0
- package/dist/enum/TicketPriority.d.ts +6 -0
- package/dist/enum/TicketPriority.js +11 -0
- package/dist/enum/TicketPriority.js.map +1 -0
- package/dist/enum/TicketStatus.d.ts +6 -0
- package/dist/enum/TicketStatus.js +11 -0
- package/dist/enum/TicketStatus.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/dist/meta/CategoryMetaTable.d.ts +14 -0
- package/dist/meta/CategoryMetaTable.js +37 -0
- package/dist/meta/CategoryMetaTable.js.map +1 -0
- package/dist/meta/MessageMetaTable.d.ts +16 -0
- package/dist/meta/MessageMetaTable.js +39 -0
- package/dist/meta/MessageMetaTable.js.map +1 -0
- package/dist/meta/NamirasoftSupportMetaDatabase.d.ts +17 -0
- package/dist/meta/NamirasoftSupportMetaDatabase.js +31 -0
- package/dist/meta/NamirasoftSupportMetaDatabase.js.map +1 -0
- package/dist/meta/TicketMetaTable.d.ts +19 -0
- package/dist/meta/TicketMetaTable.js +42 -0
- package/dist/meta/TicketMetaTable.js.map +1 -0
- package/dist/row/CategoryRow.d.ts +7 -0
- package/dist/row/CategoryRow.js +3 -0
- package/dist/row/CategoryRow.js.map +1 -0
- package/dist/row/MessageInputRow.d.ts +5 -0
- package/dist/row/MessageInputRow.js +3 -0
- package/dist/row/MessageInputRow.js.map +1 -0
- package/dist/row/MessageRow.d.ts +9 -0
- package/dist/row/MessageRow.js +3 -0
- package/dist/row/MessageRow.js.map +1 -0
- package/dist/row/TicketInputRow.d.ts +11 -0
- package/dist/row/TicketInputRow.js +3 -0
- package/dist/row/TicketInputRow.js.map +1 -0
- package/dist/row/TicketRow.d.ts +15 -0
- package/dist/row/TicketRow.js +3 -0
- package/dist/row/TicketRow.js.map +1 -0
- package/logo.png +0 -0
- package/package.json +28 -0
- package/src/NamirasoftSupportServer.ts +45 -0
- package/src/NamirasoftSupportServerBase.ts +30 -0
- package/src/NamirasoftSupportServerCategory.ts +49 -0
- package/src/NamirasoftSupportServerHealthz.ts +36 -0
- package/src/NamirasoftSupportServerMessage.ts +70 -0
- package/src/NamirasoftSupportServerTicket.ts +70 -0
- package/src/NamirasoftSupportServerValue.ts +37 -0
- package/src/command/CategoryCommand.ts +34 -0
- package/src/command/CategoryGetCommand.ts +45 -0
- package/src/command/CategoryListCommand.ts +45 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MessageCommand.ts +40 -0
- package/src/command/MessageCreateCommand.ts +74 -0
- package/src/command/MessageDeleteCommand.ts +45 -0
- package/src/command/MessageGetCommand.ts +45 -0
- package/src/command/MessageListCommand.ts +45 -0
- package/src/command/MessageUpdateCommand.ts +74 -0
- package/src/command/TicketCommand.ts +40 -0
- package/src/command/TicketCreateCommand.ts +101 -0
- package/src/command/TicketDeleteCommand.ts +45 -0
- package/src/command/TicketGetCommand.ts +45 -0
- package/src/command/TicketListCommand.ts +45 -0
- package/src/command/TicketUpdateCommand.ts +101 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +41 -0
- package/src/enum/TicketAssignee.ts +24 -0
- package/src/enum/TicketPriority.ts +27 -0
- package/src/enum/TicketStatus.ts +27 -0
- package/src/index.ts +58 -0
- package/src/meta/CategoryMetaTable.ts +56 -0
- package/src/meta/MessageMetaTable.ts +60 -0
- package/src/meta/NamirasoftSupportMetaDatabase.ts +57 -0
- package/src/meta/TicketMetaTable.ts +66 -0
- package/src/row/CategoryRow.ts +28 -0
- package/src/row/MessageInputRow.ts +26 -0
- package/src/row/MessageRow.ts +30 -0
- package/src/row/TicketInputRow.ts +33 -0
- package/src/row/TicketRow.ts +37 -0
- package/tsconfig.json +42 -0
|
@@ -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 { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class TicketGetCommand 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-support account config \nor \nns-support account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
41
|
+
let server = new NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.ticket.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 { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class TicketListCommand 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-support account config \nor \nns-support account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
41
|
+
let server = new NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.ticket.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
|
+
};
|
|
@@ -0,0 +1,101 @@
|
|
|
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 { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class TicketUpdateCommand 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
|
+
name: "title",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'title' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["title"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "status",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'status' in body",
|
|
51
|
+
optional: false,
|
|
52
|
+
args: ["status"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "priority",
|
|
57
|
+
short: "",
|
|
58
|
+
description: "Provides the value of 'priority' in body",
|
|
59
|
+
optional: false,
|
|
60
|
+
args: ["priority"],
|
|
61
|
+
defaults: [""]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "assignee",
|
|
65
|
+
short: "",
|
|
66
|
+
description: "Provides the value of 'assignee' in body",
|
|
67
|
+
optional: false,
|
|
68
|
+
args: ["assignee"],
|
|
69
|
+
defaults: [""]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "description",
|
|
73
|
+
short: "",
|
|
74
|
+
description: "Provides the value of 'description' in body",
|
|
75
|
+
optional: true,
|
|
76
|
+
args: ["description"],
|
|
77
|
+
defaults: [""]
|
|
78
|
+
}
|
|
79
|
+
]);
|
|
80
|
+
}
|
|
81
|
+
override async exec()
|
|
82
|
+
{
|
|
83
|
+
let token = this.app.storage.getNSAToken();
|
|
84
|
+
if (token == null)
|
|
85
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
86
|
+
let storage = new IStorageMemoryDedicated();
|
|
87
|
+
let manager = new TokenManager(storage, () => { });
|
|
88
|
+
manager.setValue(token, false);
|
|
89
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
90
|
+
let server = new NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
91
|
+
let ans = await server.ticket.Update(this.arg_values[0], {
|
|
92
|
+
category_id: this.option_values.category_id,
|
|
93
|
+
title: this.option_values.title,
|
|
94
|
+
status: this.option_values.status,
|
|
95
|
+
priority: this.option_values.priority,
|
|
96
|
+
assignee: this.option_values.assignee,
|
|
97
|
+
description: this.option_values.description
|
|
98
|
+
});
|
|
99
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
100
|
+
}
|
|
101
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
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 { BaseNavigatorCommand } from "namirasoft-node-cli";
|
|
22
|
+
import { ValueListCommand } from "./ValueListCommand";
|
|
23
|
+
|
|
24
|
+
export class ValueCommand extends BaseNavigatorCommand
|
|
25
|
+
{
|
|
26
|
+
constructor(argv: string[])
|
|
27
|
+
{
|
|
28
|
+
super(argv, {
|
|
29
|
+
"list": ValueListCommand,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -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 { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class ValueListCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["table", "column", "search", "field_id", "limit"], []);
|
|
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-support account config \nor \nns-support account login.");
|
|
37
|
+
let storage = new IStorageMemoryDedicated();
|
|
38
|
+
let manager = new TokenManager(storage, () => { });
|
|
39
|
+
manager.setValue(token, false);
|
|
40
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
41
|
+
let server = new NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
42
|
+
let ans = await server.value.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/****************************************************************/
|
|
3
|
+
/* */
|
|
4
|
+
/* This is an Auto-Generated File */
|
|
5
|
+
/* Made By */
|
|
6
|
+
/* Namirasoft SDK Generator NPM Package */
|
|
7
|
+
/* */
|
|
8
|
+
/****************************************************************/
|
|
9
|
+
/****************************************************************/
|
|
10
|
+
/* */
|
|
11
|
+
/* Please do not make any change to this file */
|
|
12
|
+
/* If any change is required, ns-sdkg command must be used */
|
|
13
|
+
/* */
|
|
14
|
+
/****************************************************************/
|
|
15
|
+
/****************************************************************/
|
|
16
|
+
/* */
|
|
17
|
+
/* Namira Software Corporation */
|
|
18
|
+
/* https://namirasoft.com */
|
|
19
|
+
/* */
|
|
20
|
+
/****************************************************************/
|
|
21
|
+
|
|
22
|
+
import { AccountCommand } from "namirasoft-account";
|
|
23
|
+
import { Application, BaseStorage } from "namirasoft-node-cli";
|
|
24
|
+
import { CategoryCommand } from "./CategoryCommand";
|
|
25
|
+
import { ConfigCommand } from "namirasoft-node-cli";
|
|
26
|
+
import { HealthzCommand } from "./HealthzCommand";
|
|
27
|
+
import { MessageCommand } from "./MessageCommand";
|
|
28
|
+
import { TicketCommand } from "./TicketCommand";
|
|
29
|
+
import { ValueCommand } from "./ValueCommand";
|
|
30
|
+
|
|
31
|
+
let app = new Application("ns-support", new BaseStorage(),
|
|
32
|
+
{
|
|
33
|
+
"healthz": HealthzCommand,
|
|
34
|
+
"value": ValueCommand,
|
|
35
|
+
"category": CategoryCommand,
|
|
36
|
+
"ticket": TicketCommand,
|
|
37
|
+
"message": MessageCommand,
|
|
38
|
+
"account": AccountCommand,
|
|
39
|
+
"config": (argv: string[]) => new ConfigCommand(argv, ["ns-support-server-url"])
|
|
40
|
+
});
|
|
41
|
+
app.run();
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export enum TicketAssignee
|
|
22
|
+
{
|
|
23
|
+
ReadOnly = "ReadOnly",
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
export enum TicketPriority
|
|
22
|
+
{
|
|
23
|
+
Low = "Low",
|
|
24
|
+
Medium = "Medium",
|
|
25
|
+
High = "High",
|
|
26
|
+
Urgent = "Urgent",
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
export enum TicketStatus
|
|
22
|
+
{
|
|
23
|
+
Open = "Open",
|
|
24
|
+
InProgress = "InProgress",
|
|
25
|
+
Resolved = "Resolved",
|
|
26
|
+
Closed = "Closed",
|
|
27
|
+
}
|
package/src/index.ts
ADDED
|
@@ -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 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
|
+
export * from "./NamirasoftSupportServer";
|
|
22
|
+
export * from "./NamirasoftSupportServerBase";
|
|
23
|
+
export * from "./NamirasoftSupportServerCategory";
|
|
24
|
+
export * from "./NamirasoftSupportServerHealthz";
|
|
25
|
+
export * from "./NamirasoftSupportServerMessage";
|
|
26
|
+
export * from "./NamirasoftSupportServerTicket";
|
|
27
|
+
export * from "./NamirasoftSupportServerValue";
|
|
28
|
+
export * from "./command/CategoryCommand";
|
|
29
|
+
export * from "./command/CategoryGetCommand";
|
|
30
|
+
export * from "./command/CategoryListCommand";
|
|
31
|
+
export * from "./command/HealthzCommand";
|
|
32
|
+
export * from "./command/HealthzGetCommand";
|
|
33
|
+
export * from "./command/MessageCommand";
|
|
34
|
+
export * from "./command/MessageCreateCommand";
|
|
35
|
+
export * from "./command/MessageDeleteCommand";
|
|
36
|
+
export * from "./command/MessageGetCommand";
|
|
37
|
+
export * from "./command/MessageListCommand";
|
|
38
|
+
export * from "./command/MessageUpdateCommand";
|
|
39
|
+
export * from "./command/TicketCommand";
|
|
40
|
+
export * from "./command/TicketCreateCommand";
|
|
41
|
+
export * from "./command/TicketDeleteCommand";
|
|
42
|
+
export * from "./command/TicketGetCommand";
|
|
43
|
+
export * from "./command/TicketListCommand";
|
|
44
|
+
export * from "./command/TicketUpdateCommand";
|
|
45
|
+
export * from "./command/ValueCommand";
|
|
46
|
+
export * from "./command/ValueListCommand";
|
|
47
|
+
export * from "./enum/TicketAssignee";
|
|
48
|
+
export * from "./enum/TicketPriority";
|
|
49
|
+
export * from "./enum/TicketStatus";
|
|
50
|
+
export * from "./meta/CategoryMetaTable";
|
|
51
|
+
export * from "./meta/MessageMetaTable";
|
|
52
|
+
export * from "./meta/NamirasoftSupportMetaDatabase";
|
|
53
|
+
export * from "./meta/TicketMetaTable";
|
|
54
|
+
export * from "./row/CategoryRow";
|
|
55
|
+
export * from "./row/MessageInputRow";
|
|
56
|
+
export * from "./row/MessageRow";
|
|
57
|
+
export * from "./row/TicketInputRow";
|
|
58
|
+
export * from "./row/TicketRow";
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { BaseUUID, BaseMetaColumn, FilterItem, SortItem } from "namirasoft-core";
|
|
22
|
+
import { CategoryRow } from "../row/CategoryRow";
|
|
23
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
24
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
25
|
+
|
|
26
|
+
export class CategoryMetaTable extends NSBaseMetaTable<NamirasoftSupportServer, CategoryRow>
|
|
27
|
+
{
|
|
28
|
+
public override columns: {
|
|
29
|
+
id: BaseMetaColumn;
|
|
30
|
+
name: BaseMetaColumn;
|
|
31
|
+
description: BaseMetaColumn;
|
|
32
|
+
created_at: BaseMetaColumn;
|
|
33
|
+
updated_at: BaseMetaColumn;
|
|
34
|
+
}
|
|
35
|
+
constructor(database: NSBaseMetaDatabase<NamirasoftSupportServer>)
|
|
36
|
+
{
|
|
37
|
+
super(database, "category", "Category", new BaseUUID(""));
|
|
38
|
+
this.columns = {
|
|
39
|
+
id: new BaseMetaColumn(this, "id", "ID", "Integer", true),
|
|
40
|
+
name: new BaseMetaColumn(this, "name", "Name", "String", true),
|
|
41
|
+
description: new BaseMetaColumn(this, "description", "Description", "String", false),
|
|
42
|
+
created_at: new BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
|
43
|
+
updated_at: new BaseMetaColumn(this, "updated_at", "Updated At", "DateTime", true),
|
|
44
|
+
};
|
|
45
|
+
this.back_end.get = async (id: string) =>
|
|
46
|
+
{
|
|
47
|
+
let server = this.database.getServer();
|
|
48
|
+
return await server.category.Get(id);
|
|
49
|
+
};
|
|
50
|
+
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
|
51
|
+
{
|
|
52
|
+
let server = this.database.getServer();
|
|
53
|
+
return await server.category.List(filters, page, size, sorts);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { BaseUUID, BaseMetaColumn, FilterItem, SortItem } from "namirasoft-core";
|
|
22
|
+
import { MessageRow } from "../row/MessageRow";
|
|
23
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
|
24
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
25
|
+
|
|
26
|
+
export class MessageMetaTable extends NSBaseMetaTable<NamirasoftSupportServer, MessageRow>
|
|
27
|
+
{
|
|
28
|
+
public override columns: {
|
|
29
|
+
id: BaseMetaColumn;
|
|
30
|
+
user_id: BaseMetaColumn;
|
|
31
|
+
ticket_id: BaseMetaColumn;
|
|
32
|
+
sender_id: BaseMetaColumn;
|
|
33
|
+
message: BaseMetaColumn;
|
|
34
|
+
created_at: BaseMetaColumn;
|
|
35
|
+
updated_at: BaseMetaColumn;
|
|
36
|
+
}
|
|
37
|
+
constructor(database: NSBaseMetaDatabase<NamirasoftSupportServer>)
|
|
38
|
+
{
|
|
39
|
+
super(database, "message", "Message", new BaseUUID(""));
|
|
40
|
+
this.columns = {
|
|
41
|
+
id: new BaseMetaColumn(this, "id", "ID", "String", true),
|
|
42
|
+
user_id: new BaseMetaColumn(this, "user_id", "User ID", "String", true),
|
|
43
|
+
ticket_id: new BaseMetaColumn(this, "ticket_id", "Ticket ID", "String", true),
|
|
44
|
+
sender_id: new BaseMetaColumn(this, "sender_id", "Sender ID", "String", true),
|
|
45
|
+
message: new BaseMetaColumn(this, "message", "Message", "String", true),
|
|
46
|
+
created_at: new BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
|
47
|
+
updated_at: new BaseMetaColumn(this, "updated_at", "Updated At", "DateTime", true),
|
|
48
|
+
};
|
|
49
|
+
this.back_end.get = async (id: string) =>
|
|
50
|
+
{
|
|
51
|
+
let server = this.database.getServer();
|
|
52
|
+
return await server.message.Get(id);
|
|
53
|
+
};
|
|
54
|
+
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
|
55
|
+
{
|
|
56
|
+
let server = this.database.getServer();
|
|
57
|
+
return await server.message.List(filters, page, size, sorts);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
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 { CategoryMetaTable } from "./CategoryMetaTable";
|
|
22
|
+
import { EnvService } from "namirasoft-core";
|
|
23
|
+
import { MessageMetaTable } from "./MessageMetaTable";
|
|
24
|
+
import { NSBaseMetaDatabase } from "namirasoft-site";
|
|
25
|
+
import { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
26
|
+
import { TicketMetaTable } from "./TicketMetaTable";
|
|
27
|
+
import { TokenManager } from "namirasoft-account";
|
|
28
|
+
|
|
29
|
+
export class NamirasoftSupportMetaDatabase extends NSBaseMetaDatabase<NamirasoftSupportServer>
|
|
30
|
+
{
|
|
31
|
+
private manager?: TokenManager;
|
|
32
|
+
private onError?: (error: Error) => void;
|
|
33
|
+
public override tables: {
|
|
34
|
+
category: CategoryMetaTable,
|
|
35
|
+
ticket: TicketMetaTable,
|
|
36
|
+
message: MessageMetaTable,
|
|
37
|
+
};
|
|
38
|
+
constructor(manager?: TokenManager, onError?: (error: Error) => void)
|
|
39
|
+
{
|
|
40
|
+
super({ id: "prd-a365c9a5db434a23", name: "Namirasoft Workspace", headline: "Workspace Management Service", description: "Manage workspaces effectively. Plan, execute, and track workspace progress. Collaborate with team members and ensure timely delivery.", logo: "https://static.namirasoft.com/image/namirasoft/workspace/logo/base.png", link: "https://workspace.namirasoft.com" });
|
|
41
|
+
this.manager = manager;
|
|
42
|
+
this.onError = onError;
|
|
43
|
+
this.tables = {
|
|
44
|
+
category: new CategoryMetaTable(this),
|
|
45
|
+
ticket: new TicketMetaTable(this),
|
|
46
|
+
message: new MessageMetaTable(this),
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
override getServer(): NamirasoftSupportServer
|
|
50
|
+
{
|
|
51
|
+
if (!this.manager || !this.onError)
|
|
52
|
+
throw new Error("Arguments of NamirasoftSupportMetaDatabase (manager, onError) are required for server operations.")
|
|
53
|
+
let NAME = NSBaseMetaDatabase.getServerBaseURL(this.product.name);
|
|
54
|
+
let BASE_URL = new EnvService(NAME, true).getString();
|
|
55
|
+
return new NamirasoftSupportServer(BASE_URL, this.manager, this.onError);
|
|
56
|
+
}
|
|
57
|
+
};
|