namirasoft-cost 1.4.27 → 1.4.31

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 (182) hide show
  1. package/.ns-sdkg-file-keep +10 -0
  2. package/dist/NamirasoftCostServer.js +1 -1
  3. package/dist/NamirasoftCostServerBillWatchAWS.d.ts +4 -15
  4. package/dist/NamirasoftCostServerBillWatchAWS.js +2 -2
  5. package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
  6. package/dist/NamirasoftCostServerBillWatchAzure.d.ts +4 -15
  7. package/dist/NamirasoftCostServerBillWatchAzure.js +2 -2
  8. package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
  9. package/dist/NamirasoftCostServerBillWatchGCP.d.ts +4 -15
  10. package/dist/NamirasoftCostServerBillWatchGCP.js +2 -2
  11. package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
  12. package/dist/NamirasoftCostServerCost.d.ts +0 -2
  13. package/dist/NamirasoftCostServerCost.js +0 -8
  14. package/dist/NamirasoftCostServerCost.js.map +1 -1
  15. package/dist/NamirasoftCostServerFieldCategory.d.ts +4 -15
  16. package/dist/NamirasoftCostServerFieldCategory.js +2 -2
  17. package/dist/NamirasoftCostServerFieldCategory.js.map +1 -1
  18. package/dist/NamirasoftCostServerFieldField.d.ts +4 -15
  19. package/dist/NamirasoftCostServerFieldField.js +2 -2
  20. package/dist/NamirasoftCostServerFieldField.js.map +1 -1
  21. package/dist/NamirasoftCostServerSecretSecret.d.ts +6 -29
  22. package/dist/NamirasoftCostServerSecretSecret.js +2 -2
  23. package/dist/NamirasoftCostServerSecretSecret.js.map +1 -1
  24. package/dist/command/BillWatchAWSCommand.d.ts +4 -0
  25. package/dist/command/BillWatchAWSCommand.js +17 -0
  26. package/dist/command/BillWatchAWSCommand.js.map +1 -0
  27. package/dist/command/BillWatchAWSEstimateRecordCommand.d.ts +5 -0
  28. package/dist/command/BillWatchAWSEstimateRecordCommand.js +103 -0
  29. package/dist/command/BillWatchAWSEstimateRecordCommand.js.map +1 -0
  30. package/dist/command/BillWatchAWS_CreateForRecordCommand.d.ts +5 -0
  31. package/dist/command/BillWatchAWS_CreateForRecordCommand.js +112 -0
  32. package/dist/command/BillWatchAWS_CreateForRecordCommand.js.map +1 -0
  33. package/dist/command/BillWatchAzureCommand.d.ts +4 -0
  34. package/dist/command/BillWatchAzureCommand.js +17 -0
  35. package/dist/command/BillWatchAzureCommand.js.map +1 -0
  36. package/dist/command/BillWatchAzureEstimateRecordCommand.d.ts +5 -0
  37. package/dist/command/BillWatchAzureEstimateRecordCommand.js +103 -0
  38. package/dist/command/BillWatchAzureEstimateRecordCommand.js.map +1 -0
  39. package/dist/command/BillWatchAzure_CreateForRecordCommand.d.ts +5 -0
  40. package/dist/command/BillWatchAzure_CreateForRecordCommand.js +112 -0
  41. package/dist/command/BillWatchAzure_CreateForRecordCommand.js.map +1 -0
  42. package/dist/command/BillWatchGCPCommand.d.ts +4 -0
  43. package/dist/command/BillWatchGCPCommand.js +17 -0
  44. package/dist/command/BillWatchGCPCommand.js.map +1 -0
  45. package/dist/command/BillWatchGCPEstimateRecordCommand.d.ts +5 -0
  46. package/dist/command/BillWatchGCPEstimateRecordCommand.js +103 -0
  47. package/dist/command/BillWatchGCPEstimateRecordCommand.js.map +1 -0
  48. package/dist/command/BillWatchGCP_CreateForRecordCommand.d.ts +5 -0
  49. package/dist/command/BillWatchGCP_CreateForRecordCommand.js +112 -0
  50. package/dist/command/BillWatchGCP_CreateForRecordCommand.js.map +1 -0
  51. package/dist/command/CostCommand.d.ts +4 -0
  52. package/dist/command/CostCommand.js +15 -0
  53. package/dist/command/CostCommand.js.map +1 -0
  54. package/dist/command/CostListCommand.d.ts +5 -0
  55. package/dist/command/CostListCommand.js +38 -0
  56. package/dist/command/CostListCommand.js.map +1 -0
  57. package/dist/command/FieldCategoryCommand.d.ts +4 -0
  58. package/dist/command/FieldCategoryCommand.js +17 -0
  59. package/dist/command/FieldCategoryCommand.js.map +1 -0
  60. package/dist/command/FieldCategoryEstimateRecordCommand.d.ts +5 -0
  61. package/dist/command/FieldCategoryEstimateRecordCommand.js +103 -0
  62. package/dist/command/FieldCategoryEstimateRecordCommand.js.map +1 -0
  63. package/dist/command/FieldCategory_CreateForRecordCommand.d.ts +5 -0
  64. package/dist/command/FieldCategory_CreateForRecordCommand.js +112 -0
  65. package/dist/command/FieldCategory_CreateForRecordCommand.js.map +1 -0
  66. package/dist/command/FieldFieldCommand.d.ts +4 -0
  67. package/dist/command/FieldFieldCommand.js +17 -0
  68. package/dist/command/FieldFieldCommand.js.map +1 -0
  69. package/dist/command/FieldFieldEstimateRecordCommand.d.ts +5 -0
  70. package/dist/command/FieldFieldEstimateRecordCommand.js +103 -0
  71. package/dist/command/FieldFieldEstimateRecordCommand.js.map +1 -0
  72. package/dist/command/FieldField_CreateForRecordCommand.d.ts +5 -0
  73. package/dist/command/FieldField_CreateForRecordCommand.js +112 -0
  74. package/dist/command/FieldField_CreateForRecordCommand.js.map +1 -0
  75. package/dist/command/HealthzCommand.d.ts +4 -0
  76. package/dist/command/HealthzCommand.js +15 -0
  77. package/dist/command/HealthzCommand.js.map +1 -0
  78. package/dist/command/HealthzGetCommand.d.ts +5 -0
  79. package/dist/command/HealthzGetCommand.js +38 -0
  80. package/dist/command/HealthzGetCommand.js.map +1 -0
  81. package/dist/command/MetricsCommand.d.ts +4 -0
  82. package/dist/command/MetricsCommand.js +15 -0
  83. package/dist/command/MetricsCommand.js.map +1 -0
  84. package/dist/command/MetricsGetCommand.d.ts +5 -0
  85. package/dist/command/MetricsGetCommand.js +38 -0
  86. package/dist/command/MetricsGetCommand.js.map +1 -0
  87. package/dist/command/SecretSecretCommand.d.ts +4 -0
  88. package/dist/command/SecretSecretCommand.js +21 -0
  89. package/dist/command/SecretSecretCommand.js.map +1 -0
  90. package/dist/command/SecretSecretEstimateReadCommand.d.ts +5 -0
  91. package/dist/command/SecretSecretEstimateReadCommand.js +103 -0
  92. package/dist/command/SecretSecretEstimateReadCommand.js.map +1 -0
  93. package/dist/command/SecretSecretEstimateRecordCommand.d.ts +5 -0
  94. package/dist/command/SecretSecretEstimateRecordCommand.js +103 -0
  95. package/dist/command/SecretSecretEstimateRecordCommand.js.map +1 -0
  96. package/dist/command/SecretSecret_CreateForReadCommand.d.ts +5 -0
  97. package/dist/command/SecretSecret_CreateForReadCommand.js +112 -0
  98. package/dist/command/SecretSecret_CreateForReadCommand.js.map +1 -0
  99. package/dist/command/SecretSecret_CreateForRecordCommand.d.ts +5 -0
  100. package/dist/command/SecretSecret_CreateForRecordCommand.js +112 -0
  101. package/dist/command/SecretSecret_CreateForRecordCommand.js.map +1 -0
  102. package/dist/command/ValueCommand.d.ts +4 -0
  103. package/dist/command/ValueCommand.js +15 -0
  104. package/dist/command/ValueCommand.js.map +1 -0
  105. package/dist/command/ValueListCommand.d.ts +5 -0
  106. package/dist/command/ValueListCommand.js +38 -0
  107. package/dist/command/ValueListCommand.js.map +1 -0
  108. package/dist/command/cli.d.ts +2 -0
  109. package/dist/command/cli.js +32 -0
  110. package/dist/command/cli.js.map +1 -0
  111. package/dist/estimator/BaseEstimator.d.ts +1 -1
  112. package/dist/estimator/BaseEstimator.js +1 -1
  113. package/dist/estimator/BaseEstimator.js.map +1 -1
  114. package/dist/estimator/BillWatchBaseRecordEstimator.d.ts +1 -1
  115. package/dist/estimator/BillWatchBaseRecordEstimator.js +1 -1
  116. package/dist/estimator/BillWatchBaseRecordEstimator.js.map +1 -1
  117. package/dist/estimator/FieldBaseRecordEstimator.d.ts +1 -1
  118. package/dist/estimator/FieldBaseRecordEstimator.js +1 -1
  119. package/dist/estimator/FieldBaseRecordEstimator.js.map +1 -1
  120. package/dist/estimator/SecretSecretReadEstimator.d.ts +1 -1
  121. package/dist/estimator/SecretSecretReadEstimator.js +1 -1
  122. package/dist/estimator/SecretSecretReadEstimator.js.map +1 -1
  123. package/dist/estimator/SecretSecretRecordEstimator.d.ts +1 -1
  124. package/dist/estimator/SecretSecretRecordEstimator.js +1 -1
  125. package/dist/estimator/SecretSecretRecordEstimator.js.map +1 -1
  126. package/dist/index.d.ts +47 -12
  127. package/dist/index.js +47 -12
  128. package/dist/index.js.map +1 -1
  129. package/package.json +4 -4
  130. package/src/NamirasoftCostServer.ts +1 -1
  131. package/src/NamirasoftCostServerBillWatchAWS.ts +8 -7
  132. package/src/NamirasoftCostServerBillWatchAzure.ts +8 -7
  133. package/src/NamirasoftCostServerBillWatchGCP.ts +8 -7
  134. package/src/NamirasoftCostServerCost.ts +0 -8
  135. package/src/NamirasoftCostServerFieldCategory.ts +8 -7
  136. package/src/NamirasoftCostServerFieldField.ts +8 -7
  137. package/src/NamirasoftCostServerSecretSecret.ts +12 -11
  138. package/src/command/BillWatchAWSCommand.ts +34 -0
  139. package/src/command/BillWatchAWSEstimateRecordCommand.ts +110 -0
  140. package/src/command/BillWatchAWS_CreateForRecordCommand.ts +119 -0
  141. package/src/command/BillWatchAzureCommand.ts +34 -0
  142. package/src/command/BillWatchAzureEstimateRecordCommand.ts +110 -0
  143. package/src/command/BillWatchAzure_CreateForRecordCommand.ts +119 -0
  144. package/src/command/BillWatchGCPCommand.ts +34 -0
  145. package/src/command/BillWatchGCPEstimateRecordCommand.ts +110 -0
  146. package/src/command/BillWatchGCP_CreateForRecordCommand.ts +119 -0
  147. package/src/{row/CostCreateRow.ts → command/CostCommand.ts} +11 -17
  148. package/src/command/CostListCommand.ts +45 -0
  149. package/src/command/FieldCategoryCommand.ts +34 -0
  150. package/src/command/FieldCategoryEstimateRecordCommand.ts +110 -0
  151. package/src/command/FieldCategory_CreateForRecordCommand.ts +119 -0
  152. package/src/command/FieldFieldCommand.ts +34 -0
  153. package/src/command/FieldFieldEstimateRecordCommand.ts +110 -0
  154. package/src/command/FieldField_CreateForRecordCommand.ts +119 -0
  155. package/src/command/HealthzCommand.ts +32 -0
  156. package/src/command/HealthzGetCommand.ts +45 -0
  157. package/src/command/MetricsCommand.ts +32 -0
  158. package/src/command/MetricsGetCommand.ts +45 -0
  159. package/src/command/SecretSecretCommand.ts +38 -0
  160. package/src/command/SecretSecretEstimateReadCommand.ts +110 -0
  161. package/src/command/SecretSecretEstimateRecordCommand.ts +110 -0
  162. package/src/command/SecretSecret_CreateForReadCommand.ts +119 -0
  163. package/src/command/SecretSecret_CreateForRecordCommand.ts +119 -0
  164. package/src/command/ValueCommand.ts +32 -0
  165. package/src/command/ValueListCommand.ts +45 -0
  166. package/src/command/cli.ts +51 -0
  167. package/src/estimator/BaseEstimator.ts +62 -62
  168. package/src/estimator/BillWatchAWSRecordEstimator.ts +4 -4
  169. package/src/estimator/BillWatchAzureRecordEstimator.ts +4 -4
  170. package/src/estimator/BillWatchBaseRecordEstimator.ts +25 -25
  171. package/src/estimator/BillWatchGCPRecordEstimator.ts +4 -4
  172. package/src/estimator/FieldBaseRecordEstimator.ts +20 -20
  173. package/src/estimator/FieldCategoryRecordEstimator.ts +9 -9
  174. package/src/estimator/FieldFieldRecordEstimator.ts +9 -9
  175. package/src/estimator/SecretSecretReadEstimator.ts +25 -25
  176. package/src/estimator/SecretSecretRecordEstimator.ts +24 -24
  177. package/src/index.ts +47 -12
  178. package/src/type/CalculationOption.ts +1 -1
  179. package/src/type/Estimation.ts +1 -1
  180. package/dist/row/CostCreateRow.d.ts +0 -17
  181. package/dist/row/CostCreateRow.js +0 -3
  182. package/dist/row/CostCreateRow.js.map +0 -1
