namirasoft-inference 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 (267) hide show
  1. package/dist/NamirasoftInferenceServer.d.ts +23 -0
  2. package/dist/NamirasoftInferenceServer.js +30 -0
  3. package/dist/NamirasoftInferenceServer.js.map +1 -0
  4. package/dist/NamirasoftInferenceServerBase.d.ts +5 -0
  5. package/dist/NamirasoftInferenceServerBase.js +11 -0
  6. package/dist/NamirasoftInferenceServerBase.js.map +1 -0
  7. package/dist/NamirasoftInferenceServerHealth.d.ts +8 -0
  8. package/dist/NamirasoftInferenceServerHealth.js +35 -0
  9. package/dist/NamirasoftInferenceServerHealth.js.map +1 -0
  10. package/dist/NamirasoftInferenceServerHealthz.d.ts +7 -0
  11. package/dist/NamirasoftInferenceServerHealthz.js +28 -0
  12. package/dist/NamirasoftInferenceServerHealthz.js.map +1 -0
  13. package/dist/NamirasoftInferenceServerMetrics.d.ts +7 -0
  14. package/dist/NamirasoftInferenceServerMetrics.js +28 -0
  15. package/dist/NamirasoftInferenceServerMetrics.js.map +1 -0
  16. package/dist/NamirasoftInferenceServerModel.d.ts +25 -0
  17. package/dist/NamirasoftInferenceServerModel.js +72 -0
  18. package/dist/NamirasoftInferenceServerModel.js.map +1 -0
  19. package/dist/NamirasoftInferenceServerModelCategory.d.ts +17 -0
  20. package/dist/NamirasoftInferenceServerModelCategory.js +56 -0
  21. package/dist/NamirasoftInferenceServerModelCategory.js.map +1 -0
  22. package/dist/NamirasoftInferenceServerModelField.d.ts +18 -0
  23. package/dist/NamirasoftInferenceServerModelField.js +64 -0
  24. package/dist/NamirasoftInferenceServerModelField.js.map +1 -0
  25. package/dist/NamirasoftInferenceServerModelTag.d.ts +18 -0
  26. package/dist/NamirasoftInferenceServerModelTag.js +64 -0
  27. package/dist/NamirasoftInferenceServerModelTag.js.map +1 -0
  28. package/dist/NamirasoftInferenceServerUsage.d.ts +8 -0
  29. package/dist/NamirasoftInferenceServerUsage.js +29 -0
  30. package/dist/NamirasoftInferenceServerUsage.js.map +1 -0
  31. package/dist/NamirasoftInferenceServerValue.d.ts +7 -0
  32. package/dist/NamirasoftInferenceServerValue.js +29 -0
  33. package/dist/NamirasoftInferenceServerValue.js.map +1 -0
  34. package/dist/command/HealthCommand.d.ts +4 -0
  35. package/dist/command/HealthCommand.js +17 -0
  36. package/dist/command/HealthCommand.js.map +1 -0
  37. package/dist/command/HealthLivenessCommand.d.ts +5 -0
  38. package/dist/command/HealthLivenessCommand.js +38 -0
  39. package/dist/command/HealthLivenessCommand.js.map +1 -0
  40. package/dist/command/HealthReadinessCommand.d.ts +5 -0
  41. package/dist/command/HealthReadinessCommand.js +38 -0
  42. package/dist/command/HealthReadinessCommand.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/MetricsCommand.d.ts +4 -0
  50. package/dist/command/MetricsCommand.js +15 -0
  51. package/dist/command/MetricsCommand.js.map +1 -0
  52. package/dist/command/MetricsGetCommand.d.ts +5 -0
  53. package/dist/command/MetricsGetCommand.js +38 -0
  54. package/dist/command/MetricsGetCommand.js.map +1 -0
  55. package/dist/command/ModelAskCommand.d.ts +5 -0
  56. package/dist/command/ModelAskCommand.js +76 -0
  57. package/dist/command/ModelAskCommand.js.map +1 -0
  58. package/dist/command/ModelCategoryCommand.d.ts +4 -0
  59. package/dist/command/ModelCategoryCommand.js +21 -0
  60. package/dist/command/ModelCategoryCommand.js.map +1 -0
  61. package/dist/command/ModelCategoryCreateCommand.d.ts +5 -0
  62. package/dist/command/ModelCategoryCreateCommand.js +49 -0
  63. package/dist/command/ModelCategoryCreateCommand.js.map +1 -0
  64. package/dist/command/ModelCategoryDeleteCommand.d.ts +5 -0
  65. package/dist/command/ModelCategoryDeleteCommand.js +38 -0
  66. package/dist/command/ModelCategoryDeleteCommand.js.map +1 -0
  67. package/dist/command/ModelCategoryGetCommand.d.ts +5 -0
  68. package/dist/command/ModelCategoryGetCommand.js +38 -0
  69. package/dist/command/ModelCategoryGetCommand.js.map +1 -0
  70. package/dist/command/ModelCategoryListCommand.d.ts +5 -0
  71. package/dist/command/ModelCategoryListCommand.js +38 -0
  72. package/dist/command/ModelCategoryListCommand.js.map +1 -0
  73. package/dist/command/ModelCommand.d.ts +4 -0
  74. package/dist/command/ModelCommand.js +25 -0
  75. package/dist/command/ModelCommand.js.map +1 -0
  76. package/dist/command/ModelCreateCommand.d.ts +5 -0
  77. package/dist/command/ModelCreateCommand.js +157 -0
  78. package/dist/command/ModelCreateCommand.js.map +1 -0
  79. package/dist/command/ModelDeleteCommand.d.ts +5 -0
  80. package/dist/command/ModelDeleteCommand.js +38 -0
  81. package/dist/command/ModelDeleteCommand.js.map +1 -0
  82. package/dist/command/ModelFieldCommand.d.ts +4 -0
  83. package/dist/command/ModelFieldCommand.js +23 -0
  84. package/dist/command/ModelFieldCommand.js.map +1 -0
  85. package/dist/command/ModelFieldCreateCommand.d.ts +5 -0
  86. package/dist/command/ModelFieldCreateCommand.js +58 -0
  87. package/dist/command/ModelFieldCreateCommand.js.map +1 -0
  88. package/dist/command/ModelFieldDeleteCommand.d.ts +5 -0
  89. package/dist/command/ModelFieldDeleteCommand.js +38 -0
  90. package/dist/command/ModelFieldDeleteCommand.js.map +1 -0
  91. package/dist/command/ModelFieldGetCommand.d.ts +5 -0
  92. package/dist/command/ModelFieldGetCommand.js +38 -0
  93. package/dist/command/ModelFieldGetCommand.js.map +1 -0
  94. package/dist/command/ModelFieldListCommand.d.ts +5 -0
  95. package/dist/command/ModelFieldListCommand.js +38 -0
  96. package/dist/command/ModelFieldListCommand.js.map +1 -0
  97. package/dist/command/ModelFieldUpdateCommand.d.ts +5 -0
  98. package/dist/command/ModelFieldUpdateCommand.js +58 -0
  99. package/dist/command/ModelFieldUpdateCommand.js.map +1 -0
  100. package/dist/command/ModelGetCommand.d.ts +5 -0
  101. package/dist/command/ModelGetCommand.js +38 -0
  102. package/dist/command/ModelGetCommand.js.map +1 -0
  103. package/dist/command/ModelListCommand.d.ts +5 -0
  104. package/dist/command/ModelListCommand.js +38 -0
  105. package/dist/command/ModelListCommand.js.map +1 -0
  106. package/dist/command/ModelTagCommand.d.ts +4 -0
  107. package/dist/command/ModelTagCommand.js +23 -0
  108. package/dist/command/ModelTagCommand.js.map +1 -0
  109. package/dist/command/ModelTagCreateCommand.d.ts +5 -0
  110. package/dist/command/ModelTagCreateCommand.js +58 -0
  111. package/dist/command/ModelTagCreateCommand.js.map +1 -0
  112. package/dist/command/ModelTagDeleteCommand.d.ts +5 -0
  113. package/dist/command/ModelTagDeleteCommand.js +38 -0
  114. package/dist/command/ModelTagDeleteCommand.js.map +1 -0
  115. package/dist/command/ModelTagGetCommand.d.ts +5 -0
  116. package/dist/command/ModelTagGetCommand.js +38 -0
  117. package/dist/command/ModelTagGetCommand.js.map +1 -0
  118. package/dist/command/ModelTagListCommand.d.ts +5 -0
  119. package/dist/command/ModelTagListCommand.js +38 -0
  120. package/dist/command/ModelTagListCommand.js.map +1 -0
  121. package/dist/command/ModelTagUpdateCommand.d.ts +5 -0
  122. package/dist/command/ModelTagUpdateCommand.js +58 -0
  123. package/dist/command/ModelTagUpdateCommand.js.map +1 -0
  124. package/dist/command/ModelUpdateCommand.d.ts +5 -0
  125. package/dist/command/ModelUpdateCommand.js +157 -0
  126. package/dist/command/ModelUpdateCommand.js.map +1 -0
  127. package/dist/command/UsageCommand.d.ts +4 -0
  128. package/dist/command/UsageCommand.js +15 -0
  129. package/dist/command/UsageCommand.js.map +1 -0
  130. package/dist/command/UsageSummaryCommand.d.ts +5 -0
  131. package/dist/command/UsageSummaryCommand.js +38 -0
  132. package/dist/command/UsageSummaryCommand.js.map +1 -0
  133. package/dist/command/ValueCommand.d.ts +4 -0
  134. package/dist/command/ValueCommand.js +15 -0
  135. package/dist/command/ValueCommand.js.map +1 -0
  136. package/dist/command/ValueListCommand.d.ts +5 -0
  137. package/dist/command/ValueListCommand.js +38 -0
  138. package/dist/command/ValueListCommand.js.map +1 -0
  139. package/dist/command/cli.d.ts +2 -0
  140. package/dist/command/cli.js +30 -0
  141. package/dist/command/cli.js.map +1 -0
  142. package/dist/enum/InteractionStatus.d.ts +5 -0
  143. package/dist/enum/InteractionStatus.js +10 -0
  144. package/dist/enum/InteractionStatus.js.map +1 -0
  145. package/dist/enum/ModelModelCompany.d.ts +6 -0
  146. package/dist/enum/ModelModelCompany.js +11 -0
  147. package/dist/enum/ModelModelCompany.js.map +1 -0
  148. package/dist/enum/ModelModelName.d.ts +11 -0
  149. package/dist/enum/ModelModelName.js +16 -0
  150. package/dist/enum/ModelModelName.js.map +1 -0
  151. package/dist/index.d.ts +64 -0
  152. package/dist/index.js +81 -0
  153. package/dist/index.js.map +1 -0
  154. package/dist/meta/ModelCategoryMetaTable.d.ts +15 -0
  155. package/dist/meta/ModelCategoryMetaTable.js +39 -0
  156. package/dist/meta/ModelCategoryMetaTable.js.map +1 -0
  157. package/dist/meta/ModelFieldMetaTable.d.ts +16 -0
  158. package/dist/meta/ModelFieldMetaTable.js +39 -0
  159. package/dist/meta/ModelFieldMetaTable.js.map +1 -0
  160. package/dist/meta/ModelMetaTable.d.ts +62 -0
  161. package/dist/meta/ModelMetaTable.js +85 -0
  162. package/dist/meta/ModelMetaTable.js.map +1 -0
  163. package/dist/meta/ModelTagMetaTable.d.ts +16 -0
  164. package/dist/meta/ModelTagMetaTable.js +39 -0
  165. package/dist/meta/ModelTagMetaTable.js.map +1 -0
  166. package/dist/meta/NamirasoftInferenceMetaDatabase.d.ts +19 -0
  167. package/dist/meta/NamirasoftInferenceMetaDatabase.js +33 -0
  168. package/dist/meta/NamirasoftInferenceMetaDatabase.js.map +1 -0
  169. package/dist/row/EntityCategoryInputRow.d.ts +3 -0
  170. package/dist/row/EntityCategoryInputRow.js +3 -0
  171. package/dist/row/EntityCategoryInputRow.js.map +1 -0
  172. package/dist/row/EntityFieldInputRow.d.ts +4 -0
  173. package/dist/row/EntityFieldInputRow.js +3 -0
  174. package/dist/row/EntityFieldInputRow.js.map +1 -0
  175. package/dist/row/EntityTagInputRow.d.ts +4 -0
  176. package/dist/row/EntityTagInputRow.js +3 -0
  177. package/dist/row/EntityTagInputRow.js.map +1 -0
  178. package/dist/row/InteractionRow.d.ts +22 -0
  179. package/dist/row/InteractionRow.js +3 -0
  180. package/dist/row/InteractionRow.js.map +1 -0
  181. package/dist/row/ModelCategoryRow.d.ts +8 -0
  182. package/dist/row/ModelCategoryRow.js +3 -0
  183. package/dist/row/ModelCategoryRow.js.map +1 -0
  184. package/dist/row/ModelFieldRow.d.ts +9 -0
  185. package/dist/row/ModelFieldRow.js +3 -0
  186. package/dist/row/ModelFieldRow.js.map +1 -0
  187. package/dist/row/ModelInputRow.d.ts +20 -0
  188. package/dist/row/ModelInputRow.js +3 -0
  189. package/dist/row/ModelInputRow.js.map +1 -0
  190. package/dist/row/ModelRow.d.ts +57 -0
  191. package/dist/row/ModelRow.js +3 -0
  192. package/dist/row/ModelRow.js.map +1 -0
  193. package/dist/row/ModelTagRow.d.ts +9 -0
  194. package/dist/row/ModelTagRow.js +3 -0
  195. package/dist/row/ModelTagRow.js.map +1 -0
  196. package/dist/row/UsageSummaryResponseRow.d.ts +9 -0
  197. package/dist/row/UsageSummaryResponseRow.js +3 -0
  198. package/dist/row/UsageSummaryResponseRow.js.map +1 -0
  199. package/logo.png +0 -0
  200. package/package.json +28 -0
  201. package/src/NamirasoftInferenceServer.ts +57 -0
  202. package/src/NamirasoftInferenceServerBase.ts +30 -0
  203. package/src/NamirasoftInferenceServerHealth.ts +43 -0
  204. package/src/NamirasoftInferenceServerHealthz.ts +37 -0
  205. package/src/NamirasoftInferenceServerMetrics.ts +37 -0
  206. package/src/NamirasoftInferenceServerModel.ts +79 -0
  207. package/src/NamirasoftInferenceServerModelCategory.ts +64 -0
  208. package/src/NamirasoftInferenceServerModelField.ts +71 -0
  209. package/src/NamirasoftInferenceServerModelTag.ts +71 -0
  210. package/src/NamirasoftInferenceServerUsage.ts +39 -0
  211. package/src/NamirasoftInferenceServerValue.ts +38 -0
  212. package/src/command/HealthCommand.ts +34 -0
  213. package/src/command/HealthLivenessCommand.ts +45 -0
  214. package/src/command/HealthReadinessCommand.ts +45 -0
  215. package/src/command/HealthzCommand.ts +32 -0
  216. package/src/command/HealthzGetCommand.ts +45 -0
  217. package/src/command/MetricsCommand.ts +32 -0
  218. package/src/command/MetricsGetCommand.ts +45 -0
  219. package/src/command/ModelAskCommand.ts +83 -0
  220. package/src/command/ModelCategoryCommand.ts +38 -0
  221. package/src/command/ModelCategoryCreateCommand.ts +56 -0
  222. package/src/command/ModelCategoryDeleteCommand.ts +45 -0
  223. package/src/command/ModelCategoryGetCommand.ts +45 -0
  224. package/src/command/ModelCategoryListCommand.ts +45 -0
  225. package/src/command/ModelCommand.ts +42 -0
  226. package/src/command/ModelCreateCommand.ts +164 -0
  227. package/src/command/ModelDeleteCommand.ts +45 -0
  228. package/src/command/ModelFieldCommand.ts +40 -0
  229. package/src/command/ModelFieldCreateCommand.ts +65 -0
  230. package/src/command/ModelFieldDeleteCommand.ts +45 -0
  231. package/src/command/ModelFieldGetCommand.ts +45 -0
  232. package/src/command/ModelFieldListCommand.ts +45 -0
  233. package/src/command/ModelFieldUpdateCommand.ts +65 -0
  234. package/src/command/ModelGetCommand.ts +45 -0
  235. package/src/command/ModelListCommand.ts +45 -0
  236. package/src/command/ModelTagCommand.ts +40 -0
  237. package/src/command/ModelTagCreateCommand.ts +65 -0
  238. package/src/command/ModelTagDeleteCommand.ts +45 -0
  239. package/src/command/ModelTagGetCommand.ts +45 -0
  240. package/src/command/ModelTagListCommand.ts +45 -0
  241. package/src/command/ModelTagUpdateCommand.ts +65 -0
  242. package/src/command/ModelUpdateCommand.ts +164 -0
  243. package/src/command/UsageCommand.ts +32 -0
  244. package/src/command/UsageSummaryCommand.ts +45 -0
  245. package/src/command/ValueCommand.ts +32 -0
  246. package/src/command/ValueListCommand.ts +45 -0
  247. package/src/command/cli.ts +49 -0
  248. package/src/enum/InteractionStatus.ts +26 -0
  249. package/src/enum/ModelModelCompany.ts +27 -0
  250. package/src/enum/ModelModelName.ts +32 -0
  251. package/src/index.ts +84 -0
  252. package/src/meta/ModelCategoryMetaTable.ts +60 -0
  253. package/src/meta/ModelFieldMetaTable.ts +61 -0
  254. package/src/meta/ModelMetaTable.ts +153 -0
  255. package/src/meta/ModelTagMetaTable.ts +61 -0
  256. package/src/meta/NamirasoftInferenceMetaDatabase.ts +60 -0
  257. package/src/row/EntityCategoryInputRow.ts +24 -0
  258. package/src/row/EntityFieldInputRow.ts +25 -0
  259. package/src/row/EntityTagInputRow.ts +25 -0
  260. package/src/row/InteractionRow.ts +44 -0
  261. package/src/row/ModelCategoryRow.ts +29 -0
  262. package/src/row/ModelFieldRow.ts +30 -0
  263. package/src/row/ModelInputRow.ts +42 -0
  264. package/src/row/ModelRow.ts +79 -0
  265. package/src/row/ModelTagRow.ts +30 -0
  266. package/src/row/UsageSummaryResponseRow.ts +30 -0
  267. package/tsconfig.json +45 -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 { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelDeleteCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model.Delete(this.arg_values[0]);
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 { ModelFieldCreateCommand } from "./ModelFieldCreateCommand";
23
+ import { ModelFieldDeleteCommand } from "./ModelFieldDeleteCommand";
24
+ import { ModelFieldGetCommand } from "./ModelFieldGetCommand";
25
+ import { ModelFieldListCommand } from "./ModelFieldListCommand";
26
+ import { ModelFieldUpdateCommand } from "./ModelFieldUpdateCommand";
27
+
28
+ export class ModelFieldCommand extends BaseNavigatorCommand
29
+ {
30
+ constructor(argv: string[])
31
+ {
32
+ super(argv, {
33
+ "list": ModelFieldListCommand,
34
+ "get": ModelFieldGetCommand,
35
+ "create": ModelFieldCreateCommand,
36
+ "update": ModelFieldUpdateCommand,
37
+ "delete": ModelFieldDeleteCommand,
38
+ });
39
+ }
40
+ };
@@ -0,0 +1,65 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelFieldCreateCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, [], [
31
+ {
32
+ name: "field_id",
33
+ short: "",
34
+ description: "Provides the value of 'field_id' in body",
35
+ optional: false,
36
+ args: ["field_id"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "value",
41
+ short: "",
42
+ description: "Provides the value of 'value' in body",
43
+ optional: true,
44
+ args: ["value"],
45
+ defaults: [""]
46
+ }
47
+ ]);
48
+ }
49
+ override async exec()
50
+ {
51
+ let token = this.app.storage.getNSAToken();
52
+ if (token == null)
53
+ throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
54
+ let storage = new IStorageMemoryDedicated();
55
+ let token_manager = new TokenManager(storage, () => { });
56
+ token_manager.setValue(token, false);
57
+ let url = this.app.storage.getItem("ns-inference-server-url");
58
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
59
+ let ans = await server.model_field.Create({
60
+ field_id: this.option_values.field_id,
61
+ value: this.option_values.value
62
+ });
63
+ this.app.logger.success(JSON.stringify(ans));
64
+ }
65
+ };
@@ -0,0 +1,45 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelFieldDeleteCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model_field.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 { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelFieldGetCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model_field.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 { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelFieldListCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model_field.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,65 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelFieldUpdateCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["id"], [
31
+ {
32
+ name: "field_id",
33
+ short: "",
34
+ description: "Provides the value of 'field_id' in body",
35
+ optional: false,
36
+ args: ["field_id"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "value",
41
+ short: "",
42
+ description: "Provides the value of 'value' in body",
43
+ optional: true,
44
+ args: ["value"],
45
+ defaults: [""]
46
+ }
47
+ ]);
48
+ }
49
+ override async exec()
50
+ {
51
+ let token = this.app.storage.getNSAToken();
52
+ if (token == null)
53
+ throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
54
+ let storage = new IStorageMemoryDedicated();
55
+ let token_manager = new TokenManager(storage, () => { });
56
+ token_manager.setValue(token, false);
57
+ let url = this.app.storage.getItem("ns-inference-server-url");
58
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
59
+ let ans = await server.model_field.Update(this.arg_values[0], {
60
+ field_id: this.option_values.field_id,
61
+ value: this.option_values.value
62
+ });
63
+ this.app.logger.success(JSON.stringify(ans));
64
+ }
65
+ };
@@ -0,0 +1,45 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelGetCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model.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 { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelListCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model.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 { ModelTagCreateCommand } from "./ModelTagCreateCommand";
23
+ import { ModelTagDeleteCommand } from "./ModelTagDeleteCommand";
24
+ import { ModelTagGetCommand } from "./ModelTagGetCommand";
25
+ import { ModelTagListCommand } from "./ModelTagListCommand";
26
+ import { ModelTagUpdateCommand } from "./ModelTagUpdateCommand";
27
+
28
+ export class ModelTagCommand extends BaseNavigatorCommand
29
+ {
30
+ constructor(argv: string[])
31
+ {
32
+ super(argv, {
33
+ "list": ModelTagListCommand,
34
+ "get": ModelTagGetCommand,
35
+ "create": ModelTagCreateCommand,
36
+ "update": ModelTagUpdateCommand,
37
+ "delete": ModelTagDeleteCommand,
38
+ });
39
+ }
40
+ };
@@ -0,0 +1,65 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelTagCreateCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, [], [
31
+ {
32
+ name: "name",
33
+ short: "",
34
+ description: "Provides the value of 'name' in body",
35
+ optional: false,
36
+ args: ["name"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "value",
41
+ short: "",
42
+ description: "Provides the value of 'value' in body",
43
+ optional: true,
44
+ args: ["value"],
45
+ defaults: [""]
46
+ }
47
+ ]);
48
+ }
49
+ override async exec()
50
+ {
51
+ let token = this.app.storage.getNSAToken();
52
+ if (token == null)
53
+ throw new Error("Token is not available. Please login first using:\nns-inference account config \nor \nns-inference account login.");
54
+ let storage = new IStorageMemoryDedicated();
55
+ let token_manager = new TokenManager(storage, () => { });
56
+ token_manager.setValue(token, false);
57
+ let url = this.app.storage.getItem("ns-inference-server-url");
58
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
59
+ let ans = await server.model_tag.Create({
60
+ name: this.option_values.name,
61
+ value: this.option_values.value
62
+ });
63
+ this.app.logger.success(JSON.stringify(ans));
64
+ }
65
+ };
@@ -0,0 +1,45 @@
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelTagDeleteCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model_tag.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 { NamirasoftInferenceServer } from "../NamirasoftInferenceServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ModelTagGetCommand 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-inference account config \nor \nns-inference account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let token_manager = new TokenManager(storage, () => { });
39
+ token_manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-inference-server-url");
41
+ let server = new NamirasoftInferenceServer(url, token_manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.model_tag.Get(this.arg_values[0]);
43
+ this.app.logger.success(JSON.stringify(ans));
44
+ }
45
+ };