namirasoft-cost 1.4.32 → 1.4.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ns-sdkg-dir-deep +3 -3
- package/.ns-sdkg-file-keep +27 -28
- package/dist/bonus/DeactiveBonus.d.ts +1 -2
- package/dist/bonus/DeactiveBonus.js +1 -2
- package/dist/bonus/DeactiveBonus.js.map +1 -1
- package/dist/estimator/BillWatchBaseRecordEstimator.d.ts +2 -1
- package/dist/estimator/BillWatchBaseRecordEstimator.js +3 -1
- package/dist/estimator/BillWatchBaseRecordEstimator.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- 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 -47
- package/src/NamirasoftCostServerBillWatchAzure.ts +47 -47
- package/src/NamirasoftCostServerBillWatchGCP.ts +47 -47
- package/src/NamirasoftCostServerCost.ts +41 -41
- package/src/NamirasoftCostServerFieldCategory.ts +47 -47
- package/src/NamirasoftCostServerFieldField.ts +47 -47
- package/src/NamirasoftCostServerHealthz.ts +35 -35
- package/src/NamirasoftCostServerMetrics.ts +35 -35
- package/src/NamirasoftCostServerSecretSecret.ts +61 -61
- package/src/NamirasoftCostServerValue.ts +36 -36
- package/src/bonus/BaseBonus.ts +13 -13
- package/src/bonus/DeactiveBonus.ts +14 -14
- package/src/bonus/FreeCountBonus.ts +14 -14
- package/src/bonus/FreeTotalValueBonus.ts +28 -28
- package/src/bonus/FreeValueBonus.ts +24 -24
- package/src/bonus/LowAmountBonus.ts +14 -14
- package/src/bonus/LowSecondsBonus.ts +14 -14
- package/src/bonus/LowTotalValueBonus.ts +14 -14
- package/src/bonus/LowValueBonus.ts +14 -14
- package/src/bonus/TrialBonus.ts +18 -18
- package/src/command/BillWatchAWSCommand.ts +33 -33
- package/src/command/BillWatchAWSEstimateRecordCommand.ts +109 -109
- package/src/command/BillWatchAWS_CreateForRecordCommand.ts +118 -118
- package/src/command/BillWatchAzureCommand.ts +33 -33
- package/src/command/BillWatchAzureEstimateRecordCommand.ts +109 -109
- package/src/command/BillWatchAzure_CreateForRecordCommand.ts +118 -118
- package/src/command/BillWatchGCPCommand.ts +33 -33
- package/src/command/BillWatchGCPEstimateRecordCommand.ts +109 -109
- package/src/command/BillWatchGCP_CreateForRecordCommand.ts +118 -118
- package/src/command/CostCommand.ts +31 -31
- package/src/command/CostListCommand.ts +44 -44
- package/src/command/FieldCategoryCommand.ts +33 -33
- package/src/command/FieldCategoryEstimateRecordCommand.ts +109 -109
- package/src/command/FieldCategory_CreateForRecordCommand.ts +118 -118
- package/src/command/FieldFieldCommand.ts +33 -33
- package/src/command/FieldFieldEstimateRecordCommand.ts +109 -109
- package/src/command/FieldField_CreateForRecordCommand.ts +118 -118
- package/src/command/HealthzCommand.ts +31 -31
- package/src/command/HealthzGetCommand.ts +44 -44
- package/src/command/MetricsCommand.ts +31 -31
- package/src/command/MetricsGetCommand.ts +44 -44
- package/src/command/SecretSecretCommand.ts +37 -37
- package/src/command/SecretSecretEstimateReadCommand.ts +109 -109
- package/src/command/SecretSecretEstimateRecordCommand.ts +109 -109
- package/src/command/SecretSecret_CreateForReadCommand.ts +118 -118
- package/src/command/SecretSecret_CreateForRecordCommand.ts +118 -118
- package/src/command/ValueCommand.ts +31 -31
- package/src/command/ValueListCommand.ts +44 -44
- package/src/command/cli.ts +50 -50
- package/src/estimator/BillWatchBaseRecordEstimator.ts +3 -1
- package/src/index.ts +90 -91
- 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 +33 -33
- package/src/type/Estimation.ts +34 -34
- package/src/type/EstimationOption.ts +31 -31
- package/src/type/EstimationUsage.ts +22 -22
- package/src/type/Period.ts +101 -101
- package/src/type/SimulationOption.ts +29 -29
- package/src/type/Usage.ts +24 -24
- package/dist/bonus/LowTotalCountBonus.d.ts +0 -10
- package/dist/bonus/LowTotalCountBonus.js +0 -27
- package/dist/bonus/LowTotalCountBonus.js.map +0 -1
- package/src/bonus/LowTotalCountBonus.ts +0 -15
package/src/index.ts
CHANGED
@@ -1,92 +1,91 @@
|
|
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 * from "./NamirasoftCostServer";
|
22
|
-
export * from "./NamirasoftCostServerBase";
|
23
|
-
export * from "./NamirasoftCostServerBillWatchAWS";
|
24
|
-
export * from "./NamirasoftCostServerBillWatchAzure";
|
25
|
-
export * from "./NamirasoftCostServerBillWatchGCP";
|
26
|
-
export * from "./NamirasoftCostServerCost";
|
27
|
-
export * from "./NamirasoftCostServerFieldCategory";
|
28
|
-
export * from "./NamirasoftCostServerFieldField";
|
29
|
-
export * from "./NamirasoftCostServerHealthz";
|
30
|
-
export * from "./NamirasoftCostServerMetrics";
|
31
|
-
export * from "./NamirasoftCostServerSecretSecret";
|
32
|
-
export * from "./NamirasoftCostServerValue";
|
33
|
-
export * from "./bonus/BaseBonus";
|
34
|
-
export * from "./bonus/DeactiveBonus";
|
35
|
-
export * from "./bonus/FreeCountBonus";
|
36
|
-
export * from "./bonus/FreeTotalValueBonus";
|
37
|
-
export * from "./bonus/FreeValueBonus";
|
38
|
-
export * from "./bonus/LowAmountBonus";
|
39
|
-
export * from "./bonus/LowSecondsBonus";
|
40
|
-
export * from "./bonus/
|
41
|
-
export * from "./bonus/
|
42
|
-
export * from "./bonus/
|
43
|
-
export * from "./
|
44
|
-
export * from "./command/
|
45
|
-
export * from "./command/
|
46
|
-
export * from "./command/
|
47
|
-
export * from "./command/
|
48
|
-
export * from "./command/
|
49
|
-
export * from "./command/
|
50
|
-
export * from "./command/
|
51
|
-
export * from "./command/
|
52
|
-
export * from "./command/
|
53
|
-
export * from "./command/
|
54
|
-
export * from "./command/
|
55
|
-
export * from "./command/
|
56
|
-
export * from "./command/
|
57
|
-
export * from "./command/
|
58
|
-
export * from "./command/
|
59
|
-
export * from "./command/
|
60
|
-
export * from "./command/
|
61
|
-
export * from "./command/
|
62
|
-
export * from "./command/
|
63
|
-
export * from "./command/
|
64
|
-
export * from "./command/
|
65
|
-
export * from "./command/
|
66
|
-
export * from "./command/
|
67
|
-
export * from "./command/
|
68
|
-
export * from "./command/
|
69
|
-
export * from "./command/
|
70
|
-
export * from "./command/
|
71
|
-
export * from "./
|
72
|
-
export * from "./estimator/
|
73
|
-
export * from "./estimator/
|
74
|
-
export * from "./estimator/
|
75
|
-
export * from "./estimator/
|
76
|
-
export * from "./estimator/
|
77
|
-
export * from "./estimator/
|
78
|
-
export * from "./estimator/
|
79
|
-
export * from "./estimator/
|
80
|
-
export * from "./estimator/
|
81
|
-
export * from "./
|
82
|
-
export * from "./meta/
|
83
|
-
export * from "./
|
84
|
-
export * from "./
|
85
|
-
export * from "./type/
|
86
|
-
export * from "./type/
|
87
|
-
export * from "./type/
|
88
|
-
export * from "./type/
|
89
|
-
export * from "./type/
|
90
|
-
export * from "./type/
|
91
|
-
export * from "./type/SimulationOption";
|
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 * from "./NamirasoftCostServer";
|
22
|
+
export * from "./NamirasoftCostServerBase";
|
23
|
+
export * from "./NamirasoftCostServerBillWatchAWS";
|
24
|
+
export * from "./NamirasoftCostServerBillWatchAzure";
|
25
|
+
export * from "./NamirasoftCostServerBillWatchGCP";
|
26
|
+
export * from "./NamirasoftCostServerCost";
|
27
|
+
export * from "./NamirasoftCostServerFieldCategory";
|
28
|
+
export * from "./NamirasoftCostServerFieldField";
|
29
|
+
export * from "./NamirasoftCostServerHealthz";
|
30
|
+
export * from "./NamirasoftCostServerMetrics";
|
31
|
+
export * from "./NamirasoftCostServerSecretSecret";
|
32
|
+
export * from "./NamirasoftCostServerValue";
|
33
|
+
export * from "./bonus/BaseBonus";
|
34
|
+
export * from "./bonus/DeactiveBonus";
|
35
|
+
export * from "./bonus/FreeCountBonus";
|
36
|
+
export * from "./bonus/FreeTotalValueBonus";
|
37
|
+
export * from "./bonus/FreeValueBonus";
|
38
|
+
export * from "./bonus/LowAmountBonus";
|
39
|
+
export * from "./bonus/LowSecondsBonus";
|
40
|
+
export * from "./bonus/LowTotalValueBonus";
|
41
|
+
export * from "./bonus/LowValueBonus";
|
42
|
+
export * from "./bonus/TrialBonus";
|
43
|
+
export * from "./command/BillWatchAWSCommand";
|
44
|
+
export * from "./command/BillWatchAWSEstimateRecordCommand";
|
45
|
+
export * from "./command/BillWatchAWS_CreateForRecordCommand";
|
46
|
+
export * from "./command/BillWatchAzureCommand";
|
47
|
+
export * from "./command/BillWatchAzureEstimateRecordCommand";
|
48
|
+
export * from "./command/BillWatchAzure_CreateForRecordCommand";
|
49
|
+
export * from "./command/BillWatchGCPCommand";
|
50
|
+
export * from "./command/BillWatchGCPEstimateRecordCommand";
|
51
|
+
export * from "./command/BillWatchGCP_CreateForRecordCommand";
|
52
|
+
export * from "./command/CostCommand";
|
53
|
+
export * from "./command/CostListCommand";
|
54
|
+
export * from "./command/FieldCategoryCommand";
|
55
|
+
export * from "./command/FieldCategoryEstimateRecordCommand";
|
56
|
+
export * from "./command/FieldCategory_CreateForRecordCommand";
|
57
|
+
export * from "./command/FieldFieldCommand";
|
58
|
+
export * from "./command/FieldFieldEstimateRecordCommand";
|
59
|
+
export * from "./command/FieldField_CreateForRecordCommand";
|
60
|
+
export * from "./command/HealthzCommand";
|
61
|
+
export * from "./command/HealthzGetCommand";
|
62
|
+
export * from "./command/MetricsCommand";
|
63
|
+
export * from "./command/MetricsGetCommand";
|
64
|
+
export * from "./command/SecretSecretCommand";
|
65
|
+
export * from "./command/SecretSecretEstimateReadCommand";
|
66
|
+
export * from "./command/SecretSecretEstimateRecordCommand";
|
67
|
+
export * from "./command/SecretSecret_CreateForReadCommand";
|
68
|
+
export * from "./command/SecretSecret_CreateForRecordCommand";
|
69
|
+
export * from "./command/ValueCommand";
|
70
|
+
export * from "./command/ValueListCommand";
|
71
|
+
export * from "./estimator/BaseEstimator";
|
72
|
+
export * from "./estimator/BillWatchAWSRecordEstimator";
|
73
|
+
export * from "./estimator/BillWatchAzureRecordEstimator";
|
74
|
+
export * from "./estimator/BillWatchBaseRecordEstimator";
|
75
|
+
export * from "./estimator/BillWatchGCPRecordEstimator";
|
76
|
+
export * from "./estimator/FieldBaseRecordEstimator";
|
77
|
+
export * from "./estimator/FieldCategoryRecordEstimator";
|
78
|
+
export * from "./estimator/FieldFieldRecordEstimator";
|
79
|
+
export * from "./estimator/SecretSecretReadEstimator";
|
80
|
+
export * from "./estimator/SecretSecretRecordEstimator";
|
81
|
+
export * from "./meta/CostMetaTable";
|
82
|
+
export * from "./meta/NamirasoftCostMetaDatabase";
|
83
|
+
export * from "./row/CostRow";
|
84
|
+
export * from "./type/Bonus";
|
85
|
+
export * from "./type/CalculationOption";
|
86
|
+
export * from "./type/Estimation";
|
87
|
+
export * from "./type/EstimationOption";
|
88
|
+
export * from "./type/EstimationUsage";
|
89
|
+
export * from "./type/Period";
|
90
|
+
export * from "./type/SimulationOption";
|
92
91
|
export * from "./type/Usage";
|
@@ -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
|
}
|