namirasoft-slack-sender 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 (271) hide show
  1. package/dist/NamirasoftSlackSenderServer.d.ts +23 -0
  2. package/dist/NamirasoftSlackSenderServer.js +30 -0
  3. package/dist/NamirasoftSlackSenderServer.js.map +1 -0
  4. package/dist/NamirasoftSlackSenderServerBase.d.ts +5 -0
  5. package/dist/NamirasoftSlackSenderServerBase.js +11 -0
  6. package/dist/NamirasoftSlackSenderServerBase.js.map +1 -0
  7. package/dist/NamirasoftSlackSenderServerChannelBot.d.ts +10 -0
  8. package/dist/NamirasoftSlackSenderServerChannelBot.js +37 -0
  9. package/dist/NamirasoftSlackSenderServerChannelBot.js.map +1 -0
  10. package/dist/NamirasoftSlackSenderServerHealthz.d.ts +6 -0
  11. package/dist/NamirasoftSlackSenderServerHealthz.js +28 -0
  12. package/dist/NamirasoftSlackSenderServerHealthz.js.map +1 -0
  13. package/dist/NamirasoftSlackSenderServerProvider.d.ts +24 -0
  14. package/dist/NamirasoftSlackSenderServerProvider.js +63 -0
  15. package/dist/NamirasoftSlackSenderServerProvider.js.map +1 -0
  16. package/dist/NamirasoftSlackSenderServerProviderCategory.d.ts +16 -0
  17. package/dist/NamirasoftSlackSenderServerProviderCategory.js +56 -0
  18. package/dist/NamirasoftSlackSenderServerProviderCategory.js.map +1 -0
  19. package/dist/NamirasoftSlackSenderServerProviderField.d.ts +17 -0
  20. package/dist/NamirasoftSlackSenderServerProviderField.js +64 -0
  21. package/dist/NamirasoftSlackSenderServerProviderField.js.map +1 -0
  22. package/dist/NamirasoftSlackSenderServerProviderTag.d.ts +17 -0
  23. package/dist/NamirasoftSlackSenderServerProviderTag.js +64 -0
  24. package/dist/NamirasoftSlackSenderServerProviderTag.js.map +1 -0
  25. package/dist/NamirasoftSlackSenderServerSent.d.ts +13 -0
  26. package/dist/NamirasoftSlackSenderServerSent.js +41 -0
  27. package/dist/NamirasoftSlackSenderServerSent.js.map +1 -0
  28. package/dist/NamirasoftSlackSenderServerSlack.d.ts +21 -0
  29. package/dist/NamirasoftSlackSenderServerSlack.js +37 -0
  30. package/dist/NamirasoftSlackSenderServerSlack.js.map +1 -0
  31. package/dist/NamirasoftSlackSenderServerValue.d.ts +6 -0
  32. package/dist/NamirasoftSlackSenderServerValue.js +29 -0
  33. package/dist/NamirasoftSlackSenderServerValue.js.map +1 -0
  34. package/dist/command/ChannelBotCommand.d.ts +4 -0
  35. package/dist/command/ChannelBotCommand.js +17 -0
  36. package/dist/command/ChannelBotCommand.js.map +1 -0
  37. package/dist/command/ChannelBotCreateCommand.d.ts +5 -0
  38. package/dist/command/ChannelBotCreateCommand.js +139 -0
  39. package/dist/command/ChannelBotCreateCommand.js.map +1 -0
  40. package/dist/command/ChannelBotUpdateCommand.d.ts +5 -0
  41. package/dist/command/ChannelBotUpdateCommand.js +139 -0
  42. package/dist/command/ChannelBotUpdateCommand.js.map +1 -0
  43. package/dist/command/HealthzCommand.d.ts +4 -0
  44. package/dist/command/HealthzCommand.js +15 -0
  45. package/dist/command/HealthzCommand.js.map +1 -0
  46. package/dist/command/HealthzGetCommand.d.ts +5 -0
  47. package/dist/command/HealthzGetCommand.js +38 -0
  48. package/dist/command/HealthzGetCommand.js.map +1 -0
  49. package/dist/command/ProviderCategoryCommand.d.ts +4 -0
  50. package/dist/command/ProviderCategoryCommand.js +21 -0
  51. package/dist/command/ProviderCategoryCommand.js.map +1 -0
  52. package/dist/command/ProviderCategoryCreateCommand.d.ts +5 -0
  53. package/dist/command/ProviderCategoryCreateCommand.js +49 -0
  54. package/dist/command/ProviderCategoryCreateCommand.js.map +1 -0
  55. package/dist/command/ProviderCategoryDeleteCommand.d.ts +5 -0
  56. package/dist/command/ProviderCategoryDeleteCommand.js +38 -0
  57. package/dist/command/ProviderCategoryDeleteCommand.js.map +1 -0
  58. package/dist/command/ProviderCategoryGetCommand.d.ts +5 -0
  59. package/dist/command/ProviderCategoryGetCommand.js +38 -0
  60. package/dist/command/ProviderCategoryGetCommand.js.map +1 -0
  61. package/dist/command/ProviderCategoryListCommand.d.ts +5 -0
  62. package/dist/command/ProviderCategoryListCommand.js +38 -0
  63. package/dist/command/ProviderCategoryListCommand.js.map +1 -0
  64. package/dist/command/ProviderCommand.d.ts +4 -0
  65. package/dist/command/ProviderCommand.js +23 -0
  66. package/dist/command/ProviderCommand.js.map +1 -0
  67. package/dist/command/ProviderDeleteCommand.d.ts +5 -0
  68. package/dist/command/ProviderDeleteCommand.js +38 -0
  69. package/dist/command/ProviderDeleteCommand.js.map +1 -0
  70. package/dist/command/ProviderFieldCommand.d.ts +4 -0
  71. package/dist/command/ProviderFieldCommand.js +23 -0
  72. package/dist/command/ProviderFieldCommand.js.map +1 -0
  73. package/dist/command/ProviderFieldCreateCommand.d.ts +5 -0
  74. package/dist/command/ProviderFieldCreateCommand.js +58 -0
  75. package/dist/command/ProviderFieldCreateCommand.js.map +1 -0
  76. package/dist/command/ProviderFieldDeleteCommand.d.ts +5 -0
  77. package/dist/command/ProviderFieldDeleteCommand.js +38 -0
  78. package/dist/command/ProviderFieldDeleteCommand.js.map +1 -0
  79. package/dist/command/ProviderFieldGetCommand.d.ts +5 -0
  80. package/dist/command/ProviderFieldGetCommand.js +38 -0
  81. package/dist/command/ProviderFieldGetCommand.js.map +1 -0
  82. package/dist/command/ProviderFieldListCommand.d.ts +5 -0
  83. package/dist/command/ProviderFieldListCommand.js +38 -0
  84. package/dist/command/ProviderFieldListCommand.js.map +1 -0
  85. package/dist/command/ProviderFieldUpdateCommand.d.ts +5 -0
  86. package/dist/command/ProviderFieldUpdateCommand.js +58 -0
  87. package/dist/command/ProviderFieldUpdateCommand.js.map +1 -0
  88. package/dist/command/ProviderGetCommand.d.ts +5 -0
  89. package/dist/command/ProviderGetCommand.js +38 -0
  90. package/dist/command/ProviderGetCommand.js.map +1 -0
  91. package/dist/command/ProviderListCommand.d.ts +5 -0
  92. package/dist/command/ProviderListCommand.js +38 -0
  93. package/dist/command/ProviderListCommand.js.map +1 -0
  94. package/dist/command/ProviderRequestCommand.d.ts +5 -0
  95. package/dist/command/ProviderRequestCommand.js +58 -0
  96. package/dist/command/ProviderRequestCommand.js.map +1 -0
  97. package/dist/command/ProviderTagCommand.d.ts +4 -0
  98. package/dist/command/ProviderTagCommand.js +23 -0
  99. package/dist/command/ProviderTagCommand.js.map +1 -0
  100. package/dist/command/ProviderTagCreateCommand.d.ts +5 -0
  101. package/dist/command/ProviderTagCreateCommand.js +58 -0
  102. package/dist/command/ProviderTagCreateCommand.js.map +1 -0
  103. package/dist/command/ProviderTagDeleteCommand.d.ts +5 -0
  104. package/dist/command/ProviderTagDeleteCommand.js +38 -0
  105. package/dist/command/ProviderTagDeleteCommand.js.map +1 -0
  106. package/dist/command/ProviderTagGetCommand.d.ts +5 -0
  107. package/dist/command/ProviderTagGetCommand.js +38 -0
  108. package/dist/command/ProviderTagGetCommand.js.map +1 -0
  109. package/dist/command/ProviderTagListCommand.d.ts +5 -0
  110. package/dist/command/ProviderTagListCommand.js +38 -0
  111. package/dist/command/ProviderTagListCommand.js.map +1 -0
  112. package/dist/command/ProviderTagUpdateCommand.d.ts +5 -0
  113. package/dist/command/ProviderTagUpdateCommand.js +58 -0
  114. package/dist/command/ProviderTagUpdateCommand.js.map +1 -0
  115. package/dist/command/ProviderVerifyCommand.d.ts +5 -0
  116. package/dist/command/ProviderVerifyCommand.js +49 -0
  117. package/dist/command/ProviderVerifyCommand.js.map +1 -0
  118. package/dist/command/SentCommand.d.ts +4 -0
  119. package/dist/command/SentCommand.js +17 -0
  120. package/dist/command/SentCommand.js.map +1 -0
  121. package/dist/command/SentGetCommand.d.ts +5 -0
  122. package/dist/command/SentGetCommand.js +38 -0
  123. package/dist/command/SentGetCommand.js.map +1 -0
  124. package/dist/command/SentListCommand.d.ts +5 -0
  125. package/dist/command/SentListCommand.js +38 -0
  126. package/dist/command/SentListCommand.js.map +1 -0
  127. package/dist/command/SlackCommand.d.ts +4 -0
  128. package/dist/command/SlackCommand.js +17 -0
  129. package/dist/command/SlackCommand.js.map +1 -0
  130. package/dist/command/SlackSendCommand.d.ts +5 -0
  131. package/dist/command/SlackSendCommand.js +76 -0
  132. package/dist/command/SlackSendCommand.js.map +1 -0
  133. package/dist/command/Slack_SendForCommand.d.ts +5 -0
  134. package/dist/command/Slack_SendForCommand.js +76 -0
  135. package/dist/command/Slack_SendForCommand.js.map +1 -0
  136. package/dist/command/ValueCommand.d.ts +4 -0
  137. package/dist/command/ValueCommand.js +15 -0
  138. package/dist/command/ValueCommand.js.map +1 -0
  139. package/dist/command/ValueListCommand.d.ts +5 -0
  140. package/dist/command/ValueListCommand.js +38 -0
  141. package/dist/command/ValueListCommand.js.map +1 -0
  142. package/dist/command/cli.d.ts +2 -0
  143. package/dist/command/cli.js +30 -0
  144. package/dist/command/cli.js.map +1 -0
  145. package/dist/enum/ProviderLimitPerUnit.d.ts +6 -0
  146. package/dist/enum/ProviderLimitPerUnit.js +11 -0
  147. package/dist/enum/ProviderLimitPerUnit.js.map +1 -0
  148. package/dist/enum/ProviderType.d.ts +3 -0
  149. package/dist/enum/ProviderType.js +8 -0
  150. package/dist/enum/ProviderType.js.map +1 -0
  151. package/dist/index.d.ts +65 -0
  152. package/dist/index.js +82 -0
  153. package/dist/index.js.map +1 -0
  154. package/dist/meta/NamirasoftSlackSenderMetaDatabase.d.ts +21 -0
  155. package/dist/meta/NamirasoftSlackSenderMetaDatabase.js +35 -0
  156. package/dist/meta/NamirasoftSlackSenderMetaDatabase.js.map +1 -0
  157. package/dist/meta/ProviderCategoryMetaTable.d.ts +15 -0
  158. package/dist/meta/ProviderCategoryMetaTable.js +38 -0
  159. package/dist/meta/ProviderCategoryMetaTable.js.map +1 -0
  160. package/dist/meta/ProviderFieldMetaTable.d.ts +16 -0
  161. package/dist/meta/ProviderFieldMetaTable.js +39 -0
  162. package/dist/meta/ProviderFieldMetaTable.js.map +1 -0
  163. package/dist/meta/ProviderMetaTable.d.ts +22 -0
  164. package/dist/meta/ProviderMetaTable.js +45 -0
  165. package/dist/meta/ProviderMetaTable.js.map +1 -0
  166. package/dist/meta/ProviderTagMetaTable.d.ts +16 -0
  167. package/dist/meta/ProviderTagMetaTable.js +39 -0
  168. package/dist/meta/ProviderTagMetaTable.js.map +1 -0
  169. package/dist/meta/SentMetaTable.d.ts +21 -0
  170. package/dist/meta/SentMetaTable.js +44 -0
  171. package/dist/meta/SentMetaTable.js.map +1 -0
  172. package/dist/row/ChannelBotCreateRow.d.ts +17 -0
  173. package/dist/row/ChannelBotCreateRow.js +3 -0
  174. package/dist/row/ChannelBotCreateRow.js.map +1 -0
  175. package/dist/row/ChannelBotUpdateRow.d.ts +17 -0
  176. package/dist/row/ChannelBotUpdateRow.js +3 -0
  177. package/dist/row/ChannelBotUpdateRow.js.map +1 -0
  178. package/dist/row/EntityCategoryInputRow.d.ts +3 -0
  179. package/dist/row/EntityCategoryInputRow.js +3 -0
  180. package/dist/row/EntityCategoryInputRow.js.map +1 -0
  181. package/dist/row/EntityFieldInputRow.d.ts +4 -0
  182. package/dist/row/EntityFieldInputRow.js +3 -0
  183. package/dist/row/EntityFieldInputRow.js.map +1 -0
  184. package/dist/row/EntityTagInputRow.d.ts +4 -0
  185. package/dist/row/EntityTagInputRow.js +3 -0
  186. package/dist/row/EntityTagInputRow.js.map +1 -0
  187. package/dist/row/ProviderCategoryRow.d.ts +8 -0
  188. package/dist/row/ProviderCategoryRow.js +3 -0
  189. package/dist/row/ProviderCategoryRow.js.map +1 -0
  190. package/dist/row/ProviderFieldRow.d.ts +9 -0
  191. package/dist/row/ProviderFieldRow.js +3 -0
  192. package/dist/row/ProviderFieldRow.js.map +1 -0
  193. package/dist/row/ProviderRow.d.ts +17 -0
  194. package/dist/row/ProviderRow.js +3 -0
  195. package/dist/row/ProviderRow.js.map +1 -0
  196. package/dist/row/ProviderTagRow.d.ts +9 -0
  197. package/dist/row/ProviderTagRow.js +3 -0
  198. package/dist/row/ProviderTagRow.js.map +1 -0
  199. package/dist/row/SentRow.d.ts +14 -0
  200. package/dist/row/SentRow.js +3 -0
  201. package/dist/row/SentRow.js.map +1 -0
  202. package/logo.png +0 -0
  203. package/package.json +28 -0
  204. package/src/NamirasoftSlackSenderServer.ts +57 -0
  205. package/src/NamirasoftSlackSenderServerBase.ts +30 -0
  206. package/src/NamirasoftSlackSenderServerChannelBot.ts +47 -0
  207. package/src/NamirasoftSlackSenderServerHealthz.ts +36 -0
  208. package/src/NamirasoftSlackSenderServerProvider.ts +68 -0
  209. package/src/NamirasoftSlackSenderServerProviderCategory.ts +63 -0
  210. package/src/NamirasoftSlackSenderServerProviderField.ts +70 -0
  211. package/src/NamirasoftSlackSenderServerProviderTag.ts +70 -0
  212. package/src/NamirasoftSlackSenderServerSent.ts +49 -0
  213. package/src/NamirasoftSlackSenderServerSlack.ts +44 -0
  214. package/src/NamirasoftSlackSenderServerValue.ts +37 -0
  215. package/src/command/ChannelBotCommand.ts +34 -0
  216. package/src/command/ChannelBotCreateCommand.ts +146 -0
  217. package/src/command/ChannelBotUpdateCommand.ts +146 -0
  218. package/src/command/HealthzCommand.ts +32 -0
  219. package/src/command/HealthzGetCommand.ts +45 -0
  220. package/src/command/ProviderCategoryCommand.ts +38 -0
  221. package/src/command/ProviderCategoryCreateCommand.ts +56 -0
  222. package/src/command/ProviderCategoryDeleteCommand.ts +45 -0
  223. package/src/command/ProviderCategoryGetCommand.ts +45 -0
  224. package/src/command/ProviderCategoryListCommand.ts +45 -0
  225. package/src/command/ProviderCommand.ts +40 -0
  226. package/src/command/ProviderDeleteCommand.ts +45 -0
  227. package/src/command/ProviderFieldCommand.ts +40 -0
  228. package/src/command/ProviderFieldCreateCommand.ts +65 -0
  229. package/src/command/ProviderFieldDeleteCommand.ts +45 -0
  230. package/src/command/ProviderFieldGetCommand.ts +45 -0
  231. package/src/command/ProviderFieldListCommand.ts +45 -0
  232. package/src/command/ProviderFieldUpdateCommand.ts +65 -0
  233. package/src/command/ProviderGetCommand.ts +45 -0
  234. package/src/command/ProviderListCommand.ts +45 -0
  235. package/src/command/ProviderRequestCommand.ts +65 -0
  236. package/src/command/ProviderTagCommand.ts +40 -0
  237. package/src/command/ProviderTagCreateCommand.ts +65 -0
  238. package/src/command/ProviderTagDeleteCommand.ts +45 -0
  239. package/src/command/ProviderTagGetCommand.ts +45 -0
  240. package/src/command/ProviderTagListCommand.ts +45 -0
  241. package/src/command/ProviderTagUpdateCommand.ts +65 -0
  242. package/src/command/ProviderVerifyCommand.ts +56 -0
  243. package/src/command/SentCommand.ts +34 -0
  244. package/src/command/SentGetCommand.ts +45 -0
  245. package/src/command/SentListCommand.ts +45 -0
  246. package/src/command/SlackCommand.ts +34 -0
  247. package/src/command/SlackSendCommand.ts +83 -0
  248. package/src/command/Slack_SendForCommand.ts +83 -0
  249. package/src/command/ValueCommand.ts +32 -0
  250. package/src/command/ValueListCommand.ts +45 -0
  251. package/src/command/cli.ts +49 -0
  252. package/src/enum/ProviderLimitPerUnit.ts +27 -0
  253. package/src/enum/ProviderType.ts +24 -0
  254. package/src/index.ts +85 -0
  255. package/src/meta/NamirasoftSlackSenderMetaDatabase.ts +63 -0
  256. package/src/meta/ProviderCategoryMetaTable.ts +58 -0
  257. package/src/meta/ProviderFieldMetaTable.ts +60 -0
  258. package/src/meta/ProviderMetaTable.ts +72 -0
  259. package/src/meta/ProviderTagMetaTable.ts +60 -0
  260. package/src/meta/SentMetaTable.ts +70 -0
  261. package/src/row/ChannelBotCreateRow.ts +39 -0
  262. package/src/row/ChannelBotUpdateRow.ts +39 -0
  263. package/src/row/EntityCategoryInputRow.ts +24 -0
  264. package/src/row/EntityFieldInputRow.ts +25 -0
  265. package/src/row/EntityTagInputRow.ts +25 -0
  266. package/src/row/ProviderCategoryRow.ts +29 -0
  267. package/src/row/ProviderFieldRow.ts +30 -0
  268. package/src/row/ProviderRow.ts +39 -0
  269. package/src/row/ProviderTagRow.ts +30 -0
  270. package/src/row/SentRow.ts +35 -0
  271. package/tsconfig.json +42 -0