package/dist/index.js CHANGED
@@ -14,17 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./bonus/BaseBonus"), exports);
18
- __exportStar(require("./estimator/BaseEstimator"), exports);
19
- __exportStar(require("./estimator/BillWatchAWSRecordEstimator"), exports);
20
- __exportStar(require("./estimator/BillWatchAzureRecordEstimator"), exports);
21
- __exportStar(require("./estimator/BillWatchBaseRecordEstimator"), exports);
22
- __exportStar(require("./estimator/BillWatchGCPRecordEstimator"), exports);
23
- __exportStar(require("./estimator/FieldBaseRecordEstimator"), exports);
24
- __exportStar(require("./estimator/FieldCategoryRecordEstimator"), exports);
25
- __exportStar(require("./estimator/FieldFieldRecordEstimator"), exports);
26
- __exportStar(require("./estimator/SecretSecretRecordEstimator"), exports);
27
- __exportStar(require("./estimator/SecretSecretReadEstimator"), exports);
28
17
  __exportStar(require("./NamirasoftCostServer"), exports);
29
18
  __exportStar(require("./NamirasoftCostServerBase"), exports);
30
19
  __exportStar(require("./NamirasoftCostServerBillWatchAWS"), exports);
@@ -37,9 +26,55 @@ __exportStar(require("./NamirasoftCostServerHealthz"), exports);
37
26
  __exportStar(require("./NamirasoftCostServerMetrics"), exports);
