namirasoft-cost 1.4.4 → 1.4.6
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 -0
- package/.ns-sdkg-dir-keep +0 -0
- package/.ns-sdkg-file-keep +7 -0
- package/dist/NamirasoftCostServerBillWatchAWS.d.ts +4 -4
- package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchAzure.d.ts +4 -4
- package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchGCP.d.ts +4 -4
- package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
- package/dist/TimeUtil.d.ts +7 -0
- package/dist/TimeUtil.js +44 -0
- package/dist/TimeUtil.js.map +1 -0
- package/dist/enum/TrialUnit.d.ts +5 -0
- package/dist/enum/TrialUnit.js +10 -0
- package/dist/enum/TrialUnit.js.map +1 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/type/Estimation.d.ts +5 -0
- package/dist/{row/EstimationRowRow.js → type/Estimation.js} +1 -1
- package/dist/type/Estimation.js.map +1 -0
- package/dist/type/EstimationRow.d.ts +5 -0
- package/dist/{row → type}/EstimationRow.js.map +1 -1
- package/dist/type/Period.d.ts +4 -0
- package/dist/{row/PeriodRow.js → type/Period.js} +1 -1
- package/dist/type/Period.js.map +1 -0
- package/dist/type/Trial.d.ts +5 -0
- package/dist/type/Trial.js +3 -0
- package/dist/type/Trial.js.map +1 -0
- package/dist/type/TrialDuration.d.ts +5 -0
- package/dist/type/TrialDuration.js +3 -0
- package/dist/type/TrialDuration.js.map +1 -0
- package/package.json +27 -27
- package/src/NamirasoftCostServer.ts +47 -47
- package/src/NamirasoftCostServerBase.ts +29 -29
- package/src/NamirasoftCostServerBillWatchAWS.ts +38 -38
- package/src/NamirasoftCostServerBillWatchAzure.ts +38 -38
- package/src/NamirasoftCostServerBillWatchGCP.ts +38 -38
- package/src/NamirasoftCostServerCost.ts +49 -49
- package/src/NamirasoftCostServerHealthz.ts +35 -35
- package/src/NamirasoftCostServerValue.ts +36 -36
- package/src/TimeUtil.ts +53 -0
- package/src/command/BillWatchAWSCommand.ts +31 -31
- package/src/command/BillWatchAWSEstimationCommand.ts +64 -64
- package/src/command/BillWatchAzureCommand.ts +31 -31
- package/src/command/BillWatchAzureEstimationCommand.ts +64 -64
- package/src/command/BillWatchGCPCommand.ts +31 -31
- package/src/command/BillWatchGCPEstimationCommand.ts +64 -64
- package/src/command/CostCommand.ts +33 -33
- package/src/command/CostListCommand.ts +44 -44
- package/src/command/Cost_CreateForCommand.ts +172 -172
- package/src/command/HealthzCommand.ts +31 -31
- package/src/command/HealthzGetCommand.ts +44 -44
- package/src/command/ValueCommand.ts +31 -31
- package/src/command/ValueListCommand.ts +44 -44
- package/src/command/cli.ts +42 -42
- package/src/enum/TrialUnit.ts +6 -0
- package/src/index.ts +52 -48
- package/src/meta/CostMetaTable.ts +79 -79
- package/src/meta/NamirasoftCostMetaDatabase.ts +50 -50
- package/src/row/CostCreateRow.ts +36 -36
- package/src/row/CostRow.ts +39 -39
- package/src/type/Estimation.ts +7 -0
- package/src/type/EstimationRow.ts +7 -0
- package/src/type/Period.ts +5 -0
- package/src/type/Trial.ts +7 -0
- package/src/type/TrialDuration.ts +7 -0
- package/dist/row/EstimationRow.d.ts +0 -5
- package/dist/row/EstimationRowRow.d.ts +0 -5
- package/dist/row/EstimationRowRow.js.map +0 -1
- package/dist/row/PeriodRow.d.ts +0 -4
- package/dist/row/PeriodRow.js.map +0 -1
- package/src/row/EstimationRow.ts +0 -27
- package/src/row/EstimationRowRow.ts +0 -27
- package/src/row/PeriodRow.ts +0 -25
- /package/dist/{row → type}/EstimationRow.js +0 -0
File without changes
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { Estimation } from "./type/Estimation";
|
2
2
|
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
3
3
|
import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
|
4
|
-
import {
|
4
|
+
import { Period } from "./type/Period";
|
5
5
|
export declare class NamirasoftCostServerBillWatchAWS extends NamirasoftCostServerBase {
|
6
6
|
constructor(server: NamirasoftCostServer);
|
7
7
|
Estimation(body: {
|
8
|
-
period:
|
8
|
+
period: Period;
|
9
9
|
active: boolean;
|
10
|
-
}): Promise<
|
10
|
+
}): Promise<Estimation>;
|
11
11
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NamirasoftCostServerBillWatchAWS.js","sourceRoot":"","sources":["../src/NamirasoftCostServerBillWatchAWS.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,yEAAsE;AAGtE,MAAa,gCAAiC,SAAQ,mDAAwB;IAE1E,YAAY,MAA4B;QAEpC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACK,UAAU,CAAC,
|
1
|
+
{"version":3,"file":"NamirasoftCostServerBillWatchAWS.js","sourceRoot":"","sources":["../src/NamirasoftCostServerBillWatchAWS.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,yEAAsE;AAGtE,MAAa,gCAAiC,SAAQ,mDAAwB;IAE1E,YAAY,MAA4B;QAEpC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACK,UAAU,CAAC,IAAyC;;YAEtD,IAAI,IAAI,GAAG,kCAAkC,CAAC;YAC9C,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAa,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAbD,4EAaC;AAAA,CAAC"}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { Estimation } from "./type/Estimation";
|
2
2
|
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
3
3
|
import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
|
4
|
-
import {
|
4
|
+
import { Period } from "./type/Period";
|
5
5
|
export declare class NamirasoftCostServerBillWatchAzure extends NamirasoftCostServerBase {
|
6
6
|
constructor(server: NamirasoftCostServer);
|
7
7
|
Estimation(body: {
|
8
|
-
period:
|
8
|
+
period: Period;
|
9
9
|
active: boolean;
|
10
|
-
}): Promise<
|
10
|
+
}): Promise<Estimation>;
|
11
11
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NamirasoftCostServerBillWatchAzure.js","sourceRoot":"","sources":["../src/NamirasoftCostServerBillWatchAzure.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,yEAAsE;AAGtE,MAAa,kCAAmC,SAAQ,mDAAwB;IAE5E,YAAY,MAA4B;QAEpC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACK,UAAU,CAAC,
|
1
|
+
{"version":3,"file":"NamirasoftCostServerBillWatchAzure.js","sourceRoot":"","sources":["../src/NamirasoftCostServerBillWatchAzure.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,yEAAsE;AAGtE,MAAa,kCAAmC,SAAQ,mDAAwB;IAE5E,YAAY,MAA4B;QAEpC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACK,UAAU,CAAC,IAAyC;;YAEtD,IAAI,IAAI,GAAG,oCAAoC,CAAC;YAChD,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAa,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAbD,gFAaC;AAAA,CAAC"}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { Estimation } from "./type/Estimation";
|
2
2
|
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
3
3
|
import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
|
4
|
-
import {
|
4
|
+
import { Period } from "./type/Period";
|
5
5
|
export declare class NamirasoftCostServerBillWatchGCP extends NamirasoftCostServerBase {
|
6
6
|
constructor(server: NamirasoftCostServer);
|
7
7
|
Estimation(body: {
|
8
|
-
period:
|
8
|
+
period: Period;
|
9
9
|
active: boolean;
|
10
|
-
}): Promise<
|
10
|
+
}): Promise<Estimation>;
|
11
11
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NamirasoftCostServerBillWatchGCP.js","sourceRoot":"","sources":["../src/NamirasoftCostServerBillWatchGCP.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,yEAAsE;AAGtE,MAAa,gCAAiC,SAAQ,mDAAwB;IAE1E,YAAY,MAA4B;QAEpC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACK,UAAU,CAAC,
|
1
|
+
{"version":3,"file":"NamirasoftCostServerBillWatchGCP.js","sourceRoot":"","sources":["../src/NamirasoftCostServerBillWatchGCP.ts"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,yEAAsE;AAGtE,MAAa,gCAAiC,SAAQ,mDAAwB;IAE1E,YAAY,MAA4B;QAEpC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC;IACK,UAAU,CAAC,IAAyC;;YAEtD,IAAI,IAAI,GAAG,kCAAkC,CAAC;YAC9C,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAa,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAbD,4EAaC;AAAA,CAAC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Trial } from "./type/Trial";
|
2
|
+
import { Period } from "./type/Period";
|
3
|
+
export declare class TimeUtil {
|
4
|
+
static trialEndsAt(trial: Trial): Date;
|
5
|
+
static isTrial(trial: Trial, date: Date): boolean;
|
6
|
+
static loopHourly(trial: Trial | null, period: Period, estimate_hour: (period: Period) => void): void;
|
7
|
+
}
|
package/dist/TimeUtil.js
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TimeUtil = void 0;
|
4
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
5
|
+
const TrialUnit_1 = require("./enum/TrialUnit");
|
6
|
+
class TimeUtil {
|
7
|
+
static trialEndsAt(trial) {
|
8
|
+
if (trial.duration.unit == TrialUnit_1.TrialUnit.Day)
|
9
|
+
return namirasoft_core_1.TimeOperation.daysLater(trial.duration.value, trial.started_at);
|
10
|
+
if (trial.duration.unit == TrialUnit_1.TrialUnit.Week)
|
11
|
+
return namirasoft_core_1.TimeOperation.daysLater(trial.duration.value * 7, trial.started_at);
|
12
|
+
if (trial.duration.unit == TrialUnit_1.TrialUnit.Month)
|
13
|
+
return namirasoft_core_1.TimeOperation.monthsLater(trial.duration.value, trial.started_at);
|
14
|
+
return trial.started_at;
|
15
|
+
}
|
16
|
+
static isTrial(trial, date) {
|
17
|
+
return date <= TimeUtil.trialEndsAt(trial);
|
18
|
+
}
|
19
|
+
static loopHourly(trial, period, estimate_hour) {
|
20
|
+
if (period.end <= period.start)
|
21
|
+
return;
|
22
|
+
if (trial) {
|
23
|
+
let ends_at = TimeUtil.trialEndsAt(trial);
|
24
|
+
if (period.end <= ends_at)
|
25
|
+
return;
|
26
|
+
if (period.start <= ends_at)
|
27
|
+
period.start = ends_at;
|
28
|
+
}
|
29
|
+
let start = period.start;
|
30
|
+
let end = null;
|
31
|
+
do {
|
32
|
+
end = namirasoft_core_1.TimeOperation.hoursLater(1, start);
|
33
|
+
end.setMilliseconds(0);
|
34
|
+
end.setSeconds(0);
|
35
|
+
end.setMinutes(0);
|
36
|
+
if (period.end < end)
|
37
|
+
end = period.end;
|
38
|
+
estimate_hour({ start, end });
|
39
|
+
start = end;
|
40
|
+
} while (end < period.end);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
exports.TimeUtil = TimeUtil;
|
44
|
+
//# sourceMappingURL=TimeUtil.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TimeUtil.js","sourceRoot":"","sources":["../src/TimeUtil.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAGhD,gDAA6C;AAE7C,MAAa,QAAQ;IAEjB,MAAM,CAAC,WAAW,CAAC,KAAY;QAE3B,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,qBAAS,CAAC,GAAG;YACpC,OAAO,+BAAa,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAC3E,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,qBAAS,CAAC,IAAI;YACrC,OAAO,+BAAa,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAC/E,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,IAAI,qBAAS,CAAC,KAAK;YACtC,OAAO,+BAAa,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;QAC7E,OAAO,KAAK,CAAC,UAAU,CAAC;IAC5B,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,KAAY,EAAE,IAAU;QAEnC,OAAO,IAAI,IAAI,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;IACD,MAAM,CAAC,UAAU,CAAC,KAAmB,EAAE,MAAc,EAAE,aAAuC;QAE1F,IAAI,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK;YAC1B,OAAO;QAEX,IAAI,KAAK,EACT,CAAC;YACG,IAAI,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAC1C,IAAI,MAAM,CAAC,GAAG,IAAI,OAAO;gBACrB,OAAO;YACX,IAAI,MAAM,CAAC,KAAK,IAAI,OAAO;gBACvB,MAAM,CAAC,KAAK,GAAG,OAAO,CAAC;QAC/B,CAAC;QAED,IAAI,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QACzB,IAAI,GAAG,GAAG,IAAI,CAAC;QAEf,GACA,CAAC;YACG,GAAG,GAAG,+BAAa,CAAC,UAAU,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YACzC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YACvB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAClB,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAClB,IAAI,MAAM,CAAC,GAAG,GAAG,GAAG;gBAChB,GAAG,GAAG,MAAM,CAAC,GAAG,CAAC;YAErB,aAAa,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;YAC9B,KAAK,GAAG,GAAG,CAAC;QAChB,CAAC,QACM,GAAG,GAAG,MAAM,CAAC,GAAG,EAAC;IAC5B,CAAC;CACJ;AA/CD,4BA+CC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TrialUnit = void 0;
|
4
|
+
var TrialUnit;
|
5
|
+
(function (TrialUnit) {
|
6
|
+
TrialUnit["Day"] = "Day";
|
7
|
+
TrialUnit["Week"] = "Week";
|
8
|
+
TrialUnit["Month"] = "Month";
|
9
|
+
})(TrialUnit || (exports.TrialUnit = TrialUnit = {}));
|
10
|
+
//# sourceMappingURL=TrialUnit.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TrialUnit.js","sourceRoot":"","sources":["../../src/enum/TrialUnit.ts"],"names":[],"mappings":";;;AAAA,IAAY,SAKX;AALD,WAAY,SAAS;IAEjB,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,4BAAe,CAAA;AACnB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB"}
|
package/dist/index.d.ts
CHANGED
@@ -23,6 +23,10 @@ export * from "./meta/CostMetaTable";
|
|
23
23
|
export * from "./meta/NamirasoftCostMetaDatabase";
|
24
24
|
export * from "./row/CostCreateRow";
|
25
25
|
export * from "./row/CostRow";
|
26
|
-
export * from "./
|
27
|
-
export * from "./
|
28
|
-
export * from "./
|
26
|
+
export * from "./enum/TrialUnit";
|
27
|
+
export * from "./type/Estimation";
|
28
|
+
export * from "./type/EstimationRow";
|
29
|
+
export * from "./type/Period";
|
30
|
+
export * from "./type/Trial";
|
31
|
+
export * from "./type/TrialDuration";
|
32
|
+
export * from "./TimeUtil";
|
package/dist/index.js
CHANGED
@@ -39,7 +39,11 @@ __exportStar(require("./meta/CostMetaTable"), exports);
|
|
39
39
|
__exportStar(require("./meta/NamirasoftCostMetaDatabase"), exports);
|
40
40
|
__exportStar(require("./row/CostCreateRow"), exports);
|
41
41
|
__exportStar(require("./row/CostRow"), exports);
|
42
|
-
__exportStar(require("./
|
43
|
-
__exportStar(require("./
|
44
|
-
__exportStar(require("./
|
42
|
+
__exportStar(require("./enum/TrialUnit"), exports);
|
43
|
+
__exportStar(require("./type/Estimation"), exports);
|
44
|
+
__exportStar(require("./type/EstimationRow"), exports);
|
45
|
+
__exportStar(require("./type/Period"), exports);
|
46
|
+
__exportStar(require("./type/Trial"), exports);
|
47
|
+
__exportStar(require("./type/TrialDuration"), exports);
|
48
|
+
__exportStar(require("./TimeUtil"), exports);
|
45
49
|
//# 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,gEAA8C;AAC9C,8DAA4C;AAC5C,gEAA8C;AAC9C,0EAAwD;AACxD,kEAAgD;AAChD,4EAA0D;AAC1D,gEAA8C;AAC9C,0EAAwD;AACxD,wDAAsC;AACtC,4DAA0C;AAC1C,kEAAgD;AAChD,2DAAyC;AACzC,8DAA4C;AAC5C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,oEAAkD;AAClD,sDAAoC;AACpC,gDAA8B;AAC9B,
|
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,gEAA8C;AAC9C,8DAA4C;AAC5C,gEAA8C;AAC9C,0EAAwD;AACxD,kEAAgD;AAChD,4EAA0D;AAC1D,gEAA8C;AAC9C,0EAAwD;AACxD,wDAAsC;AACtC,4DAA0C;AAC1C,kEAAgD;AAChD,2DAAyC;AACzC,8DAA4C;AAC5C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,oEAAkD;AAClD,sDAAoC;AACpC,gDAA8B;AAC9B,mDAAiC;AACjC,oDAAkC;AAClC,uDAAqC;AACrC,gDAA8B;AAC9B,+CAA6B;AAC7B,uDAAqC;AACrC,6CAA2B"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Estimation.js","sourceRoot":"","sources":["../../src/type/Estimation.ts"],"names":[],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EstimationRow.js","sourceRoot":"","sources":["../../src/
|
1
|
+
{"version":3,"file":"EstimationRow.js","sourceRoot":"","sources":["../../src/type/EstimationRow.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Period.js","sourceRoot":"","sources":["../../src/type/Period.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Trial.js","sourceRoot":"","sources":["../../src/type/Trial.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TrialDuration.js","sourceRoot":"","sources":["../../src/type/TrialDuration.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
{
|
2
|
-
"name": "namirasoft-cost",
|
3
|
-
"title": "Namirasoft Cost NPM Package",
|
4
|
-
"description": "Namira Software Corporation Cost NPM Package",
|
5
|
-
"icon": "logo.png",
|
6
|
-
"logo": "https://static.namirasoft.com/image/namirasoft/cost/logo/base.png",
|
7
|
-
"language": "ts",
|
8
|
-
"framework": "npm",
|
9
|
-
"application": "package",
|
10
|
-
"private": false,
|
11
|
-
"version": "1.4.
|
12
|
-
"author": "Amir Abolhasani",
|
13
|
-
"license": "MIT",
|
14
|
-
"main": "./dist/index.js",
|
15
|
-
"types": "./dist/index.d.ts",
|
16
|
-
"scripts": {
|
17
|
-
"build": ""
|
18
|
-
},
|
19
|
-
"dependencies": {
|
20
|
-
"namirasoft-core": "^1.4.71",
|
21
|
-
"namirasoft-site": "^1.4.36",
|
22
|
-
"namirasoft-node-cli": "^1.4.7",
|
23
|
-
"namirasoft-account": "^1.4.72"
|
24
|
-
},
|
25
|
-
"bin": {
|
26
|
-
"ns-cost": "./dist/command/cli.js"
|
27
|
-
}
|
1
|
+
{
|
2
|
+
"name": "namirasoft-cost",
|
3
|
+
"title": "Namirasoft Cost NPM Package",
|
4
|
+
"description": "Namira Software Corporation Cost NPM Package",
|
5
|
+
"icon": "logo.png",
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/cost/logo/base.png",
|
7
|
+
"language": "ts",
|
8
|
+
"framework": "npm",
|
9
|
+
"application": "package",
|
10
|
+
"private": false,
|
11
|
+
"version": "1.4.6",
|
12
|
+
"author": "Amir Abolhasani",
|
13
|
+
"license": "MIT",
|
14
|
+
"main": "./dist/index.js",
|
15
|
+
"types": "./dist/index.d.ts",
|
16
|
+
"scripts": {
|
17
|
+
"build": ""
|
18
|
+
},
|
19
|
+
"dependencies": {
|
20
|
+
"namirasoft-core": "^1.4.71",
|
21
|
+
"namirasoft-site": "^1.4.36",
|
22
|
+
"namirasoft-node-cli": "^1.4.7",
|
23
|
+
"namirasoft-account": "^1.4.72"
|
24
|
+
},
|
25
|
+
"bin": {
|
26
|
+
"ns-cost": "./dist/command/cli.js"
|
27
|
+
}
|
28
28
|
}
|
@@ -1,48 +1,48 @@
|
|
1
|
-
/****************************************************************/
|
2
|
-
/* */
|
3
|
-
/* This is an Auto-Generated File */
|
4
|
-
/* Made By */
|
5
|
-
/* Namirasoft SDK Generator NPM Package */
|
6
|
-
/* */
|
7
|
-
/****************************************************************/
|
8
|
-
/****************************************************************/
|
9
|
-
/* */
|
10
|
-
/* Please do not make any change to this file */
|
11
|
-
/* If any change is required, ns-sdkg command must be used */
|
12
|
-
/* */
|
13
|
-
/****************************************************************/
|
14
|
-
/****************************************************************/
|
15
|
-
/* */
|
16
|
-
/* Namira Software Corporation */
|
17
|
-
/* https://namirasoft.com */
|
18
|
-
/* */
|
19
|
-
/****************************************************************/
|
20
|
-
|
21
|
-
import { NSABaseServer } from "namirasoft-account";
|
22
|
-
import { NamirasoftCostServerBillWatchAWS } from "./NamirasoftCostServerBillWatchAWS";
|
23
|
-
import { NamirasoftCostServerBillWatchAzure } from "./NamirasoftCostServerBillWatchAzure";
|
24
|
-
import { NamirasoftCostServerBillWatchGCP } from "./NamirasoftCostServerBillWatchGCP";
|
25
|
-
import { NamirasoftCostServerCost } from "./NamirasoftCostServerCost";
|
26
|
-
import { NamirasoftCostServerHealthz } from "./NamirasoftCostServerHealthz";
|
27
|
-
import { NamirasoftCostServerValue } from "./NamirasoftCostServerValue";
|
28
|
-
import { TokenManager } from "namirasoft-account";
|
29
|
-
|
30
|
-
export class NamirasoftCostServer extends NSABaseServer
|
31
|
-
{
|
32
|
-
healthz: NamirasoftCostServerHealthz;
|
33
|
-
value: NamirasoftCostServerValue;
|
34
|
-
bill_watch_a_w_s: NamirasoftCostServerBillWatchAWS;
|
35
|
-
bill_watch_azure: NamirasoftCostServerBillWatchAzure;
|
36
|
-
bill_watch_g_c_p: NamirasoftCostServerBillWatchGCP;
|
37
|
-
cost: NamirasoftCostServerCost;
|
38
|
-
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
|
39
|
-
{
|
40
|
-
super(base_url, `1.4.4`, manager, onError);
|
41
|
-
this.healthz = new NamirasoftCostServerHealthz(this);
|
42
|
-
this.value = new NamirasoftCostServerValue(this);
|
43
|
-
this.bill_watch_a_w_s = new NamirasoftCostServerBillWatchAWS(this);
|
44
|
-
this.bill_watch_azure = new NamirasoftCostServerBillWatchAzure(this);
|
45
|
-
this.bill_watch_g_c_p = new NamirasoftCostServerBillWatchGCP(this);
|
46
|
-
this.cost = new NamirasoftCostServerCost(this);
|
47
|
-
}
|
1
|
+
/****************************************************************/
|
2
|
+
/* */
|
3
|
+
/* This is an Auto-Generated File */
|
4
|
+
/* Made By */
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
6
|
+
/* */
|
7
|
+
/****************************************************************/
|
8
|
+
/****************************************************************/
|
9
|
+
/* */
|
10
|
+
/* Please do not make any change to this file */
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
12
|
+
/* */
|
13
|
+
/****************************************************************/
|
14
|
+
/****************************************************************/
|
15
|
+
/* */
|
16
|
+
/* Namira Software Corporation */
|
17
|
+
/* https://namirasoft.com */
|
18
|
+
/* */
|
19
|
+
/****************************************************************/
|
20
|
+
|
21
|
+
import { NSABaseServer } from "namirasoft-account";
|
22
|
+
import { NamirasoftCostServerBillWatchAWS } from "./NamirasoftCostServerBillWatchAWS";
|
23
|
+
import { NamirasoftCostServerBillWatchAzure } from "./NamirasoftCostServerBillWatchAzure";
|
24
|
+
import { NamirasoftCostServerBillWatchGCP } from "./NamirasoftCostServerBillWatchGCP";
|
25
|
+
import { NamirasoftCostServerCost } from "./NamirasoftCostServerCost";
|
26
|
+
import { NamirasoftCostServerHealthz } from "./NamirasoftCostServerHealthz";
|
27
|
+
import { NamirasoftCostServerValue } from "./NamirasoftCostServerValue";
|
28
|
+
import { TokenManager } from "namirasoft-account";
|
29
|
+
|
30
|
+
export class NamirasoftCostServer extends NSABaseServer
|
31
|
+
{
|
32
|
+
healthz: NamirasoftCostServerHealthz;
|
33
|
+
value: NamirasoftCostServerValue;
|
34
|
+
bill_watch_a_w_s: NamirasoftCostServerBillWatchAWS;
|
35
|
+
bill_watch_azure: NamirasoftCostServerBillWatchAzure;
|
36
|
+
bill_watch_g_c_p: NamirasoftCostServerBillWatchGCP;
|
37
|
+
cost: NamirasoftCostServerCost;
|
38
|
+
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
|
39
|
+
{
|
40
|
+
super(base_url, `1.4.4`, manager, onError);
|
41
|
+
this.healthz = new NamirasoftCostServerHealthz(this);
|
42
|
+
this.value = new NamirasoftCostServerValue(this);
|
43
|
+
this.bill_watch_a_w_s = new NamirasoftCostServerBillWatchAWS(this);
|
44
|
+
this.bill_watch_azure = new NamirasoftCostServerBillWatchAzure(this);
|
45
|
+
this.bill_watch_g_c_p = new NamirasoftCostServerBillWatchGCP(this);
|
46
|
+
this.cost = new NamirasoftCostServerCost(this);
|
47
|
+
}
|
48
48
|
};
|
@@ -1,30 +1,30 @@
|
|
1
|
-
/****************************************************************/
|
2
|
-
/* */
|
3
|
-
/* This is an Auto-Generated File */
|
4
|
-
/* Made By */
|
5
|
-
/* Namirasoft SDK Generator NPM Package */
|
6
|
-
/* */
|
7
|
-
/****************************************************************/
|
8
|
-
/****************************************************************/
|
9
|
-
/* */
|
10
|
-
/* Please do not make any change to this file */
|
11
|
-
/* If any change is required, ns-sdkg command must be used */
|
12
|
-
/* */
|
13
|
-
/****************************************************************/
|
14
|
-
/****************************************************************/
|
15
|
-
/* */
|
16
|
-
/* Namira Software Corporation */
|
17
|
-
/* https://namirasoft.com */
|
18
|
-
/* */
|
19
|
-
/****************************************************************/
|
20
|
-
|
21
|
-
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
22
|
-
|
23
|
-
export class NamirasoftCostServerBase
|
24
|
-
{
|
25
|
-
public server: NamirasoftCostServer;
|
26
|
-
constructor(server: NamirasoftCostServer)
|
27
|
-
{
|
28
|
-
this.server = server;
|
29
|
-
}
|
1
|
+
/****************************************************************/
|
2
|
+
/* */
|
3
|
+
/* This is an Auto-Generated File */
|
4
|
+
/* Made By */
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
6
|
+
/* */
|
7
|
+
/****************************************************************/
|
8
|
+
/****************************************************************/
|
9
|
+
/* */
|
10
|
+
/* Please do not make any change to this file */
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
12
|
+
/* */
|
13
|
+
/****************************************************************/
|
14
|
+
/****************************************************************/
|
15
|
+
/* */
|
16
|
+
/* Namira Software Corporation */
|
17
|
+
/* https://namirasoft.com */
|
18
|
+
/* */
|
19
|
+
/****************************************************************/
|
20
|
+
|
21
|
+
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
22
|
+
|
23
|
+
export class NamirasoftCostServerBase
|
24
|
+
{
|
25
|
+
public server: NamirasoftCostServer;
|
26
|
+
constructor(server: NamirasoftCostServer)
|
27
|
+
{
|
28
|
+
this.server = server;
|
29
|
+
}
|
30
30
|
};
|
@@ -1,39 +1,39 @@
|
|
1
|
-
/****************************************************************/
|
2
|
-
/* */
|
3
|
-
/* This is an Auto-Generated File */
|
4
|
-
/* Made By */
|
5
|
-
/* Namirasoft SDK Generator NPM Package */
|
6
|
-
/* */
|
7
|
-
/****************************************************************/
|
8
|
-
/****************************************************************/
|
9
|
-
/* */
|
10
|
-
/* Please do not make any change to this file */
|
11
|
-
/* If any change is required, ns-sdkg command must be used */
|
12
|
-
/* */
|
13
|
-
/****************************************************************/
|
14
|
-
/****************************************************************/
|
15
|
-
/* */
|
16
|
-
/* Namira Software Corporation */
|
17
|
-
/* https://namirasoft.com */
|
18
|
-
/* */
|
19
|
-
/****************************************************************/
|
20
|
-
|
21
|
-
import {
|
22
|
-
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
23
|
-
import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
|
24
|
-
import {
|
25
|
-
|
26
|
-
export class NamirasoftCostServerBillWatchAWS extends NamirasoftCostServerBase
|
27
|
-
{
|
28
|
-
constructor(server: NamirasoftCostServer)
|
29
|
-
{
|
30
|
-
super(server);
|
31
|
-
this.Estimation = this.Estimation.bind(this);
|
32
|
-
}
|
33
|
-
async Estimation(body: { period:
|
34
|
-
{
|
35
|
-
let path = `/estimation/bill-watch/watch/aws`;
|
36
|
-
let { data } = await this.server._post<
|
37
|
-
return data;
|
38
|
-
}
|
1
|
+
/****************************************************************/
|
2
|
+
/* */
|
3
|
+
/* This is an Auto-Generated File */
|
4
|
+
/* Made By */
|
5
|
+
/* Namirasoft SDK Generator NPM Package */
|
6
|
+
/* */
|
7
|
+
/****************************************************************/
|
8
|
+
/****************************************************************/
|
9
|
+
/* */
|
10
|
+
/* Please do not make any change to this file */
|
11
|
+
/* If any change is required, ns-sdkg command must be used */
|
12
|
+
/* */
|
13
|
+
/****************************************************************/
|
14
|
+
/****************************************************************/
|
15
|
+
/* */
|
16
|
+
/* Namira Software Corporation */
|
17
|
+
/* https://namirasoft.com */
|
18
|
+
/* */
|
19
|
+
/****************************************************************/
|
20
|
+
|
21
|
+
import { Estimation } from "./type/Estimation";
|
22
|
+
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
23
|
+
import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
|
24
|
+
import { Period } from "./type/Period";
|
25
|
+
|
26
|
+
export class NamirasoftCostServerBillWatchAWS extends NamirasoftCostServerBase
|
27
|
+
{
|
28
|
+
constructor(server: NamirasoftCostServer)
|
29
|
+
{
|
30
|
+
super(server);
|
31
|
+
this.Estimation = this.Estimation.bind(this);
|
32
|
+
}
|
33
|
+
async Estimation(body: { period: Period, active: boolean }): Promise<Estimation>
|
34
|
+
{
|
35
|
+
let path = `/estimation/bill-watch/watch/aws`;
|
36
|
+
let { data } = await this.server._post<Estimation>(path, {}, body);
|
37
|
+
return data;
|
38
|
+
}
|
39
39
|
};
|