namirasoft-cost 1.4.20 → 1.4.22
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 -2
- package/.ns-sdkg-file-keep +21 -5
- package/dist/NamirasoftCostServer.d.ts +2 -0
- package/dist/NamirasoftCostServer.js +3 -1
- package/dist/NamirasoftCostServer.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchAWS.d.ts +4 -4
- package/dist/NamirasoftCostServerBillWatchAWS.js +6 -6
- package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchAzure.d.ts +4 -4
- package/dist/NamirasoftCostServerBillWatchAzure.js +6 -6
- package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchGCP.d.ts +4 -4
- package/dist/NamirasoftCostServerBillWatchGCP.js +6 -6
- package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
- package/dist/NamirasoftCostServerFieldCategory.d.ts +4 -4
- package/dist/NamirasoftCostServerFieldCategory.js +6 -6
- package/dist/NamirasoftCostServerFieldCategory.js.map +1 -1
- package/dist/NamirasoftCostServerFieldField.d.ts +4 -4
- package/dist/NamirasoftCostServerFieldField.js +6 -6
- package/dist/NamirasoftCostServerFieldField.js.map +1 -1
- package/dist/NamirasoftCostServerSecretSecret.d.ts +36 -0
- package/dist/NamirasoftCostServerSecretSecret.js +53 -0
- package/dist/NamirasoftCostServerSecretSecret.js.map +1 -0
- package/dist/bonus/BaseBonus.d.ts +13 -0
- package/dist/bonus/BaseBonus.js +11 -0
- package/dist/bonus/BaseBonus.js.map +1 -0
- package/dist/bonus/DeactiveBonus.d.ts +10 -0
- package/dist/bonus/DeactiveBonus.js +27 -0
- package/dist/bonus/DeactiveBonus.js.map +1 -0
- package/dist/bonus/FreeCountBonus.d.ts +10 -0
- package/dist/bonus/FreeCountBonus.js +27 -0
- package/dist/bonus/FreeCountBonus.js.map +1 -0
- package/dist/bonus/FreeTotalValueBonus.d.ts +33 -0
- package/dist/bonus/FreeTotalValueBonus.js +39 -0
- package/dist/bonus/FreeTotalValueBonus.js.map +1 -0
- package/dist/bonus/LowAmountBonus.d.ts +10 -0
- package/dist/bonus/LowAmountBonus.js +27 -0
- package/dist/bonus/LowAmountBonus.js.map +1 -0
- package/dist/bonus/LowSecondsBonus.d.ts +10 -0
- package/dist/bonus/LowSecondsBonus.js +27 -0
- package/dist/bonus/LowSecondsBonus.js.map +1 -0
- package/dist/bonus/LowTotalCountBonus.d.ts +10 -0
- package/dist/bonus/LowTotalCountBonus.js +27 -0
- package/dist/bonus/LowTotalCountBonus.js.map +1 -0
- package/dist/bonus/LowTotalValueBonus.d.ts +10 -0
- package/dist/bonus/LowTotalValueBonus.js +27 -0
- package/dist/bonus/LowTotalValueBonus.js.map +1 -0
- package/dist/bonus/TrialBonus.d.ts +12 -0
- package/dist/bonus/TrialBonus.js +32 -0
- package/dist/bonus/TrialBonus.js.map +1 -0
- package/dist/command/BillWatchAWSCommand.js +4 -4
- package/dist/command/BillWatchAWSCommand.js.map +1 -1
- package/dist/command/{BillWatchAWS_CreateForCommand.d.ts → BillWatchAWSEstimateHourlyCommand.d.ts} +1 -1
- package/dist/command/{BillWatchGCPEstimationCommand.js → BillWatchAWSEstimateHourlyCommand.js} +15 -15
- package/dist/command/BillWatchAWSEstimateHourlyCommand.js.map +1 -0
- package/dist/command/BillWatchAWS_CreateForHourlyCommand.d.ts +5 -0
- package/dist/command/{BillWatchAWS_CreateForCommand.js → BillWatchAWS_CreateForHourlyCommand.js} +14 -14
- package/dist/command/BillWatchAWS_CreateForHourlyCommand.js.map +1 -0
- package/dist/command/BillWatchAzureCommand.js +4 -4
- package/dist/command/BillWatchAzureCommand.js.map +1 -1
- package/dist/command/BillWatchAzureEstimateHourlyCommand.d.ts +5 -0
- package/dist/command/BillWatchAzureEstimateHourlyCommand.js +76 -0
- package/dist/command/BillWatchAzureEstimateHourlyCommand.js.map +1 -0
- package/dist/command/BillWatchAzure_CreateForHourlyCommand.d.ts +5 -0
- package/dist/command/BillWatchAzure_CreateForHourlyCommand.js +94 -0
- package/dist/command/BillWatchAzure_CreateForHourlyCommand.js.map +1 -0
- package/dist/command/BillWatchGCPCommand.js +4 -4
- package/dist/command/BillWatchGCPCommand.js.map +1 -1
- package/dist/command/{BillWatchAWSEstimationCommand.d.ts → BillWatchGCPEstimateHourlyCommand.d.ts} +1 -1
- package/dist/command/{FieldCategoryEstimationCommand.js → BillWatchGCPEstimateHourlyCommand.js} +15 -15
- package/dist/command/BillWatchGCPEstimateHourlyCommand.js.map +1 -0
- package/dist/command/BillWatchGCP_CreateForHourlyCommand.d.ts +5 -0
- package/dist/command/{FieldCategory_CreateForCommand.js → BillWatchGCP_CreateForHourlyCommand.js} +14 -14
- package/dist/command/BillWatchGCP_CreateForHourlyCommand.js.map +1 -0
- package/dist/command/FieldCategoryCommand.js +4 -4
- package/dist/command/FieldCategoryCommand.js.map +1 -1
- package/dist/command/FieldCategoryEstimateHourlyCommand.d.ts +5 -0
- package/dist/command/FieldCategoryEstimateHourlyCommand.js +76 -0
- package/dist/command/FieldCategoryEstimateHourlyCommand.js.map +1 -0
- package/dist/command/FieldCategory_CreateForHourlyCommand.d.ts +5 -0
- package/dist/command/FieldCategory_CreateForHourlyCommand.js +94 -0
- package/dist/command/FieldCategory_CreateForHourlyCommand.js.map +1 -0
- package/dist/command/FieldFieldCommand.js +4 -4
- package/dist/command/FieldFieldCommand.js.map +1 -1
- package/dist/command/{BillWatchAzure_CreateForCommand.d.ts → FieldFieldEstimateHourlyCommand.d.ts} +1 -1
- package/dist/command/{BillWatchAzureEstimationCommand.js → FieldFieldEstimateHourlyCommand.js} +15 -15
- package/dist/command/{BillWatchAzureEstimationCommand.js.map → FieldFieldEstimateHourlyCommand.js.map} +1 -1
- package/dist/command/FieldField_CreateForHourlyCommand.d.ts +5 -0
- package/dist/command/{BillWatchGCP_CreateForCommand.js → FieldField_CreateForHourlyCommand.js} +14 -14
- package/dist/command/FieldField_CreateForHourlyCommand.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/SecretSecretEstimateHourlyCommand.d.ts +5 -0
- package/dist/command/{BillWatchAWSEstimationCommand.js → SecretSecretEstimateHourlyCommand.js} +15 -15
- package/dist/command/SecretSecretEstimateHourlyCommand.js.map +1 -0
- package/dist/command/{BillWatchAzureEstimationCommand.d.ts → SecretSecretEstimateReadCommand.d.ts} +1 -1
- package/dist/command/{FieldFieldEstimationCommand.js → SecretSecretEstimateReadCommand.js} +17 -17
- package/dist/command/SecretSecretEstimateReadCommand.js.map +1 -0
- package/dist/command/SecretSecret_CreateForHourlyCommand.d.ts +5 -0
- package/dist/command/{BillWatchAzure_CreateForCommand.js → SecretSecret_CreateForHourlyCommand.js} +14 -14
- package/dist/command/SecretSecret_CreateForHourlyCommand.js.map +1 -0
- package/dist/command/SecretSecret_CreateForReadCommand.d.ts +5 -0
- package/dist/command/{FieldField_CreateForCommand.js → SecretSecret_CreateForReadCommand.js} +16 -16
- package/dist/command/SecretSecret_CreateForReadCommand.js.map +1 -0
- package/dist/command/cli.js +2 -0
- package/dist/command/cli.js.map +1 -1
- package/dist/estimator/BaseEstimator.d.ts +15 -0
- package/dist/estimator/BaseEstimator.js +58 -0
- package/dist/estimator/BaseEstimator.js.map +1 -0
- package/dist/estimator/BillWatchAWSHourlyEstimator.d.ts +3 -0
- package/dist/estimator/BillWatchAWSHourlyEstimator.js +8 -0
- package/dist/estimator/BillWatchAWSHourlyEstimator.js.map +1 -0
- package/dist/estimator/BillWatchAzureHourlyEstimator.d.ts +3 -0
- package/dist/estimator/BillWatchAzureHourlyEstimator.js +8 -0
- package/dist/estimator/BillWatchAzureHourlyEstimator.js.map +1 -0
- package/dist/estimator/BillWatchBaseHourlyEstimator.d.ts +14 -0
- package/dist/estimator/BillWatchBaseHourlyEstimator.js +26 -0
- package/dist/estimator/BillWatchBaseHourlyEstimator.js.map +1 -0
- package/dist/estimator/BillWatchGCPHourlyEstimator.d.ts +3 -0
- package/dist/estimator/BillWatchGCPHourlyEstimator.js +8 -0
- package/dist/estimator/BillWatchGCPHourlyEstimator.js.map +1 -0
- package/dist/estimator/FieldBaseHourlyEstimator.d.ts +9 -0
- package/dist/estimator/FieldBaseHourlyEstimator.js +22 -0
- package/dist/estimator/FieldBaseHourlyEstimator.js.map +1 -0
- package/dist/estimator/FieldCategoryHourlyEstimator.d.ts +8 -0
- package/dist/estimator/FieldCategoryHourlyEstimator.js +12 -0
- package/dist/estimator/FieldCategoryHourlyEstimator.js.map +1 -0
- package/dist/estimator/FieldFieldHourlyEstimator.d.ts +8 -0
- package/dist/estimator/FieldFieldHourlyEstimator.js +12 -0
- package/dist/estimator/FieldFieldHourlyEstimator.js.map +1 -0
- package/dist/estimator/SecretSecretHourlyEstimator.d.ts +14 -0
- package/dist/estimator/SecretSecretHourlyEstimator.js +25 -0
- package/dist/estimator/SecretSecretHourlyEstimator.js.map +1 -0
- package/dist/estimator/SecretSecretReadEstimator.d.ts +14 -0
- package/dist/estimator/SecretSecretReadEstimator.js +25 -0
- package/dist/estimator/SecretSecretReadEstimator.js.map +1 -0
- package/dist/index.d.ts +16 -15
- package/dist/index.js +16 -15
- package/dist/index.js.map +1 -1
- package/dist/type/Estimation.d.ts +10 -3
- package/dist/type/EstimationOption.d.ts +10 -0
- package/dist/type/{EstimationRow.js → EstimationOption.js} +2 -1
- package/dist/type/EstimationOption.js.map +1 -0
- package/dist/type/Period.d.ts +20 -2
- package/dist/type/Period.js +61 -0
- package/dist/type/Period.js.map +1 -1
- package/dist/type/Usage.d.ts +24 -0
- package/dist/type/Usage.js +30 -0
- package/dist/type/Usage.js.map +1 -0
- package/package.json +2 -2
- package/src/NamirasoftCostServer.ts +4 -1
- package/src/NamirasoftCostServerBillWatchAWS.ts +6 -6
- package/src/NamirasoftCostServerBillWatchAzure.ts +6 -6
- package/src/NamirasoftCostServerBillWatchGCP.ts +6 -6
- package/src/NamirasoftCostServerFieldCategory.ts +6 -6
- package/src/NamirasoftCostServerFieldField.ts +6 -6
- package/src/NamirasoftCostServerSecretSecret.ts +61 -0
- package/src/bonus/BaseBonus.ts +14 -0
- package/src/bonus/DeactiveBonus.ts +15 -0
- package/src/bonus/FreeCountBonus.ts +15 -0
- package/src/bonus/FreeTotalValueBonus.ts +29 -0
- package/src/bonus/LowAmountBonus.ts +15 -0
- package/src/bonus/LowSecondsBonus.ts +15 -0
- package/src/bonus/LowTotalCountBonus.ts +15 -0
- package/src/bonus/LowTotalValueBonus.ts +15 -0
- package/src/bonus/TrialBonus.ts +19 -0
- package/src/command/BillWatchAWSCommand.ts +4 -4
- package/src/command/{FieldCategoryEstimationCommand.ts → BillWatchAWSEstimateHourlyCommand.ts} +12 -12
- package/src/command/{BillWatchAzure_CreateForCommand.ts → BillWatchAWS_CreateForHourlyCommand.ts} +11 -11
- package/src/command/BillWatchAzureCommand.ts +4 -4
- package/src/command/BillWatchAzureEstimateHourlyCommand.ts +83 -0
- package/src/command/BillWatchAzure_CreateForHourlyCommand.ts +101 -0
- package/src/command/BillWatchGCPCommand.ts +4 -4
- package/src/command/{BillWatchGCPEstimationCommand.ts → BillWatchGCPEstimateHourlyCommand.ts} +12 -12
- package/src/command/{FieldCategory_CreateForCommand.ts → BillWatchGCP_CreateForHourlyCommand.ts} +11 -11
- package/src/command/FieldCategoryCommand.ts +4 -4
- package/src/command/FieldCategoryEstimateHourlyCommand.ts +83 -0
- package/src/command/FieldCategory_CreateForHourlyCommand.ts +101 -0
- package/src/command/FieldFieldCommand.ts +4 -4
- package/src/command/{BillWatchAzureEstimationCommand.ts → FieldFieldEstimateHourlyCommand.ts} +12 -12
- package/src/command/{BillWatchGCP_CreateForCommand.ts → FieldField_CreateForHourlyCommand.ts} +11 -11
- package/src/command/SecretSecretCommand.ts +38 -0
- package/src/command/{BillWatchAWSEstimationCommand.ts → SecretSecretEstimateHourlyCommand.ts} +12 -12
- package/src/command/{FieldFieldEstimationCommand.ts → SecretSecretEstimateReadCommand.ts} +14 -14
- package/src/command/{BillWatchAWS_CreateForCommand.ts → SecretSecret_CreateForHourlyCommand.ts} +11 -11
- package/src/command/{FieldField_CreateForCommand.ts → SecretSecret_CreateForReadCommand.ts} +13 -13
- package/src/command/cli.ts +2 -0
- package/src/estimator/BaseEstimator.ts +63 -0
- package/src/estimator/BillWatchAWSHourlyEstimator.ts +5 -0
- package/src/estimator/BillWatchAzureHourlyEstimator.ts +5 -0
- package/src/estimator/BillWatchBaseHourlyEstimator.ts +26 -0
- package/src/estimator/BillWatchGCPHourlyEstimator.ts +5 -0
- package/src/estimator/FieldBaseHourlyEstimator.ts +21 -0
- package/src/estimator/FieldCategoryHourlyEstimator.ts +10 -0
- package/src/estimator/FieldFieldHourlyEstimator.ts +10 -0
- package/src/estimator/SecretSecretHourlyEstimator.ts +25 -0
- package/src/estimator/SecretSecretReadEstimator.ts +26 -0
- package/src/index.ts +17 -16
- package/src/type/Estimation.ts +10 -3
- package/src/type/EstimationOption.ts +12 -0
- package/src/type/Period.ts +72 -3
- package/src/type/Usage.ts +25 -0
- package/dist/TimeUtil.d.ts +0 -7
- package/dist/TimeUtil.js +0 -66
- package/dist/TimeUtil.js.map +0 -1
- package/dist/command/BillWatchAWSEstimationCommand.js.map +0 -1
- package/dist/command/BillWatchAWS_CreateForCommand.js.map +0 -1
- package/dist/command/BillWatchAzure_CreateForCommand.js.map +0 -1
- package/dist/command/BillWatchGCPEstimationCommand.d.ts +0 -5
- package/dist/command/BillWatchGCPEstimationCommand.js.map +0 -1
- package/dist/command/BillWatchGCP_CreateForCommand.d.ts +0 -5
- package/dist/command/BillWatchGCP_CreateForCommand.js.map +0 -1
- package/dist/command/FieldCategoryEstimationCommand.d.ts +0 -5
- package/dist/command/FieldCategoryEstimationCommand.js.map +0 -1
- package/dist/command/FieldCategory_CreateForCommand.d.ts +0 -5
- package/dist/command/FieldCategory_CreateForCommand.js.map +0 -1
- package/dist/command/FieldFieldEstimationCommand.d.ts +0 -5
- package/dist/command/FieldFieldEstimationCommand.js.map +0 -1
- package/dist/command/FieldField_CreateForCommand.d.ts +0 -5
- package/dist/command/FieldField_CreateForCommand.js.map +0 -1
- package/dist/enum/TrialUnit.d.ts +0 -5
- package/dist/enum/TrialUnit.js +0 -10
- package/dist/enum/TrialUnit.js.map +0 -1
- package/dist/type/EstimationRow.d.ts +0 -9
- package/dist/type/EstimationRow.js.map +0 -1
- package/dist/type/Trial.d.ts +0 -5
- package/dist/type/Trial.js +0 -3
- package/dist/type/Trial.js.map +0 -1
- package/dist/type/TrialDuration.d.ts +0 -5
- package/dist/type/TrialDuration.js +0 -3
- package/dist/type/TrialDuration.js.map +0 -1
- package/src/TimeUtil.ts +0 -67
- package/src/enum/TrialUnit.ts +0 -6
- package/src/type/EstimationRow.ts +0 -10
- package/src/type/Trial.ts +0 -7
- package/src/type/TrialDuration.ts +0 -7
@@ -0,0 +1,26 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BillWatchBaseHourlyEstimator = void 0;
|
4
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
5
|
+
const BaseEstimator_1 = require("./BaseEstimator");
|
6
|
+
const Usage_1 = require("../type/Usage");
|
7
|
+
const TrialBonus_1 = require("../bonus/TrialBonus");
|
8
|
+
class BillWatchBaseHourlyEstimator extends BaseEstimator_1.BaseEstimator {
|
9
|
+
getFee() {
|
10
|
+
return { active: BillWatchBaseHourlyEstimator.WATCH_PER_HOUR_ACTIVE, deactive: 0 };
|
11
|
+
}
|
12
|
+
getUsage() {
|
13
|
+
return {
|
14
|
+
name: Usage_1.Usage.Time.name,
|
15
|
+
unit: Usage_1.Usage.Time.units.Hour.name
|
16
|
+
};
|
17
|
+
}
|
18
|
+
getBonues() {
|
19
|
+
return [
|
20
|
+
new TrialBonus_1.TrialBonus(1, namirasoft_core_1.DurationUnit.Week)
|
21
|
+
];
|
22
|
+
}
|
23
|
+
}
|
24
|
+
exports.BillWatchBaseHourlyEstimator = BillWatchBaseHourlyEstimator;
|
25
|
+
BillWatchBaseHourlyEstimator.WATCH_PER_HOUR_ACTIVE = namirasoft_core_1.PriceOperation.cent_to_millicent(3);
|
26
|
+
//# sourceMappingURL=BillWatchBaseHourlyEstimator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BillWatchBaseHourlyEstimator.js","sourceRoot":"","sources":["../../src/estimator/BillWatchBaseHourlyEstimator.ts"],"names":[],"mappings":";;;AAAA,qDAA+D;AAC/D,mDAAgD;AAChD,yCAAsC;AACtC,oDAAiD;AAEjD,MAAsB,4BAA6B,SAAQ,6BAAa;IAG3D,MAAM;QAEX,OAAO,EAAE,MAAM,EAAE,4BAA4B,CAAC,qBAAqB,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IACvF,CAAC;IACQ,QAAQ;QAEb,OAAO;YACH,IAAI,EAAE,aAAK,CAAC,IAAI,CAAC,IAAI;YACrB,IAAI,EAAE,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;SACnC,CAAC;IACN,CAAC;IACQ,SAAS;QAEd,OAAO;YACH,IAAI,uBAAU,CAAC,CAAC,EAAE,8BAAY,CAAC,IAAI,CAAC;SACvC,CAAC;IACN,CAAC;;AAnBL,oEAoBC;AAlBU,kDAAqB,GAAG,gCAAc,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.BillWatchGCPHourlyEstimator = void 0;
|
4
|
+
const BillWatchBaseHourlyEstimator_1 = require("./BillWatchBaseHourlyEstimator");
|
5
|
+
class BillWatchGCPHourlyEstimator extends BillWatchBaseHourlyEstimator_1.BillWatchBaseHourlyEstimator {
|
6
|
+
}
|
7
|
+
exports.BillWatchGCPHourlyEstimator = BillWatchGCPHourlyEstimator;
|
8
|
+
//# sourceMappingURL=BillWatchGCPHourlyEstimator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BillWatchGCPHourlyEstimator.js","sourceRoot":"","sources":["../../src/estimator/BillWatchGCPHourlyEstimator.ts"],"names":[],"mappings":";;;AAAA,iFAA8E;AAE9E,MAAa,2BAA4B,SAAQ,2DAA4B;CAE5E;AAFD,kEAEC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { TrialBonus } from "../bonus/TrialBonus";
|
2
|
+
import { BaseEstimator } from "./BaseEstimator";
|
3
|
+
export declare abstract class FieldBaseHourlyEstimator extends BaseEstimator {
|
4
|
+
getBonues(): TrialBonus[];
|
5
|
+
getUsage(): {
|
6
|
+
name: string;
|
7
|
+
unit: string;
|
8
|
+
};
|
9
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldBaseHourlyEstimator = void 0;
|
4
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
5
|
+
const TrialBonus_1 = require("../bonus/TrialBonus");
|
6
|
+
const BaseEstimator_1 = require("./BaseEstimator");
|
7
|
+
const Usage_1 = require("../type/Usage");
|
8
|
+
class FieldBaseHourlyEstimator extends BaseEstimator_1.BaseEstimator {
|
9
|
+
getBonues() {
|
10
|
+
return [
|
11
|
+
new TrialBonus_1.TrialBonus(1, namirasoft_core_1.DurationUnit.Week)
|
12
|
+
];
|
13
|
+
}
|
14
|
+
getUsage() {
|
15
|
+
return {
|
16
|
+
name: Usage_1.Usage.Time.name,
|
17
|
+
unit: Usage_1.Usage.Time.units.Hour.name
|
18
|
+
};
|
19
|
+
}
|
20
|
+
}
|
21
|
+
exports.FieldBaseHourlyEstimator = FieldBaseHourlyEstimator;
|
22
|
+
//# sourceMappingURL=FieldBaseHourlyEstimator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FieldBaseHourlyEstimator.js","sourceRoot":"","sources":["../../src/estimator/FieldBaseHourlyEstimator.ts"],"names":[],"mappings":";;;AAAA,qDAA+C;AAC/C,oDAAiD;AACjD,mDAAgD;AAChD,yCAAsC;AAEtC,MAAsB,wBAAyB,SAAQ,6BAAa;IAEvD,SAAS;QAEd,OAAO;YACH,IAAI,uBAAU,CAAC,CAAC,EAAE,8BAAY,CAAC,IAAI,CAAC;SACvC,CAAC;IACN,CAAC;IACQ,QAAQ;QAEb,OAAO;YACH,IAAI,EAAE,aAAK,CAAC,IAAI,CAAC,IAAI;YACrB,IAAI,EAAE,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;SACnC,CAAC;IACN,CAAC;CACJ;AAfD,4DAeC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldCategoryHourlyEstimator = void 0;
|
4
|
+
const FieldBaseHourlyEstimator_1 = require("./FieldBaseHourlyEstimator");
|
5
|
+
class FieldCategoryHourlyEstimator extends FieldBaseHourlyEstimator_1.FieldBaseHourlyEstimator {
|
6
|
+
getFee() {
|
7
|
+
return { active: FieldCategoryHourlyEstimator.PER_HOUR_ACTIVE, deactive: FieldCategoryHourlyEstimator.PER_HOUR_ACTIVE };
|
8
|
+
}
|
9
|
+
}
|
10
|
+
exports.FieldCategoryHourlyEstimator = FieldCategoryHourlyEstimator;
|
11
|
+
FieldCategoryHourlyEstimator.PER_HOUR_ACTIVE = 200;
|
12
|
+
//# sourceMappingURL=FieldCategoryHourlyEstimator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FieldCategoryHourlyEstimator.js","sourceRoot":"","sources":["../../src/estimator/FieldCategoryHourlyEstimator.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAEtE,MAAa,4BAA6B,SAAQ,mDAAwB;IAG7D,MAAM;QAEX,OAAO,EAAE,MAAM,EAAE,4BAA4B,CAAC,eAAe,EAAE,QAAQ,EAAE,4BAA4B,CAAC,eAAe,EAAE,CAAC;IAC5H,CAAC;;AANL,oEAOC;AALU,4CAAe,GAAG,GAAG,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.FieldFieldHourlyEstimator = void 0;
|
4
|
+
const FieldBaseHourlyEstimator_1 = require("./FieldBaseHourlyEstimator");
|
5
|
+
class FieldFieldHourlyEstimator extends FieldBaseHourlyEstimator_1.FieldBaseHourlyEstimator {
|
6
|
+
getFee() {
|
7
|
+
return { active: FieldFieldHourlyEstimator.PER_HOUR_ACTIVE, deactive: FieldFieldHourlyEstimator.PER_HOUR_ACTIVE };
|
8
|
+
}
|
9
|
+
}
|
10
|
+
exports.FieldFieldHourlyEstimator = FieldFieldHourlyEstimator;
|
11
|
+
FieldFieldHourlyEstimator.PER_HOUR_ACTIVE = 250;
|
12
|
+
//# sourceMappingURL=FieldFieldHourlyEstimator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FieldFieldHourlyEstimator.js","sourceRoot":"","sources":["../../src/estimator/FieldFieldHourlyEstimator.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AAEtE,MAAa,yBAA0B,SAAQ,mDAAwB;IAG1D,MAAM;QAEX,OAAO,EAAE,MAAM,EAAE,yBAAyB,CAAC,eAAe,EAAE,QAAQ,EAAE,yBAAyB,CAAC,eAAe,EAAE,CAAC;IACtH,CAAC;;AANL,8DAOC;AALU,yCAAe,GAAG,GAAG,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FreeCountBonus } from "../bonus/FreeCountBonus";
|
2
|
+
import { BaseEstimator } from "./BaseEstimator";
|
3
|
+
export declare class SecretSecretHourlyEstimator extends BaseEstimator {
|
4
|
+
static PER_HOUR_ACTIVE: number;
|
5
|
+
getFee(): {
|
6
|
+
active: number;
|
7
|
+
deactive: number;
|
8
|
+
};
|
9
|
+
getUsage(): {
|
10
|
+
name: string;
|
11
|
+
unit: string;
|
12
|
+
};
|
13
|
+
getBonues(): FreeCountBonus[];
|
14
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SecretSecretHourlyEstimator = void 0;
|
4
|
+
const FreeCountBonus_1 = require("../bonus/FreeCountBonus");
|
5
|
+
const Usage_1 = require("../type/Usage");
|
6
|
+
const BaseEstimator_1 = require("./BaseEstimator");
|
7
|
+
class SecretSecretHourlyEstimator extends BaseEstimator_1.BaseEstimator {
|
8
|
+
getFee() {
|
9
|
+
return { active: SecretSecretHourlyEstimator.PER_HOUR_ACTIVE, deactive: SecretSecretHourlyEstimator.PER_HOUR_ACTIVE };
|
10
|
+
}
|
11
|
+
getUsage() {
|
12
|
+
return {
|
13
|
+
name: Usage_1.Usage.Time.name,
|
14
|
+
unit: Usage_1.Usage.Time.units.Hour.name
|
15
|
+
};
|
16
|
+
}
|
17
|
+
getBonues() {
|
18
|
+
return [
|
19
|
+
new FreeCountBonus_1.FreeCountBonus(100)
|
20
|
+
];
|
21
|
+
}
|
22
|
+
}
|
23
|
+
exports.SecretSecretHourlyEstimator = SecretSecretHourlyEstimator;
|
24
|
+
SecretSecretHourlyEstimator.PER_HOUR_ACTIVE = 2;
|
25
|
+
//# sourceMappingURL=SecretSecretHourlyEstimator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SecretSecretHourlyEstimator.js","sourceRoot":"","sources":["../../src/estimator/SecretSecretHourlyEstimator.ts"],"names":[],"mappings":";;;AAAA,4DAAyD;AACzD,yCAAsC;AACtC,mDAAgD;AAEhD,MAAa,2BAA4B,SAAQ,6BAAa;IAGjD,MAAM;QAEX,OAAO,EAAE,MAAM,EAAE,2BAA2B,CAAC,eAAe,EAAE,QAAQ,EAAE,2BAA2B,CAAC,eAAe,EAAE,CAAC;IAC1H,CAAC;IACQ,QAAQ;QAEb,OAAO;YACH,IAAI,EAAE,aAAK,CAAC,IAAI,CAAC,IAAI;YACrB,IAAI,EAAE,aAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI;SACnC,CAAC;IACN,CAAC;IACQ,SAAS;QAEd,OAAO;YACH,IAAI,+BAAc,CAAC,GAAG,CAAC;SAC1B,CAAC;IACN,CAAC;;AAnBL,kEAoBC;AAlBU,2CAAe,GAAG,CAAC,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FreeTotalValueBonus } from "../bonus/FreeTotalValueBonus";
|
2
|
+
import { BaseEstimator } from "./BaseEstimator";
|
3
|
+
export declare class SecretSecretReadEstimator extends BaseEstimator {
|
4
|
+
static PER_CALL: number;
|
5
|
+
getFee(): {
|
6
|
+
active: number;
|
7
|
+
deactive: number;
|
8
|
+
};
|
9
|
+
getUsage(): {
|
10
|
+
name: string;
|
11
|
+
unit: string;
|
12
|
+
};
|
13
|
+
getBonues(): FreeTotalValueBonus[];
|
14
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.SecretSecretReadEstimator = void 0;
|
4
|
+
const FreeTotalValueBonus_1 = require("../bonus/FreeTotalValueBonus");
|
5
|
+
const Usage_1 = require("../type/Usage");
|
6
|
+
const BaseEstimator_1 = require("./BaseEstimator");
|
7
|
+
class SecretSecretReadEstimator extends BaseEstimator_1.BaseEstimator {
|
8
|
+
getFee() {
|
9
|
+
return { active: SecretSecretReadEstimator.PER_CALL, deactive: SecretSecretReadEstimator.PER_CALL };
|
10
|
+
}
|
11
|
+
getUsage() {
|
12
|
+
return {
|
13
|
+
name: Usage_1.Usage.APICALL.name,
|
14
|
+
unit: Usage_1.Usage.APICALL.units.REQUEST.name
|
15
|
+
};
|
16
|
+
}
|
17
|
+
getBonues() {
|
18
|
+
return [
|
19
|
+
new FreeTotalValueBonus_1.FreeTotalValueBonus(1000)
|
20
|
+
];
|
21
|
+
}
|
22
|
+
}
|
23
|
+
exports.SecretSecretReadEstimator = SecretSecretReadEstimator;
|
24
|
+
SecretSecretReadEstimator.PER_CALL = 1;
|
25
|
+
//# sourceMappingURL=SecretSecretReadEstimator.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"SecretSecretReadEstimator.js","sourceRoot":"","sources":["../../src/estimator/SecretSecretReadEstimator.ts"],"names":[],"mappings":";;;AAAA,sEAAmE;AACnE,yCAAsC;AACtC,mDAAgD;AAEhD,MAAa,yBAA0B,SAAQ,6BAAa;IAI/C,MAAM;QAEX,OAAO,EAAE,MAAM,EAAE,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,EAAE,yBAAyB,CAAC,QAAQ,EAAE,CAAC;IACxG,CAAC;IACQ,QAAQ;QAEb,OAAO;YACH,IAAI,EAAE,aAAK,CAAC,OAAO,CAAC,IAAI;YACxB,IAAI,EAAE,aAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI;SACzC,CAAC;IACN,CAAC;IACQ,SAAS;QAEd,OAAO;YACH,IAAI,yCAAmB,CAAC,IAAI,CAAC;SAChC,CAAC;IACN,CAAC;;AApBL,8DAqBC;AAnBU,kCAAQ,GAAG,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
@@ -8,40 +8,41 @@ export * from "./NamirasoftCostServerFieldCategory";
|
|
8
8
|
export * from "./NamirasoftCostServerFieldField";
|
9
9
|
export * from "./NamirasoftCostServerHealthz";
|
10
10
|
export * from "./NamirasoftCostServerMetrics";
|
11
|
+
export * from "./NamirasoftCostServerSecretSecret";
|
11
12
|
export * from "./NamirasoftCostServerValue";
|
12
|
-
export * from "./TimeUtil";
|
13
13
|
export * from "./command/BillWatchAWSCommand";
|
14
|
-
export * from "./command/
|
15
|
-
export * from "./command/
|
14
|
+
export * from "./command/BillWatchAWSEstimateHourlyCommand";
|
15
|
+
export * from "./command/BillWatchAWS_CreateForHourlyCommand";
|
16
16
|
export * from "./command/BillWatchAzureCommand";
|
17
|
-
export * from "./command/
|
18
|
-
export * from "./command/
|
17
|
+
export * from "./command/BillWatchAzureEstimateHourlyCommand";
|
18
|
+
export * from "./command/BillWatchAzure_CreateForHourlyCommand";
|
19
19
|
export * from "./command/BillWatchGCPCommand";
|
20
|
-
export * from "./command/
|
21
|
-
export * from "./command/
|
20
|
+
export * from "./command/BillWatchGCPEstimateHourlyCommand";
|
21
|
+
export * from "./command/BillWatchGCP_CreateForHourlyCommand";
|
22
22
|
export * from "./command/CostCommand";
|
23
23
|
export * from "./command/CostListCommand";
|
24
24
|
export * from "./command/Cost_CreateForCommand";
|
25
25
|
export * from "./command/FieldCategoryCommand";
|
26
|
-
export * from "./command/
|
27
|
-
export * from "./command/
|
26
|
+
export * from "./command/FieldCategoryEstimateHourlyCommand";
|
27
|
+
export * from "./command/FieldCategory_CreateForHourlyCommand";
|
28
28
|
export * from "./command/FieldFieldCommand";
|
29
|
-
export * from "./command/
|
30
|
-
export * from "./command/
|
29
|
+
export * from "./command/FieldFieldEstimateHourlyCommand";
|
30
|
+
export * from "./command/FieldField_CreateForHourlyCommand";
|
31
31
|
export * from "./command/HealthzCommand";
|
32
32
|
export * from "./command/HealthzGetCommand";
|
33
33
|
export * from "./command/MetricsCommand";
|
34
34
|
export * from "./command/MetricsGetCommand";
|
35
|
+
export * from "./command/SecretSecretCommand";
|
36
|
+
export * from "./command/SecretSecretEstimateHourlyCommand";
|
37
|
+
export * from "./command/SecretSecretEstimateReadCommand";
|
38
|
+
export * from "./command/SecretSecret_CreateForHourlyCommand";
|
39
|
+
export * from "./command/SecretSecret_CreateForReadCommand";
|
35
40
|
export * from "./command/ValueCommand";
|
36
41
|
export * from "./command/ValueListCommand";
|
37
|
-
export * from "./enum/TrialUnit";
|
38
42
|
export * from "./meta/CostMetaTable";
|
39
43
|
export * from "./meta/NamirasoftCostMetaDatabase";
|
40
44
|
export * from "./row/CostCreateRow";
|
41
45
|
export * from "./row/CostRow";
|
42
46
|
export * from "./type/Estimation";
|
43
|
-
export * from "./type/EstimationRow";
|
44
47
|
export * from "./type/EstimationUsage";
|
45
48
|
export * from "./type/Period";
|
46
|
-
export * from "./type/Trial";
|
47
|
-
export * from "./type/TrialDuration";
|
package/dist/index.js
CHANGED
@@ -24,41 +24,42 @@ __exportStar(require("./NamirasoftCostServerFieldCategory"), exports);
|
|
24
24
|
__exportStar(require("./NamirasoftCostServerFieldField"), exports);
|
25
25
|
__exportStar(require("./NamirasoftCostServerHealthz"), exports);
|
26
26
|
__exportStar(require("./NamirasoftCostServerMetrics"), exports);
|
27
|
+
__exportStar(require("./NamirasoftCostServerSecretSecret"), exports);
|
27
28
|
__exportStar(require("./NamirasoftCostServerValue"), exports);
|
28
|
-
__exportStar(require("./TimeUtil"), exports);
|
29
29
|
__exportStar(require("./command/BillWatchAWSCommand"), exports);
|
30
|
-
__exportStar(require("./command/
|
31
|
-
__exportStar(require("./command/
|
30
|
+
__exportStar(require("./command/BillWatchAWSEstimateHourlyCommand"), exports);
|
31
|
+
__exportStar(require("./command/BillWatchAWS_CreateForHourlyCommand"), exports);
|
32
32
|
__exportStar(require("./command/BillWatchAzureCommand"), exports);
|
33
|
-
__exportStar(require("./command/
|
34
|
-
__exportStar(require("./command/
|
33
|
+
__exportStar(require("./command/BillWatchAzureEstimateHourlyCommand"), exports);
|
34
|
+
__exportStar(require("./command/BillWatchAzure_CreateForHourlyCommand"), exports);
|
35
35
|
__exportStar(require("./command/BillWatchGCPCommand"), exports);
|
36
|
-
__exportStar(require("./command/
|
37
|
-
__exportStar(require("./command/
|
36
|
+
__exportStar(require("./command/BillWatchGCPEstimateHourlyCommand"), exports);
|
37
|
+
__exportStar(require("./command/BillWatchGCP_CreateForHourlyCommand"), exports);
|
38
38
|
__exportStar(require("./command/CostCommand"), exports);
|
39
39
|
__exportStar(require("./command/CostListCommand"), exports);
|
40
40
|
__exportStar(require("./command/Cost_CreateForCommand"), exports);
|
41
41
|
__exportStar(require("./command/FieldCategoryCommand"), exports);
|
42
|
-
__exportStar(require("./command/
|
43
|
-
__exportStar(require("./command/
|
42
|
+
__exportStar(require("./command/FieldCategoryEstimateHourlyCommand"), exports);
|
43
|
+
__exportStar(require("./command/FieldCategory_CreateForHourlyCommand"), exports);
|
44
44
|
__exportStar(require("./command/FieldFieldCommand"), exports);
|
45
|
-
__exportStar(require("./command/
|
46
|
-
__exportStar(require("./command/
|
45
|
+
__exportStar(require("./command/FieldFieldEstimateHourlyCommand"), exports);
|
46
|
+
__exportStar(require("./command/FieldField_CreateForHourlyCommand"), exports);
|
47
47
|
__exportStar(require("./command/HealthzCommand"), exports);
|
48
48
|
__exportStar(require("./command/HealthzGetCommand"), exports);
|
49
49
|
__exportStar(require("./command/MetricsCommand"), exports);
|
50
50
|
__exportStar(require("./command/MetricsGetCommand"), exports);
|
51
|
+
__exportStar(require("./command/SecretSecretCommand"), exports);
|
52
|
+
__exportStar(require("./command/SecretSecretEstimateHourlyCommand"), exports);
|
53
|
+
__exportStar(require("./command/SecretSecretEstimateReadCommand"), exports);
|
54
|
+
__exportStar(require("./command/SecretSecret_CreateForHourlyCommand"), exports);
|
55
|
+
__exportStar(require("./command/SecretSecret_CreateForReadCommand"), exports);
|
51
56
|
__exportStar(require("./command/ValueCommand"), exports);
|
52
57
|
__exportStar(require("./command/ValueListCommand"), exports);
|
53
|
-
__exportStar(require("./enum/TrialUnit"), exports);
|
54
58
|
__exportStar(require("./meta/CostMetaTable"), exports);
|
55
59
|
__exportStar(require("./meta/NamirasoftCostMetaDatabase"), exports);
|
56
60
|
__exportStar(require("./row/CostCreateRow"), exports);
|
57
61
|
__exportStar(require("./row/CostRow"), exports);
|
58
62
|
__exportStar(require("./type/Estimation"), exports);
|
59
|
-
__exportStar(require("./type/EstimationRow"), exports);
|
60
63
|
__exportStar(require("./type/EstimationUsage"), exports);
|
61
64
|
__exportStar(require("./type/Period"), exports);
|
62
|
-
__exportStar(require("./type/Trial"), exports);
|
63
|
-
__exportStar(require("./type/TrialDuration"), exports);
|
64
65
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,yDAAuC;AACvC,6DAA2C;AAC3C,qEAAmD;AACnD,uEAAqD;AACrD,qEAAmD;AACnD,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,gEAA8C;AAC9C,gEAA8C;AAC9C,8DAA4C;AAC5C,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAoBA,yDAAuC;AACvC,6DAA2C;AAC3C,qEAAmD;AACnD,uEAAqD;AACrD,qEAAmD;AACnD,6DAA2C;AAC3C,sEAAoD;AACpD,mEAAiD;AACjD,gEAA8C;AAC9C,gEAA8C;AAC9C,qEAAmD;AACnD,8DAA4C;AAC5C,gEAA8C;AAC9C,8EAA4D;AAC5D,gFAA8D;AAC9D,kEAAgD;AAChD,gFAA8D;AAC9D,kFAAgE;AAChE,gEAA8C;AAC9C,8EAA4D;AAC5D,gFAA8D;AAC9D,wDAAsC;AACtC,4DAA0C;AAC1C,kEAAgD;AAChD,iEAA+C;AAC/C,+EAA6D;AAC7D,iFAA+D;AAC/D,8DAA4C;AAC5C,4EAA0D;AAC1D,8EAA4D;AAC5D,2DAAyC;AACzC,8DAA4C;AAC5C,2DAAyC;AACzC,8DAA4C;AAC5C,gEAA8C;AAC9C,8EAA4D;AAC5D,4EAA0D;AAC1D,gFAA8D;AAC9D,8EAA4D;AAC5D,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,oEAAkD;AAClD,sDAAoC;AACpC,gDAA8B;AAC9B,oDAAkC;AAClC,yDAAuC;AACvC,gDAA8B"}
|
@@ -1,5 +1,12 @@
|
|
1
|
-
import {
|
1
|
+
import { BaseBonus } from "../bonus/BaseBonus";
|
2
|
+
import { EstimationOption } from "./EstimationOption";
|
3
|
+
import { EstimationUsage } from "./EstimationUsage";
|
2
4
|
export type Estimation = {
|
3
|
-
|
4
|
-
|
5
|
+
option: EstimationOption;
|
6
|
+
seconds: number;
|
7
|
+
usage: EstimationUsage;
|
8
|
+
fee: number;
|
9
|
+
amount: number;
|
10
|
+
currency: string;
|
11
|
+
free?: BaseBonus;
|
5
12
|
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"EstimationOption.js","sourceRoot":"","sources":["../../src/type/EstimationOption.ts"],"names":[],"mappings":";;AAWC,CAAC"}
|
package/dist/type/Period.d.ts
CHANGED
@@ -1,4 +1,22 @@
|
|
1
1
|
export type Period = {
|
2
|
-
|
3
|
-
|
2
|
+
year: number;
|
3
|
+
month: number;
|
4
|
+
day: number;
|
5
|
+
hour: number;
|
6
|
+
start: {
|
7
|
+
minute: number;
|
8
|
+
second: number;
|
9
|
+
};
|
10
|
+
end: {
|
11
|
+
minute: number;
|
12
|
+
second: number;
|
13
|
+
};
|
4
14
|
};
|
15
|
+
export declare class PeriodUtil {
|
16
|
+
static toSeconds(period: Period): number;
|
17
|
+
static toDates(period: Period): {
|
18
|
+
start: Date;
|
19
|
+
end: Date;
|
20
|
+
};
|
21
|
+
static loop(start: Date, end: Date, estimate_hour: (period: Period) => Promise<void>): Promise<void>;
|
22
|
+
}
|
package/dist/type/Period.js
CHANGED
@@ -1,3 +1,64 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
+
});
|
10
|
+
};
|
2
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
+
exports.PeriodUtil = void 0;
|
13
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
14
|
+
class PeriodUtil {
|
15
|
+
static toSeconds(period) {
|
16
|
+
return (period.end.minute * 60 + period.end.second) - (period.start.minute * 60 + period.start.second) + 1;
|
17
|
+
}
|
18
|
+
static toDates(period) {
|
19
|
+
let start = new Date(period.year, period.month, period.day, period.hour, period.start.minute, period.start.second);
|
20
|
+
let end = new Date(period.year, period.month, period.day, period.hour, period.end.minute, period.end.second);
|
21
|
+
return { start, end };
|
22
|
+
}
|
23
|
+
static loop(start, end, estimate_hour) {
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
let pre_estimate_hour = (start, end) => __awaiter(this, void 0, void 0, function* () {
|
26
|
+
if (end <= start)
|
27
|
+
return;
|
28
|
+
return yield estimate_hour({
|
29
|
+
year: start.getFullYear(),
|
30
|
+
month: start.getMonth(),
|
31
|
+
day: start.getDate(),
|
32
|
+
hour: start.getHours(),
|
33
|
+
start: {
|
34
|
+
minute: start.getMinutes(),
|
35
|
+
second: start.getSeconds(),
|
36
|
+
},
|
37
|
+
end: {
|
38
|
+
minute: end.getMinutes(),
|
39
|
+
second: end.getSeconds(),
|
40
|
+
}
|
41
|
+
});
|
42
|
+
});
|
43
|
+
let s = start;
|
44
|
+
let e = null;
|
45
|
+
do {
|
46
|
+
let next_start = namirasoft_core_1.TimeOperation.hoursLater(1, s);
|
47
|
+
next_start.setMilliseconds(0);
|
48
|
+
next_start.setSeconds(0);
|
49
|
+
next_start.setMinutes(0);
|
50
|
+
if (end < next_start) {
|
51
|
+
next_start = end;
|
52
|
+
e = end;
|
53
|
+
}
|
54
|
+
else
|
55
|
+
e = namirasoft_core_1.TimeOperation.secondsAgo(1, next_start);
|
56
|
+
yield pre_estimate_hour(s, e);
|
57
|
+
s = next_start;
|
58
|
+
} while (e < end);
|
59
|
+
});
|
60
|
+
}
|
61
|
+
}
|
62
|
+
exports.PeriodUtil = PeriodUtil;
|
63
|
+
;
|
3
64
|
//# sourceMappingURL=Period.js.map
|
package/dist/type/Period.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Period.js","sourceRoot":"","sources":["../../src/type/Period.ts"],"names":[],"mappings":""}
|
1
|
+
{"version":3,"file":"Period.js","sourceRoot":"","sources":["../../src/type/Period.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAgD;AAkBhD,MAAa,UAAU;IAEnB,MAAM,CAAC,SAAS,CAAC,MAAc;QAE3B,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC9G,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,MAAc;QAEzB,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACnH,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC7G,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;IAC1B,CAAC;IACD,MAAM,CAAO,IAAI,CAAC,KAAW,EAAE,GAAS,EAAE,aAAgD;;YAEtF,IAAI,iBAAiB,GAAG,CAAO,KAAW,EAAE,GAAS,EAAE,EAAE;gBAErD,IAAI,GAAG,IAAI,KAAK;oBACZ,OAAO;gBACX,OAAO,MAAM,aAAa,CAAC;oBACvB,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE;oBACzB,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE;oBACvB,GAAG,EAAE,KAAK,CAAC,OAAO,EAAE;oBACpB,IAAI,EAAE,KAAK,CAAC,QAAQ,EAAE;oBACtB,KAAK,EAAE;wBACH,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE;wBAC1B,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE;qBAC7B;oBACD,GAAG,EAAE;wBACD,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE;wBACxB,MAAM,EAAE,GAAG,CAAC,UAAU,EAAE;qBAC3B;iBACJ,CAAC,CAAC;YACP,CAAC,CAAA,CAAA;YAED,IAAI,CAAC,GAAG,KAAK,CAAC;YACd,IAAI,CAAC,GAAG,IAAI,CAAC;YAEb,GACA,CAAC;gBACG,IAAI,UAAU,GAAG,+BAAa,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAChD,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;gBAC9B,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBACzB,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBACzB,IAAI,GAAG,GAAG,UAAU,EACpB,CAAC;oBACG,UAAU,GAAG,GAAG,CAAC;oBACjB,CAAC,GAAG,GAAG,CAAC;gBACZ,CAAC;;oBAEG,CAAC,GAAG,+BAAa,CAAC,UAAU,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;gBAChD,MAAM,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;gBAC9B,CAAC,GAAG,UAAU,CAAC;YACnB,CAAC,QACM,CAAC,GAAG,GAAG,EAAC;QACnB,CAAC;KAAA;CACJ;AAvDD,gCAuDC;AAAA,CAAC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export declare class Usage {
|
2
|
+
static Time: {
|
3
|
+
name: string;
|
4
|
+
units: {
|
5
|
+
Second: {
|
6
|
+
name: string;
|
7
|
+
};
|
8
|
+
Minute: {
|
9
|
+
name: string;
|
10
|
+
};
|
11
|
+
Hour: {
|
12
|
+
name: string;
|
13
|
+
};
|
14
|
+
};
|
15
|
+
};
|
16
|
+
static APICALL: {
|
17
|
+
name: string;
|
18
|
+
units: {
|
19
|
+
REQUEST: {
|
20
|
+
name: string;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
};
|
24
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Usage = void 0;
|
4
|
+
class Usage {
|
5
|
+
}
|
6
|
+
exports.Usage = Usage;
|
7
|
+
Usage.Time = {
|
8
|
+
name: "Time",
|
9
|
+
units: {
|
10
|
+
Second: {
|
11
|
+
name: "Second"
|
12
|
+
},
|
13
|
+
Minute: {
|
14
|
+
name: "Minute"
|
15
|
+
},
|
16
|
+
Hour: {
|
17
|
+
name: "Hour"
|
18
|
+
}
|
19
|
+
}
|
20
|
+
};
|
21
|
+
Usage.APICALL = {
|
22
|
+
name: "API Call",
|
23
|
+
units: {
|
24
|
+
REQUEST: {
|
25
|
+
name: "Request"
|
26
|
+
}
|
27
|
+
}
|
28
|
+
};
|
29
|
+
;
|
30
|
+
//# sourceMappingURL=Usage.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Usage.js","sourceRoot":"","sources":["../../src/type/Usage.ts"],"names":[],"mappings":";;;AAAA,MAAa,KAAK;;AAAlB,sBAwBC;AAtBU,UAAI,GAAG;IACV,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE;QACH,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;SACjB;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;SACjB;QACD,IAAI,EAAE;YACF,IAAI,EAAE,MAAM;SACf;KACJ;CACJ,CAAC;AACK,aAAO,GAAG;IACb,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE;QACH,OAAO,EAAE;YACL,IAAI,EAAE,SAAS;SAClB;KACJ;CACJ,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
"framework": "npm",
|
9
9
|
"application": "package",
|
10
10
|
"private": false,
|
11
|
-
"version": "1.4.
|
11
|
+
"version": "1.4.22",
|
12
12
|
"author": "Amir Abolhasani",
|
13
13
|
"license": "MIT",
|
14
14
|
"main": "./dist/index.js",
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"build": ""
|
18
18
|
},
|
19
19
|
"dependencies": {
|
20
|
-
"namirasoft-core": "^1.4.
|
20
|
+
"namirasoft-core": "^1.4.80",
|
21
21
|
"namirasoft-site": "^1.4.39",
|
22
22
|
"namirasoft-node-cli": "^1.4.7",
|
23
23
|
"namirasoft-account": "^1.4.84"
|
@@ -27,6 +27,7 @@ import { NamirasoftCostServerFieldCategory } from "./NamirasoftCostServerFieldCa
|
|
27
27
|
import { NamirasoftCostServerFieldField } from "./NamirasoftCostServerFieldField";
|
28
28
|
import { NamirasoftCostServerHealthz } from "./NamirasoftCostServerHealthz";
|
29
29
|
import { NamirasoftCostServerMetrics } from "./NamirasoftCostServerMetrics";
|
30
|
+
import { NamirasoftCostServerSecretSecret } from "./NamirasoftCostServerSecretSecret";
|
30
31
|
import { NamirasoftCostServerValue } from "./NamirasoftCostServerValue";
|
31
32
|
import { TokenManager } from "namirasoft-account";
|
32
33
|
|
@@ -40,10 +41,11 @@ export class NamirasoftCostServer extends NSABaseServer
|
|
40
41
|
bill_watch_gcp: NamirasoftCostServerBillWatchGCP;
|
41
42
|
field_category: NamirasoftCostServerFieldCategory;
|
42
43
|
field_field: NamirasoftCostServerFieldField;
|
44
|
+
secret_secret: NamirasoftCostServerSecretSecret;
|
43
45
|
cost: NamirasoftCostServerCost;
|
44
46
|
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
|
45
47
|
{
|
46
|
-
super(base_url, `1.4.
|
48
|
+
super(base_url, `1.4.21`, manager, onError);
|
47
49
|
this.healthz = new NamirasoftCostServerHealthz(this);
|
48
50
|
this.metrics = new NamirasoftCostServerMetrics(this);
|
49
51
|
this.value = new NamirasoftCostServerValue(this);
|
@@ -52,6 +54,7 @@ export class NamirasoftCostServer extends NSABaseServer
|
|
52
54
|
this.bill_watch_gcp = new NamirasoftCostServerBillWatchGCP(this);
|
53
55
|
this.field_category = new NamirasoftCostServerFieldCategory(this);
|
54
56
|
this.field_field = new NamirasoftCostServerFieldField(this);
|
57
|
+
this.secret_secret = new NamirasoftCostServerSecretSecret(this);
|
55
58
|
this.cost = new NamirasoftCostServerCost(this);
|
56
59
|
}
|
57
60
|
};
|
@@ -29,18 +29,18 @@ export class NamirasoftCostServerBillWatchAWS extends NamirasoftCostServerBase
|
|
29
29
|
constructor(server: NamirasoftCostServer)
|
30
30
|
{
|
31
31
|
super(server);
|
32
|
-
this.
|
33
|
-
this.
|
32
|
+
this.EstimateHourly = this.EstimateHourly.bind(this);
|
33
|
+
this._CreateForHourly = this._CreateForHourly.bind(this);
|
34
34
|
}
|
35
|
-
async
|
35
|
+
async EstimateHourly(body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean }): Promise<Estimation>
|
36
36
|
{
|
37
|
-
let path = `/estimation/bill-watch/aws`;
|
37
|
+
let path = `/estimation/bill-watch/aws/hourly`;
|
38
38
|
let { data } = await this.server._post<Estimation>(path, {}, body);
|
39
39
|
return data;
|
40
40
|
}
|
41
|
-
async
|
41
|
+
async _CreateForHourly(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, row_number: number, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
|
42
42
|
{
|
43
|
-
let path = `/application/user/${user_id}/cost/bill-watch/aws`;
|
43
|
+
let path = `/application/user/${user_id}/cost/bill-watch/aws/hourly`;
|
44
44
|
let { data } = await this.server._post<CostRow>(path, {}, body);
|
45
45
|
return data;
|
46
46
|
}
|