namirasoft-cost 1.4.32 → 1.4.33

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 (77) hide show
  1. package/.ns-sdkg-dir-deep +3 -3
  2. package/.ns-sdkg-file-keep +28 -28
  3. package/dist/bonus/DeactiveBonus.d.ts +1 -2
  4. package/dist/bonus/DeactiveBonus.js +1 -2
  5. package/dist/bonus/DeactiveBonus.js.map +1 -1
  6. package/dist/estimator/BillWatchBaseRecordEstimator.d.ts +2 -1
  7. package/dist/estimator/BillWatchBaseRecordEstimator.js +3 -1
  8. package/dist/estimator/BillWatchBaseRecordEstimator.js.map +1 -1
  9. package/package.json +28 -28
  10. package/src/NamirasoftCostServer.ts +59 -59
  11. package/src/NamirasoftCostServerBase.ts +29 -29
  12. package/src/NamirasoftCostServerBillWatchAWS.ts +47 -47
  13. package/src/NamirasoftCostServerBillWatchAzure.ts +47 -47
  14. package/src/NamirasoftCostServerBillWatchGCP.ts +47 -47
  15. package/src/NamirasoftCostServerCost.ts +41 -41
  16. package/src/NamirasoftCostServerFieldCategory.ts +47 -47
  17. package/src/NamirasoftCostServerFieldField.ts +47 -47
  18. package/src/NamirasoftCostServerHealthz.ts +35 -35
  19. package/src/NamirasoftCostServerMetrics.ts +35 -35
  20. package/src/NamirasoftCostServerSecretSecret.ts +61 -61
  21. package/src/NamirasoftCostServerValue.ts +36 -36
  22. package/src/bonus/BaseBonus.ts +13 -13
  23. package/src/bonus/DeactiveBonus.ts +14 -14
  24. package/src/bonus/FreeCountBonus.ts +14 -14
  25. package/src/bonus/FreeTotalValueBonus.ts +28 -28
  26. package/src/bonus/FreeValueBonus.ts +24 -24
  27. package/src/bonus/LowAmountBonus.ts +14 -14
  28. package/src/bonus/LowSecondsBonus.ts +14 -14
  29. package/src/bonus/LowTotalValueBonus.ts +14 -14
  30. package/src/bonus/LowValueBonus.ts +14 -14
  31. package/src/bonus/TrialBonus.ts +18 -18
  32. package/src/command/BillWatchAWSCommand.ts +33 -33
  33. package/src/command/BillWatchAWSEstimateRecordCommand.ts +109 -109
  34. package/src/command/BillWatchAWS_CreateForRecordCommand.ts +118 -118
  35. package/src/command/BillWatchAzureCommand.ts +33 -33
  36. package/src/command/BillWatchAzureEstimateRecordCommand.ts +109 -109
  37. package/src/command/BillWatchAzure_CreateForRecordCommand.ts +118 -118
  38. package/src/command/BillWatchGCPCommand.ts +33 -33
  39. package/src/command/BillWatchGCPEstimateRecordCommand.ts +109 -109
  40. package/src/command/BillWatchGCP_CreateForRecordCommand.ts +118 -118
  41. package/src/command/CostCommand.ts +31 -31
  42. package/src/command/CostListCommand.ts +44 -44
  43. package/src/command/FieldCategoryCommand.ts +33 -33
  44. package/src/command/FieldCategoryEstimateRecordCommand.ts +109 -109
  45. package/src/command/FieldCategory_CreateForRecordCommand.ts +118 -118
  46. package/src/command/FieldFieldCommand.ts +33 -33
  47. package/src/command/FieldFieldEstimateRecordCommand.ts +109 -109
  48. package/src/command/FieldField_CreateForRecordCommand.ts +118 -118
  49. package/src/command/HealthzCommand.ts +31 -31
  50. package/src/command/HealthzGetCommand.ts +44 -44
  51. package/src/command/MetricsCommand.ts +31 -31
  52. package/src/command/MetricsGetCommand.ts +44 -44
  53. package/src/command/SecretSecretCommand.ts +37 -37
  54. package/src/command/SecretSecretEstimateReadCommand.ts +109 -109
  55. package/src/command/SecretSecretEstimateRecordCommand.ts +109 -109
  56. package/src/command/SecretSecret_CreateForReadCommand.ts +118 -118
  57. package/src/command/SecretSecret_CreateForRecordCommand.ts +118 -118
  58. package/src/command/ValueCommand.ts +31 -31
  59. package/src/command/ValueListCommand.ts +44 -44
  60. package/src/command/cli.ts +50 -50
  61. package/src/estimator/BillWatchBaseRecordEstimator.ts +3 -1
  62. package/src/index.ts +91 -91
  63. package/src/meta/CostMetaTable.ts +81 -81
  64. package/src/meta/NamirasoftCostMetaDatabase.ts +50 -50
  65. package/src/row/CostRow.ts +40 -40
  66. package/src/type/Bonus.ts +20 -20
  67. package/src/type/CalculationOption.ts +33 -33
  68. package/src/type/Estimation.ts +34 -34
  69. package/src/type/EstimationOption.ts +31 -31
  70. package/src/type/EstimationUsage.ts +22 -22
  71. package/src/type/Period.ts +101 -101
  72. package/src/type/SimulationOption.ts +29 -29
  73. package/src/type/Usage.ts +24 -24
  74. package/dist/bonus/LowTotalCountBonus.d.ts +0 -10
  75. package/dist/bonus/LowTotalCountBonus.js +0 -27
  76. package/dist/bonus/LowTotalCountBonus.js.map +0 -1
  77. package/src/bonus/LowTotalCountBonus.ts +0 -15
