namirasoft-cost 1.4.44 → 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/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/estimator/BaseEstimator.js +1 -1
- package/dist/estimator/BaseEstimator.js.map +1 -1
- package/dist/estimator/SecretSecretReadEstimator.d.ts +1 -1
- package/dist/estimator/SecretSecretReadEstimator.js +2 -2
- package/dist/estimator/SecretSecretReadEstimator.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/NamirasoftCostServer.ts +4 -1
- package/src/NamirasoftCostServerLogLogGroup.ts +62 -0
- 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/cli.ts +2 -0
- package/src/estimator/BaseEstimator.ts +1 -1
- package/src/estimator/SecretSecretReadEstimator.ts +2 -2
- package/src/index.ts +6 -0
|
@@ -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,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IACK,cAAc,CAAC,IAAsB;;YAEvC,IAAI,IAAI,GAAG,kCAAkC,CAAC;YAC9C,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACrE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,gBAAgB,CAAC,OAAe,EAAE,IAAuB;;YAE3D,IAAI,IAAI,GAAG,qBAAqB,OAAO,4BAA4B,CAAC;YACpE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAY,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAClE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,YAAY,CAAC,IAAsB;;YAErC,IAAI,IAAI,GAAG,gCAAgC,CAAC;YAC5C,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YACrE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;IACK,cAAc,CAAC,OAAe,EAAE,IAAuB;;YAEzD,IAAI,IAAI,GAAG,qBAAqB,OAAO,0BAA0B,CAAC;YAClE,IAAI,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAY,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;YAClE,OAAO,IAAI,CAAC;QAChB,CAAC;KAAA;CACJ;AAlCD,0EAkCC;AAAA,CAAC"}
|
|
@@ -0,0 +1,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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AAW,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;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+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;gB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,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,CAAC;KAAA;CACJ;AA7FD,4EA6FC;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_CreateForRecordCommand = 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_CreateForRecordCommand 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._CreateForRecord(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_CreateForRecordCommand = LogLogGroup_CreateForRecordCommand;
|
|
111
|
+
;
|
|
112
|
+
//# sourceMappingURL=LogLogGroup_CreateForRecordCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LogLogGroup_CreateForRecordCommand.js","sourceRoot":"","sources":["../../src/command/LogLogGroup_CreateForRecordCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;AAoBA,6DAAuD;AACvD,qDAA0D;AAC1D,kEAA+D;AAC/D,2DAAkD;AAElD,MAAa,kCAAmC,SAAQ,sCAAgB;IAEpE,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,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