namirasoft-cost 1.4.24 → 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 (238) 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/estimator/BillWatchAWSRecordEstimator.d.ts +3 -0
  15. package/dist/estimator/BillWatchAWSRecordEstimator.js +8 -0
  16. package/dist/estimator/BillWatchAWSRecordEstimator.js.map +1 -0
  17. package/dist/estimator/BillWatchAzureRecordEstimator.d.ts +3 -0
  18. package/dist/estimator/BillWatchAzureRecordEstimator.js +8 -0
  19. package/dist/estimator/BillWatchAzureRecordEstimator.js.map +1 -0
  20. package/dist/estimator/{BillWatchBaseHourlyEstimator.d.ts → BillWatchBaseRecordEstimator.d.ts} +1 -1
  21. package/dist/estimator/{BillWatchBaseHourlyEstimator.js → BillWatchBaseRecordEstimator.js} +6 -6
  22. package/dist/estimator/{BillWatchBaseHourlyEstimator.js.map → BillWatchBaseRecordEstimator.js.map} +1 -1
  23. package/dist/estimator/BillWatchGCPRecordEstimator.d.ts +3 -0
  24. package/dist/estimator/BillWatchGCPRecordEstimator.js +8 -0
  25. package/dist/estimator/BillWatchGCPRecordEstimator.js.map +1 -0
  26. package/dist/estimator/{FieldBaseHourlyEstimator.d.ts → FieldBaseRecordEstimator.d.ts} +1 -1
  27. package/dist/estimator/{FieldBaseHourlyEstimator.js → FieldBaseRecordEstimator.js} +4 -4
  28. package/dist/estimator/{FieldBaseHourlyEstimator.js.map → FieldBaseRecordEstimator.js.map} +1 -1
  29. package/dist/estimator/FieldCategoryRecordEstimator.d.ts +8 -0
  30. package/dist/estimator/FieldCategoryRecordEstimator.js +12 -0
  31. package/dist/estimator/{FieldCategoryHourlyEstimator.js.map → FieldCategoryRecordEstimator.js.map} +1 -1
  32. package/dist/estimator/FieldFieldRecordEstimator.d.ts +8 -0
  33. package/dist/estimator/FieldFieldRecordEstimator.js +12 -0
  34. package/dist/estimator/{FieldFieldHourlyEstimator.js.map → FieldFieldRecordEstimator.js.map} +1 -1
  35. package/dist/estimator/{SecretSecretHourlyEstimator.d.ts → SecretSecretRecordEstimator.d.ts} +1 -1
  36. package/dist/estimator/{SecretSecretHourlyEstimator.js → SecretSecretRecordEstimator.js} +6 -6
  37. package/dist/estimator/{SecretSecretHourlyEstimator.js.map → SecretSecretRecordEstimator.js.map} +1 -1
  38. package/dist/index.d.ts +9 -37
  39. package/dist/index.js +9 -37
  40. package/dist/index.js.map +1 -1
  41. package/dist/type/Bonus.d.ts +9 -0
  42. package/dist/type/Bonus.js +16 -0
  43. package/dist/type/Bonus.js.map +1 -0
  44. package/dist/type/Estimation.d.ts +4 -0
  45. package/dist/type/Estimation.js +22 -0
  46. package/dist/type/Estimation.js.map +1 -1
  47. package/dist/type/EstimationOption.d.ts +4 -0
  48. package/dist/type/EstimationOption.js +20 -0
  49. package/dist/type/EstimationOption.js.map +1 -1
  50. package/dist/type/EstimationUsage.d.ts +4 -0
  51. package/dist/type/EstimationUsage.js +15 -0
  52. package/dist/type/EstimationUsage.js.map +1 -1
  53. package/dist/type/Period.d.ts +4 -0
  54. package/dist/type/Period.js +27 -4
  55. package/dist/type/Period.js.map +1 -1
  56. package/package.json +4 -3
  57. package/src/NamirasoftCostServerBillWatchAWS.ts +4 -4
  58. package/src/NamirasoftCostServerBillWatchAzure.ts +4 -4
  59. package/src/NamirasoftCostServerBillWatchGCP.ts +4 -4
  60. package/src/NamirasoftCostServerFieldCategory.ts +4 -4
  61. package/src/NamirasoftCostServerFieldField.ts +4 -4
  62. package/src/NamirasoftCostServerSecretSecret.ts +4 -4
  63. package/src/estimator/BillWatchAWSRecordEstimator.ts +5 -0
  64. package/src/estimator/BillWatchAzureRecordEstimator.ts +5 -0
  65. package/src/estimator/{BillWatchBaseEstimator.ts → BillWatchBaseRecordEstimator.ts} +2 -2
  66. package/src/estimator/BillWatchGCPRecordEstimator.ts +5 -0
  67. package/src/estimator/{FieldBaseEstimator.ts → FieldBaseRecordEstimator.ts} +1 -1
  68. package/src/estimator/FieldCategoryRecordEstimator.ts +10 -0
  69. package/src/estimator/FieldFieldRecordEstimator.ts +10 -0
  70. package/src/estimator/{SecretSecretEstimator.ts → SecretSecretRecordEstimator.ts} +2 -2
  71. package/src/index.ts +9 -37
  72. package/src/type/Bonus.ts +21 -0
  73. package/src/type/Estimation.ts +24 -3
  74. package/src/type/EstimationOption.ts +22 -2
  75. package/src/type/EstimationUsage.ts +18 -1
  76. package/src/type/Period.ts +27 -3
  77. package/dist/command/BillWatchAWSCommand.d.ts +0 -4
  78. package/dist/command/BillWatchAWSCommand.js +0 -17
  79. package/dist/command/BillWatchAWSCommand.js.map +0 -1
  80. package/dist/command/BillWatchAWSEstimateHourlyCommand.d.ts +0 -5
  81. package/dist/command/BillWatchAWSEstimateHourlyCommand.js +0 -76
  82. package/dist/command/BillWatchAWSEstimateHourlyCommand.js.map +0 -1
  83. package/dist/command/BillWatchAWS_CreateForHourlyCommand.d.ts +0 -5
  84. package/dist/command/BillWatchAWS_CreateForHourlyCommand.js +0 -94
  85. package/dist/command/BillWatchAWS_CreateForHourlyCommand.js.map +0 -1
  86. package/dist/command/BillWatchAzureCommand.d.ts +0 -4
  87. package/dist/command/BillWatchAzureCommand.js +0 -17
  88. package/dist/command/BillWatchAzureCommand.js.map +0 -1
  89. package/dist/command/BillWatchAzureEstimateHourlyCommand.d.ts +0 -5
  90. package/dist/command/BillWatchAzureEstimateHourlyCommand.js +0 -76
  91. package/dist/command/BillWatchAzureEstimateHourlyCommand.js.map +0 -1
  92. package/dist/command/BillWatchAzure_CreateForHourlyCommand.d.ts +0 -5
  93. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js +0 -94
  94. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js.map +0 -1
  95. package/dist/command/BillWatchGCPCommand.d.ts +0 -4
  96. package/dist/command/BillWatchGCPCommand.js +0 -17
  97. package/dist/command/BillWatchGCPCommand.js.map +0 -1
  98. package/dist/command/BillWatchGCPEstimateHourlyCommand.d.ts +0 -5
  99. package/dist/command/BillWatchGCPEstimateHourlyCommand.js +0 -76
  100. package/dist/command/BillWatchGCPEstimateHourlyCommand.js.map +0 -1
  101. package/dist/command/BillWatchGCP_CreateForHourlyCommand.d.ts +0 -5
  102. package/dist/command/BillWatchGCP_CreateForHourlyCommand.js +0 -94
  103. package/dist/command/BillWatchGCP_CreateForHourlyCommand.js.map +0 -1
  104. package/dist/command/CostCommand.d.ts +0 -4
  105. package/dist/command/CostCommand.js +0 -17
  106. package/dist/command/CostCommand.js.map +0 -1
  107. package/dist/command/CostListCommand.d.ts +0 -5
  108. package/dist/command/CostListCommand.js +0 -38
  109. package/dist/command/CostListCommand.js.map +0 -1
  110. package/dist/command/Cost_CreateForCommand.d.ts +0 -5
  111. package/dist/command/Cost_CreateForCommand.js +0 -175
  112. package/dist/command/Cost_CreateForCommand.js.map +0 -1
  113. package/dist/command/FieldCategoryCommand.d.ts +0 -4
  114. package/dist/command/FieldCategoryCommand.js +0 -17
  115. package/dist/command/FieldCategoryCommand.js.map +0 -1
  116. package/dist/command/FieldCategoryEstimateHourlyCommand.d.ts +0 -5
  117. package/dist/command/FieldCategoryEstimateHourlyCommand.js +0 -76
  118. package/dist/command/FieldCategoryEstimateHourlyCommand.js.map +0 -1
  119. package/dist/command/FieldCategory_CreateForHourlyCommand.d.ts +0 -5
  120. package/dist/command/FieldCategory_CreateForHourlyCommand.js +0 -94
  121. package/dist/command/FieldCategory_CreateForHourlyCommand.js.map +0 -1
  122. package/dist/command/FieldFieldCommand.d.ts +0 -4
  123. package/dist/command/FieldFieldCommand.js +0 -17
  124. package/dist/command/FieldFieldCommand.js.map +0 -1
  125. package/dist/command/FieldFieldEstimateHourlyCommand.d.ts +0 -5
  126. package/dist/command/FieldFieldEstimateHourlyCommand.js +0 -76
  127. package/dist/command/FieldFieldEstimateHourlyCommand.js.map +0 -1
  128. package/dist/command/FieldField_CreateForHourlyCommand.d.ts +0 -5
  129. package/dist/command/FieldField_CreateForHourlyCommand.js +0 -94
  130. package/dist/command/FieldField_CreateForHourlyCommand.js.map +0 -1
  131. package/dist/command/HealthzCommand.d.ts +0 -4
  132. package/dist/command/HealthzCommand.js +0 -15
  133. package/dist/command/HealthzCommand.js.map +0 -1
  134. package/dist/command/HealthzGetCommand.d.ts +0 -5
  135. package/dist/command/HealthzGetCommand.js +0 -38
  136. package/dist/command/HealthzGetCommand.js.map +0 -1
  137. package/dist/command/MetricsCommand.d.ts +0 -4
  138. package/dist/command/MetricsCommand.js +0 -15
  139. package/dist/command/MetricsCommand.js.map +0 -1
  140. package/dist/command/MetricsGetCommand.d.ts +0 -5
  141. package/dist/command/MetricsGetCommand.js +0 -38
  142. package/dist/command/MetricsGetCommand.js.map +0 -1
  143. package/dist/command/SecretSecretCommand.d.ts +0 -4
  144. package/dist/command/SecretSecretCommand.js +0 -21
  145. package/dist/command/SecretSecretCommand.js.map +0 -1
  146. package/dist/command/SecretSecretEstimateHourlyCommand.d.ts +0 -5
  147. package/dist/command/SecretSecretEstimateHourlyCommand.js +0 -76
  148. package/dist/command/SecretSecretEstimateHourlyCommand.js.map +0 -1
  149. package/dist/command/SecretSecretEstimateReadCommand.d.ts +0 -5
  150. package/dist/command/SecretSecretEstimateReadCommand.js +0 -76
  151. package/dist/command/SecretSecretEstimateReadCommand.js.map +0 -1
  152. package/dist/command/SecretSecret_CreateForHourlyCommand.d.ts +0 -5
  153. package/dist/command/SecretSecret_CreateForHourlyCommand.js +0 -94
  154. package/dist/command/SecretSecret_CreateForHourlyCommand.js.map +0 -1
  155. package/dist/command/SecretSecret_CreateForReadCommand.d.ts +0 -5
  156. package/dist/command/SecretSecret_CreateForReadCommand.js +0 -94
  157. package/dist/command/SecretSecret_CreateForReadCommand.js.map +0 -1
  158. package/dist/command/ValueCommand.d.ts +0 -4
  159. package/dist/command/ValueCommand.js +0 -15
  160. package/dist/command/ValueCommand.js.map +0 -1
  161. package/dist/command/ValueListCommand.d.ts +0 -5
  162. package/dist/command/ValueListCommand.js +0 -38
  163. package/dist/command/ValueListCommand.js.map +0 -1
  164. package/dist/command/cli.d.ts +0 -2
  165. package/dist/command/cli.js +0 -32
  166. package/dist/command/cli.js.map +0 -1
  167. package/dist/estimator/BillWatchAWSEstimator.d.ts +0 -3
  168. package/dist/estimator/BillWatchAWSEstimator.js +0 -8
  169. package/dist/estimator/BillWatchAWSEstimator.js.map +0 -1
  170. package/dist/estimator/BillWatchAWSHourlyEstimator.d.ts +0 -3
  171. package/dist/estimator/BillWatchAWSHourlyEstimator.js +0 -8
  172. package/dist/estimator/BillWatchAWSHourlyEstimator.js.map +0 -1
  173. package/dist/estimator/BillWatchAzureEstimator.d.ts +0 -3
  174. package/dist/estimator/BillWatchAzureEstimator.js +0 -8
  175. package/dist/estimator/BillWatchAzureEstimator.js.map +0 -1
  176. package/dist/estimator/BillWatchAzureHourlyEstimator.d.ts +0 -3
  177. package/dist/estimator/BillWatchAzureHourlyEstimator.js +0 -8
  178. package/dist/estimator/BillWatchAzureHourlyEstimator.js.map +0 -1
  179. package/dist/estimator/BillWatchBaseEstimator.d.ts +0 -14
  180. package/dist/estimator/BillWatchBaseEstimator.js +0 -26
  181. package/dist/estimator/BillWatchBaseEstimator.js.map +0 -1
  182. package/dist/estimator/BillWatchGCPEstimator.d.ts +0 -3
  183. package/dist/estimator/BillWatchGCPEstimator.js +0 -8
  184. package/dist/estimator/BillWatchGCPEstimator.js.map +0 -1
  185. package/dist/estimator/BillWatchGCPHourlyEstimator.d.ts +0 -3
  186. package/dist/estimator/BillWatchGCPHourlyEstimator.js +0 -8
  187. package/dist/estimator/BillWatchGCPHourlyEstimator.js.map +0 -1
  188. package/dist/estimator/FieldBaseEstimator.d.ts +0 -9
  189. package/dist/estimator/FieldBaseEstimator.js +0 -22
  190. package/dist/estimator/FieldBaseEstimator.js.map +0 -1
  191. package/dist/estimator/FieldCategoryEstimator.d.ts +0 -8
  192. package/dist/estimator/FieldCategoryEstimator.js +0 -12
  193. package/dist/estimator/FieldCategoryEstimator.js.map +0 -1
  194. package/dist/estimator/FieldCategoryHourlyEstimator.d.ts +0 -8
  195. package/dist/estimator/FieldCategoryHourlyEstimator.js +0 -12
  196. package/dist/estimator/FieldFieldEstimator.d.ts +0 -8
  197. package/dist/estimator/FieldFieldEstimator.js +0 -12
  198. package/dist/estimator/FieldFieldEstimator.js.map +0 -1
  199. package/dist/estimator/FieldFieldHourlyEstimator.d.ts +0 -8
  200. package/dist/estimator/FieldFieldHourlyEstimator.js +0 -12
  201. package/dist/estimator/SecretSecretEstimator.d.ts +0 -14
  202. package/dist/estimator/SecretSecretEstimator.js +0 -25
  203. package/dist/estimator/SecretSecretEstimator.js.map +0 -1
  204. package/src/command/BillWatchAWSCommand.ts +0 -34
  205. package/src/command/BillWatchAWSEstimateHourlyCommand.ts +0 -83
  206. package/src/command/BillWatchAWS_CreateForHourlyCommand.ts +0 -101
  207. package/src/command/BillWatchAzureCommand.ts +0 -34
  208. package/src/command/BillWatchAzureEstimateHourlyCommand.ts +0 -83
  209. package/src/command/BillWatchAzure_CreateForHourlyCommand.ts +0 -101
  210. package/src/command/BillWatchGCPCommand.ts +0 -34
  211. package/src/command/BillWatchGCPEstimateHourlyCommand.ts +0 -83
  212. package/src/command/BillWatchGCP_CreateForHourlyCommand.ts +0 -101
  213. package/src/command/CostCommand.ts +0 -34
  214. package/src/command/CostListCommand.ts +0 -45
  215. package/src/command/Cost_CreateForCommand.ts +0 -182
  216. package/src/command/FieldCategoryCommand.ts +0 -34
  217. package/src/command/FieldCategoryEstimateHourlyCommand.ts +0 -83
  218. package/src/command/FieldCategory_CreateForHourlyCommand.ts +0 -101
  219. package/src/command/FieldFieldCommand.ts +0 -34
  220. package/src/command/FieldFieldEstimateHourlyCommand.ts +0 -83
  221. package/src/command/FieldField_CreateForHourlyCommand.ts +0 -101
  222. package/src/command/HealthzCommand.ts +0 -32
  223. package/src/command/HealthzGetCommand.ts +0 -45
  224. package/src/command/MetricsCommand.ts +0 -32
  225. package/src/command/MetricsGetCommand.ts +0 -45
  226. package/src/command/SecretSecretCommand.ts +0 -38
  227. package/src/command/SecretSecretEstimateHourlyCommand.ts +0 -83
  228. package/src/command/SecretSecretEstimateReadCommand.ts +0 -83
  229. package/src/command/SecretSecret_CreateForHourlyCommand.ts +0 -101
  230. package/src/command/SecretSecret_CreateForReadCommand.ts +0 -101
  231. package/src/command/ValueCommand.ts +0 -32
  232. package/src/command/ValueListCommand.ts +0 -45
  233. package/src/command/cli.ts +0 -51
  234. package/src/estimator/BillWatchAWSEstimator.ts +0 -5
  235. package/src/estimator/BillWatchAzureEstimator.ts +0 -5
  236. package/src/estimator/BillWatchGCPEstimator.ts +0 -5
  237. package/src/estimator/FieldCategoryEstimator.ts +0 -10
  238. package/src/estimator/FieldFieldEstimator.ts +0 -10