38
27
  __exportStar(require("./NamirasoftCostServerSecretSecret"), exports);
39
28
  __exportStar(require("./NamirasoftCostServerValue"), exports);
29
+ __exportStar(require("./bonus/BaseBonus"), exports);
30
+ __exportStar(require("./bonus/DeactiveBonus"), exports);
31
+ __exportStar(require("./bonus/FreeCountBonus"), exports);
32
+ __exportStar(require("./bonus/FreeTotalValueBonus"), exports);
33
+ __exportStar(require("./bonus/LowAmountBonus"), exports);
34
+ __exportStar(require("./bonus/LowSecondsBonus"), exports);
35
+ __exportStar(require("./bonus/LowTotalCountBonus"), exports);
36
+ __exportStar(require("./bonus/LowTotalValueBonus"), exports);
37
+ __exportStar(require("./bonus/TrialBonus"), exports);
38
+ __exportStar(require("./command/BillWatchAWSCommand"), exports);
39
+ __exportStar(require("./command/BillWatchAWSEstimateRecordCommand"), exports);
40
+ __exportStar(require("./command/BillWatchAWS_CreateForRecordCommand"), exports);
41
+ __exportStar(require("./command/BillWatchAzureCommand"), exports);
42
+ __exportStar(require("./command/BillWatchAzureEstimateRecordCommand"), exports);
43
+ __exportStar(require("./command/BillWatchAzure_CreateForRecordCommand"), exports);
44
+ __exportStar(require("./command/BillWatchGCPCommand"), exports);
45
+ __exportStar(require("./command/BillWatchGCPEstimateRecordCommand"), exports);
46
+ __exportStar(require("./command/BillWatchGCP_CreateForRecordCommand"), exports);
47
+ __exportStar(require("./command/CostCommand"), exports);
48
+ __exportStar(require("./command/CostListCommand"), exports);
49
+ __exportStar(require("./command/FieldCategoryCommand"), exports);
50
+ __exportStar(require("./command/FieldCategoryEstimateRecordCommand"), exports);
51
+ __exportStar(require("./command/FieldCategory_CreateForRecordCommand"), exports);
52
+ __exportStar(require("./command/FieldFieldCommand"), exports);
53
+ __exportStar(require("./command/FieldFieldEstimateRecordCommand"), exports);
54
+ __exportStar(require("./command/FieldField_CreateForRecordCommand"), exports);
55
+ __exportStar(require("./command/HealthzCommand"), exports);
56
+ __exportStar(require("./command/HealthzGetCommand"), exports);
57
+ __exportStar(require("./command/MetricsCommand"), exports);
58
+ __exportStar(require("./command/MetricsGetCommand"), exports);
59
+ __exportStar(require("./command/SecretSecretCommand"), exports);
60
+ __exportStar(require("./command/SecretSecretEstimateReadCommand"), exports);
61
+ __exportStar(require("./command/SecretSecretEstimateRecordCommand"), exports);
62
+ __exportStar(require("./command/SecretSecret_CreateForReadCommand"), exports);
63
+ __exportStar(require("./command/SecretSecret_CreateForRecordCommand"), exports);
64
+ __exportStar(require("./command/ValueCommand"), exports);
65
+ __exportStar(require("./command/ValueListCommand"), exports);
66
+ __exportStar(require("./estimator/BaseEstimator"), exports);
67
+ __exportStar(require("./estimator/BillWatchAWSRecordEstimator"), exports);
68
+ __exportStar(require("./estimator/BillWatchAzureRecordEstimator"), exports);
69
+ __exportStar(require("./estimator/BillWatchBaseRecordEstimator"), exports);
70
+ __exportStar(require("./estimator/BillWatchGCPRecordEstimator"), exports);
71
+ __exportStar(require("./estimator/FieldBaseRecordEstimator"), exports);
72
+ __exportStar(require("./estimator/FieldCategoryRecordEstimator"), exports);
73
+ __exportStar(require("./estimator/FieldFieldRecordEstimator"), exports);
74
+ __exportStar(require("./estimator/SecretSecretReadEstimator"), exports);
75
+ __exportStar(require("./estimator/SecretSecretRecordEstimator"), exports);
40
76
  __exportStar(require("./meta/CostMetaTable"), exports);
