namirasoft-cost 1.4.25 → 1.4.27

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 (220) hide show
  1. package/.ns-sdkg-file-keep +11 -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 +3 -29
  15. package/dist/index.js +3 -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/CalculationOption.d.ts +15 -0
  21. package/dist/type/CalculationOption.js +25 -0
  22. package/dist/type/CalculationOption.js.map +1 -0
  23. package/dist/type/Estimation.d.ts +4 -0
  24. package/dist/type/Estimation.js +22 -0
  25. package/dist/type/Estimation.js.map +1 -1
  26. package/dist/type/EstimationOption.d.ts +4 -0
  27. package/dist/type/EstimationOption.js +20 -0
  28. package/dist/type/EstimationOption.js.map +1 -1
  29. package/dist/type/EstimationUsage.d.ts +4 -0
  30. package/dist/type/EstimationUsage.js +15 -0
  31. package/dist/type/EstimationUsage.js.map +1 -1
  32. package/dist/type/Period.d.ts +4 -0
  33. package/dist/type/Period.js +27 -4
  34. package/dist/type/Period.js.map +1 -1
  35. package/dist/type/SimulationOption.d.ts +13 -0
  36. package/dist/type/SimulationOption.js +23 -0
  37. package/dist/type/SimulationOption.js.map +1 -0
  38. package/package.json +4 -3
  39. package/src/NamirasoftCostServerBillWatchAWS.ts +4 -4
  40. package/src/NamirasoftCostServerBillWatchAzure.ts +4 -4
  41. package/src/NamirasoftCostServerBillWatchGCP.ts +4 -4
  42. package/src/NamirasoftCostServerFieldCategory.ts +4 -4
  43. package/src/NamirasoftCostServerFieldField.ts +4 -4
  44. package/src/NamirasoftCostServerSecretSecret.ts +4 -4
  45. package/src/index.ts +3 -29
  46. package/src/type/Bonus.ts +21 -0
  47. package/src/type/CalculationOption.ts +34 -0
  48. package/src/type/Estimation.ts +24 -3
  49. package/src/type/EstimationOption.ts +22 -2
  50. package/src/type/EstimationUsage.ts +18 -1
  51. package/src/type/Period.ts +27 -3
  52. package/src/type/SimulationOption.ts +30 -0
  53. package/dist/command/BillWatchAWSCommand.d.ts +0 -4
  54. package/dist/command/BillWatchAWSCommand.js +0 -17
  55. package/dist/command/BillWatchAWSCommand.js.map +0 -1
  56. package/dist/command/BillWatchAWSEstimateHourlyCommand.d.ts +0 -5
  57. package/dist/command/BillWatchAWSEstimateHourlyCommand.js +0 -76
  58. package/dist/command/BillWatchAWSEstimateHourlyCommand.js.map +0 -1
  59. package/dist/command/BillWatchAWS_CreateForHourlyCommand.d.ts +0 -5
  60. package/dist/command/BillWatchAWS_CreateForHourlyCommand.js +0 -94
  61. package/dist/command/BillWatchAWS_CreateForHourlyCommand.js.map +0 -1
  62. package/dist/command/BillWatchAzureCommand.d.ts +0 -4
  63. package/dist/command/BillWatchAzureCommand.js +0 -17
  64. package/dist/command/BillWatchAzureCommand.js.map +0 -1
  65. package/dist/command/BillWatchAzureEstimateHourlyCommand.d.ts +0 -5
  66. package/dist/command/BillWatchAzureEstimateHourlyCommand.js +0 -76
  67. package/dist/command/BillWatchAzureEstimateHourlyCommand.js.map +0 -1
  68. package/dist/command/BillWatchAzure_CreateForHourlyCommand.d.ts +0 -5
  69. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js +0 -94
  70. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js.map +0 -1
  71. package/dist/command/BillWatchGCPCommand.d.ts +0 -4
  72. package/dist/command/BillWatchGCPCommand.js +0 -17
  73. package/dist/command/BillWatchGCPCommand.js.map +0 -1
  74. package/dist/command/BillWatchGCPEstimateHourlyCommand.d.ts +0 -5
  75. package/dist/command/BillWatchGCPEstimateHourlyCommand.js +0 -76
  76. package/dist/command/BillWatchGCPEstimateHourlyCommand.js.map +0 -1
  77. package/dist/command/BillWatchGCP_CreateForHourlyCommand.d.ts +0 -5
  78. package/dist/command/BillWatchGCP_CreateForHourlyCommand.js +0 -94
  79. package/dist/command/BillWatchGCP_CreateForHourlyCommand.js.map +0 -1
  80. package/dist/command/CostCommand.d.ts +0 -4
  81. package/dist/command/CostCommand.js +0 -17
  82. package/dist/command/CostCommand.js.map +0 -1
  83. package/dist/command/CostListCommand.d.ts +0 -5
  84. package/dist/command/CostListCommand.js +0 -38
  85. package/dist/command/CostListCommand.js.map +0 -1
  86. package/dist/command/Cost_CreateForCommand.d.ts +0 -5
  87. package/dist/command/Cost_CreateForCommand.js +0 -175
  88. package/dist/command/Cost_CreateForCommand.js.map +0 -1
  89. package/dist/command/FieldCategoryCommand.d.ts +0 -4
  90. package/dist/command/FieldCategoryCommand.js +0 -17
  91. package/dist/command/FieldCategoryCommand.js.map +0 -1
  92. package/dist/command/FieldCategoryEstimateHourlyCommand.d.ts +0 -5
  93. package/dist/command/FieldCategoryEstimateHourlyCommand.js +0 -76
  94. package/dist/command/FieldCategoryEstimateHourlyCommand.js.map +0 -1
  95. package/dist/command/FieldCategory_CreateForHourlyCommand.d.ts +0 -5
  96. package/dist/command/FieldCategory_CreateForHourlyCommand.js +0 -94
  97. package/dist/command/FieldCategory_CreateForHourlyCommand.js.map +0 -1
  98. package/dist/command/FieldFieldCommand.d.ts +0 -4
  99. package/dist/command/FieldFieldCommand.js +0 -17
  100. package/dist/command/FieldFieldCommand.js.map +0 -1
  101. package/dist/command/FieldFieldEstimateHourlyCommand.d.ts +0 -5
  102. package/dist/command/FieldFieldEstimateHourlyCommand.js +0 -76
  103. package/dist/command/FieldFieldEstimateHourlyCommand.js.map +0 -1
  104. package/dist/command/FieldField_CreateForHourlyCommand.d.ts +0 -5
  105. package/dist/command/FieldField_CreateForHourlyCommand.js +0 -94
  106. package/dist/command/FieldField_CreateForHourlyCommand.js.map +0 -1
  107. package/dist/command/HealthzCommand.d.ts +0 -4
  108. package/dist/command/HealthzCommand.js +0 -15
  109. package/dist/command/HealthzCommand.js.map +0 -1
  110. package/dist/command/HealthzGetCommand.d.ts +0 -5
  111. package/dist/command/HealthzGetCommand.js +0 -38
  112. package/dist/command/HealthzGetCommand.js.map +0 -1
  113. package/dist/command/MetricsCommand.d.ts +0 -4
  114. package/dist/command/MetricsCommand.js +0 -15
  115. package/dist/command/MetricsCommand.js.map +0 -1
  116. package/dist/command/MetricsGetCommand.d.ts +0 -5
  117. package/dist/command/MetricsGetCommand.js +0 -38
  118. package/dist/command/MetricsGetCommand.js.map +0 -1
  119. package/dist/command/SecretSecretCommand.d.ts +0 -4
  120. package/dist/command/SecretSecretCommand.js +0 -21
  121. package/dist/command/SecretSecretCommand.js.map +0 -1
  122. package/dist/command/SecretSecretEstimateHourlyCommand.d.ts +0 -5
  123. package/dist/command/SecretSecretEstimateHourlyCommand.js +0 -76
  124. package/dist/command/SecretSecretEstimateHourlyCommand.js.map +0 -1
  125. package/dist/command/SecretSecretEstimateReadCommand.d.ts +0 -5
  126. package/dist/command/SecretSecretEstimateReadCommand.js +0 -76
  127. package/dist/command/SecretSecretEstimateReadCommand.js.map +0 -1
  128. package/dist/command/SecretSecret_CreateForHourlyCommand.d.ts +0 -5
  129. package/dist/command/SecretSecret_CreateForHourlyCommand.js +0 -94
  130. package/dist/command/SecretSecret_CreateForHourlyCommand.js.map +0 -1
  131. package/dist/command/SecretSecret_CreateForReadCommand.d.ts +0 -5
  132. package/dist/command/SecretSecret_CreateForReadCommand.js +0 -94
  133. package/dist/command/SecretSecret_CreateForReadCommand.js.map +0 -1
  134. package/dist/command/ValueCommand.d.ts +0 -4
  135. package/dist/command/ValueCommand.js +0 -15
  136. package/dist/command/ValueCommand.js.map +0 -1
  137. package/dist/command/ValueListCommand.d.ts +0 -5
  138. package/dist/command/ValueListCommand.js +0 -38
  139. package/dist/command/ValueListCommand.js.map +0 -1
  140. package/dist/command/cli.d.ts +0 -2
  141. package/dist/command/cli.js +0 -32
  142. package/dist/command/cli.js.map +0 -1
  143. package/dist/estimator/BillWatchAWSEstimator.d.ts +0 -3
  144. package/dist/estimator/BillWatchAWSEstimator.js +0 -8
  145. package/dist/estimator/BillWatchAWSEstimator.js.map +0 -1
  146. package/dist/estimator/BillWatchAWSHourlyEstimator.d.ts +0 -3
  147. package/dist/estimator/BillWatchAWSHourlyEstimator.js +0 -8
  148. package/dist/estimator/BillWatchAWSHourlyEstimator.js.map +0 -1
  149. package/dist/estimator/BillWatchAzureEstimator.d.ts +0 -3
  150. package/dist/estimator/BillWatchAzureEstimator.js +0 -8
  151. package/dist/estimator/BillWatchAzureEstimator.js.map +0 -1
  152. package/dist/estimator/BillWatchAzureHourlyEstimator.d.ts +0 -3
  153. package/dist/estimator/BillWatchAzureHourlyEstimator.js +0 -8
  154. package/dist/estimator/BillWatchAzureHourlyEstimator.js.map +0 -1
  155. package/dist/estimator/BillWatchBaseEstimator.d.ts +0 -14
  156. package/dist/estimator/BillWatchBaseEstimator.js +0 -26
  157. package/dist/estimator/BillWatchBaseEstimator.js.map +0 -1
  158. package/dist/estimator/BillWatchBaseHourlyEstimator.d.ts +0 -14
  159. package/dist/estimator/BillWatchBaseHourlyEstimator.js +0 -26
  160. package/dist/estimator/BillWatchBaseHourlyEstimator.js.map +0 -1
  161. package/dist/estimator/BillWatchGCPEstimator.d.ts +0 -3
  162. package/dist/estimator/BillWatchGCPEstimator.js +0 -8
  163. package/dist/estimator/BillWatchGCPEstimator.js.map +0 -1
  164. package/dist/estimator/BillWatchGCPHourlyEstimator.d.ts +0 -3
  165. package/dist/estimator/BillWatchGCPHourlyEstimator.js +0 -8
  166. package/dist/estimator/BillWatchGCPHourlyEstimator.js.map +0 -1
  167. package/dist/estimator/FieldBaseEstimator.d.ts +0 -9
  168. package/dist/estimator/FieldBaseEstimator.js +0 -22
  169. package/dist/estimator/FieldBaseEstimator.js.map +0 -1
  170. package/dist/estimator/FieldBaseHourlyEstimator.d.ts +0 -9
  171. package/dist/estimator/FieldBaseHourlyEstimator.js +0 -22
  172. package/dist/estimator/FieldBaseHourlyEstimator.js.map +0 -1
  173. package/dist/estimator/FieldCategoryEstimator.d.ts +0 -8
  174. package/dist/estimator/FieldCategoryEstimator.js +0 -12
  175. package/dist/estimator/FieldCategoryEstimator.js.map +0 -1
  176. package/dist/estimator/FieldCategoryHourlyEstimator.d.ts +0 -8
  177. package/dist/estimator/FieldCategoryHourlyEstimator.js +0 -12
  178. package/dist/estimator/FieldCategoryHourlyEstimator.js.map +0 -1
  179. package/dist/estimator/FieldFieldEstimator.d.ts +0 -8
  180. package/dist/estimator/FieldFieldEstimator.js +0 -12
  181. package/dist/estimator/FieldFieldEstimator.js.map +0 -1
  182. package/dist/estimator/FieldFieldHourlyEstimator.d.ts +0 -8
  183. package/dist/estimator/FieldFieldHourlyEstimator.js +0 -12
  184. package/dist/estimator/FieldFieldHourlyEstimator.js.map +0 -1
  185. package/dist/estimator/SecretSecretEstimator.d.ts +0 -14
  186. package/dist/estimator/SecretSecretEstimator.js +0 -25
  187. package/dist/estimator/SecretSecretEstimator.js.map +0 -1
  188. package/dist/estimator/SecretSecretHourlyEstimator.d.ts +0 -14
  189. package/dist/estimator/SecretSecretHourlyEstimator.js +0 -25
  190. package/dist/estimator/SecretSecretHourlyEstimator.js.map +0 -1
  191. package/src/command/BillWatchAWSCommand.ts +0 -34
  192. package/src/command/BillWatchAWSEstimateHourlyCommand.ts +0 -83
  193. package/src/command/BillWatchAWS_CreateForHourlyCommand.ts +0 -101
  194. package/src/command/BillWatchAzureCommand.ts +0 -34
  195. package/src/command/BillWatchAzureEstimateHourlyCommand.ts +0 -83
  196. package/src/command/BillWatchAzure_CreateForHourlyCommand.ts +0 -101
  197. package/src/command/BillWatchGCPCommand.ts +0 -34
  198. package/src/command/BillWatchGCPEstimateHourlyCommand.ts +0 -83
  199. package/src/command/BillWatchGCP_CreateForHourlyCommand.ts +0 -101
  200. package/src/command/CostCommand.ts +0 -34
  201. package/src/command/CostListCommand.ts +0 -45
  202. package/src/command/Cost_CreateForCommand.ts +0 -182
  203. package/src/command/FieldCategoryCommand.ts +0 -34
  204. package/src/command/FieldCategoryEstimateHourlyCommand.ts +0 -83
  205. package/src/command/FieldCategory_CreateForHourlyCommand.ts +0 -101
  206. package/src/command/FieldFieldCommand.ts +0 -34
  207. package/src/command/FieldFieldEstimateHourlyCommand.ts +0 -83
  208. package/src/command/FieldField_CreateForHourlyCommand.ts +0 -101
  209. package/src/command/HealthzCommand.ts +0 -32
  210. package/src/command/HealthzGetCommand.ts +0 -45
  211. package/src/command/MetricsCommand.ts +0 -32
  212. package/src/command/MetricsGetCommand.ts +0 -45
  213. package/src/command/SecretSecretCommand.ts +0 -38
  214. package/src/command/SecretSecretEstimateHourlyCommand.ts +0 -83
  215. package/src/command/SecretSecretEstimateReadCommand.ts +0 -83
  216. package/src/command/SecretSecret_CreateForHourlyCommand.ts +0 -101
  217. package/src/command/SecretSecret_CreateForReadCommand.ts +0 -101
  218. package/src/command/ValueCommand.ts +0 -32
  219. package/src/command/ValueListCommand.ts +0 -45
  220. package/src/command/cli.ts +0 -51
