namirasoft-cost 1.4.19 → 1.4.21

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 (129) hide show
  1. package/dist/NamirasoftCostServer.d.ts +2 -0
  2. package/dist/NamirasoftCostServer.js +3 -1
  3. package/dist/NamirasoftCostServer.js.map +1 -1
  4. package/dist/NamirasoftCostServerBillWatchAWS.d.ts +4 -4
  5. package/dist/NamirasoftCostServerBillWatchAWS.js +6 -6
  6. package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
  7. package/dist/NamirasoftCostServerBillWatchAzure.d.ts +4 -4
  8. package/dist/NamirasoftCostServerBillWatchAzure.js +6 -6
  9. package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
  10. package/dist/NamirasoftCostServerBillWatchGCP.d.ts +4 -4
  11. package/dist/NamirasoftCostServerBillWatchGCP.js +6 -6
  12. package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
  13. package/dist/NamirasoftCostServerFieldCategory.d.ts +4 -4
  14. package/dist/NamirasoftCostServerFieldCategory.js +6 -6
  15. package/dist/NamirasoftCostServerFieldCategory.js.map +1 -1
  16. package/dist/NamirasoftCostServerFieldField.d.ts +4 -4
  17. package/dist/NamirasoftCostServerFieldField.js +6 -6
  18. package/dist/NamirasoftCostServerFieldField.js.map +1 -1
  19. package/dist/NamirasoftCostServerSecretSecret.d.ts +36 -0
  20. package/dist/NamirasoftCostServerSecretSecret.js +53 -0
  21. package/dist/NamirasoftCostServerSecretSecret.js.map +1 -0
  22. package/dist/TimeUtil.js +18 -11
  23. package/dist/TimeUtil.js.map +1 -1
  24. package/dist/command/BillWatchAWSCommand.js +4 -4
  25. package/dist/command/BillWatchAWSCommand.js.map +1 -1
  26. package/dist/command/{BillWatchAWSEstimationCommand.d.ts → BillWatchAWSEstimateHourlyCommand.d.ts} +1 -1
  27. package/dist/command/{BillWatchAWSEstimationCommand.js → BillWatchAWSEstimateHourlyCommand.js} +15 -15
  28. package/dist/command/BillWatchAWSEstimateHourlyCommand.js.map +1 -0
  29. package/dist/command/BillWatchAWS_CreateForHourlyCommand.d.ts +5 -0
  30. package/dist/command/{FieldCategory_CreateForCommand.js → BillWatchAWS_CreateForHourlyCommand.js} +14 -14
  31. package/dist/command/BillWatchAWS_CreateForHourlyCommand.js.map +1 -0
  32. package/dist/command/BillWatchAzureCommand.js +4 -4
  33. package/dist/command/BillWatchAzureCommand.js.map +1 -1
  34. package/dist/command/BillWatchAzureEstimateHourlyCommand.d.ts +5 -0
  35. package/dist/command/BillWatchAzureEstimateHourlyCommand.js +76 -0
  36. package/dist/command/BillWatchAzureEstimateHourlyCommand.js.map +1 -0
  37. package/dist/command/BillWatchAzure_CreateForHourlyCommand.d.ts +5 -0
  38. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js +94 -0
  39. package/dist/command/BillWatchAzure_CreateForHourlyCommand.js.map +1 -0
  40. package/dist/command/BillWatchGCPCommand.js +4 -4
  41. package/dist/command/BillWatchGCPCommand.js.map +1 -1
  42. package/dist/command/{BillWatchAWS_CreateForCommand.d.ts → BillWatchGCPEstimateHourlyCommand.d.ts} +1 -1
  43. package/dist/command/{BillWatchGCPEstimationCommand.js → BillWatchGCPEstimateHourlyCommand.js} +15 -15
  44. package/dist/command/BillWatchGCPEstimateHourlyCommand.js.map +1 -0
  45. package/dist/command/BillWatchGCP_CreateForHourlyCommand.d.ts +5 -0
  46. package/dist/command/{BillWatchAzure_CreateForCommand.js → BillWatchGCP_CreateForHourlyCommand.js} +14 -14
  47. package/dist/command/BillWatchGCP_CreateForHourlyCommand.js.map +1 -0
  48. package/dist/command/FieldCategoryCommand.js +4 -4
  49. package/dist/command/FieldCategoryCommand.js.map +1 -1
  50. package/dist/command/FieldCategoryEstimateHourlyCommand.d.ts +5 -0
  51. package/dist/command/FieldCategoryEstimateHourlyCommand.js +76 -0
  52. package/dist/command/FieldCategoryEstimateHourlyCommand.js.map +1 -0
  53. package/dist/command/FieldCategory_CreateForHourlyCommand.d.ts +5 -0
  54. package/dist/command/FieldCategory_CreateForHourlyCommand.js +94 -0
  55. package/dist/command/FieldCategory_CreateForHourlyCommand.js.map +1 -0
  56. package/dist/command/FieldFieldCommand.js +4 -4
  57. package/dist/command/FieldFieldCommand.js.map +1 -1
  58. package/dist/command/{BillWatchAzureEstimationCommand.d.ts → FieldFieldEstimateHourlyCommand.d.ts} +1 -1
  59. package/dist/command/{BillWatchAzureEstimationCommand.js → FieldFieldEstimateHourlyCommand.js} +15 -15
  60. package/dist/command/{BillWatchAzureEstimationCommand.js.map → FieldFieldEstimateHourlyCommand.js.map} +1 -1
  61. package/dist/command/FieldField_CreateForHourlyCommand.d.ts +5 -0
  62. package/dist/command/{BillWatchAWS_CreateForCommand.js → FieldField_CreateForHourlyCommand.js} +14 -14
  63. package/dist/command/FieldField_CreateForHourlyCommand.js.map +1 -0
  64. package/dist/command/SecretSecretCommand.d.ts +4 -0
  65. package/dist/command/SecretSecretCommand.js +21 -0
  66. package/dist/command/SecretSecretCommand.js.map +1 -0
  67. package/dist/command/SecretSecretEstimateHourlyCommand.d.ts +5 -0
  68. package/dist/command/{FieldCategoryEstimationCommand.js → SecretSecretEstimateHourlyCommand.js} +15 -15
  69. package/dist/command/SecretSecretEstimateHourlyCommand.js.map +1 -0
  70. package/dist/command/{BillWatchAzure_CreateForCommand.d.ts → SecretSecretEstimateReadCommand.d.ts} +1 -1
  71. package/dist/command/{FieldFieldEstimationCommand.js → SecretSecretEstimateReadCommand.js} +17 -17
  72. package/dist/command/SecretSecretEstimateReadCommand.js.map +1 -0
  73. package/dist/command/SecretSecret_CreateForHourlyCommand.d.ts +5 -0
  74. package/dist/command/{BillWatchGCP_CreateForCommand.js → SecretSecret_CreateForHourlyCommand.js} +14 -14
  75. package/dist/command/SecretSecret_CreateForHourlyCommand.js.map +1 -0
  76. package/dist/command/SecretSecret_CreateForReadCommand.d.ts +5 -0
  77. package/dist/command/{FieldField_CreateForCommand.js → SecretSecret_CreateForReadCommand.js} +16 -16
  78. package/dist/command/SecretSecret_CreateForReadCommand.js.map +1 -0
  79. package/dist/command/cli.js +2 -0
  80. package/dist/command/cli.js.map +1 -1
  81. package/dist/index.d.ts +16 -10
  82. package/dist/index.js +16 -10
  83. package/dist/index.js.map +1 -1
  84. package/package.json +2 -2
  85. package/src/NamirasoftCostServer.ts +4 -1
  86. package/src/NamirasoftCostServerBillWatchAWS.ts +6 -6
  87. package/src/NamirasoftCostServerBillWatchAzure.ts +6 -6
  88. package/src/NamirasoftCostServerBillWatchGCP.ts +6 -6
  89. package/src/NamirasoftCostServerFieldCategory.ts +6 -6
  90. package/src/NamirasoftCostServerFieldField.ts +6 -6
  91. package/src/NamirasoftCostServerSecretSecret.ts +61 -0
  92. package/src/TimeUtil.ts +20 -10
  93. package/src/command/BillWatchAWSCommand.ts +4 -4
  94. package/src/command/{FieldCategoryEstimationCommand.ts → BillWatchAWSEstimateHourlyCommand.ts} +12 -12
  95. package/src/command/{FieldCategory_CreateForCommand.ts → BillWatchAWS_CreateForHourlyCommand.ts} +11 -11
  96. package/src/command/BillWatchAzureCommand.ts +4 -4
  97. package/src/command/BillWatchAzureEstimateHourlyCommand.ts +83 -0
  98. package/src/command/BillWatchAzure_CreateForHourlyCommand.ts +101 -0
  99. package/src/command/BillWatchGCPCommand.ts +4 -4
  100. package/src/command/{BillWatchGCPEstimationCommand.ts → BillWatchGCPEstimateHourlyCommand.ts} +12 -12
  101. package/src/command/{BillWatchAzure_CreateForCommand.ts → BillWatchGCP_CreateForHourlyCommand.ts} +11 -11
  102. package/src/command/FieldCategoryCommand.ts +4 -4
  103. package/src/command/FieldCategoryEstimateHourlyCommand.ts +83 -0
  104. package/src/command/FieldCategory_CreateForHourlyCommand.ts +101 -0
  105. package/src/command/FieldFieldCommand.ts +4 -4
  106. package/src/command/{BillWatchAzureEstimationCommand.ts → FieldFieldEstimateHourlyCommand.ts} +12 -12
  107. package/src/command/{BillWatchGCP_CreateForCommand.ts → FieldField_CreateForHourlyCommand.ts} +11 -11
  108. package/src/command/SecretSecretCommand.ts +38 -0
  109. package/src/command/{BillWatchAWSEstimationCommand.ts → SecretSecretEstimateHourlyCommand.ts} +12 -12
  110. package/src/command/{FieldFieldEstimationCommand.ts → SecretSecretEstimateReadCommand.ts} +14 -14
  111. package/src/command/{BillWatchAWS_CreateForCommand.ts → SecretSecret_CreateForHourlyCommand.ts} +11 -11
  112. package/src/command/{FieldField_CreateForCommand.ts → SecretSecret_CreateForReadCommand.ts} +13 -13
  113. package/src/command/cli.ts +2 -0
  114. package/src/index.ts +16 -10
  115. package/dist/command/BillWatchAWSEstimationCommand.js.map +0 -1
  116. package/dist/command/BillWatchAWS_CreateForCommand.js.map +0 -1
  117. package/dist/command/BillWatchAzure_CreateForCommand.js.map +0 -1
  118. package/dist/command/BillWatchGCPEstimationCommand.d.ts +0 -5
  119. package/dist/command/BillWatchGCPEstimationCommand.js.map +0 -1
  120. package/dist/command/BillWatchGCP_CreateForCommand.d.ts +0 -5
  121. package/dist/command/BillWatchGCP_CreateForCommand.js.map +0 -1
  122. package/dist/command/FieldCategoryEstimationCommand.d.ts +0 -5
  123. package/dist/command/FieldCategoryEstimationCommand.js.map +0 -1
  124. package/dist/command/FieldCategory_CreateForCommand.d.ts +0 -5
  125. package/dist/command/FieldCategory_CreateForCommand.js.map +0 -1
  126. package/dist/command/FieldFieldEstimationCommand.d.ts +0 -5
  127. package/dist/command/FieldFieldEstimationCommand.js.map +0 -1
  128. package/dist/command/FieldField_CreateForCommand.d.ts +0 -5
  129. package/dist/command/FieldField_CreateForCommand.js.map +0 -1