@@ -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 BillWatchGCPEstimateHourlyCommand 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.bill_watch_gcp.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,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 BillWatchGCP_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.bill_watch_gcp._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,34 +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 { CostListCommand } from "./CostListCommand";
23
- import { Cost_CreateForCommand } from "./Cost_CreateForCommand";
24
-
25
- export class CostCommand extends BaseNavigatorCommand
26
- {
27
- constructor(argv: string[])
28
- {
29
- super(argv, {
30
- "list": CostListCommand,
31
- "_createfor": Cost_CreateForCommand,
32
- });
33
- }
34
- };
@@ -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 CostListCommand 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-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.cost.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
- };
@@ -1,182 +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 Cost_CreateForCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, ["user_id"], [
31
- {
32
- name: "workspace_id",
33
- short: "",
34
- description: "Provides the value of 'workspace_id' in body",
35
- optional: false,
36
- args: ["workspace_id"],
37
- defaults: [""]
38
- },
39
- {
40
- name: "product_id",
41
- short: "",
42
- description: "Provides the value of 'product_id' in body",
43
- optional: false,
44
- args: ["product_id"],
45
- defaults: [""]
46
- },
47
- {
48
- name: "sales_item_id",
49
- short: "",
50
- description: "Provides the value of 'sales_item_id' in body",
51
- optional: false,
52
- args: ["sales_item_id"],
53
- defaults: [""]
54
- },
55
- {
56
- name: "offer_id",
57
- short: "",
58
- description: "Provides the value of 'offer_id' in body",
59
- optional: false,
60
- args: ["offer_id"],
61
- defaults: [""]
62
- },
63
- {
64
- name: "offer_item_id",
65
- short: "",
66
- description: "Provides the value of 'offer_item_id' in body",
67
- optional: false,
68
- args: ["offer_item_id"],
69
- defaults: [""]
70
- },
71
- {
72
- name: "resource_entity",
73
- short: "",
74
- description: "Provides the value of 'resource_entity' in body",
75
- optional: false,
76
- args: ["resource_entity"],
77
- defaults: [""]
78
- },
79
- {
80
- name: "resource_id",
81
- short: "",
82
- description: "Provides the value of 'resource_id' in body",
83
- optional: false,
84
- args: ["resource_id"],
85
- defaults: [""]
86
- },
87
- {
88
- name: "usage_name",
89
- short: "",
90
- description: "Provides the value of 'usage_name' in body",
91
- optional: false,
92
- args: ["usage_name"],
93
- defaults: [""]
94
- },
95
- {
96
- name: "usage_value",
97
- short: "",
98
- description: "Provides the value of 'usage_value' in body",
99
- optional: false,
100
- args: ["usage_value"],
101
- defaults: [""]
102
- },
103
- {
104
- name: "usage_unit",
105
- short: "",
106
- description: "Provides the value of 'usage_unit' in body",
107
- optional: false,
108
- args: ["usage_unit"],
109
- defaults: [""]
110
- },
111
- {
112
- name: "period_start",
113
- short: "",
114
- description: "Provides the value of 'period_start' in body",
115
- optional: false,
116
- args: ["period_start"],
117
- defaults: [""]
118
- },
119
- {
120
- name: "period_end",
121
- short: "",
122
- description: "Provides the value of 'period_end' in body",
123
- optional: false,
124
- args: ["period_end"],
125
- defaults: [""]
126
- },
127
- {
128
- name: "amount",
129
- short: "",
130
- description: "Provides the value of 'amount' in body",
131
- optional: false,
132
- args: ["amount"],
133
- defaults: [""]
134
- },
135
- {
136
- name: "currency",
137
- short: "",
138
- description: "Provides the value of 'currency' in body",
139
- optional: false,
140
- args: ["currency"],
141
- defaults: [""]
142
- },
143
- {
144
- name: "description",
145
- short: "",
146
- description: "Provides the value of 'description' in body",
147
- optional: false,
148
- args: ["description"],
149
- defaults: [""]
150
- }
151
- ]);
152
- }
153
- override async exec()
154
- {
155
- let token = this.app.storage.getNSAToken();
156
- if (token == null)
157
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
158
- let storage = new IStorageMemoryDedicated();
159
- let manager = new TokenManager(storage, () => { });
160
- manager.setValue(token, false);
161
- let url = this.app.storage.getItem("ns-cost-server-url");
162
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
163
- let ans = await server.cost._CreateFor(this.arg_values[0], {
164
- workspace_id: this.option_values.workspace_id,
165
- product_id: this.option_values.product_id,
166
- sales_item_id: this.option_values.sales_item_id,
167
- offer_id: this.option_values.offer_id,
168
- offer_item_id: this.option_values.offer_item_id,
169
- resource_entity: this.option_values.resource_entity,
170
- resource_id: this.option_values.resource_id,
171
- usage_name: this.option_values.usage_name,
172
- usage_value: this.option_values.usage_value,
173
- usage_unit: this.option_values.usage_unit,
174
- period_start: this.option_values.period_start,
175
- period_end: this.option_values.period_end,
176
- amount: this.option_values.amount,
177
- currency: this.option_values.currency,
178
- description: this.option_values.description
179
- });
180
- this.app.logger.success(JSON.stringify(ans));
181
- }
182
- };
@@ -1,34 +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 { FieldCategoryEstimateHourlyCommand } from "./FieldCategoryEstimateHourlyCommand";
23
- import { FieldCategory_CreateForHourlyCommand } from "./FieldCategory_CreateForHourlyCommand";
24
-
25
- export class FieldCategoryCommand extends BaseNavigatorCommand
26
- {
27
- constructor(argv: string[])
28
- {
29
- super(argv, {
30
- "estimatehourly": FieldCategoryEstimateHourlyCommand,
31
- "_createforhourly": FieldCategory_CreateForHourlyCommand,
32
- });
33
- }
34
- };
@@ -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 FieldCategoryEstimateHourlyCommand 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.field_category.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,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 FieldCategory_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.field_category._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
- };