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.
- package/.ns-sdkg-dir-deep +3 -3
- package/.ns-sdkg-file-keep +36 -26
- package/dist/NamirasoftCostServer.js +1 -1
- package/dist/NamirasoftCostServerBillWatchAWS.d.ts +4 -15
- package/dist/NamirasoftCostServerBillWatchAWS.js +2 -2
- package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchAzure.d.ts +4 -15
- package/dist/NamirasoftCostServerBillWatchAzure.js +2 -2
- package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchGCP.d.ts +4 -15
- package/dist/NamirasoftCostServerBillWatchGCP.js +2 -2
- package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
- package/dist/NamirasoftCostServerCost.d.ts +0 -2
- package/dist/NamirasoftCostServerCost.js +0 -8
- package/dist/NamirasoftCostServerCost.js.map +1 -1
- package/dist/NamirasoftCostServerFieldCategory.d.ts +4 -15
- package/dist/NamirasoftCostServerFieldCategory.js +2 -2
- package/dist/NamirasoftCostServerFieldCategory.js.map +1 -1
- package/dist/NamirasoftCostServerFieldField.d.ts +4 -15
- package/dist/NamirasoftCostServerFieldField.js +2 -2
- package/dist/NamirasoftCostServerFieldField.js.map +1 -1
- package/dist/NamirasoftCostServerSecretSecret.d.ts +6 -29
- package/dist/NamirasoftCostServerSecretSecret.js +2 -2
- package/dist/NamirasoftCostServerSecretSecret.js.map +1 -1
- package/dist/command/BillWatchAWSCommand.d.ts +4 -0
- package/dist/command/BillWatchAWSCommand.js +17 -0
- package/dist/command/BillWatchAWSCommand.js.map +1 -0
- package/dist/command/BillWatchAWSEstimateRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAWSEstimateRecordCommand.js +103 -0
- package/dist/command/BillWatchAWSEstimateRecordCommand.js.map +1 -0
- package/dist/command/BillWatchAWS_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAWS_CreateForRecordCommand.js +112 -0
- package/dist/command/BillWatchAWS_CreateForRecordCommand.js.map +1 -0
- package/dist/command/BillWatchAzureCommand.d.ts +4 -0
- package/dist/command/BillWatchAzureCommand.js +17 -0
- package/dist/command/BillWatchAzureCommand.js.map +1 -0
- package/dist/command/BillWatchAzureEstimateRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAzureEstimateRecordCommand.js +103 -0
- package/dist/command/BillWatchAzureEstimateRecordCommand.js.map +1 -0
- package/dist/command/BillWatchAzure_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAzure_CreateForRecordCommand.js +112 -0
- package/dist/command/BillWatchAzure_CreateForRecordCommand.js.map +1 -0
- package/dist/command/BillWatchGCPCommand.d.ts +4 -0
- package/dist/command/BillWatchGCPCommand.js +17 -0
- package/dist/command/BillWatchGCPCommand.js.map +1 -0
- package/dist/command/BillWatchGCPEstimateRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchGCPEstimateRecordCommand.js +103 -0
- package/dist/command/BillWatchGCPEstimateRecordCommand.js.map +1 -0
- package/dist/command/BillWatchGCP_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchGCP_CreateForRecordCommand.js +112 -0
- package/dist/command/BillWatchGCP_CreateForRecordCommand.js.map +1 -0
- package/dist/command/CostCommand.d.ts +4 -0
- package/dist/command/CostCommand.js +15 -0
- package/dist/command/CostCommand.js.map +1 -0
- package/dist/command/CostListCommand.d.ts +5 -0
- package/dist/command/CostListCommand.js +38 -0
- package/dist/command/CostListCommand.js.map +1 -0
- package/dist/command/FieldCategoryCommand.d.ts +4 -0
- package/dist/command/FieldCategoryCommand.js +17 -0
- package/dist/command/FieldCategoryCommand.js.map +1 -0
- package/dist/command/FieldCategoryEstimateRecordCommand.d.ts +5 -0
- package/dist/command/FieldCategoryEstimateRecordCommand.js +103 -0
- package/dist/command/FieldCategoryEstimateRecordCommand.js.map +1 -0
- package/dist/command/FieldCategory_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/FieldCategory_CreateForRecordCommand.js +112 -0
- package/dist/command/FieldCategory_CreateForRecordCommand.js.map +1 -0
- package/dist/command/FieldFieldCommand.d.ts +4 -0
- package/dist/command/FieldFieldCommand.js +17 -0
- package/dist/command/FieldFieldCommand.js.map +1 -0
- package/dist/command/FieldFieldEstimateRecordCommand.d.ts +5 -0
- package/dist/command/FieldFieldEstimateRecordCommand.js +103 -0
- package/dist/command/FieldFieldEstimateRecordCommand.js.map +1 -0
- package/dist/command/FieldField_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/FieldField_CreateForRecordCommand.js +112 -0
- package/dist/command/FieldField_CreateForRecordCommand.js.map +1 -0
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +38 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/MetricsCommand.d.ts +4 -0
- package/dist/command/MetricsCommand.js +15 -0
- package/dist/command/MetricsCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.d.ts +5 -0
- package/dist/command/MetricsGetCommand.js +38 -0
- package/dist/command/MetricsGetCommand.js.map +1 -0
- package/dist/command/SecretSecretCommand.d.ts +4 -0
- package/dist/command/SecretSecretCommand.js +21 -0
- package/dist/command/SecretSecretCommand.js.map +1 -0
- package/dist/command/SecretSecretEstimateReadCommand.d.ts +5 -0
- package/dist/command/SecretSecretEstimateReadCommand.js +103 -0
- package/dist/command/SecretSecretEstimateReadCommand.js.map +1 -0
- package/dist/command/SecretSecretEstimateRecordCommand.d.ts +5 -0
- package/dist/command/SecretSecretEstimateRecordCommand.js +103 -0
- package/dist/command/SecretSecretEstimateRecordCommand.js.map +1 -0
- package/dist/command/SecretSecret_CreateForReadCommand.d.ts +5 -0
- package/dist/command/SecretSecret_CreateForReadCommand.js +112 -0
- package/dist/command/SecretSecret_CreateForReadCommand.js.map +1 -0
- package/dist/command/SecretSecret_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/SecretSecret_CreateForRecordCommand.js +112 -0
- package/dist/command/SecretSecret_CreateForRecordCommand.js.map +1 -0
- package/dist/command/ValueCommand.d.ts +4 -0
- package/dist/command/ValueCommand.js +15 -0
- package/dist/command/ValueCommand.js.map +1 -0
- package/dist/command/ValueListCommand.d.ts +5 -0
- package/dist/command/ValueListCommand.js +38 -0
- package/dist/command/ValueListCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +32 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/index.d.ts +47 -12
- package/dist/index.js +47 -12
- package/dist/index.js.map +1 -1
- package/package.json +28 -28
- package/src/NamirasoftCostServer.ts +59 -59
- package/src/NamirasoftCostServerBase.ts +29 -29
- package/src/NamirasoftCostServerBillWatchAWS.ts +47 -46
- package/src/NamirasoftCostServerBillWatchAzure.ts +47 -46
- package/src/NamirasoftCostServerBillWatchGCP.ts +47 -46
- package/src/NamirasoftCostServerCost.ts +41 -49
- package/src/NamirasoftCostServerFieldCategory.ts +47 -46
- package/src/NamirasoftCostServerFieldField.ts +47 -46
- package/src/NamirasoftCostServerHealthz.ts +35 -35
- package/src/NamirasoftCostServerMetrics.ts +35 -35
- package/src/NamirasoftCostServerSecretSecret.ts +61 -60
- package/src/NamirasoftCostServerValue.ts +36 -36
- package/src/bonus/BaseBonus.ts +13 -13
- package/src/bonus/DeactiveBonus.ts +14 -14
- package/src/bonus/FreeCountBonus.ts +14 -14
- package/src/bonus/FreeTotalValueBonus.ts +28 -28
- package/src/bonus/LowAmountBonus.ts +14 -14
- package/src/bonus/LowSecondsBonus.ts +14 -14
- package/src/bonus/LowTotalCountBonus.ts +14 -14
- package/src/bonus/LowTotalValueBonus.ts +14 -14
- package/src/bonus/TrialBonus.ts +18 -18
- package/src/command/BillWatchAWSCommand.ts +34 -0
- package/src/command/BillWatchAWSEstimateRecordCommand.ts +110 -0
- package/src/command/BillWatchAWS_CreateForRecordCommand.ts +119 -0
- package/src/command/BillWatchAzureCommand.ts +34 -0
- package/src/command/BillWatchAzureEstimateRecordCommand.ts +110 -0
- package/src/command/BillWatchAzure_CreateForRecordCommand.ts +119 -0
- package/src/command/BillWatchGCPCommand.ts +34 -0
- package/src/command/BillWatchGCPEstimateRecordCommand.ts +110 -0
- package/src/command/BillWatchGCP_CreateForRecordCommand.ts +119 -0
- package/src/{row/CostCreateRow.ts → command/CostCommand.ts} +32 -38
- package/src/command/CostListCommand.ts +45 -0
- package/src/command/FieldCategoryCommand.ts +34 -0
- package/src/command/FieldCategoryEstimateRecordCommand.ts +110 -0
- package/src/command/FieldCategory_CreateForRecordCommand.ts +119 -0
- package/src/command/FieldFieldCommand.ts +34 -0
- package/src/command/FieldFieldEstimateRecordCommand.ts +110 -0
- package/src/command/FieldField_CreateForRecordCommand.ts +119 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MetricsCommand.ts +32 -0
- package/src/command/MetricsGetCommand.ts +45 -0
- package/src/command/SecretSecretCommand.ts +38 -0
- package/src/command/SecretSecretEstimateReadCommand.ts +110 -0
- package/src/command/SecretSecretEstimateRecordCommand.ts +110 -0
- package/src/command/SecretSecret_CreateForReadCommand.ts +119 -0
- package/src/command/SecretSecret_CreateForRecordCommand.ts +119 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +51 -0
- package/src/estimator/BaseEstimator.ts +62 -62
- package/src/estimator/BillWatchAWSRecordEstimator.ts +4 -4
- package/src/estimator/BillWatchAzureRecordEstimator.ts +4 -4
- package/src/estimator/BillWatchBaseRecordEstimator.ts +25 -25
- package/src/estimator/BillWatchGCPRecordEstimator.ts +4 -4
- package/src/estimator/FieldBaseRecordEstimator.ts +20 -20
- package/src/estimator/FieldCategoryRecordEstimator.ts +9 -9
- package/src/estimator/FieldFieldRecordEstimator.ts +9 -9
- package/src/estimator/SecretSecretReadEstimator.ts +25 -25
- package/src/estimator/SecretSecretRecordEstimator.ts +24 -24
- package/src/index.ts +89 -54
- package/src/meta/CostMetaTable.ts +81 -81
- package/src/meta/NamirasoftCostMetaDatabase.ts +50 -50
- package/src/row/CostRow.ts +40 -40
- package/src/type/Bonus.ts +20 -20
- package/src/type/CalculationOption.ts +34 -34
- package/src/type/Estimation.ts +35 -35
- package/src/type/EstimationOption.ts +31 -31
- package/src/type/EstimationUsage.ts +22 -22
- package/src/type/Period.ts +101 -101
- package/src/type/SimulationOption.ts +29 -29
- package/src/type/Usage.ts +24 -24
- package/dist/row/CostCreateRow.d.ts +0 -17
- package/dist/row/CostCreateRow.js +0 -3
- 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 "./
|
22
|
-
export * from "./
|
23
|
-
export * from "./
|
24
|
-
export * from "./
|
25
|
-
export * from "./
|
26
|
-
export * from "./
|
27
|
-
export * from "./
|
28
|
-
export * from "./
|
29
|
-
export * from "./
|
30
|
-
export * from "./
|
31
|
-
export * from "./
|
32
|
-
export * from "./
|
33
|
-
export * from "./
|
34
|
-
export * from "./
|
35
|
-
export * from "./
|
36
|
-
export * from "./
|
37
|
-
export * from "./
|
38
|
-
export * from "./
|
39
|
-
export * from "./
|
40
|
-
export * from "./
|
41
|
-
export * from "./
|
42
|
-
export * from "./
|
43
|
-
export * from "./
|
44
|
-
export * from "./
|
45
|
-
export * from "./
|
46
|
-
export * from "./
|
47
|
-
export * from "./
|
48
|
-
export * from "./
|
49
|
-
export * from "./
|
50
|
-
export * from "./
|
51
|
-
export * from "./
|
52
|
-
export * from "./
|
53
|
-
export * from "./
|
54
|
-
export * from "./
|
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";
|