@@ -23,7 +23,7 @@ import { IStorageMemoryDedicated } from "namirasoft-core";
23
23
  import { NamirasoftCostServer } from "../NamirasoftCostServer";
24
24
  import { TokenManager } from "namirasoft-account";
25
25
 
26
- export class FieldCategory_CreateForCommand extends BaseFinalCommand
26
+ export class BillWatchAWS_CreateForHourlyCommand extends BaseFinalCommand
27
27
  {
28
28
  constructor(argv: string[])
29
29
  {
@@ -36,6 +36,14 @@ export class FieldCategory_CreateForCommand extends BaseFinalCommand
36
36
  args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
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
+ },
39
47
  {
40
48
  name: "row_number",
41
49
  short: "",
@@ -52,14 +60,6 @@ export class FieldCategory_CreateForCommand extends BaseFinalCommand
52
60
  args: ["active"],
53
61
  defaults: [""]
54
62
  },
55
- {
56
- name: "period",
57
- short: "",
58
- description: "Provides the value of 'period' in body",
59
- optional: false,
60
- args: ["period"],
61
- defaults: [""]
62
- },
63
63
  {
64
64
  name: "workspace_id",
65
65
  short: "",
@@ -88,11 +88,11 @@ export class FieldCategory_CreateForCommand extends BaseFinalCommand
88
88
  manager.setValue(token, false);
89
89
  let url = this.app.storage.getItem("ns-cost-server-url");
90
90
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
91
- let ans = await server.field_category._CreateFor(this.arg_values[0], {
91
+ let ans = await server.bill_watch_aws._CreateForHourly(this.arg_values[0], {
92
92
  first_entity_created_at: this.option_values.first_entity_created_at,
93
+ period: this.option_values.period,
93
94
  row_number: this.option_values.row_number,
94
95
  active: this.option_values.active,
95
- period: this.option_values.period,
96
96
  workspace_id: this.option_values.workspace_id,
97
97
  resource_id: this.option_values.resource_id
98
98
  });
@@ -19,16 +19,16 @@
19
19
  /****************************************************************/
20
20
 
21
21
  import { BaseNavigatorCommand } from "namirasoft-node-cli";
22
- import { BillWatchAzureEstimationCommand } from "./BillWatchAzureEstimationCommand";
23
- import { BillWatchAzure_CreateForCommand } from "./BillWatchAzure_CreateForCommand";
22
+ import { BillWatchAzureEstimateHourlyCommand } from "./BillWatchAzureEstimateHourlyCommand";
23
+ import { BillWatchAzure_CreateForHourlyCommand } from "./BillWatchAzure_CreateForHourlyCommand";
24
24
 
25
25
  export class BillWatchAzureCommand extends BaseNavigatorCommand
26
26
  {
27
27
  constructor(argv: string[])
28
28
  {
29
29
  super(argv, {
30
- "estimation": BillWatchAzureEstimationCommand,
31
- "_createfor": BillWatchAzure_CreateForCommand,
30
+ "estimatehourly": BillWatchAzureEstimateHourlyCommand,
31
+ "_createforhourly": BillWatchAzure_CreateForHourlyCommand,
32
32
  });
33
33
  }
34
34
  };
@@ -0,0 +1,83 @@
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 BillWatchAzureEstimateHourlyCommand 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_azure.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
+ };
@@ -0,0 +1,101 @@
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 BillWatchAzure_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_azure._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
+ };
@@ -19,16 +19,16 @@
19
19
  /****************************************************************/
20
20
 
21
21
  import { BaseNavigatorCommand } from "namirasoft-node-cli";
22
- import { BillWatchGCPEstimationCommand } from "./BillWatchGCPEstimationCommand";
23
- import { BillWatchGCP_CreateForCommand } from "./BillWatchGCP_CreateForCommand";
22
+ import { BillWatchGCPEstimateHourlyCommand } from "./BillWatchGCPEstimateHourlyCommand";
23
+ import { BillWatchGCP_CreateForHourlyCommand } from "./BillWatchGCP_CreateForHourlyCommand";
24
24
 
25
25
  export class BillWatchGCPCommand extends BaseNavigatorCommand
26
26
  {
27
27
  constructor(argv: string[])
28
28
  {
29
29
  super(argv, {
30
- "estimation": BillWatchGCPEstimationCommand,
31
- "_createfor": BillWatchGCP_CreateForCommand,
30
+ "estimatehourly": BillWatchGCPEstimateHourlyCommand,
31
+ "_createforhourly": BillWatchGCP_CreateForHourlyCommand,
32
32
  });
33
33
  }
34
34
  };
@@ -23,7 +23,7 @@ import { IStorageMemoryDedicated } from "namirasoft-core";
23
23
  import { NamirasoftCostServer } from "../NamirasoftCostServer";
24
24
  import { TokenManager } from "namirasoft-account";
25
25
 
26
- export class BillWatchGCPEstimationCommand extends BaseFinalCommand
26
+ export class BillWatchGCPEstimateHourlyCommand extends BaseFinalCommand
27
27
  {
28
28
  constructor(argv: string[])
29
29
  {
@@ -36,6 +36,14 @@ export class BillWatchGCPEstimationCommand extends BaseFinalCommand
36
36
  args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
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
+ },
39
47
  {
40
48
  name: "row_number",
41
49
  short: "",
@@ -51,14 +59,6 @@ export class BillWatchGCPEstimationCommand extends BaseFinalCommand
51
59
  optional: false,
52
60
  args: ["active"],
53
61
  defaults: [""]
54
- },
55
- {
56
- name: "period",
57
- short: "",
58
- description: "Provides the value of 'period' in body",
59
- optional: false,
60
- args: ["period"],
61
- defaults: [""]
62
62
  }
63
63
  ]);
64
64
  }