41
77
  __exportStar(require("./meta/NamirasoftCostMetaDatabase"), exports);
42
- __exportStar(require("./row/CostCreateRow"), exports);
43
78
  __exportStar(require("./row/CostRow"), exports);
44
79
  __exportStar(require("./type/Bonus"), exports);
45
80
  __exportStar(require("./type/CalculationOption"), exports);
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,oDAAkC;AAClC,4DAA0C;AAC1C,0EAAwD;AACxD,4EAA0D;AAC1D,2EAAyD;AACzD,0EAAwD;AACxD,uEAAqD;AACrD,2EAAyD;AACzD,wEAAsD;AACtD,0EAAwD;AACxD,wEAAsD;AACtD,yDAAuC;AACvC,6DAA2C;AAC3C,qEAAmD;AACnD,uEAAqD;AACrD,qEAAmD;AACnD,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,gEAA8C;AAC9C,gEAA8C;AAC9C,qEAAmD;AACnD,8DAA4C;AAC5C,uDAAqC;AACrC,oEAAkD;AAClD,sDAAoC;AACpC,gDAA8B;AAC9B,+CAA6B;AAC7B,2DAAyC;AACzC,oDAAkC;AAClC,0DAAwC;AACxC,yDAAuC;AACvC,gDAA8B;AAC9B,0DAAwC;AACxC,+CAA6B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,yDAAuC;AACvC,6DAA2C;AAC3C,qEAAmD;AACnD,uEAAqD;AACrD,qEAAmD;AACnD,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,gEAA8C;AAC9C,gEAA8C;AAC9C,qEAAmD;AACnD,8DAA4C;AAC5C,oDAAkC;AAClC,wDAAsC;AACtC,yDAAuC;AACvC,8DAA4C;AAC5C,yDAAuC;AACvC,0DAAwC;AACxC,6DAA2C;AAC3C,6DAA2C;AAC3C,qDAAmC;AACnC,gEAA8C;AAC9C,8EAA4D;AAC5D,gFAA8D;AAC9D,kEAAgD;AAChD,gFAA8D;AAC9D,kFAAgE;AAChE,gEAA8C;AAC9C,8EAA4D;AAC5D,gFAA8D;AAC9D,wDAAsC;AACtC,4DAA0C;AAC1C,iEAA+C;AAC/C,+EAA6D;AAC7D,iFAA+D;AAC/D,8DAA4C;AAC5C,4EAA0D;AAC1D,8EAA4D;AAC5D,2DAAyC;AACzC,8DAA4C;AAC5C,2DAAyC;AACzC,8DAA4C;AAC5C,gEAA8C;AAC9C,4EAA0D;AAC1D,8EAA4D;AAC5D,8EAA4D;AAC5D,gFAA8D;AAC9D,yDAAuC;AACvC,6DAA2C;AAC3C,4DAA0C;AAC1C,0EAAwD;AACxD,4EAA0D;AAC1D,2EAAyD;AACzD,0EAAwD;AACxD,uEAAqD;AACrD,2EAAyD;AACzD,wEAAsD;AACtD,wEAAsD;AACtD,0EAAwD;AACxD,uDAAqC;AACrC,oEAAkD;AAClD,gDAA8B;AAC9B,+CAA6B;AAC7B,2DAAyC;AACzC,oDAAkC;AAClC,0DAAwC;AACxC,yDAAuC;AACvC,gDAA8B;AAC9B,0DAAwC;AACxC,+CAA6B"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.4.27",
11
+ "version": "1.4.31",
12
12
  "author": "Amir Abolhasani",
