namirasoft-cost 1.4.45 → 1.4.46
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 +27 -27
- package/dist/NamirasoftCostServer.d.ts +2 -0
- package/dist/NamirasoftCostServer.js +3 -1
- package/dist/NamirasoftCostServer.js.map +1 -1
- package/dist/NamirasoftCostServerLogLogGroup.d.ts +13 -0
- package/dist/NamirasoftCostServerLogLogGroup.js +53 -0
- package/dist/NamirasoftCostServerLogLogGroup.js.map +1 -0
- package/dist/command/LogLogGroupCommand.d.ts +4 -0
- package/dist/command/LogLogGroupCommand.js +21 -0
- package/dist/command/LogLogGroupCommand.js.map +1 -0
- package/dist/command/LogLogGroupEstimateReadCommand.d.ts +5 -0
- package/dist/command/LogLogGroupEstimateReadCommand.js +103 -0
- package/dist/command/LogLogGroupEstimateReadCommand.js.map +1 -0
- package/dist/command/LogLogGroupEstimateRecordCommand.d.ts +5 -0
- package/dist/command/LogLogGroupEstimateRecordCommand.js +103 -0
- package/dist/command/LogLogGroupEstimateRecordCommand.js.map +1 -0
- package/dist/command/LogLogGroup_CreateForReadCommand.d.ts +5 -0
- package/dist/command/LogLogGroup_CreateForReadCommand.js +112 -0
- package/dist/command/LogLogGroup_CreateForReadCommand.js.map +1 -0
- package/dist/command/LogLogGroup_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/LogLogGroup_CreateForRecordCommand.js +112 -0
- package/dist/command/LogLogGroup_CreateForRecordCommand.js.map +1 -0
- package/dist/command/cli.js +2 -0
- package/dist/command/cli.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +28 -28
- package/src/NamirasoftCostServer.ts +62 -59
- package/src/NamirasoftCostServerBase.ts +29 -29
- package/src/NamirasoftCostServerBillWatchAWS.ts +47 -47
- package/src/NamirasoftCostServerBillWatchAzure.ts +47 -47
- package/src/NamirasoftCostServerBillWatchGCP.ts +47 -47
- package/src/NamirasoftCostServerCost.ts +51 -51
- package/src/NamirasoftCostServerFieldCategory.ts +47 -47
- package/src/NamirasoftCostServerFieldField.ts +47 -47
- package/src/NamirasoftCostServerHealthz.ts +35 -35
- package/src/NamirasoftCostServerLogLogGroup.ts +62 -0
- package/src/NamirasoftCostServerMetrics.ts +35 -35
- package/src/NamirasoftCostServerSecretSecret.ts +61 -61
- 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/FreeValueBonus.ts +24 -24
- package/src/bonus/LowAmountBonus.ts +14 -14
- package/src/bonus/LowSecondsBonus.ts +14 -14
- package/src/bonus/LowTotalValueBonus.ts +14 -14
- package/src/bonus/LowValueBonus.ts +14 -14
- package/src/bonus/TrialBonus.ts +18 -18
- package/src/command/BillWatchAWSCommand.ts +33 -33
- package/src/command/BillWatchAWSEstimateRecordCommand.ts +109 -109
- package/src/command/BillWatchAWS_CreateForRecordCommand.ts +118 -118
- package/src/command/BillWatchAzureCommand.ts +33 -33
- package/src/command/BillWatchAzureEstimateRecordCommand.ts +109 -109
- package/src/command/BillWatchAzure_CreateForRecordCommand.ts +118 -118
- package/src/command/BillWatchGCPCommand.ts +33 -33
- package/src/command/BillWatchGCPEstimateRecordCommand.ts +109 -109
- package/src/command/BillWatchGCP_CreateForRecordCommand.ts +118 -118
- package/src/command/CostCommand.ts +33 -33
- package/src/command/CostGroupedCommand.ts +154 -154
- package/src/command/CostListCommand.ts +44 -44
- package/src/command/FieldCategoryCommand.ts +33 -33
- package/src/command/FieldCategoryEstimateRecordCommand.ts +109 -109
- package/src/command/FieldCategory_CreateForRecordCommand.ts +118 -118
- package/src/command/FieldFieldCommand.ts +33 -33
- package/src/command/FieldFieldEstimateRecordCommand.ts +109 -109
- package/src/command/FieldField_CreateForRecordCommand.ts +118 -118
- package/src/command/HealthzCommand.ts +31 -31
- package/src/command/HealthzGetCommand.ts +44 -44
- package/src/command/LogLogGroupCommand.ts +38 -0
- package/src/command/LogLogGroupEstimateReadCommand.ts +110 -0
- package/src/command/LogLogGroupEstimateRecordCommand.ts +110 -0
- package/src/command/LogLogGroup_CreateForReadCommand.ts +119 -0
- package/src/command/LogLogGroup_CreateForRecordCommand.ts +119 -0
- package/src/command/MetricsCommand.ts +31 -31
- package/src/command/MetricsGetCommand.ts +44 -44
- package/src/command/SecretSecretCommand.ts +37 -37
- package/src/command/SecretSecretEstimateReadCommand.ts +109 -109
- package/src/command/SecretSecretEstimateRecordCommand.ts +109 -109
- package/src/command/SecretSecret_CreateForReadCommand.ts +118 -118
- package/src/command/SecretSecret_CreateForRecordCommand.ts +118 -118
- package/src/command/ValueCommand.ts +31 -31
- package/src/command/ValueListCommand.ts +44 -44
- package/src/command/cli.ts +52 -50
- package/src/enum/DimensionType.ts +31 -31
- package/src/enum/GranularityType.ts +26 -26
- package/src/index.ts +100 -96
- package/src/meta/CostMetaTable.ts +81 -81
- package/src/meta/NamirasoftCostMetaDatabase.ts +50 -50
- package/src/row/CostRow.ts +40 -40
- package/src/row/GroupedResponseRow.ts +26 -26
- package/src/type/Bonus.ts +18 -18
- package/src/type/CalculationOption.ts +33 -33
- package/src/type/Estimation.ts +34 -34
- package/src/type/EstimationOption.ts +31 -31
- package/src/type/EstimationUsage.ts +22 -22
- package/src/type/Period.ts +108 -108
- package/src/type/SimulationOption.ts +29 -29
- package/src/type/Usage.ts +24 -24
- package/dist/estimator/LogLogGroupReadEstimator.d.ts +0 -15
- package/dist/estimator/LogLogGroupReadEstimator.js +0 -26
- package/dist/estimator/LogLogGroupReadEstimator.js.map +0 -1
- package/dist/estimator/LogLogGroupRecordEstimator.d.ts +0 -17
- package/dist/estimator/LogLogGroupRecordEstimator.js +0 -29
- package/dist/estimator/LogLogGroupRecordEstimator.js.map +0 -1
- package/src/estimator/LogLogGroupReadEstimator.ts +0 -26
- package/src/estimator/LogLogGroupRecordEstimator.ts +0 -29
package/.ns-sdkg-dir-deep
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/src
|
|
2
|
-
/src/bonus
|
|
3
|
-
/src/estimator
|
|
1
|
+
/src
|
|
2
|
+
/src/bonus
|
|
3
|
+
/src/estimator
|
|
4
4
|
/src/type
|
package/.ns-sdkg-file-keep
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
src/bonus/BaseBonus.ts
|
|
2
|
-
src/bonus/DeactiveBonus.ts
|
|
3
|
-
src/bonus/FreeCountBonus.ts
|
|
4
|
-
src/bonus/FreeTotalValueBonus.ts
|
|
5
|
-
src/bonus/FreeValueBonus.ts
|
|
6
|
-
src/bonus/LowAmountBonus.ts
|
|
7
|
-
src/bonus/LowSecondsBonus.ts
|
|
8
|
-
src/bonus/LowTotalValueBonus.ts
|
|
9
|
-
src/bonus/LowValueBonus.ts
|
|
10
|
-
src/bonus/TrialBonus.ts
|
|
11
|
-
src/estimator/BaseEstimator.ts
|
|
12
|
-
src/estimator/BillWatchAWSRecordEstimator.ts
|
|
13
|
-
src/estimator/BillWatchAzureRecordEstimator.ts
|
|
14
|
-
src/estimator/BillWatchBaseRecordEstimator.ts
|
|
15
|
-
src/estimator/BillWatchGCPRecordEstimator.ts
|
|
16
|
-
src/estimator/FieldBaseRecordEstimator.ts
|
|
17
|
-
src/estimator/FieldCategoryRecordEstimator.ts
|
|
18
|
-
src/estimator/FieldFieldRecordEstimator.ts
|
|
19
|
-
src/estimator/SecretSecretRecordEstimator.ts
|
|
20
|
-
src/estimator/SecretSecretReadEstimator.ts
|
|
21
|
-
src/type/Bonus.ts
|
|
22
|
-
src/type/CalculationOption.ts
|
|
23
|
-
src/type/Estimation.ts
|
|
24
|
-
src/type/EstimationOption.ts
|
|
25
|
-
src/type/EstimationUsage.ts
|
|
26
|
-
src/type/Period.ts
|
|
27
|
-
src/type/SimulationOption.ts
|
|
1
|
+
src/bonus/BaseBonus.ts
|
|
2
|
+
src/bonus/DeactiveBonus.ts
|
|
3
|
+
src/bonus/FreeCountBonus.ts
|
|
4
|
+
src/bonus/FreeTotalValueBonus.ts
|
|
5
|
+
src/bonus/FreeValueBonus.ts
|
|
6
|
+
src/bonus/LowAmountBonus.ts
|
|
7
|
+
src/bonus/LowSecondsBonus.ts
|
|
8
|
+
src/bonus/LowTotalValueBonus.ts
|
|
9
|
+
src/bonus/LowValueBonus.ts
|
|
10
|
+
src/bonus/TrialBonus.ts
|
|
11
|
+
src/estimator/BaseEstimator.ts
|
|
12
|
+
src/estimator/BillWatchAWSRecordEstimator.ts
|
|
13
|
+
src/estimator/BillWatchAzureRecordEstimator.ts
|
|
14
|
+
src/estimator/BillWatchBaseRecordEstimator.ts
|
|
15
|
+
src/estimator/BillWatchGCPRecordEstimator.ts
|
|
16
|
+
src/estimator/FieldBaseRecordEstimator.ts
|
|
17
|
+
src/estimator/FieldCategoryRecordEstimator.ts
|
|
18
|
+
src/estimator/FieldFieldRecordEstimator.ts
|
|
19
|
+
src/estimator/SecretSecretRecordEstimator.ts
|
|
20
|
+
src/estimator/SecretSecretReadEstimator.ts
|
|
21
|
+
src/type/Bonus.ts
|
|
22
|
+
src/type/CalculationOption.ts
|
|
23
|
+
src/type/Estimation.ts
|
|
24
|
+
src/type/EstimationOption.ts
|
|
25
|
+
src/type/EstimationUsage.ts
|
|
26
|
+
src/type/Period.ts
|
|
27
|
+
src/type/SimulationOption.ts
|
|
28
28
|
src/type/Usage.ts
|
|
@@ -6,6 +6,7 @@ import { NamirasoftCostServerCost } from "./NamirasoftCostServerCost";
|
|
|
6
6
|
import { NamirasoftCostServerFieldCategory } from "./NamirasoftCostServerFieldCategory";
|
|
7
7
|
import { NamirasoftCostServerFieldField } from "./NamirasoftCostServerFieldField";
|
|
8
8
|
import { NamirasoftCostServerHealthz } from "./NamirasoftCostServerHealthz";
|
|
9
|
+
import { NamirasoftCostServerLogLogGroup } from "./NamirasoftCostServerLogLogGroup";
|
|
9
10
|
import { NamirasoftCostServerMetrics } from "./NamirasoftCostServerMetrics";
|
|
10
11
|
import { NamirasoftCostServerSecretSecret } from "./NamirasoftCostServerSecretSecret";
|
|
11
12
|
import { NamirasoftCostServerValue } from "./NamirasoftCostServerValue";
|
|
@@ -19,6 +20,7 @@ export declare class NamirasoftCostServer extends NSABaseServer {
|
|
|
19
20
|
bill_watch_gcp: NamirasoftCostServerBillWatchGCP;
|
|
20
21
|
field_category: NamirasoftCostServerFieldCategory;
|
|
21
22
|
field_field: NamirasoftCostServerFieldField;
|
|
23
|
+
log_log_group: NamirasoftCostServerLogLogGroup;
|
|
22
24
|
secret_secret: NamirasoftCostServerSecretSecret;
|
|
23
25
|
cost: NamirasoftCostServerCost;
|
|
24
26
|
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void);
|
|
@@ -9,12 +9,13 @@ const NamirasoftCostServerCost_1 = require("./NamirasoftCostServerCost");
|
|
|
9
9
|
const NamirasoftCostServerFieldCategory_1 = require("./NamirasoftCostServerFieldCategory");
|
|
10
10
|
const NamirasoftCostServerFieldField_1 = require("./NamirasoftCostServerFieldField");
|
|
11
11
|
const NamirasoftCostServerHealthz_1 = require("./NamirasoftCostServerHealthz");
|
|
12
|
+
const NamirasoftCostServerLogLogGroup_1 = require("./NamirasoftCostServerLogLogGroup");
|
|
12
13
|
const NamirasoftCostServerMetrics_1 = require("./NamirasoftCostServerMetrics");
|
|
13
14
|
const NamirasoftCostServerSecretSecret_1 = require("./NamirasoftCostServerSecretSecret");
|
|
14
15
|
const NamirasoftCostServerValue_1 = require("./NamirasoftCostServerValue");
|
|
15
16
|
class NamirasoftCostServer extends namirasoft_account_1.NSABaseServer {
|
|
16
17
|
constructor(base_url, manager, onError) {
|
|
17
|
-
super(base_url, `1.4.
|
|
18
|
+
super(base_url, `1.4.46`, manager, onError);
|
|
18
19
|
this.healthz = new NamirasoftCostServerHealthz_1.NamirasoftCostServerHealthz(this);
|
|
19
20
|
this.metrics = new NamirasoftCostServerMetrics_1.NamirasoftCostServerMetrics(this);
|
|
20
21
|
this.value = new NamirasoftCostServerValue_1.NamirasoftCostServerValue(this);
|
|
@@ -23,6 +24,7 @@ class NamirasoftCostServer extends namirasoft_account_1.NSABaseServer {
|
|
|
23
24
|
this.bill_watch_gcp = new NamirasoftCostServerBillWatchGCP_1.NamirasoftCostServerBillWatchGCP(this);
|
|
24
25
|
this.field_category = new NamirasoftCostServerFieldCategory_1.NamirasoftCostServerFieldCategory(this);
|
|
25
26
|
this.field_field = new NamirasoftCostServerFieldField_1.NamirasoftCostServerFieldField(this);
|
|
27
|
+
this.log_log_group = new NamirasoftCostServerLogLogGroup_1.NamirasoftCostServerLogLogGroup(this);
|
|
26
28
|
this.secret_secret = new NamirasoftCostServerSecretSecret_1.NamirasoftCostServerSecretSecret(this);
|
|
27
29
|
this.cost = new NamirasoftCostServerCost_1.NamirasoftCostServerCost(this);
|
|
28
30
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamirasoftCostServer.js","sourceRoot":"","sources":["../src/NamirasoftCostServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,yFAAsF;AACtF,6FAA0F;AAC1F,yFAAsF;AACtF,yEAAsE;AACtE,2FAAwF;AACxF,qFAAkF;AAClF,+EAA4E;AAC5E,+EAA4E;AAC5E,yFAAsF;AACtF,2EAAwE;AAGxE,MAAa,oBAAqB,SAAQ,kCAAa;
|
|
1
|
+
{"version":3,"file":"NamirasoftCostServer.js","sourceRoot":"","sources":["../src/NamirasoftCostServer.ts"],"names":[],"mappings":";;;AAoBA,2DAAmD;AACnD,yFAAsF;AACtF,6FAA0F;AAC1F,yFAAsF;AACtF,yEAAsE;AACtE,2FAAwF;AACxF,qFAAkF;AAClF,+EAA4E;AAC5E,uFAAoF;AACpF,+EAA4E;AAC5E,yFAAsF;AACtF,2EAAwE;AAGxE,MAAa,oBAAqB,SAAQ,kCAAa;IAanD,YAAY,QAAgB,EAAE,OAAqB,EAAE,OAA+B;QAEhF,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC5C,IAAI,CAAC,OAAO,GAAG,IAAI,yDAA2B,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,OAAO,GAAG,IAAI,yDAA2B,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,KAAK,GAAG,IAAI,qDAAyB,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,cAAc,GAAG,IAAI,mEAAgC,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,CAAC,gBAAgB,GAAG,IAAI,uEAAkC,CAAC,IAAI,CAAC,CAAC;QACrE,IAAI,CAAC,cAAc,GAAG,IAAI,mEAAgC,CAAC,IAAI,CAAC,CAAC;QACjE,IAAI,CAAC,cAAc,GAAG,IAAI,qEAAiC,CAAC,IAAI,CAAC,CAAC;QAClE,IAAI,CAAC,WAAW,GAAG,IAAI,+DAA8B,CAAC,IAAI,CAAC,CAAC;QAC5D,IAAI,CAAC,aAAa,GAAG,IAAI,iEAA+B,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,aAAa,GAAG,IAAI,mEAAgC,CAAC,IAAI,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,GAAG,IAAI,mDAAwB,CAAC,IAAI,CAAC,CAAC;IACnD,CAAC;CACJ;AA5BD,oDA4BC;AAAA,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CalculationOption } from "./type/CalculationOption";
|
|
2
|
+
import { CostRow } from "./row/CostRow";
|
|
3
|
+
import { Estimation } from "./type/Estimation";
|
|
4
|
+
import { EstimationOption } from "./type/EstimationOption";
|
|
5
|
+
import { NamirasoftCostServer } from "./NamirasoftCostServer";
|
|
6
|
+
import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
|
|
7
|
+
export declare class NamirasoftCostServerLogLogGroup extends NamirasoftCostServerBase {
|
|
8
|
+
constructor(server: NamirasoftCostServer);
|
|
9
|
+
EstimateRecord(body: EstimationOption): Promise<Estimation[]>;
|
|
10
|
+
_CreateForRecord(user_id: string, body: CalculationOption): Promise<CostRow[]>;
|
|
11
|
+
EstimateRead(body: EstimationOption): Promise<Estimation[]>;
|
|
12
|
+
_CreateForRead(user_id: string, body: CalculationOption): Promise<CostRow[]>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NamirasoftCostServerLogLogGroup = void 0;
|
|
13
|
+
const NamirasoftCostServerBase_1 = require("./NamirasoftCostServerBase");
|
|
14
|
+
class NamirasoftCostServerLogLogGroup extends NamirasoftCostServerBase_1.NamirasoftCostServerBase {
|
|
15
|
+
constructor(server) {
|
|
16
|
+
super(server);
|
|
17
|
+
this.EstimateRecord = this.EstimateRecord.bind(this);
|
|
18
|
+
this._CreateForRecord = this._CreateForRecord.bind(this);
|
|
19
|
+
this.EstimateRead = this.EstimateRead.bind(this);
|
|
20
|
+
this._CreateForRead = this._CreateForRead.bind(this);
|
|
21
|
+
}
|
|
22
|
+
EstimateRecord(body) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
let path = `/estimation/log/log-group/record`;
|
|
25
|
+
let { data } = yield this.server._post(path, {}, body);
|
|
26
|
+
return data;
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
_CreateForRecord(user_id, body) {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
let path = `/application/user/${user_id}/cost/log/log-group/record`;
|
|
32
|
+
let { data } = yield this.server._post(path, {}, body);
|
|
33
|
+
return data;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
EstimateRead(body) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
let path = `/estimation/log/log-group/read`;
|
|
39
|
+
let { data } = yield this.server._post(path, {}, body);
|
|
40
|
+
return data;
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
_CreateForRead(user_id, body) {
|
|
44
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
let path = `/application/user/${user_id}/cost/log/log-group/read`;
|
|
46
|
+
let { data } = yield this.server._post(path, {}, body);
|
|
47
|
+
return data;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.NamirasoftCostServerLogLogGroup = NamirasoftCostServerLogLogGroup;
|
|
52
|
+
;
|
|
53
|
+
//# sourceMappingURL=NamirasoftCostServerLogLogGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NamirasoftCostServerLogLogGroup.js","sourceRoot":"","sources":["../src/NamirasoftCostServerLogLogGroup.ts"],"names":[],"mappings":";;;;;;;;;;;;AAyBA,yEAAsE;AAEtE,MAAa,+BAAgC,SAAQ,mDAAwB;IAEzE,YAAY,MAA4B;QAEpC,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC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21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogLogGroupCommand = void 0;
|
|
4
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
5
|
+
const LogLogGroupEstimateReadCommand_1 = require("./LogLogGroupEstimateReadCommand");
|
|
6
|
+
const LogLogGroupEstimateRecordCommand_1 = require("./LogLogGroupEstimateRecordCommand");
|
|
7
|
+
const LogLogGroup_CreateForReadCommand_1 = require("./LogLogGroup_CreateForReadCommand");
|
|
8
|
+
const LogLogGroup_CreateForRecordCommand_1 = require("./LogLogGroup_CreateForRecordCommand");
|
|
9
|
+
class LogLogGroupCommand extends namirasoft_node_cli_1.BaseNavigatorCommand {
|
|
10
|
+
constructor(argv) {
|
|
11
|
+
super(argv, {
|
|
12
|
+
"estimaterecord": LogLogGroupEstimateRecordCommand_1.LogLogGroupEstimateRecordCommand,
|
|
13
|
+
"_createforrecord": LogLogGroup_CreateForRecordCommand_1.LogLogGroup_CreateForRecordCommand,
|
|
14
|
+
"estimateread": LogLogGroupEstimateReadCommand_1.LogLogGroupEstimateReadCommand,
|
|
15
|
+
"_createforread": LogLogGroup_CreateForReadCommand_1.LogLogGroup_CreateForReadCommand,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.LogLogGroupCommand = LogLogGroupCommand;
|
|
20
|
+
;
|
|
21
|
+
//# sourceMappingURL=LogLogGroupCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogLogGroupCommand.js","sourceRoot":"","sources":["../../src/command/LogLogGroupCommand.ts"],"names":[],"mappings":";;;AAoBA,6DAA2D;AAC3D,qFAAkF;AAClF,yFAAsF;AACtF,yFAAsF;AACtF,6FAA0F;AAE1F,MAAa,kBAAmB,SAAQ,0CAAoB;IAExD,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE;YACR,gBAAgB,EAAE,mEAAgC;YAClD,kBAAkB,EAAE,uEAAkC;YACtD,cAAc,EAAE,+DAA8B;YAC9C,gBAAgB,EAAE,mEAAgC;SACrD,CAAC,CAAC;IACP,CAAC;CACJ;AAXD,gDAWC;AAAA,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogLogGroupEstimateReadCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogLogGroupEstimateReadCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "period",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'period' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["period"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "total_count",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'total_count' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["total_count"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "number",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'number' in body",
|
|
40
|
+
optional: false,
|
|
41
|
+
args: ["number"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "total_value",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'total_value' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["total_value"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "value",
|
|
54
|
+
short: "",
|
|
55
|
+
description: "Provides the value of 'value' in body",
|
|
56
|
+
optional: false,
|
|
57
|
+
args: ["value"],
|
|
58
|
+
defaults: [""]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "active",
|
|
62
|
+
short: "",
|
|
63
|
+
description: "Provides the value of 'active' in body",
|
|
64
|
+
optional: false,
|
|
65
|
+
args: ["active"],
|
|
66
|
+
defaults: [""]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "trial_started_at",
|
|
70
|
+
short: "",
|
|
71
|
+
description: "Provides the value of 'trial_started_at' in body",
|
|
72
|
+
optional: true,
|
|
73
|
+
args: ["trial_started_at"],
|
|
74
|
+
defaults: [""]
|
|
75
|
+
}
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
exec() {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
let token = this.app.storage.getNSAToken();
|
|
81
|
+
if (token == null)
|
|
82
|
+
throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
|
|
83
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
84
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
85
|
+
manager.setValue(token, false);
|
|
86
|
+
let url = this.app.storage.getItem("ns-cost-server-url");
|
|
87
|
+
let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
|
|
88
|
+
let ans = yield server.log_log_group.EstimateRead({
|
|
89
|
+
period: this.option_values.period,
|
|
90
|
+
total_count: this.option_values.total_count,
|
|
91
|
+
number: this.option_values.number,
|
|
92
|
+
total_value: this.option_values.total_value,
|
|
93
|
+
value: this.option_values.value,
|
|
94
|
+
active: this.option_values.active,
|
|
95
|
+
trial_started_at: this.option_values.trial_started_at
|
|
96
|
+
});
|
|
97
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.LogLogGroupEstimateReadCommand = LogLogGroupEstimateReadCommand;
|
|
102
|
+
;
|
|
103
|
+
//# sourceMappingURL=LogLogGroupEstimateReadCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogLogGroupEstimateReadCommand.js","sourceRoot":"","sources":["../../src/command/LogLogGroupEstimateReadCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,8BAA+B,SAAQ,sCAAgB;IAEhE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAA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IAAI,iCAAY,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;YACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC/B,IAAI,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;YACzD,IAAI,MAAM,GAAG,IAAI,2CAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YAC3F,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,YAAY,CAAC;gBAC9C,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;gBAC3C,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;gBAC3C,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;gBAC/B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,gBAAgB;aACxD,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AApFD,wEAoFC;AAAA,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogLogGroupEstimateRecordCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogLogGroupEstimateRecordCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, [], [
|
|
20
|
+
{
|
|
21
|
+
name: "period",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'period' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["period"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "total_count",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'total_count' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["total_count"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "number",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'number' in body",
|
|
40
|
+
optional: false,
|
|
41
|
+
args: ["number"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "total_value",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'total_value' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["total_value"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "value",
|
|
54
|
+
short: "",
|
|
55
|
+
description: "Provides the value of 'value' in body",
|
|
56
|
+
optional: false,
|
|
57
|
+
args: ["value"],
|
|
58
|
+
defaults: [""]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "active",
|
|
62
|
+
short: "",
|
|
63
|
+
description: "Provides the value of 'active' in body",
|
|
64
|
+
optional: false,
|
|
65
|
+
args: ["active"],
|
|
66
|
+
defaults: [""]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "trial_started_at",
|
|
70
|
+
short: "",
|
|
71
|
+
description: "Provides the value of 'trial_started_at' in body",
|
|
72
|
+
optional: true,
|
|
73
|
+
args: ["trial_started_at"],
|
|
74
|
+
defaults: [""]
|
|
75
|
+
}
|
|
76
|
+
]);
|
|
77
|
+
}
|
|
78
|
+
exec() {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
let token = this.app.storage.getNSAToken();
|
|
81
|
+
if (token == null)
|
|
82
|
+
throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
|
|
83
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
84
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
85
|
+
manager.setValue(token, false);
|
|
86
|
+
let url = this.app.storage.getItem("ns-cost-server-url");
|
|
87
|
+
let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
|
|
88
|
+
let ans = yield server.log_log_group.EstimateRecord({
|
|
89
|
+
period: this.option_values.period,
|
|
90
|
+
total_count: this.option_values.total_count,
|
|
91
|
+
number: this.option_values.number,
|
|
92
|
+
total_value: this.option_values.total_value,
|
|
93
|
+
value: this.option_values.value,
|
|
94
|
+
active: this.option_values.active,
|
|
95
|
+
trial_started_at: this.option_values.trial_started_at
|
|
96
|
+
});
|
|
97
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.LogLogGroupEstimateRecordCommand = LogLogGroupEstimateRecordCommand;
|
|
102
|
+
;
|
|
103
|
+
//# sourceMappingURL=LogLogGroupEstimateRecordCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogLogGroupEstimateRecordCommand.js","sourceRoot":"","sources":["../../src/command/LogLogGroupEstimateRecordCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,gCAAiC,SAAQ,sCAAgB;IAElE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE;YACZ;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;a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CAAC,CAAC,CAAC;YAC3F,IAAI,GAAG,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC;gBAChD,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;gBAC3C,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,WAAW;gBAC3C,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,KAAK;gBAC/B,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,MAAM;gBACjC,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,gBAAgB;aACxD,CAAC,CAAC;YACH,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AApFD,4EAoFC;AAAA,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LogLogGroup_CreateForReadCommand = void 0;
|
|
13
|
+
const namirasoft_node_cli_1 = require("namirasoft-node-cli");
|
|
14
|
+
const namirasoft_core_1 = require("namirasoft-core");
|
|
15
|
+
const NamirasoftCostServer_1 = require("../NamirasoftCostServer");
|
|
16
|
+
const namirasoft_account_1 = require("namirasoft-account");
|
|
17
|
+
class LogLogGroup_CreateForReadCommand extends namirasoft_node_cli_1.BaseFinalCommand {
|
|
18
|
+
constructor(argv) {
|
|
19
|
+
super(argv, ["user_id"], [
|
|
20
|
+
{
|
|
21
|
+
name: "period",
|
|
22
|
+
short: "",
|
|
23
|
+
description: "Provides the value of 'period' in body",
|
|
24
|
+
optional: false,
|
|
25
|
+
args: ["period"],
|
|
26
|
+
defaults: [""]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "total_count",
|
|
30
|
+
short: "",
|
|
31
|
+
description: "Provides the value of 'total_count' in body",
|
|
32
|
+
optional: false,
|
|
33
|
+
args: ["total_count"],
|
|
34
|
+
defaults: [""]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "number",
|
|
38
|
+
short: "",
|
|
39
|
+
description: "Provides the value of 'number' in body",
|
|
40
|
+
optional: false,
|
|
41
|
+
args: ["number"],
|
|
42
|
+
defaults: [""]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "total_value",
|
|
46
|
+
short: "",
|
|
47
|
+
description: "Provides the value of 'total_value' in body",
|
|
48
|
+
optional: false,
|
|
49
|
+
args: ["total_value"],
|
|
50
|
+
defaults: [""]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "value",
|
|
54
|
+
short: "",
|
|
55
|
+
description: "Provides the value of 'value' in body",
|
|
56
|
+
optional: false,
|
|
57
|
+
args: ["value"],
|
|
58
|
+
defaults: [""]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "active",
|
|
62
|
+
short: "",
|
|
63
|
+
description: "Provides the value of 'active' in body",
|
|
64
|
+
optional: false,
|
|
65
|
+
args: ["active"],
|
|
66
|
+
defaults: [""]
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "workspace_id",
|
|
70
|
+
short: "",
|
|
71
|
+
description: "Provides the value of 'workspace_id' in body",
|
|
72
|
+
optional: true,
|
|
73
|
+
args: ["workspace_id"],
|
|
74
|
+
defaults: [""]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "resource_id",
|
|
78
|
+
short: "",
|
|
79
|
+
description: "Provides the value of 'resource_id' in body",
|
|
80
|
+
optional: true,
|
|
81
|
+
args: ["resource_id"],
|
|
82
|
+
defaults: [""]
|
|
83
|
+
}
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
exec() {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
let token = this.app.storage.getNSAToken();
|
|
89
|
+
if (token == null)
|
|
90
|
+
throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
|
|
91
|
+
let storage = new namirasoft_core_1.IStorageMemoryDedicated();
|
|
92
|
+
let manager = new namirasoft_account_1.TokenManager(storage, () => { });
|
|
93
|
+
manager.setValue(token, false);
|
|
94
|
+
let url = this.app.storage.getItem("ns-cost-server-url");
|
|
95
|
+
let server = new NamirasoftCostServer_1.NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
|
|
96
|
+
let ans = yield server.log_log_group._CreateForRead(this.arg_values[0], {
|
|
97
|
+
period: this.option_values.period,
|
|
98
|
+
total_count: this.option_values.total_count,
|
|
99
|
+
number: this.option_values.number,
|
|
100
|
+
total_value: this.option_values.total_value,
|
|
101
|
+
value: this.option_values.value,
|
|
102
|
+
active: this.option_values.active,
|
|
103
|
+
workspace_id: this.option_values.workspace_id,
|
|
104
|
+
resource_id: this.option_values.resource_id
|
|
105
|
+
});
|
|
106
|
+
this.app.logger.success(JSON.stringify(ans));
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.LogLogGroup_CreateForReadCommand = LogLogGroup_CreateForReadCommand;
|
|
111
|
+
;
|
|
112
|
+
//# sourceMappingURL=LogLogGroup_CreateForReadCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogLogGroup_CreateForReadCommand.js","sourceRoot":"","sources":["../../src/command/LogLogGroup_CreateForReadCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,gCAAiC,SAAQ,sCAAgB;IAElE,YAAY,IAAc;QAEtB,KAAK,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE;YACrB;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,QAAQ;gBACd,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,wCAAwC;gBACrD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,QAAQ,CAAC;gBAChB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,6CAA6C;gBAC1D,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,aAAa,CAAC;gBACrB,QAAQ,EAAE,CAAC,EAAE,CAAC;aACjB;YACD;gBACI,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE;gBACT,WAAW,EAAE,uCAAuC;gBACpD,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,CAAC,OAAO,CAAC;gBACf,QA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