namirasoft-cost 1.4.25 → 1.4.26

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 (212) hide show
  1. package/.ns-sdkg-file-keep +9 -8
  2. package/dist/NamirasoftCostServerBillWatchAWS.d.ts +2 -2
  3. package/dist/NamirasoftCostServerBillWatchAWS.js +4 -4
  4. package/dist/NamirasoftCostServerBillWatchAzure.d.ts +2 -2
  5. package/dist/NamirasoftCostServerBillWatchAzure.js +4 -4
  6. package/dist/NamirasoftCostServerBillWatchGCP.d.ts +2 -2
  7. package/dist/NamirasoftCostServerBillWatchGCP.js +4 -4
  8. package/dist/NamirasoftCostServerFieldCategory.d.ts +2 -2
  9. package/dist/NamirasoftCostServerFieldCategory.js +4 -4
  10. package/dist/NamirasoftCostServerFieldField.d.ts +2 -2
  11. package/dist/NamirasoftCostServerFieldField.js +4 -4
  12. package/dist/NamirasoftCostServerSecretSecret.d.ts +2 -2
  13. package/dist/NamirasoftCostServerSecretSecret.js +4 -4
  14. package/dist/index.d.ts +1 -29
  15. package/dist/index.js +1 -29
  16. package/dist/index.js.map +1 -1
  17. package/dist/type/Bonus.d.ts +9 -0
  18. package/dist/type/Bonus.js +16 -0
  19. package/dist/type/Bonus.js.map +1 -0
  20. package/dist/type/Estimation.d.ts +4 -0
  21. package/dist/type/Estimation.js +22 -0
  22. package/dist/type/Estimation.js.map +1 -1
  23. package/dist/type/EstimationOption.d.ts +4 -0
  24. package/dist/type/EstimationOption.js +20 -0
  25. package/dist/type/EstimationOption.js.map +1 -1
  26. package/dist/type/EstimationUsage.d.ts +4 -0
  27. package/dist/type/EstimationUsage.js +15 -0
  28. package/dist/type/EstimationUsage.js.map +1 -1
  29. package/dist/type/Period.d.ts +4 -0
  30. package/dist/type/Period.js +27 -4
  31. package/dist/type/Period.js.map +1 -1
  32. package/package.json +4 -3
  33. package/src/NamirasoftCostServerBillWatchAWS.ts +4 -4
  34. package/src/NamirasoftCostServerBillWatchAzure.ts +4 -4
  35. package/src/NamirasoftCostServerBillWatchGCP.ts +4 -4
  36. package/src/NamirasoftCostServerFieldCategory.ts +4 -4
  37. package/src/NamirasoftCostServerFieldField.ts +4 -4
  38. package/src/NamirasoftCostServerSecretSecret.ts +4 -4
  39. package/src/index.ts +1 -29
  40. package/src/type/Bonus.ts +21 -0
  41. package/src/type/Estimation.ts +24 -3
  42. package/src/type/EstimationOption.ts +22 -2
  43. package/src/type/EstimationUsage.ts +18 -1
  44. package/src/type/Period.ts +27 -3
  45. package/dist/command/BillWatchAWSCommand.d.ts +0 -4
  46. package/dist/command/BillWatchAWSCommand.js +0 -17
  47. package/dist/command/BillWatchAWSCommand.js.map +0 -1
  48. package/dist/command/BillWatchAWSEstimateHourlyCommand.d.ts +0 -5
  49. package/dist/command/BillWatchAWSEstimateHourlyCommand.js +0 -76
  50. package/dist/command/BillWatchAWSEstimateHourlyCommand.js.map +0 -1
  51. package/dist/command/BillWatchAWS_CreateForHourlyCommand.d.ts +0 -5
  52. package/dist/command/BillWatchAWS_CreateForHourlyCommand.js +0 -94
  53. package/dist/command/BillWatchAWS_CreateForHourlyCommand.js.map +0 -1
  54. package/dist/command/BillWatchAzureCommand.d.ts +0 -4
  55. package/dist/command/BillWatchAzureCommand.js +0 -17
  56. package/dist/command/BillWatchAzureCommand.js.map +0 -1
  57. package/dist/command/BillWatchAzureEstimateHourlyCommand.d.ts +0 -5
  58. package/dist/command/BillWatchAzureEstimateHourlyCommand.js +0 -76
  59. package/dist/command/BillWatchAzureEstimateHourlyCommand.js.map +0 -1
  60. package/dist/command/BillWatchAzure_CreateForHourlyCommand.d.ts +0 -5
  61. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js +0 -94
  62. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js.map +0 -1
  63. package/dist/command/BillWatchGCPCommand.d.ts +0 -4
  64. package/dist/command/BillWatchGCPCommand.js +0 -17
  65. package/dist/command/BillWatchGCPCommand.js.map +0 -1
  66. package/dist/command/BillWatchGCPEstimateHourlyCommand.d.ts +0 -5
  67. package/dist/command/BillWatchGCPEstimateHourlyCommand.js +0 -76
  68. package/dist/command/BillWatchGCPEstimateHourlyCommand.js.map +0 -1
  69. package/dist/command/BillWatchGCP_CreateForHourlyCommand.d.ts +0 -5
  70. package/dist/command/BillWatchGCP_CreateForHourlyCommand.js +0 -94
  71. package/dist/command/BillWatchGCP_CreateForHourlyCommand.js.map +0 -1
  72. package/dist/command/CostCommand.d.ts +0 -4
  73. package/dist/command/CostCommand.js +0 -17
  74. package/dist/command/CostCommand.js.map +0 -1
  75. package/dist/command/CostListCommand.d.ts +0 -5
  76. package/dist/command/CostListCommand.js +0 -38
  77. package/dist/command/CostListCommand.js.map +0 -1
  78. package/dist/command/Cost_CreateForCommand.d.ts +0 -5
  79. package/dist/command/Cost_CreateForCommand.js +0 -175
  80. package/dist/command/Cost_CreateForCommand.js.map +0 -1
  81. package/dist/command/FieldCategoryCommand.d.ts +0 -4
  82. package/dist/command/FieldCategoryCommand.js +0 -17
  83. package/dist/command/FieldCategoryCommand.js.map +0 -1
  84. package/dist/command/FieldCategoryEstimateHourlyCommand.d.ts +0 -5
  85. package/dist/command/FieldCategoryEstimateHourlyCommand.js +0 -76
  86. package/dist/command/FieldCategoryEstimateHourlyCommand.js.map +0 -1
  87. package/dist/command/FieldCategory_CreateForHourlyCommand.d.ts +0 -5
  88. package/dist/command/FieldCategory_CreateForHourlyCommand.js +0 -94
  89. package/dist/command/FieldCategory_CreateForHourlyCommand.js.map +0 -1
  90. package/dist/command/FieldFieldCommand.d.ts +0 -4
  91. package/dist/command/FieldFieldCommand.js +0 -17
  92. package/dist/command/FieldFieldCommand.js.map +0 -1
  93. package/dist/command/FieldFieldEstimateHourlyCommand.d.ts +0 -5
  94. package/dist/command/FieldFieldEstimateHourlyCommand.js +0 -76
  95. package/dist/command/FieldFieldEstimateHourlyCommand.js.map +0 -1
  96. package/dist/command/FieldField_CreateForHourlyCommand.d.ts +0 -5
  97. package/dist/command/FieldField_CreateForHourlyCommand.js +0 -94
  98. package/dist/command/FieldField_CreateForHourlyCommand.js.map +0 -1
  99. package/dist/command/HealthzCommand.d.ts +0 -4
  100. package/dist/command/HealthzCommand.js +0 -15
  101. package/dist/command/HealthzCommand.js.map +0 -1
  102. package/dist/command/HealthzGetCommand.d.ts +0 -5
  103. package/dist/command/HealthzGetCommand.js +0 -38
  104. package/dist/command/HealthzGetCommand.js.map +0 -1
  105. package/dist/command/MetricsCommand.d.ts +0 -4
  106. package/dist/command/MetricsCommand.js +0 -15
  107. package/dist/command/MetricsCommand.js.map +0 -1
  108. package/dist/command/MetricsGetCommand.d.ts +0 -5
  109. package/dist/command/MetricsGetCommand.js +0 -38
  110. package/dist/command/MetricsGetCommand.js.map +0 -1
  111. package/dist/command/SecretSecretCommand.d.ts +0 -4
  112. package/dist/command/SecretSecretCommand.js +0 -21
  113. package/dist/command/SecretSecretCommand.js.map +0 -1
  114. package/dist/command/SecretSecretEstimateHourlyCommand.d.ts +0 -5
  115. package/dist/command/SecretSecretEstimateHourlyCommand.js +0 -76
  116. package/dist/command/SecretSecretEstimateHourlyCommand.js.map +0 -1
  117. package/dist/command/SecretSecretEstimateReadCommand.d.ts +0 -5
  118. package/dist/command/SecretSecretEstimateReadCommand.js +0 -76
  119. package/dist/command/SecretSecretEstimateReadCommand.js.map +0 -1
  120. package/dist/command/SecretSecret_CreateForHourlyCommand.d.ts +0 -5
  121. package/dist/command/SecretSecret_CreateForHourlyCommand.js +0 -94
  122. package/dist/command/SecretSecret_CreateForHourlyCommand.js.map +0 -1
  123. package/dist/command/SecretSecret_CreateForReadCommand.d.ts +0 -5
  124. package/dist/command/SecretSecret_CreateForReadCommand.js +0 -94
  125. package/dist/command/SecretSecret_CreateForReadCommand.js.map +0 -1
  126. package/dist/command/ValueCommand.d.ts +0 -4
  127. package/dist/command/ValueCommand.js +0 -15
  128. package/dist/command/ValueCommand.js.map +0 -1
  129. package/dist/command/ValueListCommand.d.ts +0 -5
  130. package/dist/command/ValueListCommand.js +0 -38
  131. package/dist/command/ValueListCommand.js.map +0 -1
  132. package/dist/command/cli.d.ts +0 -2
  133. package/dist/command/cli.js +0 -32
  134. package/dist/command/cli.js.map +0 -1
  135. package/dist/estimator/BillWatchAWSEstimator.d.ts +0 -3
  136. package/dist/estimator/BillWatchAWSEstimator.js +0 -8
  137. package/dist/estimator/BillWatchAWSEstimator.js.map +0 -1
  138. package/dist/estimator/BillWatchAWSHourlyEstimator.d.ts +0 -3
  139. package/dist/estimator/BillWatchAWSHourlyEstimator.js +0 -8
  140. package/dist/estimator/BillWatchAWSHourlyEstimator.js.map +0 -1
  141. package/dist/estimator/BillWatchAzureEstimator.d.ts +0 -3
  142. package/dist/estimator/BillWatchAzureEstimator.js +0 -8
  143. package/dist/estimator/BillWatchAzureEstimator.js.map +0 -1
  144. package/dist/estimator/BillWatchAzureHourlyEstimator.d.ts +0 -3
  145. package/dist/estimator/BillWatchAzureHourlyEstimator.js +0 -8
  146. package/dist/estimator/BillWatchAzureHourlyEstimator.js.map +0 -1
  147. package/dist/estimator/BillWatchBaseEstimator.d.ts +0 -14
  148. package/dist/estimator/BillWatchBaseEstimator.js +0 -26
  149. package/dist/estimator/BillWatchBaseEstimator.js.map +0 -1
  150. package/dist/estimator/BillWatchBaseHourlyEstimator.d.ts +0 -14
  151. package/dist/estimator/BillWatchBaseHourlyEstimator.js +0 -26
  152. package/dist/estimator/BillWatchBaseHourlyEstimator.js.map +0 -1
  153. package/dist/estimator/BillWatchGCPEstimator.d.ts +0 -3
  154. package/dist/estimator/BillWatchGCPEstimator.js +0 -8
  155. package/dist/estimator/BillWatchGCPEstimator.js.map +0 -1
  156. package/dist/estimator/BillWatchGCPHourlyEstimator.d.ts +0 -3
  157. package/dist/estimator/BillWatchGCPHourlyEstimator.js +0 -8
  158. package/dist/estimator/BillWatchGCPHourlyEstimator.js.map +0 -1
  159. package/dist/estimator/FieldBaseEstimator.d.ts +0 -9
  160. package/dist/estimator/FieldBaseEstimator.js +0 -22
  161. package/dist/estimator/FieldBaseEstimator.js.map +0 -1
  162. package/dist/estimator/FieldBaseHourlyEstimator.d.ts +0 -9
  163. package/dist/estimator/FieldBaseHourlyEstimator.js +0 -22
  164. package/dist/estimator/FieldBaseHourlyEstimator.js.map +0 -1
  165. package/dist/estimator/FieldCategoryEstimator.d.ts +0 -8
  166. package/dist/estimator/FieldCategoryEstimator.js +0 -12
  167. package/dist/estimator/FieldCategoryEstimator.js.map +0 -1
  168. package/dist/estimator/FieldCategoryHourlyEstimator.d.ts +0 -8
  169. package/dist/estimator/FieldCategoryHourlyEstimator.js +0 -12
  170. package/dist/estimator/FieldCategoryHourlyEstimator.js.map +0 -1
  171. package/dist/estimator/FieldFieldEstimator.d.ts +0 -8
  172. package/dist/estimator/FieldFieldEstimator.js +0 -12
  173. package/dist/estimator/FieldFieldEstimator.js.map +0 -1
  174. package/dist/estimator/FieldFieldHourlyEstimator.d.ts +0 -8
  175. package/dist/estimator/FieldFieldHourlyEstimator.js +0 -12
  176. package/dist/estimator/FieldFieldHourlyEstimator.js.map +0 -1
  177. package/dist/estimator/SecretSecretEstimator.d.ts +0 -14
  178. package/dist/estimator/SecretSecretEstimator.js +0 -25
  179. package/dist/estimator/SecretSecretEstimator.js.map +0 -1
  180. package/dist/estimator/SecretSecretHourlyEstimator.d.ts +0 -14
  181. package/dist/estimator/SecretSecretHourlyEstimator.js +0 -25
  182. package/dist/estimator/SecretSecretHourlyEstimator.js.map +0 -1
  183. package/src/command/BillWatchAWSCommand.ts +0 -34
  184. package/src/command/BillWatchAWSEstimateHourlyCommand.ts +0 -83
  185. package/src/command/BillWatchAWS_CreateForHourlyCommand.ts +0 -101
  186. package/src/command/BillWatchAzureCommand.ts +0 -34
  187. package/src/command/BillWatchAzureEstimateHourlyCommand.ts +0 -83
  188. package/src/command/BillWatchAzure_CreateForHourlyCommand.ts +0 -101
  189. package/src/command/BillWatchGCPCommand.ts +0 -34
  190. package/src/command/BillWatchGCPEstimateHourlyCommand.ts +0 -83
  191. package/src/command/BillWatchGCP_CreateForHourlyCommand.ts +0 -101
  192. package/src/command/CostCommand.ts +0 -34
  193. package/src/command/CostListCommand.ts +0 -45
  194. package/src/command/Cost_CreateForCommand.ts +0 -182
  195. package/src/command/FieldCategoryCommand.ts +0 -34
  196. package/src/command/FieldCategoryEstimateHourlyCommand.ts +0 -83
  197. package/src/command/FieldCategory_CreateForHourlyCommand.ts +0 -101
  198. package/src/command/FieldFieldCommand.ts +0 -34
  199. package/src/command/FieldFieldEstimateHourlyCommand.ts +0 -83
  200. package/src/command/FieldField_CreateForHourlyCommand.ts +0 -101
  201. package/src/command/HealthzCommand.ts +0 -32
  202. package/src/command/HealthzGetCommand.ts +0 -45
  203. package/src/command/MetricsCommand.ts +0 -32
  204. package/src/command/MetricsGetCommand.ts +0 -45
  205. package/src/command/SecretSecretCommand.ts +0 -38
  206. package/src/command/SecretSecretEstimateHourlyCommand.ts +0 -83
  207. package/src/command/SecretSecretEstimateReadCommand.ts +0 -83
  208. package/src/command/SecretSecret_CreateForHourlyCommand.ts +0 -101
  209. package/src/command/SecretSecret_CreateForReadCommand.ts +0 -101
  210. package/src/command/ValueCommand.ts +0 -32
  211. package/src/command/ValueListCommand.ts +0 -45
  212. package/src/command/cli.ts +0 -51