@@ -1,110 +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 SecretSecretEstimateRecordCommand 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.secret_secret.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
- }
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 SecretSecretEstimateRecordCommand 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.secret_secret.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
110
  };
@@ -1,119 +1,119 @@
1
- /****************************************************************/
2
- /* */
3
- /* This is an Auto-Generated File */
4
- /* Made By */
5
- /* Namirasoft SDK Generator NPM Package */
6
- /* */
7
- /****************************************************************/
8
- /****************************************************************/
9
- /* */
10
- /* Please do not make any change to this file */
11
- /* If any change is required, ns-sdkg command must be used */
12
- /* */
13
- /****************************************************************/
14
- /****************************************************************/
15
- /* */
16
- /* Namira Software Corporation */
17
- /* https://namirasoft.com */
18
- /* */
19
- /****************************************************************/
20
-
21
- import { BaseFinalCommand } from "namirasoft-node-cli";
22
- import { IStorageMemoryDedicated } from "namirasoft-core";
23
- import { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class SecretSecret_CreateForReadCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, ["user_id"], [
31
- {
32
- name: "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: "workspace_id",
81
- short: "",
82
- description: "Provides the value of 'workspace_id' in body",
83
- optional: true,
84
- args: ["workspace_id"],
85
- defaults: [""]
86
- },
87
- {
88
- name: "resource_id",
89
- short: "",
90
- description: "Provides the value of 'resource_id' in body",
91
- optional: true,
92
- args: ["resource_id"],
93
- defaults: [""]
94
- }
95
- ]);
96
- }
97
- override async exec()
98
- {
99
- let token = this.app.storage.getNSAToken();
100
- if (token == null)
101
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
102
- let storage = new IStorageMemoryDedicated();
103
- let manager = new TokenManager(storage, () => { });
104
- manager.setValue(token, false);
105
- let url = this.app.storage.getItem("ns-cost-server-url");
106
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
107
- let ans = await server.secret_secret._CreateForRead(this.arg_values[0], {
108
- period: this.option_values.period,
109
- total_count: this.option_values.total_count,
110
- number: this.option_values.number,
111
- total_value: this.option_values.total_value,
112
- value: this.option_values.value,
113
- active: this.option_values.active,
114
- workspace_id: this.option_values.workspace_id,
115
- resource_id: this.option_values.resource_id
116
- });
117
- this.app.logger.success(JSON.stringify(ans));
118
- }
1
+ /****************************************************************/
2
+ /* */
3
+ /* This is an Auto-Generated File */
4
+ /* Made By */
5
+ /* Namirasoft SDK Generator NPM Package */
6
+ /* */
7
+ /****************************************************************/
8
+ /****************************************************************/
9
+ /* */
10
+ /* Please do not make any change to this file */
11
+ /* If any change is required, ns-sdkg command must be used */
12
+ /* */
13
+ /****************************************************************/
14
+ /****************************************************************/
15
+ /* */
16
+ /* Namira Software Corporation */
17
+ /* https://namirasoft.com */
18
+ /* */
19
+ /****************************************************************/
20
+
21
+ import { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftCostServer } from "../NamirasoftCostServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class SecretSecret_CreateForReadCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["user_id"], [
31
+ {
32
+ name: "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: "workspace_id",
81
+ short: "",
82
+ description: "Provides the value of 'workspace_id' in body",
83
+ optional: true,
84
+ args: ["workspace_id"],
85
+ defaults: [""]
86
+ },
87
+ {
88
+ name: "resource_id",
89
+ short: "",
90
+ description: "Provides the value of 'resource_id' in body",
91
+ optional: true,
92
+ args: ["resource_id"],
93
+ defaults: [""]
94
+ }
95
+ ]);
96
+ }
97
+ override async exec()
98
+ {
99
+ let token = this.app.storage.getNSAToken();
100
+ if (token == null)
101
+ throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
102
+ let storage = new IStorageMemoryDedicated();
103
+ let manager = new TokenManager(storage, () => { });
104
+ manager.setValue(token, false);
105
+ let url = this.app.storage.getItem("ns-cost-server-url");
106
+ let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
107
+ let ans = await server.secret_secret._CreateForRead(this.arg_values[0], {
108
+ period: this.option_values.period,
109
+ total_count: this.option_values.total_count,
110
+ number: this.option_values.number,
111
+ total_value: this.option_values.total_value,
112
+ value: this.option_values.value,
113
+ active: this.option_values.active,
114
+ workspace_id: this.option_values.workspace_id,
115
+ resource_id: this.option_values.resource_id
116
+ });
117
+ this.app.logger.success(JSON.stringify(ans));
118
+ }
119
119
  };