namirasoft-cost 1.4.27 → 1.4.30
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 +36 -26
- package/dist/NamirasoftCostServer.js +1 -1
- package/dist/NamirasoftCostServerBillWatchAWS.d.ts +4 -15
- package/dist/NamirasoftCostServerBillWatchAWS.js +2 -2
- package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchAzure.d.ts +4 -15
- package/dist/NamirasoftCostServerBillWatchAzure.js +2 -2
- package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
- package/dist/NamirasoftCostServerBillWatchGCP.d.ts +4 -15
- package/dist/NamirasoftCostServerBillWatchGCP.js +2 -2
- package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
- package/dist/NamirasoftCostServerCost.d.ts +0 -2
- package/dist/NamirasoftCostServerCost.js +0 -8
- package/dist/NamirasoftCostServerCost.js.map +1 -1
- package/dist/NamirasoftCostServerFieldCategory.d.ts +4 -15
- package/dist/NamirasoftCostServerFieldCategory.js +2 -2
- package/dist/NamirasoftCostServerFieldCategory.js.map +1 -1
- package/dist/NamirasoftCostServerFieldField.d.ts +4 -15
- package/dist/NamirasoftCostServerFieldField.js +2 -2
- package/dist/NamirasoftCostServerFieldField.js.map +1 -1
- package/dist/NamirasoftCostServerSecretSecret.d.ts +6 -29
- package/dist/NamirasoftCostServerSecretSecret.js +2 -2
- package/dist/NamirasoftCostServerSecretSecret.js.map +1 -1
- package/dist/command/BillWatchAWSCommand.d.ts +4 -0
- package/dist/command/BillWatchAWSCommand.js +17 -0
- package/dist/command/BillWatchAWSCommand.js.map +1 -0
- package/dist/command/BillWatchAWSEstimateRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAWSEstimateRecordCommand.js +103 -0
- package/dist/command/BillWatchAWSEstimateRecordCommand.js.map +1 -0
- package/dist/command/BillWatchAWS_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAWS_CreateForRecordCommand.js +112 -0
- package/dist/command/BillWatchAWS_CreateForRecordCommand.js.map +1 -0
- package/dist/command/BillWatchAzureCommand.d.ts +4 -0
- package/dist/command/BillWatchAzureCommand.js +17 -0
- package/dist/command/BillWatchAzureCommand.js.map +1 -0
- package/dist/command/BillWatchAzureEstimateRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAzureEstimateRecordCommand.js +103 -0
- package/dist/command/BillWatchAzureEstimateRecordCommand.js.map +1 -0
- package/dist/command/BillWatchAzure_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchAzure_CreateForRecordCommand.js +112 -0
- package/dist/command/BillWatchAzure_CreateForRecordCommand.js.map +1 -0
- package/dist/command/BillWatchGCPCommand.d.ts +4 -0
- package/dist/command/BillWatchGCPCommand.js +17 -0
- package/dist/command/BillWatchGCPCommand.js.map +1 -0
- package/dist/command/BillWatchGCPEstimateRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchGCPEstimateRecordCommand.js +103 -0
- package/dist/command/BillWatchGCPEstimateRecordCommand.js.map +1 -0
- package/dist/command/BillWatchGCP_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/BillWatchGCP_CreateForRecordCommand.js +112 -0
- package/dist/command/BillWatchGCP_CreateForRecordCommand.js.map +1 -0
- package/dist/command/CostCommand.d.ts +4 -0
- package/dist/command/CostCommand.js +15 -0
- package/dist/command/CostCommand.js.map +1 -0
- package/dist/command/CostListCommand.d.ts +5 -0
- package/dist/command/CostListCommand.js +38 -0
- package/dist/command/CostListCommand.js.map +1 -0
- package/dist/command/FieldCategoryCommand.d.ts +4 -0
- package/dist/command/FieldCategoryCommand.js +17 -0
- package/dist/command/FieldCategoryCommand.js.map +1 -0
- package/dist/command/FieldCategoryEstimateRecordCommand.d.ts +5 -0
- package/dist/command/FieldCategoryEstimateRecordCommand.js +103 -0
- package/dist/command/FieldCategoryEstimateRecordCommand.js.map +1 -0
- package/dist/command/FieldCategory_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/FieldCategory_CreateForRecordCommand.js +112 -0
- package/dist/command/FieldCategory_CreateForRecordCommand.js.map +1 -0
- package/dist/command/FieldFieldCommand.d.ts +4 -0
- package/dist/command/FieldFieldCommand.js +17 -0
- package/dist/command/FieldFieldCommand.js.map +1 -0
- package/dist/command/FieldFieldEstimateRecordCommand.d.ts +5 -0
- package/dist/command/FieldFieldEstimateRecordCommand.js +103 -0
- package/dist/command/FieldFieldEstimateRecordCommand.js.map +1 -0
- package/dist/command/FieldField_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/FieldField_CreateForRecordCommand.js +112 -0
- package/dist/command/FieldField_CreateForRecordCommand.js.map +1 -0
- package/dist/command/HealthzCommand.d.ts +4 -0
- package/dist/command/HealthzCommand.js +15 -0
- package/dist/command/HealthzCommand.js.map +1 -0
- package/dist/command/HealthzGetCommand.d.ts +5 -0
- package/dist/command/HealthzGetCommand.js +38 -0
- package/dist/command/HealthzGetCommand.js.map +1 -0
- package/dist/command/MetricsCommand.d.ts +4 -0
- package/dist/command/MetricsCommand.js +15 -0
- package/dist/command/MetricsCommand.js.map +1 -0
- package/dist/command/MetricsGetCommand.d.ts +5 -0
- package/dist/command/MetricsGetCommand.js +38 -0
- package/dist/command/MetricsGetCommand.js.map +1 -0
- package/dist/command/SecretSecretCommand.d.ts +4 -0
- package/dist/command/SecretSecretCommand.js +21 -0
- package/dist/command/SecretSecretCommand.js.map +1 -0
- package/dist/command/SecretSecretEstimateReadCommand.d.ts +5 -0
- package/dist/command/SecretSecretEstimateReadCommand.js +103 -0
- package/dist/command/SecretSecretEstimateReadCommand.js.map +1 -0
- package/dist/command/SecretSecretEstimateRecordCommand.d.ts +5 -0
- package/dist/command/SecretSecretEstimateRecordCommand.js +103 -0
- package/dist/command/SecretSecretEstimateRecordCommand.js.map +1 -0
- package/dist/command/SecretSecret_CreateForReadCommand.d.ts +5 -0
- package/dist/command/SecretSecret_CreateForReadCommand.js +112 -0
- package/dist/command/SecretSecret_CreateForReadCommand.js.map +1 -0
- package/dist/command/SecretSecret_CreateForRecordCommand.d.ts +5 -0
- package/dist/command/SecretSecret_CreateForRecordCommand.js +112 -0
- package/dist/command/SecretSecret_CreateForRecordCommand.js.map +1 -0
- package/dist/command/ValueCommand.d.ts +4 -0
- package/dist/command/ValueCommand.js +15 -0
- package/dist/command/ValueCommand.js.map +1 -0
- package/dist/command/ValueListCommand.d.ts +5 -0
- package/dist/command/ValueListCommand.js +38 -0
- package/dist/command/ValueListCommand.js.map +1 -0
- package/dist/command/cli.d.ts +2 -0
- package/dist/command/cli.js +32 -0
- package/dist/command/cli.js.map +1 -0
- package/dist/index.d.ts +47 -12
- package/dist/index.js +47 -12
- package/dist/index.js.map +1 -1
- package/package.json +28 -28
- package/src/NamirasoftCostServer.ts +59 -59
- package/src/NamirasoftCostServerBase.ts +29 -29
- package/src/NamirasoftCostServerBillWatchAWS.ts +47 -46
- package/src/NamirasoftCostServerBillWatchAzure.ts +47 -46
- package/src/NamirasoftCostServerBillWatchGCP.ts +47 -46
- package/src/NamirasoftCostServerCost.ts +41 -49
- package/src/NamirasoftCostServerFieldCategory.ts +47 -46
- package/src/NamirasoftCostServerFieldField.ts +47 -46
- package/src/NamirasoftCostServerHealthz.ts +35 -35
- package/src/NamirasoftCostServerMetrics.ts +35 -35
- package/src/NamirasoftCostServerSecretSecret.ts +61 -60
- 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/LowAmountBonus.ts +14 -14
- package/src/bonus/LowSecondsBonus.ts +14 -14
- package/src/bonus/LowTotalCountBonus.ts +14 -14
- package/src/bonus/LowTotalValueBonus.ts +14 -14
- package/src/bonus/TrialBonus.ts +18 -18
- package/src/command/BillWatchAWSCommand.ts +34 -0
- package/src/command/BillWatchAWSEstimateRecordCommand.ts +110 -0
- package/src/command/BillWatchAWS_CreateForRecordCommand.ts +119 -0
- package/src/command/BillWatchAzureCommand.ts +34 -0
- package/src/command/BillWatchAzureEstimateRecordCommand.ts +110 -0
- package/src/command/BillWatchAzure_CreateForRecordCommand.ts +119 -0
- package/src/command/BillWatchGCPCommand.ts +34 -0
- package/src/command/BillWatchGCPEstimateRecordCommand.ts +110 -0
- package/src/command/BillWatchGCP_CreateForRecordCommand.ts +119 -0
- package/src/{row/CostCreateRow.ts → command/CostCommand.ts} +32 -38
- package/src/command/CostListCommand.ts +45 -0
- package/src/command/FieldCategoryCommand.ts +34 -0
- package/src/command/FieldCategoryEstimateRecordCommand.ts +110 -0
- package/src/command/FieldCategory_CreateForRecordCommand.ts +119 -0
- package/src/command/FieldFieldCommand.ts +34 -0
- package/src/command/FieldFieldEstimateRecordCommand.ts +110 -0
- package/src/command/FieldField_CreateForRecordCommand.ts +119 -0
- package/src/command/HealthzCommand.ts +32 -0
- package/src/command/HealthzGetCommand.ts +45 -0
- package/src/command/MetricsCommand.ts +32 -0
- package/src/command/MetricsGetCommand.ts +45 -0
- package/src/command/SecretSecretCommand.ts +38 -0
- package/src/command/SecretSecretEstimateReadCommand.ts +110 -0
- package/src/command/SecretSecretEstimateRecordCommand.ts +110 -0
- package/src/command/SecretSecret_CreateForReadCommand.ts +119 -0
- package/src/command/SecretSecret_CreateForRecordCommand.ts +119 -0
- package/src/command/ValueCommand.ts +32 -0
- package/src/command/ValueListCommand.ts +45 -0
- package/src/command/cli.ts +51 -0
- package/src/estimator/BaseEstimator.ts +62 -62
- package/src/estimator/BillWatchAWSRecordEstimator.ts +4 -4
- package/src/estimator/BillWatchAzureRecordEstimator.ts +4 -4
- package/src/estimator/BillWatchBaseRecordEstimator.ts +25 -25
- package/src/estimator/BillWatchGCPRecordEstimator.ts +4 -4
- package/src/estimator/FieldBaseRecordEstimator.ts +20 -20
- package/src/estimator/FieldCategoryRecordEstimator.ts +9 -9
- package/src/estimator/FieldFieldRecordEstimator.ts +9 -9
- package/src/estimator/SecretSecretReadEstimator.ts +25 -25
- package/src/estimator/SecretSecretRecordEstimator.ts +24 -24
- package/src/index.ts +89 -54
- package/src/meta/CostMetaTable.ts +81 -81
- package/src/meta/NamirasoftCostMetaDatabase.ts +50 -50
- package/src/row/CostRow.ts +40 -40
- package/src/type/Bonus.ts +20 -20
- package/src/type/CalculationOption.ts +34 -34
- package/src/type/Estimation.ts +35 -35
- package/src/type/EstimationOption.ts +31 -31
- package/src/type/EstimationUsage.ts +22 -22
- package/src/type/Period.ts +101 -101
- package/src/type/SimulationOption.ts +29 -29
- package/src/type/Usage.ts +24 -24
- package/dist/row/CostCreateRow.d.ts +0 -17
- package/dist/row/CostCreateRow.js +0 -3
- package/dist/row/CostCreateRow.js.map +0 -1
@@ -1,82 +1,82 @@
|
|
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 { BaseUUID, BaseMetaColumn, FilterItem, SortItem } from "namirasoft-core";
|
22
|
-
import { CostRow } from "../row/CostRow";
|
23
|
-
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
24
|
-
import { NamirasoftCostServer } from "../NamirasoftCostServer";
|
25
|
-
|
26
|
-
export class CostMetaTable extends NSBaseMetaTable<NamirasoftCostServer, CostRow>
|
27
|
-
{
|
28
|
-
public override columns: {
|
29
|
-
id: BaseMetaColumn;
|
30
|
-
user_id: BaseMetaColumn;
|
31
|
-
workspace_id: BaseMetaColumn;
|
32
|
-
product_id: BaseMetaColumn;
|
33
|
-
sales_item_id: BaseMetaColumn;
|
34
|
-
offer_id: BaseMetaColumn;
|
35
|
-
offer_item_id: BaseMetaColumn;
|
36
|
-
resource_entity: BaseMetaColumn;
|
37
|
-
resource_id: BaseMetaColumn;
|
38
|
-
usage_name: BaseMetaColumn;
|
39
|
-
usage_value: BaseMetaColumn;
|
40
|
-
usage_unit: BaseMetaColumn;
|
41
|
-
period_start: BaseMetaColumn;
|
42
|
-
period_end: BaseMetaColumn;
|
43
|
-
amount: BaseMetaColumn;
|
44
|
-
currency: BaseMetaColumn;
|
45
|
-
description: BaseMetaColumn;
|
46
|
-
created_at: BaseMetaColumn;
|
47
|
-
}
|
48
|
-
constructor(database: NSBaseMetaDatabase<NamirasoftCostServer>)
|
49
|
-
{
|
50
|
-
super(database, "cost", "Cost", new BaseUUID("cst"));
|
51
|
-
this.columns = {
|
52
|
-
id: new BaseMetaColumn(this, "id", "ID", "String", true),
|
53
|
-
user_id: new BaseMetaColumn(this, "user_id", "User ID", "String", true),
|
54
|
-
workspace_id: new BaseMetaColumn(this, "workspace_id", "Workspace ID", "String", true),
|
55
|
-
product_id: new BaseMetaColumn(this, "product_id", "Product ID", "String", true),
|
56
|
-
sales_item_id: new BaseMetaColumn(this, "sales_item_id", "Sales Item ID", "String", true),
|
57
|
-
offer_id: new BaseMetaColumn(this, "offer_id", "Offer ID", "String", true),
|
58
|
-
offer_item_id: new BaseMetaColumn(this, "offer_item_id", "Offer Item ID", "String", true),
|
59
|
-
resource_entity: new BaseMetaColumn(this, "resource_entity", "Resource Entity", "String", true),
|
60
|
-
resource_id: new BaseMetaColumn(this, "resource_id", "Resource ID", "String", true),
|
61
|
-
usage_name: new BaseMetaColumn(this, "usage_name", "Usage Name", "String", true),
|
62
|
-
usage_value: new BaseMetaColumn(this, "usage_value", "Usage Value", "Double", true),
|
63
|
-
usage_unit: new BaseMetaColumn(this, "usage_unit", "Usage Unit", "String", true),
|
64
|
-
period_start: new BaseMetaColumn(this, "period_start", "Period Start", "DateTime", true),
|
65
|
-
period_end: new BaseMetaColumn(this, "period_end", "Period End", "DateTime", true),
|
66
|
-
amount: new BaseMetaColumn(this, "amount", "Amount", "Double", true),
|
67
|
-
currency: new BaseMetaColumn(this, "currency", "Currency", "String", true),
|
68
|
-
description: new BaseMetaColumn(this, "description", "Description", "String", true),
|
69
|
-
created_at: new BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
70
|
-
};
|
71
|
-
this.back_end.get = async (id: string) =>
|
72
|
-
{
|
73
|
-
console.log(id);
|
74
|
-
throw new Error("Cost.Get is not implemented");
|
75
|
-
};
|
76
|
-
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
77
|
-
{
|
78
|
-
let server = this.database.getServer();
|
79
|
-
return await server.cost.List(filters, page, size, sorts);
|
80
|
-
};
|
81
|
-
}
|
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 { BaseUUID, BaseMetaColumn, FilterItem, SortItem } from "namirasoft-core";
|
22
|
+
import { CostRow } from "../row/CostRow";
|
23
|
+
import { NSBaseMetaDatabase, NSBaseMetaTable } from "namirasoft-site";
|
24
|
+
import { NamirasoftCostServer } from "../NamirasoftCostServer";
|
25
|
+
|
26
|
+
export class CostMetaTable extends NSBaseMetaTable<NamirasoftCostServer, CostRow>
|
27
|
+
{
|
28
|
+
public override columns: {
|
29
|
+
id: BaseMetaColumn;
|
30
|
+
user_id: BaseMetaColumn;
|
31
|
+
workspace_id: BaseMetaColumn;
|
32
|
+
product_id: BaseMetaColumn;
|
33
|
+
sales_item_id: BaseMetaColumn;
|
34
|
+
offer_id: BaseMetaColumn;
|
35
|
+
offer_item_id: BaseMetaColumn;
|
36
|
+
resource_entity: BaseMetaColumn;
|
37
|
+
resource_id: BaseMetaColumn;
|
38
|
+
usage_name: BaseMetaColumn;
|
39
|
+
usage_value: BaseMetaColumn;
|
40
|
+
usage_unit: BaseMetaColumn;
|
41
|
+
period_start: BaseMetaColumn;
|
42
|
+
period_end: BaseMetaColumn;
|
43
|
+
amount: BaseMetaColumn;
|
44
|
+
currency: BaseMetaColumn;
|
45
|
+
description: BaseMetaColumn;
|
46
|
+
created_at: BaseMetaColumn;
|
47
|
+
}
|
48
|
+
constructor(database: NSBaseMetaDatabase<NamirasoftCostServer>)
|
49
|
+
{
|
50
|
+
super(database, "cost", "Cost", new BaseUUID("cst"));
|
51
|
+
this.columns = {
|
52
|
+
id: new BaseMetaColumn(this, "id", "ID", "String", true),
|
53
|
+
user_id: new BaseMetaColumn(this, "user_id", "User ID", "String", true),
|
54
|
+
workspace_id: new BaseMetaColumn(this, "workspace_id", "Workspace ID", "String", true),
|
55
|
+
product_id: new BaseMetaColumn(this, "product_id", "Product ID", "String", true),
|
56
|
+
sales_item_id: new BaseMetaColumn(this, "sales_item_id", "Sales Item ID", "String", true),
|
57
|
+
offer_id: new BaseMetaColumn(this, "offer_id", "Offer ID", "String", true),
|
58
|
+
offer_item_id: new BaseMetaColumn(this, "offer_item_id", "Offer Item ID", "String", true),
|
59
|
+
resource_entity: new BaseMetaColumn(this, "resource_entity", "Resource Entity", "String", true),
|
60
|
+
resource_id: new BaseMetaColumn(this, "resource_id", "Resource ID", "String", true),
|
61
|
+
usage_name: new BaseMetaColumn(this, "usage_name", "Usage Name", "String", true),
|
62
|
+
usage_value: new BaseMetaColumn(this, "usage_value", "Usage Value", "Double", true),
|
63
|
+
usage_unit: new BaseMetaColumn(this, "usage_unit", "Usage Unit", "String", true),
|
64
|
+
period_start: new BaseMetaColumn(this, "period_start", "Period Start", "DateTime", true),
|
65
|
+
period_end: new BaseMetaColumn(this, "period_end", "Period End", "DateTime", true),
|
66
|
+
amount: new BaseMetaColumn(this, "amount", "Amount", "Double", true),
|
67
|
+
currency: new BaseMetaColumn(this, "currency", "Currency", "String", true),
|
68
|
+
description: new BaseMetaColumn(this, "description", "Description", "String", true),
|
69
|
+
created_at: new BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
|
70
|
+
};
|
71
|
+
this.back_end.get = async (id: string) =>
|
72
|
+
{
|
73
|
+
console.log(id);
|
74
|
+
throw new Error("Cost.Get is not implemented");
|
75
|
+
};
|
76
|
+
this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
|
77
|
+
{
|
78
|
+
let server = this.database.getServer();
|
79
|
+
return await server.cost.List(filters, page, size, sorts);
|
80
|
+
};
|
81
|
+
}
|
82
82
|
};
|
@@ -1,51 +1,51 @@
|
|
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 { CostMetaTable } from "./CostMetaTable";
|
22
|
-
import { EnvService } from "namirasoft-core";
|
23
|
-
import { NSBaseMetaDatabase } from "namirasoft-site";
|
24
|
-
import { NamirasoftCostServer } from "../NamirasoftCostServer";
|
25
|
-
import { TokenManager } from "namirasoft-account";
|
26
|
-
|
27
|
-
export class NamirasoftCostMetaDatabase extends NSBaseMetaDatabase<NamirasoftCostServer>
|
28
|
-
{
|
29
|
-
private manager?: TokenManager;
|
30
|
-
private onError?: (error: Error) => void;
|
31
|
-
public override tables: {
|
32
|
-
cost: CostMetaTable,
|
33
|
-
};
|
34
|
-
constructor(manager?: TokenManager, onError?: (error: Error) => void)
|
35
|
-
{
|
36
|
-
super({ id: "prd-bd9199b941c445bf", name: "Namirasoft Cost", headline: "", description: "Namirasoft Cost displays detailed records of charges from all Namirasoft Pay-as-You-Go services. Users can view the date, amount, and reason for each charge.", logo: "https://static.namirasoft.com/image/namirasoft/cost/logo/base.png", link: "https://cost.namirasoft.com" });
|
37
|
-
this.manager = manager;
|
38
|
-
this.onError = onError;
|
39
|
-
this.tables = {
|
40
|
-
cost: new CostMetaTable(this),
|
41
|
-
};
|
42
|
-
}
|
43
|
-
override getServer(): NamirasoftCostServer
|
44
|
-
{
|
45
|
-
if (!this.manager || !this.onError)
|
46
|
-
throw new Error("Arguments of NamirasoftCostMetaDatabase (manager, onError) are required for server operations.")
|
47
|
-
let NAME = NSBaseMetaDatabase.getServerBaseURL(this.product.name);
|
48
|
-
let BASE_URL = new EnvService(NAME, true).getString();
|
49
|
-
return new NamirasoftCostServer(BASE_URL, this.manager, this.onError);
|
50
|
-
}
|
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 { CostMetaTable } from "./CostMetaTable";
|
22
|
+
import { EnvService } from "namirasoft-core";
|
23
|
+
import { NSBaseMetaDatabase } from "namirasoft-site";
|
24
|
+
import { NamirasoftCostServer } from "../NamirasoftCostServer";
|
25
|
+
import { TokenManager } from "namirasoft-account";
|
26
|
+
|
27
|
+
export class NamirasoftCostMetaDatabase extends NSBaseMetaDatabase<NamirasoftCostServer>
|
28
|
+
{
|
29
|
+
private manager?: TokenManager;
|
30
|
+
private onError?: (error: Error) => void;
|
31
|
+
public override tables: {
|
32
|
+
cost: CostMetaTable,
|
33
|
+
};
|
34
|
+
constructor(manager?: TokenManager, onError?: (error: Error) => void)
|
35
|
+
{
|
36
|
+
super({ id: "prd-bd9199b941c445bf", name: "Namirasoft Cost", headline: "", description: "Namirasoft Cost displays detailed records of charges from all Namirasoft Pay-as-You-Go services. Users can view the date, amount, and reason for each charge.", logo: "https://static.namirasoft.com/image/namirasoft/cost/logo/base.png", link: "https://cost.namirasoft.com" });
|
37
|
+
this.manager = manager;
|
38
|
+
this.onError = onError;
|
39
|
+
this.tables = {
|
40
|
+
cost: new CostMetaTable(this),
|
41
|
+
};
|
42
|
+
}
|
43
|
+
override getServer(): NamirasoftCostServer
|
44
|
+
{
|
45
|
+
if (!this.manager || !this.onError)
|
46
|
+
throw new Error("Arguments of NamirasoftCostMetaDatabase (manager, onError) are required for server operations.")
|
47
|
+
let NAME = NSBaseMetaDatabase.getServerBaseURL(this.product.name);
|
48
|
+
let BASE_URL = new EnvService(NAME, true).getString();
|
49
|
+
return new NamirasoftCostServer(BASE_URL, this.manager, this.onError);
|
50
|
+
}
|
51
51
|
};
|
package/src/row/CostRow.ts
CHANGED
@@ -1,41 +1,41 @@
|
|
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
|
-
export type CostRow =
|
22
|
-
{
|
23
|
-
id: string;
|
24
|
-
user_id: string;
|
25
|
-
workspace_id: string;
|
26
|
-
product_id: string;
|
27
|
-
sales_item_id: string;
|
28
|
-
offer_id: string;
|
29
|
-
offer_item_id: string;
|
30
|
-
resource_entity: string;
|
31
|
-
resource_id: string;
|
32
|
-
usage_name: string;
|
33
|
-
usage_value: number;
|
34
|
-
usage_unit: string;
|
35
|
-
period_start: Date;
|
36
|
-
period_end: Date;
|
37
|
-
amount: number;
|
38
|
-
currency: string;
|
39
|
-
description: string;
|
40
|
-
created_at: Date;
|
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
|
+
export type CostRow =
|
22
|
+
{
|
23
|
+
id: string;
|
24
|
+
user_id: string;
|
25
|
+
workspace_id: string;
|
26
|
+
product_id: string;
|
27
|
+
sales_item_id: string;
|
28
|
+
offer_id: string;
|
29
|
+
offer_item_id: string;
|
30
|
+
resource_entity: string;
|
31
|
+
resource_id: string;
|
32
|
+
usage_name: string;
|
33
|
+
usage_value: number;
|
34
|
+
usage_unit: string;
|
35
|
+
period_start: Date;
|
36
|
+
period_end: Date;
|
37
|
+
amount: number;
|
38
|
+
currency: string;
|
39
|
+
description: string;
|
40
|
+
created_at: Date;
|
41
41
|
}
|
package/src/type/Bonus.ts
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
import { BaseVariableSchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
-
|
3
|
-
export type Bonus =
|
4
|
-
{
|
5
|
-
name: string;
|
6
|
-
value: number;
|
7
|
-
unit: string;
|
8
|
-
};
|
9
|
-
|
10
|
-
export class BonusSchema extends ObjectSchema
|
11
|
-
{
|
12
|
-
constructor(required: boolean)
|
13
|
-
{
|
14
|
-
super("Bonus", required, [
|
15
|
-
new BaseVariableSchema("name", new StringSchema(true)),
|
16
|
-
]);
|
17
|
-
this.external = {
|
18
|
-
package: "./type/Bonus"
|
19
|
-
};
|
20
|
-
}
|
1
|
+
import { BaseVariableSchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
+
|
3
|
+
export type Bonus =
|
4
|
+
{
|
5
|
+
name: string;
|
6
|
+
value: number;
|
7
|
+
unit: string;
|
8
|
+
};
|
9
|
+
|
10
|
+
export class BonusSchema extends ObjectSchema
|
11
|
+
{
|
12
|
+
constructor(required: boolean)
|
13
|
+
{
|
14
|
+
super("Bonus", required, [
|
15
|
+
new BaseVariableSchema("name", new StringSchema(true)),
|
16
|
+
]);
|
17
|
+
this.external = {
|
18
|
+
package: "./type/Bonus"
|
19
|
+
};
|
20
|
+
}
|
21
21
|
}
|
@@ -1,34 +1,34 @@
|
|
1
|
-
import { BaseVariableSchema, BoolSchema, IntegerSchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
-
import { Period, PeriodSchema } from "./Period";
|
3
|
-
|
4
|
-
export interface CalculationOption
|
5
|
-
{
|
6
|
-
period: Period;
|
7
|
-
total_count: number;
|
8
|
-
number: number;
|
9
|
-
total_value: number;
|
10
|
-
value: number;
|
11
|
-
active: boolean;
|
12
|
-
workspace_id: string;
|
13
|
-
resource_id: string;
|
14
|
-
};
|
15
|
-
|
16
|
-
export class CalculationOptionSchema extends ObjectSchema
|
17
|
-
{
|
18
|
-
constructor(required: boolean)
|
19
|
-
{
|
20
|
-
super("CalculationOption", required, [
|
21
|
-
new BaseVariableSchema("period", new PeriodSchema(true)),
|
22
|
-
new BaseVariableSchema("total_count", new IntegerSchema(true, 0)),
|
23
|
-
new BaseVariableSchema("number", new IntegerSchema(true, 1)),
|
24
|
-
new BaseVariableSchema("total_value", new IntegerSchema(true, 0)),
|
25
|
-
new BaseVariableSchema("value", new IntegerSchema(true, 1)),
|
26
|
-
new BaseVariableSchema("active", new BoolSchema(true)),
|
27
|
-
new BaseVariableSchema("workspace_id", new StringSchema(false, 20, 20)),
|
28
|
-
new BaseVariableSchema("resource_id", new StringSchema(false, 20, 20)),
|
29
|
-
]);
|
30
|
-
this.external = {
|
31
|
-
package: "./type/CalculationOption"
|
32
|
-
};
|
33
|
-
}
|
34
|
-
}
|
1
|
+
import { BaseVariableSchema, BoolSchema, IntegerSchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
+
import { Period, PeriodSchema } from "./Period";
|
3
|
+
|
4
|
+
export interface CalculationOption
|
5
|
+
{
|
6
|
+
period: Period;
|
7
|
+
total_count: number;
|
8
|
+
number: number;
|
9
|
+
total_value: number;
|
10
|
+
value: number;
|
11
|
+
active: boolean;
|
12
|
+
workspace_id: string;
|
13
|
+
resource_id: string;
|
14
|
+
};
|
15
|
+
|
16
|
+
export class CalculationOptionSchema extends ObjectSchema
|
17
|
+
{
|
18
|
+
constructor(required: boolean)
|
19
|
+
{
|
20
|
+
super("CalculationOption", required, [
|
21
|
+
new BaseVariableSchema("period", new PeriodSchema(true)),
|
22
|
+
new BaseVariableSchema("total_count", new IntegerSchema(true, 0)),
|
23
|
+
new BaseVariableSchema("number", new IntegerSchema(true, 1)),
|
24
|
+
new BaseVariableSchema("total_value", new IntegerSchema(true, 0)),
|
25
|
+
new BaseVariableSchema("value", new IntegerSchema(true, 1)),
|
26
|
+
new BaseVariableSchema("active", new BoolSchema(true)),
|
27
|
+
new BaseVariableSchema("workspace_id", new StringSchema(false, 20, 20)),
|
28
|
+
new BaseVariableSchema("resource_id", new StringSchema(false, 20, 20)),
|
29
|
+
]);
|
30
|
+
this.external = {
|
31
|
+
package: "./type/CalculationOption"
|
32
|
+
};
|
33
|
+
}
|
34
|
+
}
|
package/src/type/Estimation.ts
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
import { BaseVariableSchema, IntegerSchema, MoneySchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
-
import { BaseBonus } from "../bonus/BaseBonus";
|
3
|
-
import { EstimationOption, EstimationOptionSchema } from "./EstimationOption";
|
4
|
-
import { EstimationUsage, EstimationUsageSchema } from "./EstimationUsage";
|
5
|
-
import { BonusSchema } from "./Bonus";
|
6
|
-
|
7
|
-
export type Estimation =
|
8
|
-
{
|
9
|
-
option: EstimationOption;
|
10
|
-
seconds: number;
|
11
|
-
usage: EstimationUsage;
|
12
|
-
fee: number;
|
13
|
-
amount: number;
|
14
|
-
currency: string;
|
15
|
-
free?: BaseBonus;
|
16
|
-
};
|
17
|
-
|
18
|
-
export class EstimationSchema extends ObjectSchema
|
19
|
-
{
|
20
|
-
constructor(required: boolean)
|
21
|
-
{
|
22
|
-
super("Estimation", required, [
|
23
|
-
new BaseVariableSchema("option", new EstimationOptionSchema(true)),
|
24
|
-
new BaseVariableSchema("seconds", new IntegerSchema(true, 1, 3600)),
|
25
|
-
new BaseVariableSchema("usage", new EstimationUsageSchema(true)),
|
26
|
-
new BaseVariableSchema("fee", new MoneySchema(true)),
|
27
|
-
new BaseVariableSchema("amount", new MoneySchema(true, 1)),
|
28
|
-
new BaseVariableSchema("currency", new StringSchema(true)),
|
29
|
-
new BaseVariableSchema("free", new BonusSchema(false)),
|
30
|
-
]);
|
31
|
-
this.external = {
|
32
|
-
package: "./type/Estimation"
|
33
|
-
};
|
34
|
-
}
|
35
|
-
}
|
1
|
+
import { BaseVariableSchema, IntegerSchema, MoneySchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
+
import { BaseBonus } from "../bonus/BaseBonus";
|
3
|
+
import { EstimationOption, EstimationOptionSchema } from "./EstimationOption";
|
4
|
+
import { EstimationUsage, EstimationUsageSchema } from "./EstimationUsage";
|
5
|
+
import { BonusSchema } from "./Bonus";
|
6
|
+
|
7
|
+
export type Estimation =
|
8
|
+
{
|
9
|
+
option: EstimationOption;
|
10
|
+
seconds: number;
|
11
|
+
usage: EstimationUsage;
|
12
|
+
fee: number;
|
13
|
+
amount: number;
|
14
|
+
currency: string;
|
15
|
+
free?: BaseBonus;
|
16
|
+
};
|
17
|
+
|
18
|
+
export class EstimationSchema extends ObjectSchema
|
19
|
+
{
|
20
|
+
constructor(required: boolean)
|
21
|
+
{
|
22
|
+
super("Estimation", required, [
|
23
|
+
new BaseVariableSchema("option", new EstimationOptionSchema(true)),
|
24
|
+
new BaseVariableSchema("seconds", new IntegerSchema(true, 1, 3600)),
|
25
|
+
new BaseVariableSchema("usage", new EstimationUsageSchema(true)),
|
26
|
+
new BaseVariableSchema("fee", new MoneySchema(true)),
|
27
|
+
new BaseVariableSchema("amount", new MoneySchema(true, 1)),
|
28
|
+
new BaseVariableSchema("currency", new StringSchema(true)),
|
29
|
+
new BaseVariableSchema("free", new BonusSchema(false)),
|
30
|
+
]);
|
31
|
+
this.external = {
|
32
|
+
package: "./type/Estimation"
|
33
|
+
};
|
34
|
+
}
|
35
|
+
}
|
@@ -1,32 +1,32 @@
|
|
1
|
-
import { BaseVariableSchema, BoolSchema, DateTimeSchema, IntegerSchema, ObjectSchema } from "namirasoft-schema";
|
2
|
-
import { Period, PeriodSchema } from "./Period";
|
3
|
-
|
4
|
-
export interface EstimationOption
|
5
|
-
{
|
6
|
-
period: Period;
|
7
|
-
total_count: number;
|
8
|
-
number: number;
|
9
|
-
total_value: number;
|
10
|
-
value: number;
|
11
|
-
active: boolean;
|
12
|
-
trial_started_at: Date | null;
|
13
|
-
};
|
14
|
-
|
15
|
-
export class EstimationOptionSchema extends ObjectSchema
|
16
|
-
{
|
17
|
-
constructor(required: boolean)
|
18
|
-
{
|
19
|
-
super("EstimationOption", required, [
|
20
|
-
new BaseVariableSchema("period", new PeriodSchema(true)),
|
21
|
-
new BaseVariableSchema("total_count", new IntegerSchema(true, 0)),
|
22
|
-
new BaseVariableSchema("number", new IntegerSchema(true, 1)),
|
23
|
-
new BaseVariableSchema("total_value", new IntegerSchema(true, 0)),
|
24
|
-
new BaseVariableSchema("value", new IntegerSchema(true, 1)),
|
25
|
-
new BaseVariableSchema("active", new BoolSchema(true)),
|
26
|
-
new BaseVariableSchema("trial_started_at", new DateTimeSchema(false)),
|
27
|
-
]);
|
28
|
-
this.external = {
|
29
|
-
package: "./type/EstimationOption"
|
30
|
-
};
|
31
|
-
}
|
1
|
+
import { BaseVariableSchema, BoolSchema, DateTimeSchema, IntegerSchema, ObjectSchema } from "namirasoft-schema";
|
2
|
+
import { Period, PeriodSchema } from "./Period";
|
3
|
+
|
4
|
+
export interface EstimationOption
|
5
|
+
{
|
6
|
+
period: Period;
|
7
|
+
total_count: number;
|
8
|
+
number: number;
|
9
|
+
total_value: number;
|
10
|
+
value: number;
|
11
|
+
active: boolean;
|
12
|
+
trial_started_at: Date | null;
|
13
|
+
};
|
14
|
+
|
15
|
+
export class EstimationOptionSchema extends ObjectSchema
|
16
|
+
{
|
17
|
+
constructor(required: boolean)
|
18
|
+
{
|
19
|
+
super("EstimationOption", required, [
|
20
|
+
new BaseVariableSchema("period", new PeriodSchema(true)),
|
21
|
+
new BaseVariableSchema("total_count", new IntegerSchema(true, 0)),
|
22
|
+
new BaseVariableSchema("number", new IntegerSchema(true, 1)),
|
23
|
+
new BaseVariableSchema("total_value", new IntegerSchema(true, 0)),
|
24
|
+
new BaseVariableSchema("value", new IntegerSchema(true, 1)),
|
25
|
+
new BaseVariableSchema("active", new BoolSchema(true)),
|
26
|
+
new BaseVariableSchema("trial_started_at", new DateTimeSchema(false)),
|
27
|
+
]);
|
28
|
+
this.external = {
|
29
|
+
package: "./type/EstimationOption"
|
30
|
+
};
|
31
|
+
}
|
32
32
|
}
|
@@ -1,23 +1,23 @@
|
|
1
|
-
import { BaseVariableSchema, IntegerSchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
-
|
3
|
-
export type EstimationUsage =
|
4
|
-
{
|
5
|
-
name: string;
|
6
|
-
value: number;
|
7
|
-
unit: string;
|
8
|
-
};
|
9
|
-
|
10
|
-
export class EstimationUsageSchema extends ObjectSchema
|
11
|
-
{
|
12
|
-
constructor(required: boolean)
|
13
|
-
{
|
14
|
-
super("EstimationUsage", required, [
|
15
|
-
new BaseVariableSchema("name", new StringSchema(true)),
|
16
|
-
new BaseVariableSchema("value", new IntegerSchema(true)),
|
17
|
-
new BaseVariableSchema("unit", new StringSchema(true)),
|
18
|
-
]);
|
19
|
-
this.external = {
|
20
|
-
package: "./type/EstimationUsage"
|
21
|
-
};
|
22
|
-
}
|
1
|
+
import { BaseVariableSchema, IntegerSchema, ObjectSchema, StringSchema } from "namirasoft-schema";
|
2
|
+
|
3
|
+
export type EstimationUsage =
|
4
|
+
{
|
5
|
+
name: string;
|
6
|
+
value: number;
|
7
|
+
unit: string;
|
8
|
+
};
|
9
|
+
|
10
|
+
export class EstimationUsageSchema extends ObjectSchema
|
11
|
+
{
|
12
|
+
constructor(required: boolean)
|
13
|
+
{
|
14
|
+
super("EstimationUsage", required, [
|
15
|
+
new BaseVariableSchema("name", new StringSchema(true)),
|
16
|
+
new BaseVariableSchema("value", new IntegerSchema(true)),
|
17
|
+
new BaseVariableSchema("unit", new StringSchema(true)),
|
18
|
+
]);
|
19
|
+
this.external = {
|
20
|
+
package: "./type/EstimationUsage"
|
21
|
+
};
|
22
|
+
}
|
23
23
|
}
|