namirasoft-cost 1.4.27 → 1.4.30

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 (190) hide show
  1. package/.ns-sdkg-dir-deep +3 -3
  2. package/.ns-sdkg-file-keep +36 -26
  3. package/dist/NamirasoftCostServer.js +1 -1
  4. package/dist/NamirasoftCostServerBillWatchAWS.d.ts +4 -15
  5. package/dist/NamirasoftCostServerBillWatchAWS.js +2 -2
  6. package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
  7. package/dist/NamirasoftCostServerBillWatchAzure.d.ts +4 -15
  8. package/dist/NamirasoftCostServerBillWatchAzure.js +2 -2
  9. package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
  10. package/dist/NamirasoftCostServerBillWatchGCP.d.ts +4 -15
  11. package/dist/NamirasoftCostServerBillWatchGCP.js +2 -2
  12. package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
  13. package/dist/NamirasoftCostServerCost.d.ts +0 -2
  14. package/dist/NamirasoftCostServerCost.js +0 -8
  15. package/dist/NamirasoftCostServerCost.js.map +1 -1
  16. package/dist/NamirasoftCostServerFieldCategory.d.ts +4 -15
  17. package/dist/NamirasoftCostServerFieldCategory.js +2 -2
  18. package/dist/NamirasoftCostServerFieldCategory.js.map +1 -1
  19. package/dist/NamirasoftCostServerFieldField.d.ts +4 -15
  20. package/dist/NamirasoftCostServerFieldField.js +2 -2
  21. package/dist/NamirasoftCostServerFieldField.js.map +1 -1
  22. package/dist/NamirasoftCostServerSecretSecret.d.ts +6 -29
  23. package/dist/NamirasoftCostServerSecretSecret.js +2 -2
  24. package/dist/NamirasoftCostServerSecretSecret.js.map +1 -1
  25. package/dist/command/BillWatchAWSCommand.d.ts +4 -0
  26. package/dist/command/BillWatchAWSCommand.js +17 -0
  27. package/dist/command/BillWatchAWSCommand.js.map +1 -0
  28. package/dist/command/BillWatchAWSEstimateRecordCommand.d.ts +5 -0
  29. package/dist/command/BillWatchAWSEstimateRecordCommand.js +103 -0
  30. package/dist/command/BillWatchAWSEstimateRecordCommand.js.map +1 -0
  31. package/dist/command/BillWatchAWS_CreateForRecordCommand.d.ts +5 -0
  32. package/dist/command/BillWatchAWS_CreateForRecordCommand.js +112 -0
  33. package/dist/command/BillWatchAWS_CreateForRecordCommand.js.map +1 -0
  34. package/dist/command/BillWatchAzureCommand.d.ts +4 -0
  35. package/dist/command/BillWatchAzureCommand.js +17 -0
  36. package/dist/command/BillWatchAzureCommand.js.map +1 -0
  37. package/dist/command/BillWatchAzureEstimateRecordCommand.d.ts +5 -0
  38. package/dist/command/BillWatchAzureEstimateRecordCommand.js +103 -0
  39. package/dist/command/BillWatchAzureEstimateRecordCommand.js.map +1 -0
  40. package/dist/command/BillWatchAzure_CreateForRecordCommand.d.ts +5 -0
  41. package/dist/command/BillWatchAzure_CreateForRecordCommand.js +112 -0
  42. package/dist/command/BillWatchAzure_CreateForRecordCommand.js.map +1 -0
  43. package/dist/command/BillWatchGCPCommand.d.ts +4 -0
  44. package/dist/command/BillWatchGCPCommand.js +17 -0
  45. package/dist/command/BillWatchGCPCommand.js.map +1 -0
  46. package/dist/command/BillWatchGCPEstimateRecordCommand.d.ts +5 -0
  47. package/dist/command/BillWatchGCPEstimateRecordCommand.js +103 -0
  48. package/dist/command/BillWatchGCPEstimateRecordCommand.js.map +1 -0
  49. package/dist/command/BillWatchGCP_CreateForRecordCommand.d.ts +5 -0
  50. package/dist/command/BillWatchGCP_CreateForRecordCommand.js +112 -0
  51. package/dist/command/BillWatchGCP_CreateForRecordCommand.js.map +1 -0
  52. package/dist/command/CostCommand.d.ts +4 -0
  53. package/dist/command/CostCommand.js +15 -0
  54. package/dist/command/CostCommand.js.map +1 -0
  55. package/dist/command/CostListCommand.d.ts +5 -0
  56. package/dist/command/CostListCommand.js +38 -0
  57. package/dist/command/CostListCommand.js.map +1 -0
  58. package/dist/command/FieldCategoryCommand.d.ts +4 -0
  59. package/dist/command/FieldCategoryCommand.js +17 -0
  60. package/dist/command/FieldCategoryCommand.js.map +1 -0
  61. package/dist/command/FieldCategoryEstimateRecordCommand.d.ts +5 -0
  62. package/dist/command/FieldCategoryEstimateRecordCommand.js +103 -0
  63. package/dist/command/FieldCategoryEstimateRecordCommand.js.map +1 -0
  64. package/dist/command/FieldCategory_CreateForRecordCommand.d.ts +5 -0
  65. package/dist/command/FieldCategory_CreateForRecordCommand.js +112 -0
  66. package/dist/command/FieldCategory_CreateForRecordCommand.js.map +1 -0
  67. package/dist/command/FieldFieldCommand.d.ts +4 -0
  68. package/dist/command/FieldFieldCommand.js +17 -0
  69. package/dist/command/FieldFieldCommand.js.map +1 -0
  70. package/dist/command/FieldFieldEstimateRecordCommand.d.ts +5 -0
  71. package/dist/command/FieldFieldEstimateRecordCommand.js +103 -0
  72. package/dist/command/FieldFieldEstimateRecordCommand.js.map +1 -0
  73. package/dist/command/FieldField_CreateForRecordCommand.d.ts +5 -0
  74. package/dist/command/FieldField_CreateForRecordCommand.js +112 -0
  75. package/dist/command/FieldField_CreateForRecordCommand.js.map +1 -0
  76. package/dist/command/HealthzCommand.d.ts +4 -0
  77. package/dist/command/HealthzCommand.js +15 -0
  78. package/dist/command/HealthzCommand.js.map +1 -0
  79. package/dist/command/HealthzGetCommand.d.ts +5 -0
  80. package/dist/command/HealthzGetCommand.js +38 -0
  81. package/dist/command/HealthzGetCommand.js.map +1 -0
  82. package/dist/command/MetricsCommand.d.ts +4 -0
  83. package/dist/command/MetricsCommand.js +15 -0
  84. package/dist/command/MetricsCommand.js.map +1 -0
  85. package/dist/command/MetricsGetCommand.d.ts +5 -0
  86. package/dist/command/MetricsGetCommand.js +38 -0
  87. package/dist/command/MetricsGetCommand.js.map +1 -0
  88. package/dist/command/SecretSecretCommand.d.ts +4 -0
  89. package/dist/command/SecretSecretCommand.js +21 -0
  90. package/dist/command/SecretSecretCommand.js.map +1 -0
  91. package/dist/command/SecretSecretEstimateReadCommand.d.ts +5 -0
  92. package/dist/command/SecretSecretEstimateReadCommand.js +103 -0
  93. package/dist/command/SecretSecretEstimateReadCommand.js.map +1 -0
  94. package/dist/command/SecretSecretEstimateRecordCommand.d.ts +5 -0
  95. package/dist/command/SecretSecretEstimateRecordCommand.js +103 -0
  96. package/dist/command/SecretSecretEstimateRecordCommand.js.map +1 -0
  97. package/dist/command/SecretSecret_CreateForReadCommand.d.ts +5 -0
  98. package/dist/command/SecretSecret_CreateForReadCommand.js +112 -0
  99. package/dist/command/SecretSecret_CreateForReadCommand.js.map +1 -0
  100. package/dist/command/SecretSecret_CreateForRecordCommand.d.ts +5 -0
  101. package/dist/command/SecretSecret_CreateForRecordCommand.js +112 -0
  102. package/dist/command/SecretSecret_CreateForRecordCommand.js.map +1 -0
  103. package/dist/command/ValueCommand.d.ts +4 -0
  104. package/dist/command/ValueCommand.js +15 -0
  105. package/dist/command/ValueCommand.js.map +1 -0
  106. package/dist/command/ValueListCommand.d.ts +5 -0
  107. package/dist/command/ValueListCommand.js +38 -0
  108. package/dist/command/ValueListCommand.js.map +1 -0
  109. package/dist/command/cli.d.ts +2 -0
  110. package/dist/command/cli.js +32 -0
  111. package/dist/command/cli.js.map +1 -0
  112. package/dist/index.d.ts +47 -12
  113. package/dist/index.js +47 -12
  114. package/dist/index.js.map +1 -1
  115. package/package.json +28 -28
  116. package/src/NamirasoftCostServer.ts +59 -59
  117. package/src/NamirasoftCostServerBase.ts +29 -29
  118. package/src/NamirasoftCostServerBillWatchAWS.ts +47 -46
  119. package/src/NamirasoftCostServerBillWatchAzure.ts +47 -46
  120. package/src/NamirasoftCostServerBillWatchGCP.ts +47 -46
  121. package/src/NamirasoftCostServerCost.ts +41 -49
  122. package/src/NamirasoftCostServerFieldCategory.ts +47 -46
  123. package/src/NamirasoftCostServerFieldField.ts +47 -46
  124. package/src/NamirasoftCostServerHealthz.ts +35 -35
  125. package/src/NamirasoftCostServerMetrics.ts +35 -35
  126. package/src/NamirasoftCostServerSecretSecret.ts +61 -60
  127. package/src/NamirasoftCostServerValue.ts +36 -36
  128. package/src/bonus/BaseBonus.ts +13 -13
  129. package/src/bonus/DeactiveBonus.ts +14 -14
  130. package/src/bonus/FreeCountBonus.ts +14 -14
  131. package/src/bonus/FreeTotalValueBonus.ts +28 -28
  132. package/src/bonus/LowAmountBonus.ts +14 -14
  133. package/src/bonus/LowSecondsBonus.ts +14 -14
  134. package/src/bonus/LowTotalCountBonus.ts +14 -14
  135. package/src/bonus/LowTotalValueBonus.ts +14 -14
  136. package/src/bonus/TrialBonus.ts +18 -18
  137. package/src/command/BillWatchAWSCommand.ts +34 -0
  138. package/src/command/BillWatchAWSEstimateRecordCommand.ts +110 -0
  139. package/src/command/BillWatchAWS_CreateForRecordCommand.ts +119 -0
  140. package/src/command/BillWatchAzureCommand.ts +34 -0
  141. package/src/command/BillWatchAzureEstimateRecordCommand.ts +110 -0
  142. package/src/command/BillWatchAzure_CreateForRecordCommand.ts +119 -0
  143. package/src/command/BillWatchGCPCommand.ts +34 -0
  144. package/src/command/BillWatchGCPEstimateRecordCommand.ts +110 -0
  145. package/src/command/BillWatchGCP_CreateForRecordCommand.ts +119 -0
  146. package/src/{row/CostCreateRow.ts → command/CostCommand.ts} +32 -38
  147. package/src/command/CostListCommand.ts +45 -0
  148. package/src/command/FieldCategoryCommand.ts +34 -0
  149. package/src/command/FieldCategoryEstimateRecordCommand.ts +110 -0
  150. package/src/command/FieldCategory_CreateForRecordCommand.ts +119 -0
  151. package/src/command/FieldFieldCommand.ts +34 -0
  152. package/src/command/FieldFieldEstimateRecordCommand.ts +110 -0
  153. package/src/command/FieldField_CreateForRecordCommand.ts +119 -0
  154. package/src/command/HealthzCommand.ts +32 -0
  155. package/src/command/HealthzGetCommand.ts +45 -0
  156. package/src/command/MetricsCommand.ts +32 -0
  157. package/src/command/MetricsGetCommand.ts +45 -0
  158. package/src/command/SecretSecretCommand.ts +38 -0
  159. package/src/command/SecretSecretEstimateReadCommand.ts +110 -0
  160. package/src/command/SecretSecretEstimateRecordCommand.ts +110 -0
  161. package/src/command/SecretSecret_CreateForReadCommand.ts +119 -0
  162. package/src/command/SecretSecret_CreateForRecordCommand.ts +119 -0
  163. package/src/command/ValueCommand.ts +32 -0
  164. package/src/command/ValueListCommand.ts +45 -0
  165. package/src/command/cli.ts +51 -0
  166. package/src/estimator/BaseEstimator.ts +62 -62
  167. package/src/estimator/BillWatchAWSRecordEstimator.ts +4 -4
  168. package/src/estimator/BillWatchAzureRecordEstimator.ts +4 -4
  169. package/src/estimator/BillWatchBaseRecordEstimator.ts +25 -25
  170. package/src/estimator/BillWatchGCPRecordEstimator.ts +4 -4
  171. package/src/estimator/FieldBaseRecordEstimator.ts +20 -20
  172. package/src/estimator/FieldCategoryRecordEstimator.ts +9 -9
  173. package/src/estimator/FieldFieldRecordEstimator.ts +9 -9
  174. package/src/estimator/SecretSecretReadEstimator.ts +25 -25
  175. package/src/estimator/SecretSecretRecordEstimator.ts +24 -24
  176. package/src/index.ts +89 -54
  177. package/src/meta/CostMetaTable.ts +81 -81
  178. package/src/meta/NamirasoftCostMetaDatabase.ts +50 -50
  179. package/src/row/CostRow.ts +40 -40
  180. package/src/type/Bonus.ts +20 -20
  181. package/src/type/CalculationOption.ts +34 -34
  182. package/src/type/Estimation.ts +35 -35
  183. package/src/type/EstimationOption.ts +31 -31
  184. package/src/type/EstimationUsage.ts +22 -22
  185. package/src/type/Period.ts +101 -101
  186. package/src/type/SimulationOption.ts +29 -29
  187. package/src/type/Usage.ts +24 -24
  188. package/dist/row/CostCreateRow.d.ts +0 -17
  189. package/dist/row/CostCreateRow.js +0 -3
  190. package/dist/row/CostCreateRow.js.map +0 -1