@@ -0,0 +1,146 @@
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 { NamirasoftSlackSenderServer } from "../NamirasoftSlackSenderServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ChannelBotCreateCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, [], [
31
+ {
32
+ name: "workspace_id",
33
+ short: "",
34
+ description: "Provides the value of 'workspace_id' in body",
35
+ optional: true,
36
+ args: ["workspace_id"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "name",
41
+ short: "",
42
+ description: "Provides the value of 'name' in body",
43
+ optional: false,
44
+ args: ["name"],
45
+ defaults: [""]
46
+ },
47
+ {
48
+ name: "limit",
49
+ short: "",
50
+ description: "Provides the value of 'limit' in body",
51
+ optional: false,
52
+ args: ["limit"],
53
+ defaults: [""]
54
+ },
55
+ {
56
+ name: "limit_count",
57
+ short: "",
58
+ description: "Provides the value of 'limit_count' in body",
59
+ optional: true,
60
+ args: ["limit_count"],
61
+ defaults: [""]
62
+ },
63
+ {
64
+ name: "limit_per_value",
65
+ short: "",
66
+ description: "Provides the value of 'limit_per_value' in body",
67
+ optional: true,
68
+ args: ["limit_per_value"],
69
+ defaults: [""]
70
+ },
71
+ {
72
+ name: "limit_per_unit",
73
+ short: "",
74
+ description: "Provides the value of 'limit_per_unit' in body",
75
+ optional: true,
76
+ args: ["limit_per_unit"],
77
+ defaults: [""]
78
+ },
79
+ {
80
+ name: "chat_id",
81
+ short: "",
82
+ description: "Provides the value of 'chat_id' in body",
83
+ optional: false,
84
+ args: ["chat_id"],
85
+ defaults: [""]
86
+ },
87
+ {
88
+ name: "message_thread_id",
89
+ short: "",
90
+ description: "Provides the value of 'message_thread_id' in body",
91
+ optional: true,
92
+ args: ["message_thread_id"],
93
+ defaults: [""]
94
+ },
95
+ {
96
+ name: "provider_category",
97
+ short: "",
98
+ description: "Provides the value of 'provider_category' in body",
99
+ optional: false,
100
+ args: ["provider_category"],
101
+ defaults: [""]
102
+ },
103
+ {
104
+ name: "provider_field",
105
+ short: "",
106
+ description: "Provides the value of 'provider_field' in body",
107
+ optional: false,
108
+ args: ["provider_field"],
109
+ defaults: [""]
110
+ },
111
+ {
112
+ name: "provider_tag",
113
+ short: "",
114
+ description: "Provides the value of 'provider_tag' in body",
115
+ optional: false,
116
+ args: ["provider_tag"],
117
+ defaults: [""]
118
+ }
119
+ ]);
120
+ }
121
+ override async exec()
122
+ {
123
+ let token = this.app.storage.getNSAToken();
124
+ if (token == null)
125
+ throw new Error("Token is not available. Please login first using:\nns-slack-sender account config \nor \nns-slack-sender account login.");
126
+ let storage = new IStorageMemoryDedicated();
127
+ let manager = new TokenManager(storage, () => { });
128
+ manager.setValue(token, false);
129
+ let url = this.app.storage.getItem("ns-slack-sender-server-url");
130
+ let server = new NamirasoftSlackSenderServer(url, manager, e => this.app.logger.error(e.message));
131
+ let ans = await server.channel_bot.Create({
132
+ workspace_id: this.option_values.workspace_id,
133
+ name: this.option_values.name,
134
+ limit: this.option_values.limit,
135
+ limit_count: this.option_values.limit_count,
136
+ limit_per_value: this.option_values.limit_per_value,
137
+ limit_per_unit: this.option_values.limit_per_unit,
138
+ chat_id: this.option_values.chat_id,
139
+ message_thread_id: this.option_values.message_thread_id,
140
+ provider_category: this.option_values.provider_category,
141
+ provider_field: this.option_values.provider_field,
142
+ provider_tag: this.option_values.provider_tag
143
+ });
144
+ this.app.logger.success(JSON.stringify(ans));
145
+ }
146
+ };
@@ -0,0 +1,146 @@
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 { NamirasoftSlackSenderServer } from "../NamirasoftSlackSenderServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ChannelBotUpdateCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["id"], [
31
+ {
32
+ name: "workspace_id",
33
+ short: "",
34
+ description: "Provides the value of 'workspace_id' in body",
35
+ optional: true,
36
+ args: ["workspace_id"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "name",
41
+ short: "",
42
+ description: "Provides the value of 'name' in body",
43
+ optional: false,
44
+ args: ["name"],
45
+ defaults: [""]
46
+ },
47
+ {
48
+ name: "limit",
49
+ short: "",
50
+ description: "Provides the value of 'limit' in body",
51
+ optional: false,
52
+ args: ["limit"],
53
+ defaults: [""]
54
+ },
55
+ {
56
+ name: "limit_count",
57
+ short: "",
58
+ description: "Provides the value of 'limit_count' in body",
59
+ optional: true,
60
+ args: ["limit_count"],
61
+ defaults: [""]
62
+ },
63
+ {
64
+ name: "limit_per_value",
65
+ short: "",
66
+ description: "Provides the value of 'limit_per_value' in body",
67
+ optional: true,
68
+ args: ["limit_per_value"],
69
+ defaults: [""]
70
+ },
71
+ {
72
+ name: "limit_per_unit",
73
+ short: "",
74
+ description: "Provides the value of 'limit_per_unit' in body",
75
+ optional: true,
76
+ args: ["limit_per_unit"],
77
+ defaults: [""]
78
+ },
79
+ {
80
+ name: "chat_id",
81
+ short: "",
82
+ description: "Provides the value of 'chat_id' in body",
83
+ optional: true,
84
+ args: ["chat_id"],
85
+ defaults: [""]
86
+ },
87
+ {
88
+ name: "message_thread_id",
89
+ short: "",
90
+ description: "Provides the value of 'message_thread_id' in body",
91
+ optional: true,
92
+ args: ["message_thread_id"],
93
+ defaults: [""]
94
+ },
95
+ {
96
+ name: "provider_category",
97
+ short: "",
98
+ description: "Provides the value of 'provider_category' in body",
99
+ optional: false,
100
+ args: ["provider_category"],
101
+ defaults: [""]
102
+ },
103
+ {
104
+ name: "provider_field",
105
+ short: "",
106
+ description: "Provides the value of 'provider_field' in body",
107
+ optional: false,
108
+ args: ["provider_field"],
109
+ defaults: [""]
110
+ },
111
+ {
112
+ name: "provider_tag",
113
+ short: "",
114
+ description: "Provides the value of 'provider_tag' in body",
115
+ optional: false,
116
+ args: ["provider_tag"],
117
+ defaults: [""]
118
+ }
119
+ ]);
120
+ }
121
+ override async exec()
122
+ {
123
+ let token = this.app.storage.getNSAToken();
124
+ if (token == null)
125
+ throw new Error("Token is not available. Please login first using:\nns-slack-sender account config \nor \nns-slack-sender account login.");
126
+ let storage = new IStorageMemoryDedicated();
127
+ let manager = new TokenManager(storage, () => { });
128
+ manager.setValue(token, false);
129
+ let url = this.app.storage.getItem("ns-slack-sender-server-url");
130
+ let server = new NamirasoftSlackSenderServer(url, manager, e => this.app.logger.error(e.message));
131
+ let ans = await server.channel_bot.Update(this.arg_values[0], {
132
+ workspace_id: this.option_values.workspace_id,
133
+ name: this.option_values.name,
134
+ limit: this.option_values.limit,
135
+ limit_count: this.option_values.limit_count,
136
+ limit_per_value: this.option_values.limit_per_value,
137
+ limit_per_unit: this.option_values.limit_per_unit,
138
+ chat_id: this.option_values.chat_id,
139
+ message_thread_id: this.option_values.message_thread_id,
140
+ provider_category: this.option_values.provider_category,
141
+ provider_field: this.option_values.provider_field,
142
+ provider_tag: this.option_values.provider_tag
143
+ });
144
+ this.app.logger.success(JSON.stringify(ans));
145
+ }
146
+ };
@@ -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 { NamirasoftSlackSenderServer } from "../NamirasoftSlackSenderServer";
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-slack-sender account config \nor \nns-slack-sender 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-slack-sender-server-url");
41
+ let server = new NamirasoftSlackSenderServer(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,38 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseNavigatorCommand } from "namirasoft-node-cli";
22
+ import { ProviderCategoryCreateCommand } from "./ProviderCategoryCreateCommand";
23
+ import { ProviderCategoryDeleteCommand } from "./ProviderCategoryDeleteCommand";
24
+ import { ProviderCategoryGetCommand } from "./ProviderCategoryGetCommand";
25
+ import { ProviderCategoryListCommand } from "./ProviderCategoryListCommand";
26
+
27
+ export class ProviderCategoryCommand extends BaseNavigatorCommand
28
+ {
29
+ constructor(argv: string[])
30
+ {
31
+ super(argv, {
32
+ "list": ProviderCategoryListCommand,
33
+ "get": ProviderCategoryGetCommand,
34
+ "create": ProviderCategoryCreateCommand,
35
+ "delete": ProviderCategoryDeleteCommand,
36
+ });
37
+ }
38
+ };
@@ -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 { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftSlackSenderServer } from "../NamirasoftSlackSenderServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ProviderCategoryCreateCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["entity_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
+ }
41
+ override async exec()
42
+ {
43
+ let token = this.app.storage.getNSAToken();
44
+ if (token == null)
45
+ throw new Error("Token is not available. Please login first using:\nns-slack-sender account config \nor \nns-slack-sender account login.");
46
+ let storage = new IStorageMemoryDedicated();
47
+ let manager = new TokenManager(storage, () => { });
48
+ manager.setValue(token, false);
49
+ let url = this.app.storage.getItem("ns-slack-sender-server-url");
50
+ let server = new NamirasoftSlackSenderServer(url, manager, e => this.app.logger.error(e.message));
51
+ let ans = await server.provider_category.Create(this.arg_values[0], {
52
+ category_id: this.option_values.category_id
53
+ });
54
+ this.app.logger.success(JSON.stringify(ans));
55
+ }
56
+ };
@@ -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 { NamirasoftSlackSenderServer } from "../NamirasoftSlackSenderServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ProviderCategoryDeleteCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["entity_id", "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-slack-sender account config \nor \nns-slack-sender 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-slack-sender-server-url");
41
+ let server = new NamirasoftSlackSenderServer(url, manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.provider_category.Delete(this.arg_values[0], this.arg_values[1]);
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 { NamirasoftSlackSenderServer } from "../NamirasoftSlackSenderServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ProviderCategoryGetCommand 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-slack-sender account config \nor \nns-slack-sender 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-slack-sender-server-url");
41
+ let server = new NamirasoftSlackSenderServer(url, manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.provider_category.Get(this.arg_values[0]);
43
+ this.app.logger.success(JSON.stringify(ans));
44
+ }
45
+ };
@@ -0,0 +1,45 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftSlackSenderServer } from "../NamirasoftSlackSenderServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ProviderCategoryListCommand 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-slack-sender account config \nor \nns-slack-sender 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-slack-sender-server-url");
41
+ let server = new NamirasoftSlackSenderServer(url, manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.provider_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,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 { ProviderDeleteCommand } from "./ProviderDeleteCommand";
23
+ import { ProviderGetCommand } from "./ProviderGetCommand";
24
+ import { ProviderListCommand } from "./ProviderListCommand";
25
+ import { ProviderRequestCommand } from "./ProviderRequestCommand";
26
+ import { ProviderVerifyCommand } from "./ProviderVerifyCommand";
27
+
28
+ export class ProviderCommand extends BaseNavigatorCommand
29
+ {
30
+ constructor(argv: string[])
31
+ {
32
+ super(argv, {
33
+ "list": ProviderListCommand,
34
+ "get": ProviderGetCommand,
35
+ "delete": ProviderDeleteCommand,
36
+ "request": ProviderRequestCommand,
37
+ "verify": ProviderVerifyCommand,
38
+ });
39
+ }
40
+ };