13
13
  "license": "MIT",
14
14
  "main": "./dist/index.js",
@@ -17,11 +17,11 @@
17
17
  "build": ""
18
18
  },
19
19
  "dependencies": {
20
- "namirasoft-account": "^1.4.85",
21
20
  "namirasoft-core": "^1.4.80",
21
+ "namirasoft-site": "^1.4.39",
22
22
  "namirasoft-node-cli": "^1.4.7",
23
- "namirasoft-schema": "^1.4.25",
24
- "namirasoft-site": "^1.4.39"
23
+ "namirasoft-account": "^1.4.85",
24
+ "namirasoft-schema": "^1.4.25"
25
25
  },
26
26
  "bin": {
27
27
  "ns-cost": "./dist/command/cli.js"
@@ -45,7 +45,7 @@ export class NamirasoftCostServer extends NSABaseServer
45
45
  cost: NamirasoftCostServerCost;
46
46
  constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
47
47
  {
48
- super(base_url, `1.4.21`, manager, onError);
48
+ super(base_url, `1.4.30`, manager, onError);
49
49
  this.healthz = new NamirasoftCostServerHealthz(this);
50
50
  this.metrics = new NamirasoftCostServerMetrics(this);
51
51
  this.value = new NamirasoftCostServerValue(this);
@@ -18,11 +18,12 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
+ import { CalculationOption } from "./type/CalculationOption";
21
22
  import { CostRow } from "./row/CostRow";
22
23
  import { Estimation } from "./type/Estimation";
24
+ import { EstimationOption } from "./type/EstimationOption";
23
25
  import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
26
  import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
- import { Period } from "./type/Period";
26
27
 
27
28
  export class NamirasoftCostServerBillWatchAWS extends NamirasoftCostServerBase
28
29
  {
@@ -32,16 +33,16 @@ export class NamirasoftCostServerBillWatchAWS extends NamirasoftCostServerBase
32
33
  this.EstimateRecord = this.EstimateRecord.bind(this);
33
34
  this._CreateForRecord = this._CreateForRecord.bind(this);
34
35
  }
35
- async EstimateRecord(body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean }): Promise<Estimation>
36
+ async EstimateRecord(body: EstimationOption): Promise<Estimation[]>
36
37
  {
37
- let path = `/estimation/bill-watch/aws/hourly`;
38
- let { data } = await this.server._post<Estimation>(path, {}, body);
38
+ let path = `/estimation/bill-watch/aws/record`;
39
+ let { data } = await this.server._post<Estimation[]>(path, {}, body);
39
40
  return data;
40
41
  }
41
- async _CreateForRecord(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
+ async _CreateForRecord(user_id: string, body: CalculationOption): Promise<CostRow[]>
42
43
  {
43
- let path = `/application/user/${user_id}/cost/bill-watch/aws/hourly`;
44
- let { data } = await this.server._post<CostRow>(path, {}, body);
44
+ let path = `/application/user/${user_id}/cost/bill-watch/aws/record`;
45
+ let { data } = await this.server._post<CostRow[]>(path, {}, body);
45
46
  return data;
46
47
  }
47
48
  };
@@ -18,11 +18,12 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
+ import { CalculationOption } from "./type/CalculationOption";
21
22
  import { CostRow } from "./row/CostRow";
22
23
  import { Estimation } from "./type/Estimation";
24
+ import { EstimationOption } from "./type/EstimationOption";
23
25
  import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
26
  import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
- import { Period } from "./type/Period";
26
27
 
27
28
  export class NamirasoftCostServerBillWatchAzure extends NamirasoftCostServerBase
28
29
  {
@@ -32,16 +33,16 @@ export class NamirasoftCostServerBillWatchAzure extends NamirasoftCostServerBase
32
33
  this.EstimateRecord = this.EstimateRecord.bind(this);
33
34
  this._CreateForRecord = this._CreateForRecord.bind(this);
34
35
  }
35
- async EstimateRecord(body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean }): Promise<Estimation>
36
+ async EstimateRecord(body: EstimationOption): Promise<Estimation[]>
36
37
  {
37
- let path = `/estimation/bill-watch/azure/hourly`;
38
- let { data } = await this.server._post<Estimation>(path, {}, body);
38
+ let path = `/estimation/bill-watch/azure/record`;
39
+ let { data } = await this.server._post<Estimation[]>(path, {}, body);
39
40
  return data;
40
41
  }
