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.
Files changed (163) hide show
  1. package/dist/NamirasoftSupportServer.d.ts +15 -0
  2. package/dist/NamirasoftSupportServer.js +22 -0
  3. package/dist/NamirasoftSupportServer.js.map +1 -0
  4. package/dist/NamirasoftSupportServerBase.d.ts +5 -0
  5. package/dist/NamirasoftSupportServerBase.js +11 -0
  6. package/dist/NamirasoftSupportServerBase.js.map +1 -0
  7. package/dist/NamirasoftSupportServerCategory.d.ts +13 -0
  8. package/dist/NamirasoftSupportServerCategory.js +41 -0
  9. package/dist/NamirasoftSupportServerCategory.js.map +1 -0
  10. package/dist/NamirasoftSupportServerHealthz.d.ts +6 -0
  11. package/dist/NamirasoftSupportServerHealthz.js +28 -0
  12. package/dist/NamirasoftSupportServerHealthz.js.map +1 -0
  13. package/dist/NamirasoftSupportServerMessage.d.ts +17 -0
  14. package/dist/NamirasoftSupportServerMessage.js +64 -0
  15. package/dist/NamirasoftSupportServerMessage.js.map +1 -0
  16. package/dist/NamirasoftSupportServerTicket.d.ts +17 -0
  17. package/dist/NamirasoftSupportServerTicket.js +64 -0
  18. package/dist/NamirasoftSupportServerTicket.js.map +1 -0
  19. package/dist/NamirasoftSupportServerValue.d.ts +6 -0
  20. package/dist/NamirasoftSupportServerValue.js +29 -0
  21. package/dist/NamirasoftSupportServerValue.js.map +1 -0
  22. package/dist/command/CategoryCommand.d.ts +4 -0
  23. package/dist/command/CategoryCommand.js +17 -0
  24. package/dist/command/CategoryCommand.js.map +1 -0
  25. package/dist/command/CategoryGetCommand.d.ts +5 -0
  26. package/dist/command/CategoryGetCommand.js +38 -0
  27. package/dist/command/CategoryGetCommand.js.map +1 -0
  28. package/dist/command/CategoryListCommand.d.ts +5 -0
  29. package/dist/command/CategoryListCommand.js +38 -0
  30. package/dist/command/CategoryListCommand.js.map +1 -0
  31. package/dist/command/HealthzCommand.d.ts +4 -0
  32. package/dist/command/HealthzCommand.js +15 -0
  33. package/dist/command/HealthzCommand.js.map +1 -0
  34. package/dist/command/HealthzGetCommand.d.ts +5 -0
  35. package/dist/command/HealthzGetCommand.js +38 -0
  36. package/dist/command/HealthzGetCommand.js.map +1 -0
  37. package/dist/command/MessageCommand.d.ts +4 -0
  38. package/dist/command/MessageCommand.js +23 -0
  39. package/dist/command/MessageCommand.js.map +1 -0
  40. package/dist/command/MessageCreateCommand.d.ts +5 -0
  41. package/dist/command/MessageCreateCommand.js +67 -0
  42. package/dist/command/MessageCreateCommand.js.map +1 -0
  43. package/dist/command/MessageDeleteCommand.d.ts +5 -0
  44. package/dist/command/MessageDeleteCommand.js +38 -0
  45. package/dist/command/MessageDeleteCommand.js.map +1 -0
  46. package/dist/command/MessageGetCommand.d.ts +5 -0
  47. package/dist/command/MessageGetCommand.js +38 -0
  48. package/dist/command/MessageGetCommand.js.map +1 -0
  49. package/dist/command/MessageListCommand.d.ts +5 -0
  50. package/dist/command/MessageListCommand.js +38 -0
  51. package/dist/command/MessageListCommand.js.map +1 -0
  52. package/dist/command/MessageUpdateCommand.d.ts +5 -0
  53. package/dist/command/MessageUpdateCommand.js +67 -0
  54. package/dist/command/MessageUpdateCommand.js.map +1 -0
  55. package/dist/command/TicketCommand.d.ts +4 -0
  56. package/dist/command/TicketCommand.js +23 -0
  57. package/dist/command/TicketCommand.js.map +1 -0
  58. package/dist/command/TicketCreateCommand.d.ts +5 -0
  59. package/dist/command/TicketCreateCommand.js +94 -0
  60. package/dist/command/TicketCreateCommand.js.map +1 -0
  61. package/dist/command/TicketDeleteCommand.d.ts +5 -0
  62. package/dist/command/TicketDeleteCommand.js +38 -0
  63. package/dist/command/TicketDeleteCommand.js.map +1 -0
  64. package/dist/command/TicketGetCommand.d.ts +5 -0
  65. package/dist/command/TicketGetCommand.js +38 -0
  66. package/dist/command/TicketGetCommand.js.map +1 -0
  67. package/dist/command/TicketListCommand.d.ts +5 -0
  68. package/dist/command/TicketListCommand.js +38 -0
  69. package/dist/command/TicketListCommand.js.map +1 -0
  70. package/dist/command/TicketUpdateCommand.d.ts +5 -0
  71. package/dist/command/TicketUpdateCommand.js +94 -0
  72. package/dist/command/TicketUpdateCommand.js.map +1 -0
  73. package/dist/command/ValueCommand.d.ts +4 -0
  74. package/dist/command/ValueCommand.js +15 -0
  75. package/dist/command/ValueCommand.js.map +1 -0
  76. package/dist/command/ValueListCommand.d.ts +5 -0
  77. package/dist/command/ValueListCommand.js +38 -0
  78. package/dist/command/ValueListCommand.js.map +1 -0
  79. package/dist/command/cli.d.ts +2 -0
  80. package/dist/command/cli.js +22 -0
  81. package/dist/command/cli.js.map +1 -0
  82. package/dist/enum/TicketAssignee.d.ts +3 -0
  83. package/dist/enum/TicketAssignee.js +8 -0
  84. package/dist/enum/TicketAssignee.js.map +1 -0
  85. package/dist/enum/TicketPriority.d.ts +6 -0
  86. package/dist/enum/TicketPriority.js +11 -0
  87. package/dist/enum/TicketPriority.js.map +1 -0
  88. package/dist/enum/TicketStatus.d.ts +6 -0
  89. package/dist/enum/TicketStatus.js +11 -0
  90. package/dist/enum/TicketStatus.js.map +1 -0
  91. package/dist/index.d.ts +38 -0
  92. package/dist/index.js +55 -0
  93. package/dist/index.js.map +1 -0
  94. package/dist/meta/CategoryMetaTable.d.ts +14 -0
  95. package/dist/meta/CategoryMetaTable.js +37 -0
  96. package/dist/meta/CategoryMetaTable.js.map +1 -0
  97. package/dist/meta/MessageMetaTable.d.ts +16 -0
  98. package/dist/meta/MessageMetaTable.js +39 -0
  99. package/dist/meta/MessageMetaTable.js.map +1 -0
  100. package/dist/meta/NamirasoftSupportMetaDatabase.d.ts +17 -0
  101. package/dist/meta/NamirasoftSupportMetaDatabase.js +31 -0
  102. package/dist/meta/NamirasoftSupportMetaDatabase.js.map +1 -0
  103. package/dist/meta/TicketMetaTable.d.ts +19 -0
  104. package/dist/meta/TicketMetaTable.js +42 -0
  105. package/dist/meta/TicketMetaTable.js.map +1 -0
  106. package/dist/row/CategoryRow.d.ts +7 -0
  107. package/dist/row/CategoryRow.js +3 -0
  108. package/dist/row/CategoryRow.js.map +1 -0
  109. package/dist/row/MessageInputRow.d.ts +5 -0
  110. package/dist/row/MessageInputRow.js +3 -0
  111. package/dist/row/MessageInputRow.js.map +1 -0
  112. package/dist/row/MessageRow.d.ts +9 -0
  113. package/dist/row/MessageRow.js +3 -0
  114. package/dist/row/MessageRow.js.map +1 -0
  115. package/dist/row/TicketInputRow.d.ts +11 -0
  116. package/dist/row/TicketInputRow.js +3 -0
  117. package/dist/row/TicketInputRow.js.map +1 -0
  118. package/dist/row/TicketRow.d.ts +15 -0
  119. package/dist/row/TicketRow.js +3 -0
  120. package/dist/row/TicketRow.js.map +1 -0
  121. package/logo.png +0 -0
  122. package/package.json +28 -0
  123. package/src/NamirasoftSupportServer.ts +45 -0
  124. package/src/NamirasoftSupportServerBase.ts +30 -0
  125. package/src/NamirasoftSupportServerCategory.ts +49 -0
  126. package/src/NamirasoftSupportServerHealthz.ts +36 -0
  127. package/src/NamirasoftSupportServerMessage.ts +70 -0
  128. package/src/NamirasoftSupportServerTicket.ts +70 -0
  129. package/src/NamirasoftSupportServerValue.ts +37 -0
  130. package/src/command/CategoryCommand.ts +34 -0
  131. package/src/command/CategoryGetCommand.ts +45 -0
  132. package/src/command/CategoryListCommand.ts +45 -0
  133. package/src/command/HealthzCommand.ts +32 -0
  134. package/src/command/HealthzGetCommand.ts +45 -0
  135. package/src/command/MessageCommand.ts +40 -0
  136. package/src/command/MessageCreateCommand.ts +74 -0
  137. package/src/command/MessageDeleteCommand.ts +45 -0
  138. package/src/command/MessageGetCommand.ts +45 -0
  139. package/src/command/MessageListCommand.ts +45 -0
  140. package/src/command/MessageUpdateCommand.ts +74 -0
  141. package/src/command/TicketCommand.ts +40 -0
  142. package/src/command/TicketCreateCommand.ts +101 -0
  143. package/src/command/TicketDeleteCommand.ts +45 -0
  144. package/src/command/TicketGetCommand.ts +45 -0
  145. package/src/command/TicketListCommand.ts +45 -0
  146. package/src/command/TicketUpdateCommand.ts +101 -0
  147. package/src/command/ValueCommand.ts +32 -0
  148. package/src/command/ValueListCommand.ts +45 -0
  149. package/src/command/cli.ts +41 -0
  150. package/src/enum/TicketAssignee.ts +24 -0
  151. package/src/enum/TicketPriority.ts +27 -0
  152. package/src/enum/TicketStatus.ts +27 -0
  153. package/src/index.ts +58 -0
  154. package/src/meta/CategoryMetaTable.ts +56 -0
  155. package/src/meta/MessageMetaTable.ts +60 -0
  156. package/src/meta/NamirasoftSupportMetaDatabase.ts +57 -0
  157. package/src/meta/TicketMetaTable.ts +66 -0
  158. package/src/row/CategoryRow.ts +28 -0
  159. package/src/row/MessageInputRow.ts +26 -0
  160. package/src/row/MessageRow.ts +30 -0
  161. package/src/row/TicketInputRow.ts +33 -0
  162. package/src/row/TicketRow.ts +37 -0
  163. 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
+ };