namirasoft-bill-watch 1.4.49 → 1.4.50
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 +6 -6
- package/.ns-sdkg-file-keep +25 -25
- package/package.json +28 -28
- package/src/AWSConstants.ts +72 -72
- package/src/NamirasoftBillWatchServer.ts +83 -83
- package/src/NamirasoftBillWatchServerAWS.ts +84 -84
- package/src/NamirasoftBillWatchServerAWSCategory.ts +62 -62
- package/src/NamirasoftBillWatchServerAWSField.ts +69 -69
- package/src/NamirasoftBillWatchServerAWSTag.ts +69 -69
- package/src/NamirasoftBillWatchServerAzure.ts +84 -84
- package/src/NamirasoftBillWatchServerAzureCategory.ts +62 -62
- package/src/NamirasoftBillWatchServerAzureField.ts +69 -69
- package/src/NamirasoftBillWatchServerAzureTag.ts +69 -69
- package/src/NamirasoftBillWatchServerBase.ts +29 -29
- package/src/NamirasoftBillWatchServerGCP.ts +84 -84
- package/src/NamirasoftBillWatchServerGCPCategory.ts +62 -62
- package/src/NamirasoftBillWatchServerGCPField.ts +69 -69
- package/src/NamirasoftBillWatchServerGCPTag.ts +69 -69
- package/src/NamirasoftBillWatchServerHealthz.ts +35 -35
- package/src/NamirasoftBillWatchServerRule.ts +70 -70
- package/src/NamirasoftBillWatchServerRuleCategory.ts +62 -62
- package/src/NamirasoftBillWatchServerRuleField.ts +69 -69
- package/src/NamirasoftBillWatchServerRuleTag.ts +69 -69
- package/src/NamirasoftBillWatchServerValue.ts +36 -36
- package/src/command/AWSCategoryCommand.ts +37 -37
- package/src/command/AWSCategoryCreateCommand.ts +55 -55
- package/src/command/AWSCategoryDeleteCommand.ts +44 -44
- package/src/command/AWSCategoryGetCommand.ts +44 -44
- package/src/command/AWSCategoryListCommand.ts +44 -44
- package/src/command/AWSCommand.ts +43 -43
- package/src/command/AWSCreateCommand.ts +181 -181
- package/src/command/AWSDeleteCommand.ts +44 -44
- package/src/command/AWSFieldCommand.ts +39 -39
- package/src/command/AWSFieldCreateCommand.ts +64 -64
- package/src/command/AWSFieldDeleteCommand.ts +44 -44
- package/src/command/AWSFieldGetCommand.ts +44 -44
- package/src/command/AWSFieldListCommand.ts +44 -44
- package/src/command/AWSFieldUpdateCommand.ts +64 -64
- package/src/command/AWSGetCommand.ts +44 -44
- package/src/command/AWSListCommand.ts +44 -44
- package/src/command/AWSRunCommand.ts +44 -44
- package/src/command/AWSTagCommand.ts +39 -39
- package/src/command/AWSTagCreateCommand.ts +64 -64
- package/src/command/AWSTagDeleteCommand.ts +44 -44
- package/src/command/AWSTagGetCommand.ts +44 -44
- package/src/command/AWSTagListCommand.ts +44 -44
- package/src/command/AWSTagUpdateCommand.ts +64 -64
- package/src/command/AWSUpdateCommand.ts +181 -181
- package/src/command/AWSValidationCommand.ts +44 -44
- package/src/command/AzureCategoryCommand.ts +37 -37
- package/src/command/AzureCategoryCreateCommand.ts +55 -55
- package/src/command/AzureCategoryDeleteCommand.ts +44 -44
- package/src/command/AzureCategoryGetCommand.ts +44 -44
- package/src/command/AzureCategoryListCommand.ts +44 -44
- package/src/command/AzureCommand.ts +43 -43
- package/src/command/AzureCreateCommand.ts +154 -154
- package/src/command/AzureDeleteCommand.ts +44 -44
- package/src/command/AzureFieldCommand.ts +39 -39
- package/src/command/AzureFieldCreateCommand.ts +64 -64
- package/src/command/AzureFieldDeleteCommand.ts +44 -44
- package/src/command/AzureFieldGetCommand.ts +44 -44
- package/src/command/AzureFieldListCommand.ts +44 -44
- package/src/command/AzureFieldUpdateCommand.ts +64 -64
- package/src/command/AzureGetCommand.ts +44 -44
- package/src/command/AzureListCommand.ts +44 -44
- package/src/command/AzureRunCommand.ts +44 -44
- package/src/command/AzureTagCommand.ts +39 -39
- package/src/command/AzureTagCreateCommand.ts +64 -64
- package/src/command/AzureTagDeleteCommand.ts +44 -44
- package/src/command/AzureTagGetCommand.ts +44 -44
- package/src/command/AzureTagListCommand.ts +44 -44
- package/src/command/AzureTagUpdateCommand.ts +64 -64
- package/src/command/AzureUpdateCommand.ts +154 -154
- package/src/command/AzureValidationCommand.ts +44 -44
- package/src/command/GCPCategoryCommand.ts +37 -37
- package/src/command/GCPCategoryCreateCommand.ts +55 -55
- package/src/command/GCPCategoryDeleteCommand.ts +44 -44
- package/src/command/GCPCategoryGetCommand.ts +44 -44
- package/src/command/GCPCategoryListCommand.ts +44 -44
- package/src/command/GCPCommand.ts +43 -43
- package/src/command/GCPCreateCommand.ts +154 -154
- package/src/command/GCPDeleteCommand.ts +44 -44
- package/src/command/GCPFieldCommand.ts +39 -39
- package/src/command/GCPFieldCreateCommand.ts +64 -64
- package/src/command/GCPFieldDeleteCommand.ts +44 -44
- package/src/command/GCPFieldGetCommand.ts +44 -44
- package/src/command/GCPFieldListCommand.ts +44 -44
- package/src/command/GCPFieldUpdateCommand.ts +64 -64
- package/src/command/GCPGetCommand.ts +44 -44
- package/src/command/GCPListCommand.ts +44 -44
- package/src/command/GCPRunCommand.ts +44 -44
- package/src/command/GCPTagCommand.ts +39 -39
- package/src/command/GCPTagCreateCommand.ts +64 -64
- package/src/command/GCPTagDeleteCommand.ts +44 -44
- package/src/command/GCPTagGetCommand.ts +44 -44
- package/src/command/GCPTagListCommand.ts +44 -44
- package/src/command/GCPTagUpdateCommand.ts +64 -64
- package/src/command/GCPUpdateCommand.ts +154 -154
- package/src/command/GCPValidationCommand.ts +44 -44
- package/src/command/HealthzCommand.ts +31 -31
- package/src/command/HealthzGetCommand.ts +44 -44
- package/src/command/RuleCategoryCommand.ts +37 -37
- package/src/command/RuleCategoryCreateCommand.ts +55 -55
- package/src/command/RuleCategoryDeleteCommand.ts +44 -44
- package/src/command/RuleCategoryGetCommand.ts +44 -44
- package/src/command/RuleCategoryListCommand.ts +44 -44
- package/src/command/RuleCommand.ts +39 -39
- package/src/command/RuleCreateCommand.ts +109 -109
- package/src/command/RuleDeleteCommand.ts +44 -44
- package/src/command/RuleFieldCommand.ts +39 -39
- package/src/command/RuleFieldCreateCommand.ts +64 -64
- package/src/command/RuleFieldDeleteCommand.ts +44 -44
- package/src/command/RuleFieldGetCommand.ts +44 -44
- package/src/command/RuleFieldListCommand.ts +44 -44
- package/src/command/RuleFieldUpdateCommand.ts +64 -64
- package/src/command/RuleGetCommand.ts +44 -44
- package/src/command/RuleListCommand.ts +44 -44
- package/src/command/RuleTagCommand.ts +39 -39
- package/src/command/RuleTagCreateCommand.ts +64 -64
- package/src/command/RuleTagDeleteCommand.ts +44 -44
- package/src/command/RuleTagGetCommand.ts +44 -44
- package/src/command/RuleTagListCommand.ts +44 -44
- package/src/command/RuleTagUpdateCommand.ts +64 -64
- package/src/command/RuleUpdateCommand.ts +109 -109
- package/src/command/ValueCommand.ts +31 -31
- package/src/command/ValueListCommand.ts +44 -44
- package/src/command/cli.ts +66 -66
- package/src/enum/AWSLastRunStatus.ts +29 -29
- package/src/enum/AzureLastRunStatus.ts +29 -29
- package/src/enum/GCPLastRunStatus.ts +29 -29
- package/src/formula/BaseFormula.ts +49 -49
- package/src/formula/CalculationResult.ts +4 -4
- package/src/formula/ChangeType.ts +5 -5
- package/src/formula/CostData.ts +5 -5
- package/src/formula/Formatter.ts +64 -64
- package/src/formula/FormulaDefinitionRow.ts +15 -15
- package/src/formula/FormulaRow.ts +6 -6
- package/src/formula/Formulas.ts +269 -269
- package/src/formula/statistical/Formula_InterquartileRange.ts +53 -53
- package/src/formula/statistical/amount/Formula_AmountByAverage.ts +25 -25
- package/src/formula/statistical/amount/Formula_AmountByLast.ts +30 -30
- package/src/formula/statistical/amount/Formula_AmountByMax.ts +25 -25
- package/src/formula/statistical/amount/Formula_AmountByMedian.ts +25 -25
- package/src/formula/statistical/amount/Formula_AmountByMin.ts +25 -25
- package/src/formula/statistical/percent/Formula_PercentageByAverage.ts +25 -25
- package/src/formula/statistical/percent/Formula_PercentageByLast.ts +28 -28
- package/src/formula/statistical/percent/Formula_PercentageByMax.ts +25 -25
- package/src/formula/statistical/percent/Formula_PercentageByMedian.ts +25 -25
- package/src/formula/statistical/percent/Formula_PercentageByMin.ts +25 -25
- package/src/formula/statistical/z_score/Formula_GrubbsTest.ts +65 -65
- package/src/formula/statistical/z_score/Formula_ModifiedZScore.ts +35 -35
- package/src/formula/statistical/z_score/Formula_ZScore.ts +35 -35
- package/src/formula/trend/Formula_RegressionResidual.ts +49 -49
- package/src/formula/trend/Formula_TrendDeviation.ts +45 -45
- package/src/index.ts +217 -217
- package/src/meta/AWSCategoryMetaTable.ts +57 -57
- package/src/meta/AWSFieldMetaTable.ts +59 -59
- package/src/meta/AWSMetaTable.ts +85 -85
- package/src/meta/AWSTagMetaTable.ts +59 -59
- package/src/meta/AzureCategoryMetaTable.ts +57 -57
- package/src/meta/AzureFieldMetaTable.ts +59 -59
- package/src/meta/AzureMetaTable.ts +79 -79
- package/src/meta/AzureTagMetaTable.ts +59 -59
- package/src/meta/GCPCategoryMetaTable.ts +57 -57
- package/src/meta/GCPFieldMetaTable.ts +59 -59
- package/src/meta/GCPMetaTable.ts +79 -79
- package/src/meta/GCPTagMetaTable.ts +59 -59
- package/src/meta/NamirasoftBillWatchMetaDatabase.ts +95 -95
- package/src/meta/RuleCategoryMetaTable.ts +57 -57
- package/src/meta/RuleFieldMetaTable.ts +59 -59
- package/src/meta/RuleMetaTable.ts +61 -61
- package/src/meta/RuleTagMetaTable.ts +59 -59
- package/src/row/AWSCategoryRow.ts +28 -28
- package/src/row/AWSFieldRow.ts +29 -29
- package/src/row/AWSFullRow.ts +53 -53
- package/src/row/AWSInputRow.ts +42 -42
- package/src/row/AWSRow.ts +44 -44
- package/src/row/AWSRuleRow.ts +27 -27
- package/src/row/AWSTagRow.ts +29 -29
- package/src/row/AzureCategoryRow.ts +28 -28
- package/src/row/AzureFieldRow.ts +29 -29
- package/src/row/AzureFullRow.ts +50 -50
- package/src/row/AzureInputRow.ts +39 -39
- package/src/row/AzureRow.ts +41 -41
- package/src/row/AzureRuleRow.ts +27 -27
- package/src/row/AzureTagRow.ts +29 -29
- package/src/row/EntityCategoryInputRow.ts +23 -23
- package/src/row/EntityFieldInputRow.ts +24 -24
- package/src/row/EntityTagInputRow.ts +24 -24
- package/src/row/GCPCategoryRow.ts +28 -28
- package/src/row/GCPFieldRow.ts +29 -29
- package/src/row/GCPFullRow.ts +50 -50
- package/src/row/GCPInputRow.ts +39 -39
- package/src/row/GCPRow.ts +41 -41
- package/src/row/GCPRuleRow.ts +27 -27
- package/src/row/GCPTagRow.ts +29 -29
- package/src/row/LookbackPeriodRow.ts +30 -30
- package/src/row/RuleCategoryRow.ts +28 -28
- package/src/row/RuleFieldRow.ts +29 -29
- package/src/row/RuleFullRow.ts +37 -37
- package/src/row/RuleInputRow.ts +33 -33
- package/src/row/RuleRow.ts +30 -30
- package/src/row/RuleTagRow.ts +29 -29
package/.ns-sdkg-dir-deep
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/src
|
|
2
|
-
/src/formula
|
|
3
|
-
/src/formula/statistical
|
|
4
|
-
/src/formula/statistical/amount
|
|
5
|
-
/src/formula/statistical/percent
|
|
6
|
-
/src/formula/statistical/z_score
|
|
1
|
+
/src
|
|
2
|
+
/src/formula
|
|
3
|
+
/src/formula/statistical
|
|
4
|
+
/src/formula/statistical/amount
|
|
5
|
+
/src/formula/statistical/percent
|
|
6
|
+
/src/formula/statistical/z_score
|
|
7
7
|
/src/formula/trend
|
package/.ns-sdkg-file-keep
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
src/AWSConstants.ts
|
|
2
|
-
src/formula/BaseFormula.ts
|
|
3
|
-
src/formula/CalculationResult.ts
|
|
4
|
-
src/formula/ChangeType.ts
|
|
5
|
-
src/formula/CostData.ts
|
|
6
|
-
src/formula/Formatter.ts
|
|
7
|
-
src/formula/FormulaDefinitionRow.ts
|
|
8
|
-
src/formula/FormulaRow.ts
|
|
9
|
-
src/formula/Formulas.ts
|
|
10
|
-
src/formula/statistical/amount/Formula_AmountByMedian.ts
|
|
11
|
-
src/formula/statistical/amount/Formula_AmountByMax.ts
|
|
12
|
-
src/formula/statistical/amount/Formula_AmountByLast.ts
|
|
13
|
-
src/formula/statistical/amount/Formula_AmountByAverage.ts
|
|
14
|
-
src/formula/statistical/amount/Formula_AmountByMin.ts
|
|
15
|
-
src/formula/statistical/percent/Formula_PercentageByMin.ts
|
|
16
|
-
src/formula/statistical/percent/Formula_PercentageByMedian.ts
|
|
17
|
-
src/formula/statistical/percent/Formula_PercentageByMax.ts
|
|
18
|
-
src/formula/statistical/percent/Formula_PercentageByLast.ts
|
|
19
|
-
src/formula/statistical/percent/Formula_PercentageByAverage.ts
|
|
20
|
-
src/formula/statistical/z_score/Formula_GrubbsTest.ts
|
|
21
|
-
src/formula/statistical/z_score/Formula_ModifiedZScore.ts
|
|
22
|
-
src/formula/statistical/z_score/Formula_ZScore.ts
|
|
23
|
-
src/formula/statistical/Formula_InterquartileRange.ts
|
|
24
|
-
src/formula/trend/Formula_TrendDeviation.ts
|
|
25
|
-
src/formula/trend/Formula_RegressionResidual.ts
|
|
1
|
+
src/AWSConstants.ts
|
|
2
|
+
src/formula/BaseFormula.ts
|
|
3
|
+
src/formula/CalculationResult.ts
|
|
4
|
+
src/formula/ChangeType.ts
|
|
5
|
+
src/formula/CostData.ts
|
|
6
|
+
src/formula/Formatter.ts
|
|
7
|
+
src/formula/FormulaDefinitionRow.ts
|
|
8
|
+
src/formula/FormulaRow.ts
|
|
9
|
+
src/formula/Formulas.ts
|
|
10
|
+
src/formula/statistical/amount/Formula_AmountByMedian.ts
|
|
11
|
+
src/formula/statistical/amount/Formula_AmountByMax.ts
|
|
12
|
+
src/formula/statistical/amount/Formula_AmountByLast.ts
|
|
13
|
+
src/formula/statistical/amount/Formula_AmountByAverage.ts
|
|
14
|
+
src/formula/statistical/amount/Formula_AmountByMin.ts
|
|
15
|
+
src/formula/statistical/percent/Formula_PercentageByMin.ts
|
|
16
|
+
src/formula/statistical/percent/Formula_PercentageByMedian.ts
|
|
17
|
+
src/formula/statistical/percent/Formula_PercentageByMax.ts
|
|
18
|
+
src/formula/statistical/percent/Formula_PercentageByLast.ts
|
|
19
|
+
src/formula/statistical/percent/Formula_PercentageByAverage.ts
|
|
20
|
+
src/formula/statistical/z_score/Formula_GrubbsTest.ts
|
|
21
|
+
src/formula/statistical/z_score/Formula_ModifiedZScore.ts
|
|
22
|
+
src/formula/statistical/z_score/Formula_ZScore.ts
|
|
23
|
+
src/formula/statistical/Formula_InterquartileRange.ts
|
|
24
|
+
src/formula/trend/Formula_TrendDeviation.ts
|
|
25
|
+
src/formula/trend/Formula_RegressionResidual.ts
|
|
26
26
|
src/formula/trend/Formula_RegressionResidual.ts
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "namirasoft-bill-watch",
|
|
3
|
-
"title": "Namirasoft Bill Watch NPM Package",
|
|
4
|
-
"description": "Namira Software Corporation Bill Watch NPM Package",
|
|
5
|
-
"icon": "logo.png",
|
|
6
|
-
"logo": "https://static.namirasoft.com/image/namirasoft/bill-watch/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.74",
|
|
21
|
-
"namirasoft-site": "^1.4.38",
|
|
22
|
-
"namirasoft-node-cli": "^1.4.7",
|
|
23
|
-
"namirasoft-account": "^1.4.72",
|
|
24
|
-
"namirasoft-payment": "^1.4.88"
|
|
25
|
-
},
|
|
26
|
-
"bin": {
|
|
27
|
-
"ns-bill-watch": "./dist/command/cli.js"
|
|
28
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "namirasoft-bill-watch",
|
|
3
|
+
"title": "Namirasoft Bill Watch NPM Package",
|
|
4
|
+
"description": "Namira Software Corporation Bill Watch NPM Package",
|
|
5
|
+
"icon": "logo.png",
|
|
6
|
+
"logo": "https://static.namirasoft.com/image/namirasoft/bill-watch/logo/base.png",
|
|
7
|
+
"language": "ts",
|
|
8
|
+
"framework": "npm",
|
|
9
|
+
"application": "package",
|
|
10
|
+
"private": false,
|
|
11
|
+
"version": "1.4.50",
|
|
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.74",
|
|
21
|
+
"namirasoft-site": "^1.4.38",
|
|
22
|
+
"namirasoft-node-cli": "^1.4.7",
|
|
23
|
+
"namirasoft-account": "^1.4.72",
|
|
24
|
+
"namirasoft-payment": "^1.4.88"
|
|
25
|
+
},
|
|
26
|
+
"bin": {
|
|
27
|
+
"ns-bill-watch": "./dist/command/cli.js"
|
|
28
|
+
}
|
|
29
29
|
}
|
package/src/AWSConstants.ts
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
export class AWSConstants
|
|
2
|
-
{
|
|
3
|
-
static METRICS = [
|
|
4
|
-
"UnblendedCost", "BlendedCost", "AmortizedCost",
|
|
5
|
-
"NetAmortizedCost", "NetUnblendedCost", "UsageQuantity"
|
|
6
|
-
];
|
|
7
|
-
static DIMENSIONS = [
|
|
8
|
-
"REGION",
|
|
9
|
-
"SERVICE",
|
|
10
|
-
"INSTANCE_TYPE",
|
|
11
|
-
"USAGE_TYPE",
|
|
12
|
-
"AZ",
|
|
13
|
-
"PLATFORM",
|
|
14
|
-
"PURCHASE_TYPE",
|
|
15
|
-
"TENANCY",
|
|
16
|
-
"OPERATION",
|
|
17
|
-
"RECORD_TYPE",
|
|
18
|
-
];
|
|
19
|
-
static REGIONS = [
|
|
20
|
-
"us-east-1", // N. Virginia
|
|
21
|
-
"us-east-2", // Ohio
|
|
22
|
-
"us-west-1", // N. California
|
|
23
|
-
"us-west-2", // Oregon
|
|
24
|
-
"af-south-1", // Cape Town
|
|
25
|
-
"ap-east-1", // Hong Kong
|
|
26
|
-
"ap-south-1", // Mumbai
|
|
27
|
-
"ap-south-2", // Hyderabad
|
|
28
|
-
"ap-southeast-1", // Singapore
|
|
29
|
-
"ap-southeast-2", // Sydney
|
|
30
|
-
"ap-southeast-3", // Jakarta
|
|
31
|
-
"ap-southeast-4", // Melbourne
|
|
32
|
-
"ap-northeast-1", // Tokyo
|
|
33
|
-
"ap-northeast-2", // Seoul
|
|
34
|
-
"ap-northeast-3", // Osaka
|
|
35
|
-
"ca-central-1", // Central Canada
|
|
36
|
-
"ca-west-1", // Calgary
|
|
37
|
-
"eu-central-1", // Frankfurt
|
|
38
|
-
"eu-central-2", // Zurich
|
|
39
|
-
"eu-west-1", // Ireland
|
|
40
|
-
"eu-west-2", // London
|
|
41
|
-
"eu-west-3", // Paris
|
|
42
|
-
"eu-north-1", // Stockholm
|
|
43
|
-
"eu-south-1", // Milan
|
|
44
|
-
"eu-south-2", // Spain
|
|
45
|
-
"me-south-1", // Bahrain
|
|
46
|
-
"me-central-1", // UAE
|
|
47
|
-
"sa-east-1", // São Paulo
|
|
48
|
-
"il-central-1", // Tel Aviv
|
|
49
|
-
];
|
|
50
|
-
static getDimensionCombinations():
|
|
51
|
-
{
|
|
52
|
-
name: string;
|
|
53
|
-
keys: string[];
|
|
54
|
-
}[]
|
|
55
|
-
{
|
|
56
|
-
let ans: {
|
|
57
|
-
name: string;
|
|
58
|
-
keys: string[];
|
|
59
|
-
}[] = [];
|
|
60
|
-
ans.push({
|
|
61
|
-
name: "TOTAL",
|
|
62
|
-
keys: []
|
|
63
|
-
});
|
|
64
|
-
ans.push(...AWSConstants.DIMENSIONS.map(d => { return { name: d, keys: [d] } }));
|
|
65
|
-
for (let i = 0; i < AWSConstants.DIMENSIONS.length; i++)
|
|
66
|
-
for (let j = i + 1; j < AWSConstants.DIMENSIONS.length; j++)
|
|
67
|
-
ans.push({
|
|
68
|
-
name: `${AWSConstants.DIMENSIONS[i]}*${AWSConstants.DIMENSIONS[j]}`,
|
|
69
|
-
keys: [AWSConstants.DIMENSIONS[i], AWSConstants.DIMENSIONS[j]]
|
|
70
|
-
});
|
|
71
|
-
return ans;
|
|
72
|
-
}
|
|
1
|
+
export class AWSConstants
|
|
2
|
+
{
|
|
3
|
+
static METRICS = [
|
|
4
|
+
"UnblendedCost", "BlendedCost", "AmortizedCost",
|
|
5
|
+
"NetAmortizedCost", "NetUnblendedCost", "UsageQuantity"
|
|
6
|
+
];
|
|
7
|
+
static DIMENSIONS = [
|
|
8
|
+
"REGION",
|
|
9
|
+
"SERVICE",
|
|
10
|
+
"INSTANCE_TYPE",
|
|
11
|
+
"USAGE_TYPE",
|
|
12
|
+
"AZ",
|
|
13
|
+
"PLATFORM",
|
|
14
|
+
"PURCHASE_TYPE",
|
|
15
|
+
"TENANCY",
|
|
16
|
+
"OPERATION",
|
|
17
|
+
"RECORD_TYPE",
|
|
18
|
+
];
|
|
19
|
+
static REGIONS = [
|
|
20
|
+
"us-east-1", // N. Virginia
|
|
21
|
+
"us-east-2", // Ohio
|
|
22
|
+
"us-west-1", // N. California
|
|
23
|
+
"us-west-2", // Oregon
|
|
24
|
+
"af-south-1", // Cape Town
|
|
25
|
+
"ap-east-1", // Hong Kong
|
|
26
|
+
"ap-south-1", // Mumbai
|
|
27
|
+
"ap-south-2", // Hyderabad
|
|
28
|
+
"ap-southeast-1", // Singapore
|
|
29
|
+
"ap-southeast-2", // Sydney
|
|
30
|
+
"ap-southeast-3", // Jakarta
|
|
31
|
+
"ap-southeast-4", // Melbourne
|
|
32
|
+
"ap-northeast-1", // Tokyo
|
|
33
|
+
"ap-northeast-2", // Seoul
|
|
34
|
+
"ap-northeast-3", // Osaka
|
|
35
|
+
"ca-central-1", // Central Canada
|
|
36
|
+
"ca-west-1", // Calgary
|
|
37
|
+
"eu-central-1", // Frankfurt
|
|
38
|
+
"eu-central-2", // Zurich
|
|
39
|
+
"eu-west-1", // Ireland
|
|
40
|
+
"eu-west-2", // London
|
|
41
|
+
"eu-west-3", // Paris
|
|
42
|
+
"eu-north-1", // Stockholm
|
|
43
|
+
"eu-south-1", // Milan
|
|
44
|
+
"eu-south-2", // Spain
|
|
45
|
+
"me-south-1", // Bahrain
|
|
46
|
+
"me-central-1", // UAE
|
|
47
|
+
"sa-east-1", // São Paulo
|
|
48
|
+
"il-central-1", // Tel Aviv
|
|
49
|
+
];
|
|
50
|
+
static getDimensionCombinations():
|
|
51
|
+
{
|
|
52
|
+
name: string;
|
|
53
|
+
keys: string[];
|
|
54
|
+
}[]
|
|
55
|
+
{
|
|
56
|
+
let ans: {
|
|
57
|
+
name: string;
|
|
58
|
+
keys: string[];
|
|
59
|
+
}[] = [];
|
|
60
|
+
ans.push({
|
|
61
|
+
name: "TOTAL",
|
|
62
|
+
keys: []
|
|
63
|
+
});
|
|
64
|
+
ans.push(...AWSConstants.DIMENSIONS.map(d => { return { name: d, keys: [d] } }));
|
|
65
|
+
for (let i = 0; i < AWSConstants.DIMENSIONS.length; i++)
|
|
66
|
+
for (let j = i + 1; j < AWSConstants.DIMENSIONS.length; j++)
|
|
67
|
+
ans.push({
|
|
68
|
+
name: `${AWSConstants.DIMENSIONS[i]}*${AWSConstants.DIMENSIONS[j]}`,
|
|
69
|
+
keys: [AWSConstants.DIMENSIONS[i], AWSConstants.DIMENSIONS[j]]
|
|
70
|
+
});
|
|
71
|
+
return ans;
|
|
72
|
+
}
|
|
73
73
|
}
|
|
@@ -1,84 +1,84 @@
|
|
|
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 { NamirasoftBillWatchServerAWS } from "./NamirasoftBillWatchServerAWS";
|
|
23
|
-
import { NamirasoftBillWatchServerAWSCategory } from "./NamirasoftBillWatchServerAWSCategory";
|
|
24
|
-
import { NamirasoftBillWatchServerAWSField } from "./NamirasoftBillWatchServerAWSField";
|
|
25
|
-
import { NamirasoftBillWatchServerAWSTag } from "./NamirasoftBillWatchServerAWSTag";
|
|
26
|
-
import { NamirasoftBillWatchServerAzure } from "./NamirasoftBillWatchServerAzure";
|
|
27
|
-
import { NamirasoftBillWatchServerAzureCategory } from "./NamirasoftBillWatchServerAzureCategory";
|
|
28
|
-
import { NamirasoftBillWatchServerAzureField } from "./NamirasoftBillWatchServerAzureField";
|
|
29
|
-
import { NamirasoftBillWatchServerAzureTag } from "./NamirasoftBillWatchServerAzureTag";
|
|
30
|
-
import { NamirasoftBillWatchServerGCP } from "./NamirasoftBillWatchServerGCP";
|
|
31
|
-
import { NamirasoftBillWatchServerGCPCategory } from "./NamirasoftBillWatchServerGCPCategory";
|
|
32
|
-
import { NamirasoftBillWatchServerGCPField } from "./NamirasoftBillWatchServerGCPField";
|
|
33
|
-
import { NamirasoftBillWatchServerGCPTag } from "./NamirasoftBillWatchServerGCPTag";
|
|
34
|
-
import { NamirasoftBillWatchServerHealthz } from "./NamirasoftBillWatchServerHealthz";
|
|
35
|
-
import { NamirasoftBillWatchServerRule } from "./NamirasoftBillWatchServerRule";
|
|
36
|
-
import { NamirasoftBillWatchServerRuleCategory } from "./NamirasoftBillWatchServerRuleCategory";
|
|
37
|
-
import { NamirasoftBillWatchServerRuleField } from "./NamirasoftBillWatchServerRuleField";
|
|
38
|
-
import { NamirasoftBillWatchServerRuleTag } from "./NamirasoftBillWatchServerRuleTag";
|
|
39
|
-
import { NamirasoftBillWatchServerValue } from "./NamirasoftBillWatchServerValue";
|
|
40
|
-
import { TokenManager } from "namirasoft-account";
|
|
41
|
-
|
|
42
|
-
export class NamirasoftBillWatchServer extends NSABaseServer
|
|
43
|
-
{
|
|
44
|
-
healthz: NamirasoftBillWatchServerHealthz;
|
|
45
|
-
value: NamirasoftBillWatchServerValue;
|
|
46
|
-
aws_category: NamirasoftBillWatchServerAWSCategory;
|
|
47
|
-
aws_field: NamirasoftBillWatchServerAWSField;
|
|
48
|
-
aws_tag: NamirasoftBillWatchServerAWSTag;
|
|
49
|
-
aws: NamirasoftBillWatchServerAWS;
|
|
50
|
-
azure_category: NamirasoftBillWatchServerAzureCategory;
|
|
51
|
-
azure_field: NamirasoftBillWatchServerAzureField;
|
|
52
|
-
azure_tag: NamirasoftBillWatchServerAzureTag;
|
|
53
|
-
azure: NamirasoftBillWatchServerAzure;
|
|
54
|
-
gcp_category: NamirasoftBillWatchServerGCPCategory;
|
|
55
|
-
gcp_field: NamirasoftBillWatchServerGCPField;
|
|
56
|
-
gcp_tag: NamirasoftBillWatchServerGCPTag;
|
|
57
|
-
gcp: NamirasoftBillWatchServerGCP;
|
|
58
|
-
rule_category: NamirasoftBillWatchServerRuleCategory;
|
|
59
|
-
rule_field: NamirasoftBillWatchServerRuleField;
|
|
60
|
-
rule_tag: NamirasoftBillWatchServerRuleTag;
|
|
61
|
-
rule: NamirasoftBillWatchServerRule;
|
|
62
|
-
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
|
|
63
|
-
{
|
|
64
|
-
super(base_url, `1.4.48`, manager, onError);
|
|
65
|
-
this.healthz = new NamirasoftBillWatchServerHealthz(this);
|
|
66
|
-
this.value = new NamirasoftBillWatchServerValue(this);
|
|
67
|
-
this.aws_category = new NamirasoftBillWatchServerAWSCategory(this);
|
|
68
|
-
this.aws_field = new NamirasoftBillWatchServerAWSField(this);
|
|
69
|
-
this.aws_tag = new NamirasoftBillWatchServerAWSTag(this);
|
|
70
|
-
this.aws = new NamirasoftBillWatchServerAWS(this);
|
|
71
|
-
this.azure_category = new NamirasoftBillWatchServerAzureCategory(this);
|
|
72
|
-
this.azure_field = new NamirasoftBillWatchServerAzureField(this);
|
|
73
|
-
this.azure_tag = new NamirasoftBillWatchServerAzureTag(this);
|
|
74
|
-
this.azure = new NamirasoftBillWatchServerAzure(this);
|
|
75
|
-
this.gcp_category = new NamirasoftBillWatchServerGCPCategory(this);
|
|
76
|
-
this.gcp_field = new NamirasoftBillWatchServerGCPField(this);
|
|
77
|
-
this.gcp_tag = new NamirasoftBillWatchServerGCPTag(this);
|
|
78
|
-
this.gcp = new NamirasoftBillWatchServerGCP(this);
|
|
79
|
-
this.rule_category = new NamirasoftBillWatchServerRuleCategory(this);
|
|
80
|
-
this.rule_field = new NamirasoftBillWatchServerRuleField(this);
|
|
81
|
-
this.rule_tag = new NamirasoftBillWatchServerRuleTag(this);
|
|
82
|
-
this.rule = new NamirasoftBillWatchServerRule(this);
|
|
83
|
-
}
|
|
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 { NamirasoftBillWatchServerAWS } from "./NamirasoftBillWatchServerAWS";
|
|
23
|
+
import { NamirasoftBillWatchServerAWSCategory } from "./NamirasoftBillWatchServerAWSCategory";
|
|
24
|
+
import { NamirasoftBillWatchServerAWSField } from "./NamirasoftBillWatchServerAWSField";
|
|
25
|
+
import { NamirasoftBillWatchServerAWSTag } from "./NamirasoftBillWatchServerAWSTag";
|
|
26
|
+
import { NamirasoftBillWatchServerAzure } from "./NamirasoftBillWatchServerAzure";
|
|
27
|
+
import { NamirasoftBillWatchServerAzureCategory } from "./NamirasoftBillWatchServerAzureCategory";
|
|
28
|
+
import { NamirasoftBillWatchServerAzureField } from "./NamirasoftBillWatchServerAzureField";
|
|
29
|
+
import { NamirasoftBillWatchServerAzureTag } from "./NamirasoftBillWatchServerAzureTag";
|
|
30
|
+
import { NamirasoftBillWatchServerGCP } from "./NamirasoftBillWatchServerGCP";
|
|
31
|
+
import { NamirasoftBillWatchServerGCPCategory } from "./NamirasoftBillWatchServerGCPCategory";
|
|
32
|
+
import { NamirasoftBillWatchServerGCPField } from "./NamirasoftBillWatchServerGCPField";
|
|
33
|
+
import { NamirasoftBillWatchServerGCPTag } from "./NamirasoftBillWatchServerGCPTag";
|
|
34
|
+
import { NamirasoftBillWatchServerHealthz } from "./NamirasoftBillWatchServerHealthz";
|
|
35
|
+
import { NamirasoftBillWatchServerRule } from "./NamirasoftBillWatchServerRule";
|
|
36
|
+
import { NamirasoftBillWatchServerRuleCategory } from "./NamirasoftBillWatchServerRuleCategory";
|
|
37
|
+
import { NamirasoftBillWatchServerRuleField } from "./NamirasoftBillWatchServerRuleField";
|
|
38
|
+
import { NamirasoftBillWatchServerRuleTag } from "./NamirasoftBillWatchServerRuleTag";
|
|
39
|
+
import { NamirasoftBillWatchServerValue } from "./NamirasoftBillWatchServerValue";
|
|
40
|
+
import { TokenManager } from "namirasoft-account";
|
|
41
|
+
|
|
42
|
+
export class NamirasoftBillWatchServer extends NSABaseServer
|
|
43
|
+
{
|
|
44
|
+
healthz: NamirasoftBillWatchServerHealthz;
|
|
45
|
+
value: NamirasoftBillWatchServerValue;
|
|
46
|
+
aws_category: NamirasoftBillWatchServerAWSCategory;
|
|
47
|
+
aws_field: NamirasoftBillWatchServerAWSField;
|
|
48
|
+
aws_tag: NamirasoftBillWatchServerAWSTag;
|
|
49
|
+
aws: NamirasoftBillWatchServerAWS;
|
|
50
|
+
azure_category: NamirasoftBillWatchServerAzureCategory;
|
|
51
|
+
azure_field: NamirasoftBillWatchServerAzureField;
|
|
52
|
+
azure_tag: NamirasoftBillWatchServerAzureTag;
|
|
53
|
+
azure: NamirasoftBillWatchServerAzure;
|
|
54
|
+
gcp_category: NamirasoftBillWatchServerGCPCategory;
|
|
55
|
+
gcp_field: NamirasoftBillWatchServerGCPField;
|
|
56
|
+
gcp_tag: NamirasoftBillWatchServerGCPTag;
|
|
57
|
+
gcp: NamirasoftBillWatchServerGCP;
|
|
58
|
+
rule_category: NamirasoftBillWatchServerRuleCategory;
|
|
59
|
+
rule_field: NamirasoftBillWatchServerRuleField;
|
|
60
|
+
rule_tag: NamirasoftBillWatchServerRuleTag;
|
|
61
|
+
rule: NamirasoftBillWatchServerRule;
|
|
62
|
+
constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
|
|
63
|
+
{
|
|
64
|
+
super(base_url, `1.4.48`, manager, onError);
|
|
65
|
+
this.healthz = new NamirasoftBillWatchServerHealthz(this);
|
|
66
|
+
this.value = new NamirasoftBillWatchServerValue(this);
|
|
67
|
+
this.aws_category = new NamirasoftBillWatchServerAWSCategory(this);
|
|
68
|
+
this.aws_field = new NamirasoftBillWatchServerAWSField(this);
|
|
69
|
+
this.aws_tag = new NamirasoftBillWatchServerAWSTag(this);
|
|
70
|
+
this.aws = new NamirasoftBillWatchServerAWS(this);
|
|
71
|
+
this.azure_category = new NamirasoftBillWatchServerAzureCategory(this);
|
|
72
|
+
this.azure_field = new NamirasoftBillWatchServerAzureField(this);
|
|
73
|
+
this.azure_tag = new NamirasoftBillWatchServerAzureTag(this);
|
|
74
|
+
this.azure = new NamirasoftBillWatchServerAzure(this);
|
|
75
|
+
this.gcp_category = new NamirasoftBillWatchServerGCPCategory(this);
|
|
76
|
+
this.gcp_field = new NamirasoftBillWatchServerGCPField(this);
|
|
77
|
+
this.gcp_tag = new NamirasoftBillWatchServerGCPTag(this);
|
|
78
|
+
this.gcp = new NamirasoftBillWatchServerGCP(this);
|
|
79
|
+
this.rule_category = new NamirasoftBillWatchServerRuleCategory(this);
|
|
80
|
+
this.rule_field = new NamirasoftBillWatchServerRuleField(this);
|
|
81
|
+
this.rule_tag = new NamirasoftBillWatchServerRuleTag(this);
|
|
82
|
+
this.rule = new NamirasoftBillWatchServerRule(this);
|
|
83
|
+
}
|
|
84
84
|
};
|
|
@@ -1,85 +1,85 @@
|
|
|
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 { AWSFullRow } from "./row/AWSFullRow";
|
|
22
|
-
import { AWSInputRow } from "./row/AWSInputRow";
|
|
23
|
-
import { AWSRow } from "./row/AWSRow";
|
|
24
|
-
import { FilterItem } from "namirasoft-core";
|
|
25
|
-
import { NamirasoftBillWatchServer } from "./NamirasoftBillWatchServer";
|
|
26
|
-
import { NamirasoftBillWatchServerBase } from "./NamirasoftBillWatchServerBase";
|
|
27
|
-
import { SortItem } from "namirasoft-core";
|
|
28
|
-
import { SubscriptionValidation } from "namirasoft-payment";
|
|
29
|
-
|
|
30
|
-
export class NamirasoftBillWatchServerAWS extends NamirasoftBillWatchServerBase
|
|
31
|
-
{
|
|
32
|
-
constructor(server: NamirasoftBillWatchServer)
|
|
33
|
-
{
|
|
34
|
-
super(server);
|
|
35
|
-
this.List = this.List.bind(this);
|
|
36
|
-
this.Get = this.Get.bind(this);
|
|
37
|
-
this.Validation = this.Validation.bind(this);
|
|
38
|
-
this.Run = this.Run.bind(this);
|
|
39
|
-
this.Create = this.Create.bind(this);
|
|
40
|
-
this.Update = this.Update.bind(this);
|
|
41
|
-
this.Delete = this.Delete.bind(this);
|
|
42
|
-
}
|
|
43
|
-
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: AWSRow[], count: number }>
|
|
44
|
-
{
|
|
45
|
-
let filters_string_value: string = FilterItem.stringify(filters);
|
|
46
|
-
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
47
|
-
let path = `/aws/list`;
|
|
48
|
-
let { data } = await this.server._get<{ rows: AWSRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
|
|
49
|
-
return data;
|
|
50
|
-
}
|
|
51
|
-
async Get(id: string): Promise<AWSFullRow>
|
|
52
|
-
{
|
|
53
|
-
let path = `/aws/${id}`;
|
|
54
|
-
let { data } = await this.server._get<AWSFullRow>(path, {});
|
|
55
|
-
return data;
|
|
56
|
-
}
|
|
57
|
-
async Validation(): Promise<SubscriptionValidation>
|
|
58
|
-
{
|
|
59
|
-
let path = `/validation/aws`;
|
|
60
|
-
let { data } = await this.server._get<SubscriptionValidation>(path, {});
|
|
61
|
-
return data;
|
|
62
|
-
}
|
|
63
|
-
async Run(id: string): Promise<void>
|
|
64
|
-
{
|
|
65
|
-
let path = `/run/aws/${id}`;
|
|
66
|
-
await this.server._post<void>(path, {});
|
|
67
|
-
}
|
|
68
|
-
async Create(body: AWSInputRow): Promise<AWSRow>
|
|
69
|
-
{
|
|
70
|
-
let path = `/aws`;
|
|
71
|
-
let { data } = await this.server._post<AWSRow>(path, {}, body);
|
|
72
|
-
return data;
|
|
73
|
-
}
|
|
74
|
-
async Update(id: string, body: AWSInputRow): Promise<AWSRow>
|
|
75
|
-
{
|
|
76
|
-
let path = `/aws/${id}`;
|
|
77
|
-
let { data } = await this.server._put<AWSRow>(path, {}, body);
|
|
78
|
-
return data;
|
|
79
|
-
}
|
|
80
|
-
async Delete(id: string): Promise<void>
|
|
81
|
-
{
|
|
82
|
-
let path = `/aws/${id}`;
|
|
83
|
-
await this.server._delete<void>(path, {});
|
|
84
|
-
}
|
|
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 { AWSFullRow } from "./row/AWSFullRow";
|
|
22
|
+
import { AWSInputRow } from "./row/AWSInputRow";
|
|
23
|
+
import { AWSRow } from "./row/AWSRow";
|
|
24
|
+
import { FilterItem } from "namirasoft-core";
|
|
25
|
+
import { NamirasoftBillWatchServer } from "./NamirasoftBillWatchServer";
|
|
26
|
+
import { NamirasoftBillWatchServerBase } from "./NamirasoftBillWatchServerBase";
|
|
27
|
+
import { SortItem } from "namirasoft-core";
|
|
28
|
+
import { SubscriptionValidation } from "namirasoft-payment";
|
|
29
|
+
|
|
30
|
+
export class NamirasoftBillWatchServerAWS extends NamirasoftBillWatchServerBase
|
|
31
|
+
{
|
|
32
|
+
constructor(server: NamirasoftBillWatchServer)
|
|
33
|
+
{
|
|
34
|
+
super(server);
|
|
35
|
+
this.List = this.List.bind(this);
|
|
36
|
+
this.Get = this.Get.bind(this);
|
|
37
|
+
this.Validation = this.Validation.bind(this);
|
|
38
|
+
this.Run = this.Run.bind(this);
|
|
39
|
+
this.Create = this.Create.bind(this);
|
|
40
|
+
this.Update = this.Update.bind(this);
|
|
41
|
+
this.Delete = this.Delete.bind(this);
|
|
42
|
+
}
|
|
43
|
+
async List(filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]): Promise<{ rows: AWSRow[], count: number }>
|
|
44
|
+
{
|
|
45
|
+
let filters_string_value: string = FilterItem.stringify(filters);
|
|
46
|
+
let sorts_string_value: string = SortItem.stringify(sorts);
|
|
47
|
+
let path = `/aws/list`;
|
|
48
|
+
let { data } = await this.server._get<{ rows: AWSRow[], count: number }>(path, { filters: filters_string_value, page, size, sorts: sorts_string_value });
|
|
49
|
+
return data;
|
|
50
|
+
}
|
|
51
|
+
async Get(id: string): Promise<AWSFullRow>
|
|
52
|
+
{
|
|
53
|
+
let path = `/aws/${id}`;
|
|
54
|
+
let { data } = await this.server._get<AWSFullRow>(path, {});
|
|
55
|
+
return data;
|
|
56
|
+
}
|
|
57
|
+
async Validation(): Promise<SubscriptionValidation>
|
|
58
|
+
{
|
|
59
|
+
let path = `/validation/aws`;
|
|
60
|
+
let { data } = await this.server._get<SubscriptionValidation>(path, {});
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
63
|
+
async Run(id: string): Promise<void>
|
|
64
|
+
{
|
|
65
|
+
let path = `/run/aws/${id}`;
|
|
66
|
+
await this.server._post<void>(path, {});
|
|
67
|
+
}
|
|
68
|
+
async Create(body: AWSInputRow): Promise<AWSRow>
|
|
69
|
+
{
|
|
70
|
+
let path = `/aws`;
|
|
71
|
+
let { data } = await this.server._post<AWSRow>(path, {}, body);
|
|
72
|
+
return data;
|
|
73
|
+
}
|
|
74
|
+
async Update(id: string, body: AWSInputRow): Promise<AWSRow>
|
|
75
|
+
{
|
|
76
|
+
let path = `/aws/${id}`;
|
|
77
|
+
let { data } = await this.server._put<AWSRow>(path, {}, body);
|
|
78
|
+
return data;
|
|
79
|
+
}
|
|
80
|
+
async Delete(id: string): Promise<void>
|
|
81
|
+
{
|
|
82
|
+
let path = `/aws/${id}`;
|
|
83
|
+
await this.server._delete<void>(path, {});
|
|
84
|
+
}
|
|
85
85
|
};
|