41
- async _CreateForRecord(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
+ async _CreateForRecord(user_id: string, body: CalculationOption): Promise<CostRow[]>
42
43
  {
43
- let path = `/application/user/${user_id}/cost/bill-watch/azure/hourly`;
44
- let { data } = await this.server._post<CostRow>(path, {}, body);
44
+ let path = `/application/user/${user_id}/cost/bill-watch/azure/record`;
45
+ let { data } = await this.server._post<CostRow[]>(path, {}, body);
45
46
  return data;
46
47
  }
47
48
  };
@@ -18,11 +18,12 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
+ import { CalculationOption } from "./type/CalculationOption";
21
22
  import { CostRow } from "./row/CostRow";
22
23
  import { Estimation } from "./type/Estimation";
24
+ import { EstimationOption } from "./type/EstimationOption";
23
25
  import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
26
  import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
- import { Period } from "./type/Period";
26
27
 
27
28
  export class NamirasoftCostServerBillWatchGCP extends NamirasoftCostServerBase
28
29
  {
@@ -32,16 +33,16 @@ export class NamirasoftCostServerBillWatchGCP extends NamirasoftCostServerBase
32
33
  this.EstimateRecord = this.EstimateRecord.bind(this);
33
34
  this._CreateForRecord = this._CreateForRecord.bind(this);
34
35
  }
35
- async EstimateRecord(body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean }): Promise<Estimation>
36
+ async EstimateRecord(body: EstimationOption): Promise<Estimation[]>
36
37
  {
37
- let path = `/estimation/bill-watch/gcp/hourly`;
38
- let { data } = await this.server._post<Estimation>(path, {}, body);
38
+ let path = `/estimation/bill-watch/gcp/record`;
39
+ let { data } = await this.server._post<Estimation[]>(path, {}, body);
39
40
  return data;
40
41
  }
41
- async _CreateForRecord(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
+ async _CreateForRecord(user_id: string, body: CalculationOption): Promise<CostRow[]>
42
43
  {
43
- let path = `/application/user/${user_id}/cost/bill-watch/gcp/hourly`;
44
- let { data } = await this.server._post<CostRow>(path, {}, body);
44
+ let path = `/application/user/${user_id}/cost/bill-watch/gcp/record`;
45
+ let { data } = await this.server._post<CostRow[]>(path, {}, body);
45
46
  return data;
46
47
  }
47
48
  };
@@ -18,7 +18,6 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
- import { CostCreateRow } from "./row/CostCreateRow";
22
21
  import { CostRow } from "./row/CostRow";
23
22
  import { FilterItem } from "namirasoft-core";
24
23
  import { NamirasoftCostServer } from "./NamirasoftCostServer";
@@ -31,7 +30,6 @@ export class NamirasoftCostServerCost extends NamirasoftCostServerBase
31
30
  {
32
31
  super(server);
33
32
  this.List = this.List.bind(this);
34
- this._CreateFor = this._CreateFor.bind(this);
35
33
  }