@@ -1,4 +0,0 @@
1
- import { BaseNavigatorCommand } from "namirasoft-node-cli";
2
- export declare class CostCommand extends BaseNavigatorCommand {
3
- constructor(argv: string[]);
4
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CostCommand = void 0;
4
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
5
- const CostListCommand_1 = require("./CostListCommand");
6
- const Cost_CreateForCommand_1 = require("./Cost_CreateForCommand");
7
- class CostCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
8
- constructor(argv) {
9
- super(argv, {
10
- "list": CostListCommand_1.CostListCommand,
11
- "_createfor": Cost_CreateForCommand_1.Cost_CreateForCommand,
12
- });
13
- }
14
- }
15
- exports.CostCommand = CostCommand;
16
- ;
17
- //# sourceMappingURL=CostCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CostCommand.js","sourceRoot":"","sources":["../../src/command/CostCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,uDAAoD;AACpD,mEAAgE;AAEhE,MAAa,WAAY,SAAQ,0CAAoB;IAEjD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,MAAM,EAAE,iCAAe;YACvB,YAAY,EAAE,6CAAqB;SACtC,CAAC,CAAC;IACP,CAAC;CACJ;AATD,kCASC;AAAA,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseFinalCommand } from "namirasoft-node-cli";
2
- export declare class CostListCommand extends BaseFinalCommand {
3
- constructor(argv: string[]);
4
- exec(): Promise<void>;
5
- }
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CostListCommand = void 0;
13
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
- const namirasoft_core_1 = require("namirasoft-core");
15
- const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
16
- const namirasoft_account_1 = require("namirasoft-account");
17
- class CostListCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
- constructor(argv) {
19
- super(argv, ["filters", "page", "size", "sorts"], []);
20
- }
21
- exec() {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- let token = this.app.storage.getNSAToken();
24
- if (token == null)
25
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
26
- let storage = new namirasoft_core_1.IStorageMemoryDedicated();
27
- let manager = new namirasoft_account_1.TokenManager(storage, () => { });
28
- manager.setValue(token, false);
29
- let url = this.app.storage.getItem("ns-cost-server-url");
30
- let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
31
- let ans = yield server.cost.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3]);
32
- this.app.logger.success(JSON.stringify(ans));
33
- });
34
- }
35
- }
36
- exports.CostListCommand = CostListCommand;
37
- ;
38
- //# sourceMappingURL=CostListCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CostListCommand.js","sourceRoot":"","sources":["../../src/command/CostListCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,eAAgB,SAAQ,sCAAgB;IAEjD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;IAC1D,CAAC;IACc,IAAI;;YAEf,IAAI,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;YAC3C,IAAI,KAAK,IAAI,IAAI;gBACb,MAAM,IAAI,KAAK,CAAC,yGAAyG,CAAC,CAAC;YAC/H,IAAI,OAAO,GAAG,IAAI,yCAAuB,EAAE,CAAC;YAC5C,IAAI,OAAO,GAAG,IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;YACzD,IAAI,MAAM,GAAG,IAAI,2CAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3F,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YACjH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAnBD,0CAmBC;AAAA,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseFinalCommand } from "namirasoft-node-cli";
2
- export declare class Cost_CreateForCommand extends BaseFinalCommand {
3
- constructor(argv: string[]);
4
- exec(): Promise<void>;
5
- }
@@ -1,175 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.Cost_CreateForCommand = void 0;
13
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
- const namirasoft_core_1 = require("namirasoft-core");
15
- const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
16
- const namirasoft_account_1 = require("namirasoft-account");
17
- class Cost_CreateForCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
- constructor(argv) {
19
- super(argv, ["user_id"], [
20
- {
21
- name: "workspace_id",
22
- short: "",
23
- description: "Provides the value of 'workspace_id' in body",
24
- optional: false,
25
- args: ["workspace_id"],
26
- defaults: [""]
27
- },
28
- {
29
- name: "product_id",
30
- short: "",
31
- description: "Provides the value of 'product_id' in body",
32
- optional: false,
33
- args: ["product_id"],
34
- defaults: [""]
35
- },
36
- {
37
- name: "sales_item_id",
38
- short: "",
39
- description: "Provides the value of 'sales_item_id' in body",
40
- optional: false,
41
- args: ["sales_item_id"],
42
- defaults: [""]
43
- },
44
- {
45
- name: "offer_id",
46
- short: "",
47
- description: "Provides the value of 'offer_id' in body",
48
- optional: false,
49
- args: ["offer_id"],
50
- defaults: [""]
51
- },
52
- {
53
- name: "offer_item_id",
54
- short: "",
55
- description: "Provides the value of 'offer_item_id' in body",
56
- optional: false,
57
- args: ["offer_item_id"],
58
- defaults: [""]
59
- },
60
- {
61
- name: "resource_entity",
62
- short: "",
63
- description: "Provides the value of 'resource_entity' in body",
64
- optional: false,
65
- args: ["resource_entity"],
66
- defaults: [""]
67
- },
68
- {
69
- name: "resource_id",
70
- short: "",
71
- description: "Provides the value of 'resource_id' in body",
72
- optional: false,
73
- args: ["resource_id"],
74
- defaults: [""]
75
- },
76
- {
77
- name: "usage_name",
78
- short: "",
79
- description: "Provides the value of 'usage_name' in body",
80
- optional: false,
81
- args: ["usage_name"],
82
- defaults: [""]
83
- },
84
- {
85
- name: "usage_value",
86
- short: "",
87
- description: "Provides the value of 'usage_value' in body",
88
- optional: false,
89
- args: ["usage_value"],
90
- defaults: [""]
91
- },
92
- {
93
- name: "usage_unit",
94
- short: "",
95
- description: "Provides the value of 'usage_unit' in body",
96
- optional: false,
97
- args: ["usage_unit"],
98
- defaults: [""]
99
- },
100
- {
101
- name: "period_start",
102
- short: "",
103
- description: "Provides the value of 'period_start' in body",
104
- optional: false,
105
- args: ["period_start"],
106
- defaults: [""]
107
- },
108
- {
109
- name: "period_end",
110
- short: "",
111
- description: "Provides the value of 'period_end' in body",
112
- optional: false,
113
- args: ["period_end"],
114
- defaults: [""]
115
- },
116
- {
117
- name: "amount",
118
- short: "",
119
- description: "Provides the value of 'amount' in body",
120
- optional: false,
121
- args: ["amount"],
122
- defaults: [""]
123
- },
124
- {
125
- name: "currency",
126
- short: "",
127
- description: "Provides the value of 'currency' in body",
128
- optional: false,
129
- args: ["currency"],
130
- defaults: [""]
131
- },
132
- {
133
- name: "description",
134
- short: "",
135
- description: "Provides the value of 'description' in body",
136
- optional: false,
137
- args: ["description"],
138
- defaults: [""]
139
- }
140
- ]);
141
- }
142
- exec() {
143
- return __awaiter(this, void 0, void 0, function* () {
144
- let token = this.app.storage.getNSAToken();
145
- if (token == null)
146
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
147
- let storage = new namirasoft_core_1.IStorageMemoryDedicated();
148
- let manager = new namirasoft_account_1.TokenManager(storage, () => { });
149
- manager.setValue(token, false);
150
- let url = this.app.storage.getItem("ns-cost-server-url");
151
- let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
152
- let ans = yield server.cost._CreateFor(this.arg_values[0], {
153
- workspace_id: this.option_values.workspace_id,
154
- product_id: this.option_values.product_id,
155
- sales_item_id: this.option_values.sales_item_id,
156
- offer_id: this.option_values.offer_id,
157
- offer_item_id: this.option_values.offer_item_id,
158
- resource_entity: this.option_values.resource_entity,
159
- resource_id: this.option_values.resource_id,
160
- usage_name: this.option_values.usage_name,
161
- usage_value: this.option_values.usage_value,
162
- usage_unit: this.option_values.usage_unit,
163
- period_start: this.option_values.period_start,
164
- period_end: this.option_values.period_end,
165
- amount: this.option_values.amount,
166
- currency: this.option_values.currency,
167
- description: this.option_values.description
168
- });
169
- this.app.logger.success(JSON.stringify(ans));
170
- });
171
- }
172
- }
173
- exports.Cost_CreateForCommand = Cost_CreateForCommand;
174
- ;
175
- //# sourceMappingURL=Cost_CreateForCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Cost_CreateForCommand.js","sourceRoot":"","sources":["../../src/command/Cost_CreateForCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,qBAAsB,SAAQ,sCAAgB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE;YACrB;gBACI,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,8CAA8C;gBAC3D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,cAAc,CAAC;gBACtB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,YAAY,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,eAAe;gBACrB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,+CAA+C;gBAC5D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,eAAe,CAAC;gBACvB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;g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gBACjC,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ;gBACrC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;aAC9C,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AA5JD,sDA4JC;AAAA,CAAC"}
@@ -1,4 +0,0 @@
1
- import { BaseNavigatorCommand } from "namirasoft-node-cli";
2
- export declare class FieldCategoryCommand extends BaseNavigatorCommand {
3
- constructor(argv: string[]);
4
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldCategoryCommand = void 0;
4
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
5
- const FieldCategoryEstimateHourlyCommand_1 = require("./FieldCategoryEstimateHourlyCommand");
6
- const FieldCategory_CreateForHourlyCommand_1 = require("./FieldCategory_CreateForHourlyCommand");
7
- class FieldCategoryCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
8
- constructor(argv) {
9
- super(argv, {
10
- "estimatehourly": FieldCategoryEstimateHourlyCommand_1.FieldCategoryEstimateHourlyCommand,
11
- "_createforhourly": FieldCategory_CreateForHourlyCommand_1.FieldCategory_CreateForHourlyCommand,
12
- });
13
- }
14
- }
15
- exports.FieldCategoryCommand = FieldCategoryCommand;
16
- ;
17
- //# sourceMappingURL=FieldCategoryCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldCategoryCommand.js","sourceRoot":"","sources":["../../src/command/FieldCategoryCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,6FAA0F;AAC1F,iGAA8F;AAE9F,MAAa,oBAAqB,SAAQ,0CAAoB;IAE1D,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,gBAAgB,EAAE,uEAAkC;YACpD,kBAAkB,EAAE,2EAAoC;SAC3D,CAAC,CAAC;IACP,CAAC;CACJ;AATD,oDASC;AAAA,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseFinalCommand } from "namirasoft-node-cli";
2
- export declare class FieldCategoryEstimateHourlyCommand extends BaseFinalCommand {
3
- constructor(argv: string[]);
4
- exec(): Promise<void>;
5
- }
@@ -1,76 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FieldCategoryEstimateHourlyCommand = void 0;
13
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
- const namirasoft_core_1 = require("namirasoft-core");
15
- const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
16
- const namirasoft_account_1 = require("namirasoft-account");
17
- class FieldCategoryEstimateHourlyCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
- constructor(argv) {
19
- super(argv, [], [
20
- {
21
- name: "first_entity_created_at",
22
- short: "",
23
- description: "Provides the value of 'first_entity_created_at' in body",
24
- optional: true,
25
- args: ["first_entity_created_at"],
26
- defaults: [""]
27
- },
28
- {
29
- name: "period",
30
- short: "",
31
- description: "Provides the value of 'period' in body",
32
- optional: false,
33
- args: ["period"],
34
- defaults: [""]
35
- },
36
- {
37
- name: "row_number",
38
- short: "",
39
- description: "Provides the value of 'row_number' in body",
40
- optional: false,
41
- args: ["row_number"],
42
- defaults: [""]
43
- },
44
- {
45
- name: "active",
46
- short: "",
47
- description: "Provides the value of 'active' in body",
48
- optional: false,
49
- args: ["active"],
50
- defaults: [""]
51
- }
52
- ]);
53
- }
54
- exec() {
55
- return __awaiter(this, void 0, void 0, function* () {
56
- let token = this.app.storage.getNSAToken();
57
- if (token == null)
58
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
59
- let storage = new namirasoft_core_1.IStorageMemoryDedicated();
60
- let manager = new namirasoft_account_1.TokenManager(storage, () => { });
61
- manager.setValue(token, false);
62
- let url = this.app.storage.getItem("ns-cost-server-url");
63
- let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
64
- let ans = yield server.field_category.EstimateHourly({
65
- first_entity_created_at: this.option_values.first_entity_created_at,
66
- period: this.option_values.period,
67
- row_number: this.option_values.row_number,
68
- active: this.option_values.active
69
- });
70
- this.app.logger.success(JSON.stringify(ans));
71
- });
72
- }
73
- }
74
- exports.FieldCategoryEstimateHourlyCommand = FieldCategoryEstimateHourlyCommand;
75
- ;
76
- //# sourceMappingURL=FieldCategoryEstimateHourlyCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldCategoryEstimateHourlyCommand.js","sourceRoot":"","sources":["../../src/command/FieldCategoryEstimateHourlyCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,kCAAmC,SAAQ,sCAAgB;IAEpE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,yBAAyB;gBAC/B,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,yDAAyD;gBACtE,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,yBAAyB,CAAC;gBACjC,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,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AE,IAAI,CAAC,aAAa,CAAC,uBAAuB;gBACnE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU;gBACzC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;aACpC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAzDD,gFAyDC;AAAA,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseFinalCommand } from "namirasoft-node-cli";
2
- export declare class FieldCategory_CreateForHourlyCommand extends BaseFinalCommand {
3
- constructor(argv: string[]);
4
- exec(): Promise<void>;
5
- }
@@ -1,94 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FieldCategory_CreateForHourlyCommand = void 0;
13
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
- const namirasoft_core_1 = require("namirasoft-core");
15
- const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
16
- const namirasoft_account_1 = require("namirasoft-account");
17
- class FieldCategory_CreateForHourlyCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
- constructor(argv) {
19
- super(argv, ["user_id"], [
20
- {
21
- name: "first_entity_created_at",
22
- short: "",
23
- description: "Provides the value of 'first_entity_created_at' in body",
24
- optional: true,
25
- args: ["first_entity_created_at"],
26
- defaults: [""]
27
- },
28
- {
29
- name: "period",
30
- short: "",
31
- description: "Provides the value of 'period' in body",
32
- optional: false,
33
- args: ["period"],
34
- defaults: [""]
35
- },
36
- {
37
- name: "row_number",
38
- short: "",
39
- description: "Provides the value of 'row_number' in body",
40
- optional: false,
41
- args: ["row_number"],
42
- defaults: [""]
43
- },
44
- {
45
- name: "active",
46
- short: "",
47
- description: "Provides the value of 'active' in body",
48
- optional: false,
49
- args: ["active"],
50
- defaults: [""]
51
- },
52
- {
53
- name: "workspace_id",
54
- short: "",
55
- description: "Provides the value of 'workspace_id' in body",
56
- optional: false,
57
- args: ["workspace_id"],
58
- defaults: [""]
59
- },
60
- {
61
- name: "resource_id",
62
- short: "",
63
- description: "Provides the value of 'resource_id' in body",
64
- optional: false,
65
- args: ["resource_id"],
66
- defaults: [""]
67
- }
68
- ]);
69
- }
70
- exec() {
71
- return __awaiter(this, void 0, void 0, function* () {
72
- let token = this.app.storage.getNSAToken();
73
- if (token == null)
74
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
75
- let storage = new namirasoft_core_1.IStorageMemoryDedicated();
76
- let manager = new namirasoft_account_1.TokenManager(storage, () => { });
77
- manager.setValue(token, false);
78
- let url = this.app.storage.getItem("ns-cost-server-url");
79
- let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
80
- let ans = yield server.field_category._CreateForHourly(this.arg_values[0], {
81
- first_entity_created_at: this.option_values.first_entity_created_at,
82
- period: this.option_values.period,
83
- row_number: this.option_values.row_number,
84
- active: this.option_values.active,
85
- workspace_id: this.option_values.workspace_id,
86
- resource_id: this.option_values.resource_id
87
- });
88
- this.app.logger.success(JSON.stringify(ans));
89
- });
90
- }
91
- }
92
- exports.FieldCategory_CreateForHourlyCommand = FieldCategory_CreateForHourlyCommand;
93
- ;
94
- //# sourceMappingURL=FieldCategory_CreateForHourlyCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldCategory_CreateForHourlyCommand.js","sourceRoot":"","sources":["../../src/command/FieldCategory_CreateForHourlyCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,oCAAqC,SAAQ,sCAAgB;IAEtE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE;YACrB;gBACI,IAAI,EAAE,yBAAyB;gBAC/B,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,yDAAyD;gBACtE,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,yBAAyB,CAAC;gBACjC,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,YAAY;gBAClB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,4CAA4C;gBACzD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,YAAY,CAAC;gBACpB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,8CAA8C;gBAC3D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,cAAc,CAAC;gBACtB,QAAQ,EAAE,CAAC,EA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CAAC,YAAY;gBAC7C,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;aAC9C,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AA3ED,oFA2EC;AAAA,CAAC"}
@@ -1,4 +0,0 @@
1
- import { BaseNavigatorCommand } from "namirasoft-node-cli";
2
- export declare class FieldFieldCommand extends BaseNavigatorCommand {
3
- constructor(argv: string[]);
4
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FieldFieldCommand = void 0;
4
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
5
- const FieldFieldEstimateHourlyCommand_1 = require("./FieldFieldEstimateHourlyCommand");
6
- const FieldField_CreateForHourlyCommand_1 = require("./FieldField_CreateForHourlyCommand");
7
- class FieldFieldCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
8
- constructor(argv) {
9
- super(argv, {
10
- "estimatehourly": FieldFieldEstimateHourlyCommand_1.FieldFieldEstimateHourlyCommand,
11
- "_createforhourly": FieldField_CreateForHourlyCommand_1.FieldField_CreateForHourlyCommand,
12
- });
13
- }
14
- }
15
- exports.FieldFieldCommand = FieldFieldCommand;
16
- ;
17
- //# sourceMappingURL=FieldFieldCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldFieldCommand.js","sourceRoot":"","sources":["../../src/command/FieldFieldCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,uFAAoF;AACpF,2FAAwF;AAExF,MAAa,iBAAkB,SAAQ,0CAAoB;IAEvD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,gBAAgB,EAAE,iEAA+B;YACjD,kBAAkB,EAAE,qEAAiC;SACxD,CAAC,CAAC;IACP,CAAC;CACJ;AATD,8CASC;AAAA,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseFinalCommand } from "namirasoft-node-cli";
2
- export declare class FieldFieldEstimateHourlyCommand extends BaseFinalCommand {
3
- constructor(argv: string[]);
4
- exec(): Promise<void>;
5
- }
@@ -1,76 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FieldFieldEstimateHourlyCommand = void 0;
13
- const namirasoft_node_cli_1 = require("namirasoft-node-cli");
14
- const namirasoft_core_1 = require("namirasoft-core");
15
- const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
16
- const namirasoft_account_1 = require("namirasoft-account");
17
- class FieldFieldEstimateHourlyCommand extends namirasoft_node_cli_1.BaseFinalCommand {
18
- constructor(argv) {
19
- super(argv, [], [
20
- {
21
- name: "first_entity_created_at",
22
- short: "",
23
- description: "Provides the value of 'first_entity_created_at' in body",
24
- optional: true,
25
- args: ["first_entity_created_at"],
26
- defaults: [""]
27
- },
28
- {
29
- name: "period",
30
- short: "",
31
- description: "Provides the value of 'period' in body",
32
- optional: false,
33
- args: ["period"],
34
- defaults: [""]
35
- },
36
- {
37
- name: "row_number",
38
- short: "",
39
- description: "Provides the value of 'row_number' in body",
40
- optional: false,
41
- args: ["row_number"],
42
- defaults: [""]
43
- },
44
- {
45
- name: "active",
46
- short: "",
47
- description: "Provides the value of 'active' in body",
48
- optional: false,
49
- args: ["active"],
50
- defaults: [""]
51
- }
52
- ]);
53
- }
54
- exec() {
55
- return __awaiter(this, void 0, void 0, function* () {
56
- let token = this.app.storage.getNSAToken();
57
- if (token == null)
58
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
59
- let storage = new namirasoft_core_1.IStorageMemoryDedicated();
60
- let manager = new namirasoft_account_1.TokenManager(storage, () => { });
61
- manager.setValue(token, false);
62
- let url = this.app.storage.getItem("ns-cost-server-url");
63
- let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
64
- let ans = yield server.field_field.EstimateHourly({
65
- first_entity_created_at: this.option_values.first_entity_created_at,
66
- period: this.option_values.period,
67
- row_number: this.option_values.row_number,
68
- active: this.option_values.active
69
- });
70
- this.app.logger.success(JSON.stringify(ans));
71
- });
72
- }
73
- }
74
- exports.FieldFieldEstimateHourlyCommand = FieldFieldEstimateHourlyCommand;
75
- ;
76
- //# sourceMappingURL=FieldFieldEstimateHourlyCommand.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FieldFieldEstimateHourlyCommand.js","sourceRoot":"","sources":["../../src/command/FieldFieldEstimateHourlyCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,+BAAgC,SAAQ,sCAAgB;IAEjE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,yBAAyB;gBAC/B,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,yDAAyD;gBACtE,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE,CAAC,yBAAyB,CAAC;gBACjC,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,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AAC,MAAM;gBACjC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,UAAU;gBACzC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;aACpC,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AAzDD,0EAyDC;AAAA,CAAC"}
@@ -1,5 +0,0 @@
1
- import { BaseFinalCommand } from "namirasoft-node-cli";
2
- export declare class FieldField_CreateForHourlyCommand extends BaseFinalCommand {
3
- constructor(argv: string[]);
4
- exec(): Promise<void>;
5
- }