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 CategoryListCommand 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.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
|
+
};
|
|
@@ -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 { HealthzGetCommand } from "./HealthzGetCommand";
|
|
23
|
+
|
|
24
|
+
export class HealthzCommand extends BaseNavigatorCommand
|
|
25
|
+
{
|
|
26
|
+
constructor(argv: string[])
|
|
27
|
+
{
|
|
28
|
+
super(argv, {
|
|
29
|
+
"get": HealthzGetCommand,
|
|
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 HealthzGetCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], []);
|
|
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.healthz.Get();
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|
|
@@ -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 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 { MessageCreateCommand } from "./MessageCreateCommand";
|
|
23
|
+
import { MessageDeleteCommand } from "./MessageDeleteCommand";
|
|
24
|
+
import { MessageGetCommand } from "./MessageGetCommand";
|
|
25
|
+
import { MessageListCommand } from "./MessageListCommand";
|
|
26
|
+
import { MessageUpdateCommand } from "./MessageUpdateCommand";
|
|
27
|
+
|
|
28
|
+
export class MessageCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"list": MessageListCommand,
|
|
34
|
+
"get": MessageGetCommand,
|
|
35
|
+
"create": MessageCreateCommand,
|
|
36
|
+
"update": MessageUpdateCommand,
|
|
37
|
+
"delete": MessageDeleteCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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 MessageCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "ticket_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'ticket_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["ticket_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "sender_id",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'sender_id' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["sender_id"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "message",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'message' in body",
|
|
51
|
+
optional: false,
|
|
52
|
+
args: ["message"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
override async exec()
|
|
58
|
+
{
|
|
59
|
+
let token = this.app.storage.getNSAToken();
|
|
60
|
+
if (token == null)
|
|
61
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
62
|
+
let storage = new IStorageMemoryDedicated();
|
|
63
|
+
let manager = new TokenManager(storage, () => { });
|
|
64
|
+
manager.setValue(token, false);
|
|
65
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
66
|
+
let server = new NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
67
|
+
let ans = await server.message.Create({
|
|
68
|
+
ticket_id: this.option_values.ticket_id,
|
|
69
|
+
sender_id: this.option_values.sender_id,
|
|
70
|
+
message: this.option_values.message
|
|
71
|
+
});
|
|
72
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
@@ -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 MessageDeleteCommand 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.message.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 { NamirasoftSupportServer } from "../NamirasoftSupportServer";
|
|
24
|
+
import { TokenManager } from "namirasoft-account";
|
|
25
|
+
|
|
26
|
+
export class MessageGetCommand 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.message.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 MessageListCommand 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.message.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,74 @@
|
|
|
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 MessageUpdateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, ["id"], [
|
|
31
|
+
{
|
|
32
|
+
name: "ticket_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'ticket_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["ticket_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: "sender_id",
|
|
41
|
+
short: "",
|
|
42
|
+
description: "Provides the value of 'sender_id' in body",
|
|
43
|
+
optional: false,
|
|
44
|
+
args: ["sender_id"],
|
|
45
|
+
defaults: [""]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "message",
|
|
49
|
+
short: "",
|
|
50
|
+
description: "Provides the value of 'message' in body",
|
|
51
|
+
optional: false,
|
|
52
|
+
args: ["message"],
|
|
53
|
+
defaults: [""]
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
}
|
|
57
|
+
override async exec()
|
|
58
|
+
{
|
|
59
|
+
let token = this.app.storage.getNSAToken();
|
|
60
|
+
if (token == null)
|
|
61
|
+
throw new Error("Token is not available. Please login first using:\nns-support account config \nor \nns-support account login.");
|
|
62
|
+
let storage = new IStorageMemoryDedicated();
|
|
63
|
+
let manager = new TokenManager(storage, () => { });
|
|
64
|
+
manager.setValue(token, false);
|
|
65
|
+
let url = this.app.storage.getItem("ns-support-server-url");
|
|
66
|
+
let server = new NamirasoftSupportServer(url, manager, e => this.app.logger.error(e.message));
|
|
67
|
+
let ans = await server.message.Update(this.arg_values[0], {
|
|
68
|
+
ticket_id: this.option_values.ticket_id,
|
|
69
|
+
sender_id: this.option_values.sender_id,
|
|
70
|
+
message: this.option_values.message
|
|
71
|
+
});
|
|
72
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
@@ -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 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 { TicketCreateCommand } from "./TicketCreateCommand";
|
|
23
|
+
import { TicketDeleteCommand } from "./TicketDeleteCommand";
|
|
24
|
+
import { TicketGetCommand } from "./TicketGetCommand";
|
|
25
|
+
import { TicketListCommand } from "./TicketListCommand";
|
|
26
|
+
import { TicketUpdateCommand } from "./TicketUpdateCommand";
|
|
27
|
+
|
|
28
|
+
export class TicketCommand extends BaseNavigatorCommand
|
|
29
|
+
{
|
|
30
|
+
constructor(argv: string[])
|
|
31
|
+
{
|
|
32
|
+
super(argv, {
|
|
33
|
+
"list": TicketListCommand,
|
|
34
|
+
"get": TicketGetCommand,
|
|
35
|
+
"create": TicketCreateCommand,
|
|
36
|
+
"update": TicketUpdateCommand,
|
|
37
|
+
"delete": TicketDeleteCommand,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -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 TicketCreateCommand extends BaseFinalCommand
|
|
27
|
+
{
|
|
28
|
+
constructor(argv: string[])
|
|
29
|
+
{
|
|
30
|
+
super(argv, [], [
|
|
31
|
+
{
|
|
32
|
+
name: "category_id",
|
|
33
|
+
short: "",
|
|
34
|
+
description: "Provides the value of 'category_id' in body",
|
|
35
|
+
optional: false,
|
|
36
|
+
args: ["category_id"],
|
|
37
|
+
defaults: [""]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
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.Create({
|
|
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,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 TicketDeleteCommand 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.Delete(this.arg_values[0]);
|
|
43
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
44
|
+
}
|
|
45
|
+
};
|