@@ -1,63 +1,63 @@
1
- import { EstimationOption } from "../type/EstimationOption";
2
- import { BaseBonus } from "../bonus/BaseBonus";
3
- import { Estimation } from "../type/Estimation";
4
- import { PeriodUtil } from "../type/Period";
5
-
6
- export abstract class BaseEstimator
7
- {
8
- async estimate(option: EstimationOption, calculate_bonus: boolean = true): Promise<Estimation[]>
9
- {
10
- let seconds = PeriodUtil.toSeconds(option.period);
11
- let percent = seconds / 3600;
12
- let fee_object = this.getFee();
13
- let fee = option.active ? fee_object.active : fee_object.deactive;
14
-
15
- let amount = percent * fee * option.value;
16
- let currency = "USD";
17
-
18
- let estimation: Estimation = {
19
- option,
20
- seconds,
21
- usage: {
22
- value: option.value,
23
- ...this.getUsage()
24
- },
25
- fee,
26
- amount,
27
- currency,
28
- free: undefined
29
- };
30
-
31
- let ans: Estimation[] = [];
32
- if (calculate_bonus)
33
- {
34
- let bonuses = this.getBonues();
35
- for (let bonus of bonuses)
36
- {
37
- let res = await bonus.isFree(option, estimation);
38
- if (res.free)
39
- {
40
- if (res.split)
41
- {
42
- let estimation_free = await this.estimate(res.split.free, false);
43
- estimation_free.forEach(e => { e.free = bonus; });
44
- ans.push(...estimation_free);
45
- for (let estimation_paid of res.split.paids)
46
- ans.push(...await this.estimate(estimation_paid, false));
47
- }
48
- else
49
- {
50
- estimation.free = bonus;
51
- ans.push(estimation);
52
- }
53
- break;
54
- }
55
- }
56
- }
57
-
58
- return ans;
59
- }
60
- abstract getFee(): { active: number, deactive: number };
61
- abstract getUsage(): { name: string, unit: string };
62
- abstract getBonues(): BaseBonus[];
1
+ import { EstimationOption } from "../type/EstimationOption";
2
+ import { BaseBonus } from "../bonus/BaseBonus";
3
+ import { Estimation } from "../type/Estimation";
4
+ import { PeriodUtil } from "../type/Period";
5
+
6
+ export abstract class BaseEstimator
7
+ {
8
+ async estimate(option: EstimationOption, calculate_bonus: boolean = true): Promise<Estimation[]>
9
+ {
10
+ let seconds = PeriodUtil.toSeconds(option.period);
11
+ let percent = seconds / 3600;
12
+ let fee_object = this.getFee();
13
+ let fee = option.active ? fee_object.active : fee_object.deactive;
14
+
15
+ let amount = percent * fee * option.value;
16
+ let currency = "USD";
17
+
18
+ let estimation: Estimation = {
19
+ option,
20
+ seconds,
21
+ usage: {
22
+ value: option.value,
23
+ ...this.getUsage()
24
+ },
25
+ fee,
26
+ amount,
27
+ currency,
28
+ free: undefined
29
+ };
30
+
31
+ let ans: Estimation[] = [];
32
+ if (calculate_bonus)
33
+ {
34
+ let bonuses = this.getBonues();
35
+ for (let bonus of bonuses)
36
+ {
37
+ let res = await bonus.isFree(option, estimation);
38
+ if (res.free)
39
+ {
40
+ if (res.split)
41
+ {
42
+ let estimation_free = await this.estimate(res.split.free, false);
43
+ estimation_free.forEach(e => { e.free = bonus; });
44
+ ans.push(...estimation_free);
45
+ for (let estimation_paid of res.split.paids)
46
+ ans.push(...await this.estimate(estimation_paid, false));
47
+ }
48
+ else
49
+ {
50
+ estimation.free = bonus;
51
+ ans.push(estimation);
52
+ }
53
+ break;
54
+ }
55
+ }
56
+ }
57
+
58
+ return ans;
59
+ }
60
+ abstract getFee(): { active: number, deactive: number };
61
+ abstract getUsage(): { name: string, unit: string };
62
+ abstract getBonues(): BaseBonus[];
63
63
  }
@@ -1,5 +1,5 @@
1
- import { BillWatchBaseRecordEstimator } from "./BillWatchBaseRecordEstimator";
2
-
3
- export class BillWatchAWSRecordEstimator extends BillWatchBaseRecordEstimator
4
- {
1
+ import { BillWatchBaseRecordEstimator } from "./BillWatchBaseRecordEstimator";
2
+
3
+ export class BillWatchAWSRecordEstimator extends BillWatchBaseRecordEstimator
4
+ {
5
5
  }
@@ -1,5 +1,5 @@
1
- import { BillWatchBaseRecordEstimator } from "./BillWatchBaseRecordEstimator";
2
-
3
- export class BillWatchAzureRecordEstimator extends BillWatchBaseRecordEstimator
4
- {
1
+ import { BillWatchBaseRecordEstimator } from "./BillWatchBaseRecordEstimator";
2
+
3
+ export class BillWatchAzureRecordEstimator extends BillWatchBaseRecordEstimator
4
+ {
5
5
  }
@@ -1,26 +1,26 @@
1
- import { DurationUnit, PriceOperation } from "namirasoft-core";
2
- import { BaseEstimator } from "./BaseEstimator";
3
- import { Usage } from "../type/Usage";
4
- import { TrialBonus } from "../bonus/TrialBonus";
5
-
6
- export abstract class BillWatchBaseRecordEstimator extends BaseEstimator
7
- {
8
- static WATCH_PER_HOUR_ACTIVE = PriceOperation.cent_to_millicent(3);
9
- override getFee()
10
- {
11
- return { active: BillWatchBaseRecordEstimator.WATCH_PER_HOUR_ACTIVE, deactive: 0 };
12
- }
13
- override getUsage()
14
- {
15
- return {
16
- name: Usage.Time.name,
17
- unit: Usage.Time.units.Hour.name
18
- };
19
- }
20
- override getBonues()
21
- {
22
- return [
23
- new TrialBonus(1, DurationUnit.Week)
24
- ];
25
- }
1
+ import { DurationUnit, PriceOperation } from "namirasoft-core";
2
+ import { BaseEstimator } from "./BaseEstimator";
3
+ import { Usage } from "../type/Usage";
4
+ import { TrialBonus } from "../bonus/TrialBonus";
5
+
6
+ export abstract class BillWatchBaseRecordEstimator extends BaseEstimator
7
+ {
8
+ static WATCH_PER_HOUR_ACTIVE = PriceOperation.cent_to_millicent(3);
9
+ override getFee()
10
+ {
11
+ return { active: BillWatchBaseRecordEstimator.WATCH_PER_HOUR_ACTIVE, deactive: 0 };
12
+ }
13
+ override getUsage()
14
+ {
15
+ return {
16
+ name: Usage.Time.name,
17
+ unit: Usage.Time.units.Hour.name
18
+ };
19
+ }
20
+ override getBonues()
21
+ {
22
+ return [
23
+ new TrialBonus(1, DurationUnit.Week)
24
+ ];
25
+ }
26
26
  }
@@ -1,5 +1,5 @@
1
- import { BillWatchBaseRecordEstimator } from "./BillWatchBaseRecordEstimator";
2
-
3
- export class BillWatchGCPRecordEstimator extends BillWatchBaseRecordEstimator
4
- {
1
+ import { BillWatchBaseRecordEstimator } from "./BillWatchBaseRecordEstimator";
2
+
3
+ export class BillWatchGCPRecordEstimator extends BillWatchBaseRecordEstimator
4
+ {
5
5
  }
@@ -1,21 +1,21 @@
1
- import { DurationUnit } from "namirasoft-core";
2
- import { TrialBonus } from "../bonus/TrialBonus";
3
- import { BaseEstimator } from "./BaseEstimator";
4
- import { Usage } from "../type/Usage";
5
-
6
- export abstract class FieldBaseRecordEstimator extends BaseEstimator
7
- {
8
- override getBonues()
9
- {
10
- return [
11
- new TrialBonus(1, DurationUnit.Week)
12
- ];
13
- }
14
- override getUsage()
15
- {
16
- return {
17
- name: Usage.Time.name,
18
- unit: Usage.Time.units.Hour.name
19
- };
20
- }
1
+ import { DurationUnit } from "namirasoft-core";
2
+ import { TrialBonus } from "../bonus/TrialBonus";
3
+ import { BaseEstimator } from "./BaseEstimator";
4
+ import { Usage } from "../type/Usage";
5
+
6
+ export abstract class FieldBaseRecordEstimator extends BaseEstimator
7
+ {
8
+ override getBonues()
9
+ {
10
+ return [
11
+ new TrialBonus(1, DurationUnit.Week)
12
+ ];
13
+ }
14
+ override getUsage()
15
+ {
16
+ return {
17
+ name: Usage.Time.name,
18
+ unit: Usage.Time.units.Hour.name
19
+ };
20
+ }
21
21
  }
@@ -1,10 +1,10 @@
1
- import { FieldBaseRecordEstimator } from "./FieldBaseRecordEstimator";
2
-
3
- export class FieldCategoryRecordEstimator extends FieldBaseRecordEstimator
4
- {
5
- static PER_HOUR_ACTIVE = 200;
6
- override getFee()
7
- {
8
- return { active: FieldCategoryRecordEstimator.PER_HOUR_ACTIVE, deactive: FieldCategoryRecordEstimator.PER_HOUR_ACTIVE };
9
- }
1
+ import { FieldBaseRecordEstimator } from "./FieldBaseRecordEstimator";
2
+
3
+ export class FieldCategoryRecordEstimator extends FieldBaseRecordEstimator
4
+ {
5
+ static PER_HOUR_ACTIVE = 200;
6
+ override getFee()
7
+ {
8
+ return { active: FieldCategoryRecordEstimator.PER_HOUR_ACTIVE, deactive: FieldCategoryRecordEstimator.PER_HOUR_ACTIVE };
9
+ }
10
10
  }
@@ -1,10 +1,10 @@
1
- import { FieldBaseRecordEstimator } from "./FieldBaseRecordEstimator";
2
-
3
- export class FieldFieldRecordEstimator extends FieldBaseRecordEstimator
4
- {
5
- static PER_HOUR_ACTIVE = 250;
6
- override getFee()
7
- {
8
- return { active: FieldFieldRecordEstimator.PER_HOUR_ACTIVE, deactive: FieldFieldRecordEstimator.PER_HOUR_ACTIVE };
9
- }
1
+ import { FieldBaseRecordEstimator } from "./FieldBaseRecordEstimator";
2
+
3
+ export class FieldFieldRecordEstimator extends FieldBaseRecordEstimator
4
+ {
5
+ static PER_HOUR_ACTIVE = 250;
6
+ override getFee()
7
+ {
8
+ return { active: FieldFieldRecordEstimator.PER_HOUR_ACTIVE, deactive: FieldFieldRecordEstimator.PER_HOUR_ACTIVE };
9
+ }
10
10
  }
@@ -1,26 +1,26 @@
1
- import { FreeTotalValueBonus } from "../bonus/FreeTotalValueBonus";
2
- import { Usage } from "../type/Usage";
3
- import { BaseEstimator } from "./BaseEstimator";
4
-
5
- export class SecretSecretReadEstimator extends BaseEstimator
6
- {
7
- static PER_CALL = 1;
8
-
9
- override getFee()
10
- {
11
- return { active: SecretSecretReadEstimator.PER_CALL, deactive: SecretSecretReadEstimator.PER_CALL };
12
- }
13
- override getUsage()
14
- {
15
- return {
16
- name: Usage.APICALL.name,
17
- unit: Usage.APICALL.units.REQUEST.name
18
- };
19
- }
20
- override getBonues()
21
- {
22
- return [
23
- new FreeTotalValueBonus(1000)
24
- ];
25
- }
1
+ import { FreeTotalValueBonus } from "../bonus/FreeTotalValueBonus";
2
+ import { Usage } from "../type/Usage";
3
+ import { BaseEstimator } from "./BaseEstimator";
4
+
5
+ export class SecretSecretReadEstimator extends BaseEstimator
6
+ {
7
+ static PER_CALL = 1;
8
+
9
+ override getFee()
10
+ {
11
+ return { active: SecretSecretReadEstimator.PER_CALL, deactive: SecretSecretReadEstimator.PER_CALL };
12
+ }
13
+ override getUsage()
14
+ {
15
+ return {
16
+ name: Usage.APICALL.name,
17
+ unit: Usage.APICALL.units.REQUEST.name
18
+ };
19
+ }
20
+ override getBonues()
21
+ {
22
+ return [
23
+ new FreeTotalValueBonus(1000)
24
+ ];
25
+ }
26
26
  }
@@ -1,25 +1,25 @@
1
- import { FreeCountBonus } from "../bonus/FreeCountBonus";
2
- import { Usage } from "../type/Usage";
3
- import { BaseEstimator } from "./BaseEstimator";
4
-
5
- export class SecretSecretRecordEstimator extends BaseEstimator
6
- {
7
- static PER_HOUR_ACTIVE = 2;
8
- override getFee()
9
- {
10
- return { active: SecretSecretRecordEstimator.PER_HOUR_ACTIVE, deactive: SecretSecretRecordEstimator.PER_HOUR_ACTIVE };
11
- }
12
- override getUsage()
13
- {
14
- return {
15
- name: Usage.Time.name,
16
- unit: Usage.Time.units.Hour.name
17
- };
18
- }
19
- override getBonues()
20
- {
21
- return [
22
- new FreeCountBonus(100)
23
- ];
24
- }
1
+ import { FreeCountBonus } from "../bonus/FreeCountBonus";
2
+ import { Usage } from "../type/Usage";
3
+ import { BaseEstimator } from "./BaseEstimator";
4
+
5
+ export class SecretSecretRecordEstimator extends BaseEstimator
6
+ {
7
+ static PER_HOUR_ACTIVE = 2;
8
+ override getFee()
9
+ {
10
+ return { active: SecretSecretRecordEstimator.PER_HOUR_ACTIVE, deactive: SecretSecretRecordEstimator.PER_HOUR_ACTIVE };
11
+ }
12
+ override getUsage()
13
+ {
14
+ return {
15
+ name: Usage.Time.name,
16
+ unit: Usage.Time.units.Hour.name
17
+ };
18
+ }
19
+ override getBonues()
20
+ {
21
+ return [
22
+ new FreeCountBonus(100)
23
+ ];
24
+ }
25
25
  }
package/src/index.ts CHANGED
@@ -1,55 +1,90 @@
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
- export * from "./bonus/BaseBonus";
22
- export * from "./estimator/BaseEstimator";
23
- export * from "./estimator/BillWatchAWSRecordEstimator";
24
- export * from "./estimator/BillWatchAzureRecordEstimator";
25
- export * from "./estimator/BillWatchBaseRecordEstimator";
26
- export * from "./estimator/BillWatchGCPRecordEstimator";
27
- export * from "./estimator/FieldBaseRecordEstimator";
28
- export * from "./estimator/FieldCategoryRecordEstimator";
29
- export * from "./estimator/FieldFieldRecordEstimator";
30
- export * from "./estimator/SecretSecretRecordEstimator";
31
- export * from "./estimator/SecretSecretReadEstimator";
32
- export * from "./NamirasoftCostServer";
33
- export * from "./NamirasoftCostServerBase";
34
- export * from "./NamirasoftCostServerBillWatchAWS";
35
- export * from "./NamirasoftCostServerBillWatchAzure";
36
- export * from "./NamirasoftCostServerBillWatchGCP";
37
- export * from "./NamirasoftCostServerCost";
38
- export * from "./NamirasoftCostServerFieldCategory";
39
- export * from "./NamirasoftCostServerFieldField";
40
- export * from "./NamirasoftCostServerHealthz";
41
- export * from "./NamirasoftCostServerMetrics";
42
- export * from "./NamirasoftCostServerSecretSecret";
43
- export * from "./NamirasoftCostServerValue";
44
- export * from "./meta/CostMetaTable";
45
- export * from "./meta/NamirasoftCostMetaDatabase";
46
- export * from "./row/CostCreateRow";
47
- export * from "./row/CostRow";
48
- export * from "./type/Bonus";
49
- export * from "./type/CalculationOption";
50
- export * from "./type/Estimation";
51
- export * from "./type/EstimationOption";
52
- export * from "./type/EstimationUsage";
53
- export * from "./type/Period";
54
- export * from "./type/SimulationOption";
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
+ export * from "./NamirasoftCostServer";
22
+ export * from "./NamirasoftCostServerBase";
23
+ export * from "./NamirasoftCostServerBillWatchAWS";
24
+ export * from "./NamirasoftCostServerBillWatchAzure";
25
+ export * from "./NamirasoftCostServerBillWatchGCP";
26
+ export * from "./NamirasoftCostServerCost";
27
+ export * from "./NamirasoftCostServerFieldCategory";
28
+ export * from "./NamirasoftCostServerFieldField";
29
+ export * from "./NamirasoftCostServerHealthz";
30
+ export * from "./NamirasoftCostServerMetrics";
31
+ export * from "./NamirasoftCostServerSecretSecret";
32
+ export * from "./NamirasoftCostServerValue";
33
+ export * from "./bonus/BaseBonus";
34
+ export * from "./bonus/DeactiveBonus";
35
+ export * from "./bonus/FreeCountBonus";
36
+ export * from "./bonus/FreeTotalValueBonus";
37
+ export * from "./bonus/LowAmountBonus";
38
+ export * from "./bonus/LowSecondsBonus";
39
+ export * from "./bonus/LowTotalCountBonus";
40
+ export * from "./bonus/LowTotalValueBonus";
41
+ export * from "./bonus/TrialBonus";
42
+ export * from "./command/BillWatchAWSCommand";
43
+ export * from "./command/BillWatchAWSEstimateRecordCommand";
44
+ export * from "./command/BillWatchAWS_CreateForRecordCommand";
45
+ export * from "./command/BillWatchAzureCommand";
46
+ export * from "./command/BillWatchAzureEstimateRecordCommand";
47
+ export * from "./command/BillWatchAzure_CreateForRecordCommand";
48
+ export * from "./command/BillWatchGCPCommand";
49
+ export * from "./command/BillWatchGCPEstimateRecordCommand";
50
+ export * from "./command/BillWatchGCP_CreateForRecordCommand";
51
+ export * from "./command/CostCommand";
52
+ export * from "./command/CostListCommand";
53
+ export * from "./command/FieldCategoryCommand";
54
+ export * from "./command/FieldCategoryEstimateRecordCommand";
55
+ export * from "./command/FieldCategory_CreateForRecordCommand";
56
+ export * from "./command/FieldFieldCommand";
57
+ export * from "./command/FieldFieldEstimateRecordCommand";
58
+ export * from "./command/FieldField_CreateForRecordCommand";
59
+ export * from "./command/HealthzCommand";
60
+ export * from "./command/HealthzGetCommand";
61
+ export * from "./command/MetricsCommand";
62
+ export * from "./command/MetricsGetCommand";
63
+ export * from "./command/SecretSecretCommand";
64
+ export * from "./command/SecretSecretEstimateReadCommand";
65
+ export * from "./command/SecretSecretEstimateRecordCommand";
66
+ export * from "./command/SecretSecret_CreateForReadCommand";
67
+ export * from "./command/SecretSecret_CreateForRecordCommand";
68
+ export * from "./command/ValueCommand";
69
+ export * from "./command/ValueListCommand";
70
+ export * from "./estimator/BaseEstimator";
71
+ export * from "./estimator/BillWatchAWSRecordEstimator";
72
+ export * from "./estimator/BillWatchAzureRecordEstimator";
73
+ export * from "./estimator/BillWatchBaseRecordEstimator";
74
+ export * from "./estimator/BillWatchGCPRecordEstimator";
75
+ export * from "./estimator/FieldBaseRecordEstimator";
76
+ export * from "./estimator/FieldCategoryRecordEstimator";
77
+ export * from "./estimator/FieldFieldRecordEstimator";
78
+ export * from "./estimator/SecretSecretReadEstimator";
79
+ export * from "./estimator/SecretSecretRecordEstimator";
80
+ export * from "./meta/CostMetaTable";
81
+ export * from "./meta/NamirasoftCostMetaDatabase";
82
+ export * from "./row/CostRow";
83
+ export * from "./type/Bonus";
84
+ export * from "./type/CalculationOption";
85
+ export * from "./type/Estimation";
86
+ export * from "./type/EstimationOption";
87
+ export * from "./type/EstimationUsage";
88
+ export * from "./type/Period";
89
+ export * from "./type/SimulationOption";
55
90
  export * from "./type/Usage";