36
34
  async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: CostRow[], count: number }>
37
35
  {
@@ -41,10 +39,4 @@ export class NamirasoftCostServerCost extends NamirasoftCostServerBase
41
39
  let { data } = await this.server._get<{ rows: CostRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
42
40
  return data;
43
41
  }
44
- async _CreateFor(user_id: string, body: CostCreateRow): Promise<CostRow>
45
- {
46
- let path = `/application/user/${user_id}/cost`;
47
- let { data } = await this.server._post<CostRow>(path, {}, body);
48
- return data;
49
- }
50
42
  };
@@ -18,11 +18,12 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
+ import { CalculationOption } from "./type/CalculationOption";
21
22
  import { CostRow } from "./row/CostRow";
22
23
  import { Estimation } from "./type/Estimation";
24
+ import { EstimationOption } from "./type/EstimationOption";
23
25
  import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
26
  import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
- import { Period } from "./type/Period";
26
27
 
27
28
  export class NamirasoftCostServerFieldCategory extends NamirasoftCostServerBase
28
29
  {
@@ -32,16 +33,16 @@ export class NamirasoftCostServerFieldCategory extends NamirasoftCostServerBase
32
33
  this.EstimateRecord = this.EstimateRecord.bind(this);
33
34
  this._CreateForRecord = this._CreateForRecord.bind(this);
34
35
  }
35
- async EstimateRecord(body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean }): Promise<Estimation>
36
+ async EstimateRecord(body: EstimationOption): Promise<Estimation[]>
36
37
  {
37
- let path = `/estimation/field/category/hourly`;
38
- let { data } = await this.server._post<Estimation>(path, {}, body);
38
+ let path = `/estimation/field/category/record`;
39
+ let { data } = await this.server._post<Estimation[]>(path, {}, body);
39
40
  return data;
40
41
  }
41
- async _CreateForRecord(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
+ async _CreateForRecord(user_id: string, body: CalculationOption): Promise<CostRow[]>
42
43
  {
43
- let path = `/application/user/${user_id}/cost/field/category/hourly`;
44
- let { data } = await this.server._post<CostRow>(path, {}, body);
44
+ let path = `/application/user/${user_id}/cost/field/category/record`;
45
+ let { data } = await this.server._post<CostRow[]>(path, {}, body);
45
46
  return data;
46
47
  }
47
48
  };
@@ -18,11 +18,12 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
+ import { CalculationOption } from "./type/CalculationOption";
21
22
  import { CostRow } from "./row/CostRow";
22
23
  import { Estimation } from "./type/Estimation";
24
+ import { EstimationOption } from "./type/EstimationOption";
23
25
  import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
26
  import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
- import { Period } from "./type/Period";
26
27
 
27
28
  export class NamirasoftCostServerFieldField extends NamirasoftCostServerBase
28
29
  {
@@ -32,16 +33,16 @@ export class NamirasoftCostServerFieldField extends NamirasoftCostServerBase
32
33
  this.EstimateRecord = this.EstimateRecord.bind(this);
33
34
  this._CreateForRecord = this._CreateForRecord.bind(this);
34
35
  }
35
- async EstimateRecord(body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean }): Promise<Estimation>
36
+ async EstimateRecord(body: EstimationOption): Promise<Estimation[]>
36
37
  {
37
- let path = `/estimation/field/field/hourly`;
38
- let { data } = await this.server._post<Estimation>(path, {}, body);
38
+ let path = `/estimation/field/field/record`;
39
+ let { data } = await this.server._post<Estimation[]>(path, {}, body);
39
40
  return data;
40
41
  }
41
- async _CreateForRecord(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
+ async _CreateForRecord(user_id: string, body: CalculationOption): Promise<CostRow[]>
42
43
  {
43
- let path = `/application/user/${user_id}/cost/field/field/hourly`;
44
- let { data } = await this.server._post<CostRow>(path, {}, body);
44
+ let path = `/application/user/${user_id}/cost/field/field/record`;
45
+ let { data } = await this.server._post<CostRow[]>(path, {}, body);
45
46
  return data;
46
47
  }
47
48
  };
@@ -18,11 +18,12 @@
18
18
  /* */
19
19
  /****************************************************************/
20
20
 
21
+ import { CalculationOption } from "./type/CalculationOption";
21
22
  import { CostRow } from "./row/CostRow";
22
23
  import { Estimation } from "./type/Estimation";
24
+ import { EstimationOption } from "./type/EstimationOption";
23
25
  import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
26
  import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
- import { Period } from "./type/Period";
26
27
 
27
28
  export class NamirasoftCostServerSecretSecret extends NamirasoftCostServerBase
28
29
  {
@@ -34,28 +35,28 @@ export class NamirasoftCostServerSecretSecret extends NamirasoftCostServerBase
34
35
  this.EstimateRead = this.EstimateRead.bind(this);
35
36
  this._CreateForRead = this._CreateForRead.bind(this);
36
37
  }