@@ -1,32 +0,0 @@
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
- };
@@ -1,45 +0,0 @@
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 { NamirasoftCostServer } from "../NamirasoftCostServer";
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-cost account config \nor \nns-cost 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-cost-server-url");
41
- let server = new NamirasoftCostServer(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
- };
@@ -1,32 +0,0 @@
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 { MetricsGetCommand } from "./MetricsGetCommand";
23
-
24
- export class MetricsCommand extends BaseNavigatorCommand
25
- {
26
- constructor(argv: string[])
27
- {
28
- super(argv, {
29
- "get": MetricsGetCommand,
30
- });
31
- }
32
- };
@@ -1,45 +0,0 @@
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 { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class MetricsGetCommand 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-cost account config \nor \nns-cost 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-cost-server-url");
41
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
42
- let ans = await server.metrics.Get();
43
- this.app.logger.success(JSON.stringify(ans));
44
- }
45
- };
@@ -1,38 +0,0 @@
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 { SecretSecretEstimateHourlyCommand } from "./SecretSecretEstimateHourlyCommand";
23
- import { SecretSecretEstimateReadCommand } from "./SecretSecretEstimateReadCommand";
24
- import { SecretSecret_CreateForHourlyCommand } from "./SecretSecret_CreateForHourlyCommand";
25
- import { SecretSecret_CreateForReadCommand } from "./SecretSecret_CreateForReadCommand";
26
-
27
- export class SecretSecretCommand extends BaseNavigatorCommand
28
- {
29
- constructor(argv: string[])
30
- {
31
- super(argv, {
32
- "estimatehourly": SecretSecretEstimateHourlyCommand,
33
- "_createforhourly": SecretSecret_CreateForHourlyCommand,
34
- "estimateread": SecretSecretEstimateReadCommand,
35
- "_createforread": SecretSecret_CreateForReadCommand,
36
- });
37
- }
38
- };
@@ -1,83 +0,0 @@
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 { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class SecretSecretEstimateHourlyCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, [], [
31
- {
32
- name: "first_entity_created_at",
33
- short: "",
34
- description: "Provides the value of 'first_entity_created_at' in body",
35
- optional: true,
36
- args: ["first_entity_created_at"],
37
- defaults: [""]
38
- },
39
- {
40
- name: "period",
41
- short: "",
42
- description: "Provides the value of 'period' in body",
43
- optional: false,
44
- args: ["period"],
45
- defaults: [""]
46
- },
47
- {
48
- name: "row_number",
49
- short: "",
50
- description: "Provides the value of 'row_number' in body",
51
- optional: false,
52
- args: ["row_number"],
53
- defaults: [""]
54
- },
55
- {
56
- name: "active",
57
- short: "",
58
- description: "Provides the value of 'active' in body",
59
- optional: false,
60
- args: ["active"],
61
- defaults: [""]
62
- }
63
- ]);
64
- }
65
- override async exec()
66
- {
67
- let token = this.app.storage.getNSAToken();
68
- if (token == null)
69
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
70
- let storage = new IStorageMemoryDedicated();
71
- let manager = new TokenManager(storage, () => { });
72
- manager.setValue(token, false);
73
- let url = this.app.storage.getItem("ns-cost-server-url");
74
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
75
- let ans = await server.secret_secret.EstimateHourly({
76
- first_entity_created_at: this.option_values.first_entity_created_at,
77
- period: this.option_values.period,
78
- row_number: this.option_values.row_number,
79
- active: this.option_values.active
80
- });
81
- this.app.logger.success(JSON.stringify(ans));
82
- }
83
- };
@@ -1,83 +0,0 @@
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 { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class SecretSecretEstimateReadCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, [], [
31
- {
32
- name: "first_entity_created_at",
33
- short: "",
34
- description: "Provides the value of 'first_entity_created_at' in body",
35
- optional: true,
36
- args: ["first_entity_created_at"],
37
- defaults: [""]
38
- },
39
- {
40
- name: "period",
41
- short: "",
42
- description: "Provides the value of 'period' in body",
43
- optional: false,
44
- args: ["period"],
45
- defaults: [""]
46
- },
47
- {
48
- name: "total",
49
- short: "",
50
- description: "Provides the value of 'total' in body",
51
- optional: false,
52
- args: ["total"],
53
- defaults: [""]
54
- },
55
- {
56
- name: "count",
57
- short: "",
58
- description: "Provides the value of 'count' in body",
59
- optional: false,
60
- args: ["count"],
61
- defaults: [""]
62
- }
63
- ]);
64
- }
65
- override async exec()
66
- {
67
- let token = this.app.storage.getNSAToken();
68
- if (token == null)
69
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
70
- let storage = new IStorageMemoryDedicated();
71
- let manager = new TokenManager(storage, () => { });
72
- manager.setValue(token, false);
73
- let url = this.app.storage.getItem("ns-cost-server-url");
74
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
75
- let ans = await server.secret_secret.EstimateRead({
76
- first_entity_created_at: this.option_values.first_entity_created_at,
77
- period: this.option_values.period,
78
- total: this.option_values.total,
79
- count: this.option_values.count
80
- });
81
- this.app.logger.success(JSON.stringify(ans));
82
- }
83
- };
@@ -1,101 +0,0 @@
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 { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class SecretSecret_CreateForHourlyCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, ["user_id"], [
31
- {
32
- name: "first_entity_created_at",
33
- short: "",
34
- description: "Provides the value of 'first_entity_created_at' in body",
35
- optional: true,
36
- args: ["first_entity_created_at"],
37
- defaults: [""]
38
- },
39
- {
40
- name: "period",
41
- short: "",
42
- description: "Provides the value of 'period' in body",
43
- optional: false,
44
- args: ["period"],
45
- defaults: [""]
46
- },
47
- {
48
- name: "row_number",
49
- short: "",
50
- description: "Provides the value of 'row_number' in body",
51
- optional: false,
52
- args: ["row_number"],
53
- defaults: [""]
54
- },
55
- {
56
- name: "active",
57
- short: "",
58
- description: "Provides the value of 'active' in body",
59
- optional: false,
60
- args: ["active"],
61
- defaults: [""]
62
- },
63
- {
64
- name: "workspace_id",
65
- short: "",
66
- description: "Provides the value of 'workspace_id' in body",
67
- optional: false,
68
- args: ["workspace_id"],
69
- defaults: [""]
70
- },
71
- {
72
- name: "resource_id",
73
- short: "",
74
- description: "Provides the value of 'resource_id' in body",
75
- optional: false,
76
- args: ["resource_id"],
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-cost account config \nor \nns-cost 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-cost-server-url");
90
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
91
- let ans = await server.secret_secret._CreateForHourly(this.arg_values[0], {
92
- first_entity_created_at: this.option_values.first_entity_created_at,
93
- period: this.option_values.period,
94
- row_number: this.option_values.row_number,
95
- active: this.option_values.active,
96
- workspace_id: this.option_values.workspace_id,
97
- resource_id: this.option_values.resource_id
98
- });
99
- this.app.logger.success(JSON.stringify(ans));
100
- }
101
- };
@@ -1,101 +0,0 @@
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 { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class SecretSecret_CreateForReadCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, ["user_id"], [
31
- {
32
- name: "first_entity_created_at",
33
- short: "",
34
- description: "Provides the value of 'first_entity_created_at' in body",
35
- optional: true,
36
- args: ["first_entity_created_at"],
37
- defaults: [""]
38
- },
39
- {
40
- name: "period",
41
- short: "",
42
- description: "Provides the value of 'period' in body",
43
- optional: false,
44
- args: ["period"],
45
- defaults: [""]
46
- },
47
- {
48
- name: "total",
49
- short: "",
50
- description: "Provides the value of 'total' in body",
51
- optional: false,
52
- args: ["total"],
53
- defaults: [""]
54
- },
55
- {
56
- name: "count",
57
- short: "",
58
- description: "Provides the value of 'count' in body",
59
- optional: false,
60
- args: ["count"],
61
- defaults: [""]
62
- },
63
- {
64
- name: "workspace_id",
65
- short: "",
66
- description: "Provides the value of 'workspace_id' in body",
67
- optional: false,
68
- args: ["workspace_id"],
69
- defaults: [""]
70
- },
71
- {
72
- name: "resource_id",
73
- short: "",
74
- description: "Provides the value of 'resource_id' in body",
75
- optional: false,
76
- args: ["resource_id"],
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-cost account config \nor \nns-cost 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-cost-server-url");
90
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
91
- let ans = await server.secret_secret._CreateForRead(this.arg_values[0], {
92
- first_entity_created_at: this.option_values.first_entity_created_at,
93
- period: this.option_values.period,
94
- total: this.option_values.total,
95
- count: this.option_values.count,
96
- workspace_id: this.option_values.workspace_id,
97
- resource_id: this.option_values.resource_id
98
- });
99
- this.app.logger.success(JSON.stringify(ans));
100
- }
101
- };
@@ -1,32 +0,0 @@
1
- /****************************************************************/
2
- /* */
3
- /* This is an Auto-Generated File */
4
- /* Made By */
5
- /* Namirasoft SDK Generator NPM Package */
6
- /* */
7
- /****************************************************************/
8
- /****************************************************************/
9
- /* */
10
- /* Please do not make any change to this file */
11
- /* If any change is required, ns-sdkg command must be used */
12
- /* */
13
- /****************************************************************/
14
- /****************************************************************/
15
- /* */
16
- /* Namira Software Corporation */
17
- /* https://namirasoft.com */
18
- /* */
19
- /****************************************************************/
20
-
21
- import { BaseNavigatorCommand } from "namirasoft-node-cli";
22
- import { ValueListCommand } from "./ValueListCommand";
23
-
24
- export class ValueCommand extends BaseNavigatorCommand
25
- {
26
- constructor(argv: string[])
27
- {
28
- super(argv, {
29
- "list": ValueListCommand,
30
- });
31
- }
32
- };
@@ -1,45 +0,0 @@
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 { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class ValueListCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, ["table", "column", "search", "field_id", "limit"], []);
31
- }
32
- override async exec()
33
- {
34
- let token = this.app.storage.getNSAToken();
35
- if (token == null)
36
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost 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-cost-server-url");
41
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
42
- let ans = await server.value.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
43
- this.app.logger.success(JSON.stringify(ans));
44
- }
45
- };