@@ -72,11 +72,11 @@ export class BillWatchGCPEstimationCommand extends BaseFinalCommand
72
72
  manager.setValue(token, false);
73
73
  let url = this.app.storage.getItem("ns-cost-server-url");
74
74
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
75
- let ans = await server.bill_watch_gcp.Estimation({
75
+ let ans = await server.bill_watch_gcp.EstimateHourly({
76
76
  first_entity_created_at: this.option_values.first_entity_created_at,
77
+ period: this.option_values.period,
77
78
  row_number: this.option_values.row_number,
78
- active: this.option_values.active,
79
- period: this.option_values.period
79
+ active: this.option_values.active
80
80
  });
81
81
  this.app.logger.success(JSON.stringify(ans));
82
82
  }
@@ -23,7 +23,7 @@ import { IStorageMemoryDedicated } from "namirasoft-core";
23
23
  import { NamirasoftCostServer } from "../NamirasoftCostServer";
24
24
  import { TokenManager } from "namirasoft-account";
25
25
 
26
- export class BillWatchAzure_CreateForCommand extends BaseFinalCommand
26
+ export class BillWatchGCP_CreateForHourlyCommand extends BaseFinalCommand
27
27
  {
28
28
  constructor(argv: string[])
29
29
  {
@@ -36,6 +36,14 @@ export class BillWatchAzure_CreateForCommand extends BaseFinalCommand
36
36
  args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
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
+ },
39
47
  {
40
48
  name: "row_number",
41
49
  short: "",
@@ -52,14 +60,6 @@ export class BillWatchAzure_CreateForCommand extends BaseFinalCommand
52
60
  args: ["active"],
53
61
  defaults: [""]
54
62
  },
55
- {
56
- name: "period",
57
- short: "",
58
- description: "Provides the value of 'period' in body",
59
- optional: false,
60
- args: ["period"],
61
- defaults: [""]
62
- },
63
63
  {
64
64
  name: "workspace_id",
65
65
  short: "",
@@ -88,11 +88,11 @@ export class BillWatchAzure_CreateForCommand extends BaseFinalCommand
88
88
  manager.setValue(token, false);
89
89
  let url = this.app.storage.getItem("ns-cost-server-url");
90
90
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
91
- let ans = await server.bill_watch_azure._CreateFor(this.arg_values[0], {
91
+ let ans = await server.bill_watch_gcp._CreateForHourly(this.arg_values[0], {
92
92
  first_entity_created_at: this.option_values.first_entity_created_at,
93
+ period: this.option_values.period,
93
94
  row_number: this.option_values.row_number,
94
95
  active: this.option_values.active,
95
- period: this.option_values.period,
96
96
  workspace_id: this.option_values.workspace_id,
97
97
  resource_id: this.option_values.resource_id
98
98
  });
@@ -19,16 +19,16 @@
19
19
  /****************************************************************/
20
20
 
21
21
  import { BaseNavigatorCommand } from "namirasoft-node-cli";
22
- import { FieldCategoryEstimationCommand } from "./FieldCategoryEstimationCommand";
23
- import { FieldCategory_CreateForCommand } from "./FieldCategory_CreateForCommand";
22
+ import { FieldCategoryEstimateHourlyCommand } from "./FieldCategoryEstimateHourlyCommand";
23
+ import { FieldCategory_CreateForHourlyCommand } from "./FieldCategory_CreateForHourlyCommand";
24
24
 
25
25
  export class FieldCategoryCommand extends BaseNavigatorCommand
26
26
  {
27
27
  constructor(argv: string[])
28
28
  {
29
29
  super(argv, {
30
- "estimation": FieldCategoryEstimationCommand,
31
- "_createfor": FieldCategory_CreateForCommand,
30
+ "estimatehourly": FieldCategoryEstimateHourlyCommand,
31
+ "_createforhourly": FieldCategory_CreateForHourlyCommand,
32
32
  });
33
33
  }
34
34
  };
@@ -0,0 +1,83 @@
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
+ };
@@ -0,0 +1,101 @@
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
+ };
@@ -19,16 +19,16 @@
19
19
  /****************************************************************/
20
20
 
21
21
  import { BaseNavigatorCommand } from "namirasoft-node-cli";
22
- import { FieldFieldEstimationCommand } from "./FieldFieldEstimationCommand";
23
- import { FieldField_CreateForCommand } from "./FieldField_CreateForCommand";
22
+ import { FieldFieldEstimateHourlyCommand } from "./FieldFieldEstimateHourlyCommand";
23
+ import { FieldField_CreateForHourlyCommand } from "./FieldField_CreateForHourlyCommand";
24
24
 
25
25
  export class FieldFieldCommand extends BaseNavigatorCommand
26
26
  {
27
27
  constructor(argv: string[])
28
28
  {
29
29
  super(argv, {
30
- "estimation": FieldFieldEstimationCommand,
31
- "_createfor": FieldField_CreateForCommand,
30
+ "estimatehourly": FieldFieldEstimateHourlyCommand,
31
+ "_createforhourly": FieldField_CreateForHourlyCommand,
32
32
  });
33
33
  }
34
34
  };