37
- async EstimateRecord(body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean }): Promise<Estimation>
38
+ async EstimateRecord(body: EstimationOption): Promise<Estimation[]>
38
39
  {
39
- let path = `/estimation/secret/secret/hourly`;
40
- let { data } = await this.server._post<Estimation>(path, {}, body);
40
+ let path = `/estimation/secret/secret/record`;
41
+ let { data } = await this.server._post<Estimation[]>(path, {}, body);
41
42
  return data;
42
43
  }
43
- async _CreateForRecord(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
44
+ async _CreateForRecord(user_id: string, body: CalculationOption): Promise<CostRow[]>
44
45
  {
45
- let path = `/application/user/${user_id}/cost/secret/secret/hourly`;
46
- let { data } = await this.server._post<CostRow>(path, {}, body);
46
+ let path = `/application/user/${user_id}/cost/secret/secret/record`;
47
+ let { data } = await this.server._post<CostRow[]>(path, {}, body);
47
48
  return data;
48
49
  }
49
- async EstimateRead(body: { first_entity_created_at: (Date | null), period: Period, total: number, count: number }): Promise<Estimation>
50
+ async EstimateRead(body: EstimationOption): Promise<Estimation[]>
50
51
  {
51
52
  let path = `/estimation/secret/secret/read`;
52
- let { data } = await this.server._post<Estimation>(path, {}, body);
53
+ let { data } = await this.server._post<Estimation[]>(path, {}, body);
53
54
  return data;
54
55
  }
55
- async _CreateForRead(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, total: number, count: number, workspace_id: string, resource_id: string }): Promise<CostRow>
56
+ async _CreateForRead(user_id: string, body: CalculationOption): Promise<CostRow[]>
56
57
  {
57
58
  let path = `/application/user/${user_id}/cost/secret/secret/read`;
58
- let { data } = await this.server._post<CostRow>(path, {}, body);
59
+ let { data } = await this.server._post<CostRow[]>(path, {}, body);
59
60
  return data;
60
61
  }
61
62
  };
@@ -0,0 +1,34 @@
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 { BillWatchAWSEstimateRecordCommand } from "./BillWatchAWSEstimateRecordCommand";
23
+ import { BillWatchAWS_CreateForRecordCommand } from "./BillWatchAWS_CreateForRecordCommand";
24
+
25
+ export class BillWatchAWSCommand extends BaseNavigatorCommand
26
+ {
27
+ constructor(argv: string[])
28
+ {
29
+ super(argv, {
30
+ "estimaterecord": BillWatchAWSEstimateRecordCommand,
31
+ "_createforrecord": BillWatchAWS_CreateForRecordCommand,
32
+ });
33
+ }
34
+ };
@@ -0,0 +1,110 @@
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 BillWatchAWSEstimateRecordCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, [], [
31
+ {
32
+ name: "period",
33
+ short: "",
34
+ description: "Provides the value of 'period' in body",
35
+ optional: false,
36
+ args: ["period"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "total_count",
41
+ short: "",
42
+ description: "Provides the value of 'total_count' in body",
43
+ optional: false,
44
+ args: ["total_count"],
45
+ defaults: [""]
46
+ },
47
+ {
48
+ name: "number",
49
+ short: "",
50
+ description: "Provides the value of 'number' in body",
51
+ optional: false,
52
+ args: ["number"],
53
+ defaults: [""]
54
+ },
55
+ {
56
+ name: "total_value",
57
+ short: "",
58
+ description: "Provides the value of 'total_value' in body",
59
+ optional: false,
60
+ args: ["total_value"],
61
+ defaults: [""]
62
+ },
63
+ {
64
+ name: "value",
65
+ short: "",
66
+ description: "Provides the value of 'value' in body",
67
+ optional: false,
68
+ args: ["value"],
69
+ defaults: [""]
70
+ },
71
+ {
72
+ name: "active",
73
+ short: "",
74
+ description: "Provides the value of 'active' in body",
75
+ optional: false,
76
+ args: ["active"],
77
+ defaults: [""]
78
+ },
79
+ {
80
+ name: "trial_started_at",
81
+ short: "",
82
+ description: "Provides the value of 'trial_started_at' in body",
83
+ optional: true,
84
+ args: ["trial_started_at"],
85
+ defaults: [""]
86
+ }
87
+ ]);
88
+ }
89
+ override async exec()
90
+ {
91
+ let token = this.app.storage.getNSAToken();
92
+ if (token == null)
93
+ throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
94
+ let storage = new IStorageMemoryDedicated();
95
+ let manager = new TokenManager(storage, () => { });
96
+ manager.setValue(token, false);
97
+ let url = this.app.storage.getItem("ns-cost-server-url");
98
+ let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
99
+ let ans = await server.bill_watch_aws.EstimateRecord({
100
+ period: this.option_values.period,
101
+ total_count: this.option_values.total_count,
102
+ number: this.option_values.number,
103
+ total_value: this.option_values.total_value,
104
+ value: this.option_values.value,
105
+ active: this.option_values.active,
106
+ trial_started_at: this.option_values.trial_started_at
107
+ });
108
+ this.app.logger.success(JSON.stringify(ans));
109
+ }
110
+ };