namirasoft-cost 1.4.5 → 1.4.7

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.
Files changed (56) hide show
  1. package/.ns-sdkg-dir-deep +2 -2
  2. package/.ns-sdkg-file-keep +6 -6
  3. package/dist/NamirasoftCostServer.js +1 -1
  4. package/dist/NamirasoftCostServerBillWatchAWS.d.ts +1 -0
  5. package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
  6. package/dist/NamirasoftCostServerBillWatchAzure.d.ts +1 -0
  7. package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
  8. package/dist/NamirasoftCostServerBillWatchGCP.d.ts +1 -0
  9. package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
  10. package/dist/TimeUtil.d.ts +1 -1
  11. package/dist/TimeUtil.js +31 -20
  12. package/dist/TimeUtil.js.map +1 -1
  13. package/dist/command/BillWatchAWSEstimationCommand.js +9 -0
  14. package/dist/command/BillWatchAWSEstimationCommand.js.map +1 -1
  15. package/dist/command/BillWatchAzureEstimationCommand.js +9 -0
  16. package/dist/command/BillWatchAzureEstimationCommand.js.map +1 -1
  17. package/dist/command/BillWatchGCPEstimationCommand.js +9 -0
  18. package/dist/command/BillWatchGCPEstimationCommand.js.map +1 -1
  19. package/dist/index.d.ts +2 -2
  20. package/dist/index.js +2 -2
  21. package/dist/index.js.map +1 -1
  22. package/package.json +27 -27
  23. package/src/NamirasoftCostServer.ts +47 -47
  24. package/src/NamirasoftCostServerBase.ts +29 -29
  25. package/src/NamirasoftCostServerBillWatchAWS.ts +38 -38
  26. package/src/NamirasoftCostServerBillWatchAzure.ts +38 -38
  27. package/src/NamirasoftCostServerBillWatchGCP.ts +38 -38
  28. package/src/NamirasoftCostServerCost.ts +49 -49
  29. package/src/NamirasoftCostServerHealthz.ts +35 -35
  30. package/src/NamirasoftCostServerValue.ts +36 -36
  31. package/src/TimeUtil.ts +52 -52
  32. package/src/command/BillWatchAWSCommand.ts +31 -31
  33. package/src/command/BillWatchAWSEstimationCommand.ts +73 -64
  34. package/src/command/BillWatchAzureCommand.ts +31 -31
  35. package/src/command/BillWatchAzureEstimationCommand.ts +73 -64
  36. package/src/command/BillWatchGCPCommand.ts +31 -31
  37. package/src/command/BillWatchGCPEstimationCommand.ts +73 -64
  38. package/src/command/CostCommand.ts +33 -33
  39. package/src/command/CostListCommand.ts +44 -44
  40. package/src/command/Cost_CreateForCommand.ts +172 -172
  41. package/src/command/HealthzCommand.ts +31 -31
  42. package/src/command/HealthzGetCommand.ts +44 -44
  43. package/src/command/ValueCommand.ts +31 -31
  44. package/src/command/ValueListCommand.ts +44 -44
  45. package/src/command/cli.ts +42 -42
  46. package/src/enum/TrialUnit.ts +5 -5
  47. package/src/index.ts +52 -52
  48. package/src/meta/CostMetaTable.ts +79 -79
  49. package/src/meta/NamirasoftCostMetaDatabase.ts +50 -50
  50. package/src/row/CostCreateRow.ts +36 -36
  51. package/src/row/CostRow.ts +39 -39
  52. package/src/type/Estimation.ts +6 -6
  53. package/src/type/EstimationRow.ts +6 -6
  54. package/src/type/Period.ts +4 -4
  55. package/src/type/Trial.ts +6 -6
  56. package/src/type/TrialDuration.ts +6 -6
@@ -1,32 +1,32 @@
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 { BaseNavigatorCommand } from "namirasoft-node-cli";
22
- import { ValueListCommand } from "./ValueListCommand";
23
-
24
- export class ValueCommand extends BaseNavigatorCommand
25
- {
26
- constructor(argv: string[])
27
- {
28
- super(argv, {
29
- "list": ValueListCommand,
30
- });
31
- }
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 { BaseNavigatorCommand } from "namirasoft-node-cli";
22
+ import { ValueListCommand } from "./ValueListCommand";
23
+
24
+ export class ValueCommand extends BaseNavigatorCommand
25
+ {
26
+ constructor(argv: string[])
27
+ {
28
+ super(argv, {
29
+ "list": ValueListCommand,
30
+ });
31
+ }
32
32
  };
@@ -1,45 +1,45 @@
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 { BaseFinalCommand } from "namirasoft-node-cli";
22
- import { IStorageMemoryDedicated } from "namirasoft-core";
23
- import { NamirasoftCostServer } from "../NamirasoftCostServer";
24
- import { TokenManager } from "namirasoft-account";
25
-
26
- export class ValueListCommand extends BaseFinalCommand
27
- {
28
- constructor(argv: string[])
29
- {
30
- super(argv, ["table", "column", "search", "field_id", "limit"], []);
31
- }
32
- override async exec()
33
- {
34
- let token = this.app.storage.getNSAToken();
35
- if (token == null)
36
- throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
37
- let storage = new IStorageMemoryDedicated();
38
- let manager = new TokenManager(storage, () => { });
39
- manager.setValue(token, false);
40
- let url = this.app.storage.getItem("ns-cost-server-url");
41
- let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
42
- let ans = await server.value.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
43
- this.app.logger.success(JSON.stringify(ans));
44
- }
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 { BaseFinalCommand } from "namirasoft-node-cli";
22
+ import { IStorageMemoryDedicated } from "namirasoft-core";
23
+ import { NamirasoftCostServer } from "../NamirasoftCostServer";
24
+ import { TokenManager } from "namirasoft-account";
25
+
26
+ export class ValueListCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["table", "column", "search", "field_id", "limit"], []);
31
+ }
32
+ override async exec()
33
+ {
34
+ let token = this.app.storage.getNSAToken();
35
+ if (token == null)
36
+ throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
37
+ let storage = new IStorageMemoryDedicated();
38
+ let manager = new TokenManager(storage, () => { });
39
+ manager.setValue(token, false);
40
+ let url = this.app.storage.getItem("ns-cost-server-url");
41
+ let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
42
+ let ans = await server.value.List(this.arg_values[0], this.arg_values[1], this.arg_values[2], this.arg_values[3], this.arg_values[4]);
43
+ this.app.logger.success(JSON.stringify(ans));
44
+ }
45
45
  };
@@ -1,43 +1,43 @@
1
- #!/usr/bin/env node
2
- /****************************************************************/
3
- /* */
4
- /* This is an Auto-Generated File */
5
- /* Made By */
6
- /* Namirasoft SDK Generator NPM Package */
7
- /* */
8
- /****************************************************************/
9
- /****************************************************************/
10
- /* */
11
- /* Please do not make any change to this file */
12
- /* If any change is required, ns-sdkg command must be used */
13
- /* */
14
- /****************************************************************/
15
- /****************************************************************/
16
- /* */
17
- /* Namira Software Corporation */
18
- /* https://namirasoft.com */
19
- /* */
20
- /****************************************************************/
21
-
22
- import { AccountCommand } from "namirasoft-account";
23
- import { Application, BaseStorage } from "namirasoft-node-cli";
24
- import { BillWatchAWSCommand } from "./BillWatchAWSCommand";
25
- import { BillWatchAzureCommand } from "./BillWatchAzureCommand";
26
- import { BillWatchGCPCommand } from "./BillWatchGCPCommand";
27
- import { ConfigCommand } from "namirasoft-node-cli";
28
- import { CostCommand } from "./CostCommand";
29
- import { HealthzCommand } from "./HealthzCommand";
30
- import { ValueCommand } from "./ValueCommand";
31
-
32
- let app = new Application("ns-cost", new BaseStorage(),
33
- {
34
- "healthz": HealthzCommand,
35
- "value": ValueCommand,
36
- "billwatchaws": BillWatchAWSCommand,
37
- "billwatchazure": BillWatchAzureCommand,
38
- "billwatchgcp": BillWatchGCPCommand,
39
- "cost": CostCommand,
40
- "account": AccountCommand,
41
- "config": (argv: string[]) => new ConfigCommand(argv, ["ns-cost-server-url"])
42
- });
1
+ #!/usr/bin/env node
2
+ /****************************************************************/
3
+ /* */
4
+ /* This is an Auto-Generated File */
5
+ /* Made By */
6
+ /* Namirasoft SDK Generator NPM Package */
7
+ /* */
8
+ /****************************************************************/
9
+ /****************************************************************/
10
+ /* */
11
+ /* Please do not make any change to this file */
12
+ /* If any change is required, ns-sdkg command must be used */
13
+ /* */
14
+ /****************************************************************/
15
+ /****************************************************************/
16
+ /* */
17
+ /* Namira Software Corporation */
18
+ /* https://namirasoft.com */
19
+ /* */
20
+ /****************************************************************/
21
+
22
+ import { AccountCommand } from "namirasoft-account";
23
+ import { Application, BaseStorage } from "namirasoft-node-cli";
24
+ import { BillWatchAWSCommand } from "./BillWatchAWSCommand";
25
+ import { BillWatchAzureCommand } from "./BillWatchAzureCommand";
26
+ import { BillWatchGCPCommand } from "./BillWatchGCPCommand";
27
+ import { ConfigCommand } from "namirasoft-node-cli";
28
+ import { CostCommand } from "./CostCommand";
29
+ import { HealthzCommand } from "./HealthzCommand";
30
+ import { ValueCommand } from "./ValueCommand";
31
+
32
+ let app = new Application("ns-cost", new BaseStorage(),
33
+ {
34
+ "healthz": HealthzCommand,
35
+ "value": ValueCommand,
36
+ "billwatchaws": BillWatchAWSCommand,
37
+ "billwatchazure": BillWatchAzureCommand,
38
+ "billwatchgcp": BillWatchGCPCommand,
39
+ "cost": CostCommand,
40
+ "account": AccountCommand,
41
+ "config": (argv: string[]) => new ConfigCommand(argv, ["ns-cost-server-url"])
42
+ });
43
43
  app.run();
@@ -1,6 +1,6 @@
1
- export enum TrialUnit
2
- {
3
- Day = "Day",
4
- Week = "Week",
5
- Month = "Month",
1
+ export enum TrialUnit
2
+ {
3
+ Day = "Day",
4
+ Week = "Week",
5
+ Month = "Month",
6
6
  }
package/src/index.ts CHANGED
@@ -1,52 +1,52 @@
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 "./NamirasoftCostServerHealthz";
28
- export * from "./NamirasoftCostServerValue";
29
- export * from "./command/BillWatchAWSCommand";
30
- export * from "./command/BillWatchAWSEstimationCommand";
31
- export * from "./command/BillWatchAzureCommand";
32
- export * from "./command/BillWatchAzureEstimationCommand";
33
- export * from "./command/BillWatchGCPCommand";
34
- export * from "./command/BillWatchGCPEstimationCommand";
35
- export * from "./command/CostCommand";
36
- export * from "./command/CostListCommand";
37
- export * from "./command/Cost_CreateForCommand";
38
- export * from "./command/HealthzCommand";
39
- export * from "./command/HealthzGetCommand";
40
- export * from "./command/ValueCommand";
41
- export * from "./command/ValueListCommand";
42
- export * from "./meta/CostMetaTable";
43
- export * from "./meta/NamirasoftCostMetaDatabase";
44
- export * from "./row/CostCreateRow";
45
- export * from "./row/CostRow";
46
- export * from "./enum/TrialUnit";
47
- export * from "./type/Estimation";
48
- export * from "./type/EstimationRow";
49
- export * from "./type/Period";
50
- export * from "./type/Trial";
51
- export * from "./type/TrialDuration";
52
- export * from "./TimeUtil";
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 "./NamirasoftCostServerHealthz";
28
+ export * from "./NamirasoftCostServerValue";
29
+ export * from "./TimeUtil";
30
+ export * from "./command/BillWatchAWSCommand";
31
+ export * from "./command/BillWatchAWSEstimationCommand";
32
+ export * from "./command/BillWatchAzureCommand";
33
+ export * from "./command/BillWatchAzureEstimationCommand";
34
+ export * from "./command/BillWatchGCPCommand";
35
+ export * from "./command/BillWatchGCPEstimationCommand";
36
+ export * from "./command/CostCommand";
37
+ export * from "./command/CostListCommand";
38
+ export * from "./command/Cost_CreateForCommand";
39
+ export * from "./command/HealthzCommand";
40
+ export * from "./command/HealthzGetCommand";
41
+ export * from "./command/ValueCommand";
42
+ export * from "./command/ValueListCommand";
43
+ export * from "./enum/TrialUnit";
44
+ export * from "./meta/CostMetaTable";
45
+ export * from "./meta/NamirasoftCostMetaDatabase";
46
+ export * from "./row/CostCreateRow";
47
+ export * from "./row/CostRow";
48
+ export * from "./type/Estimation";
49
+ export * from "./type/EstimationRow";
50
+ export * from "./type/Period";
51
+ export * from "./type/Trial";
52
+ export * from "./type/TrialDuration";
@@ -1,80 +1,80 @@
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
- sales_item_id: BaseMetaColumn;
32
- offer_id: BaseMetaColumn;
33
- offer_item_id: BaseMetaColumn;
34
- workspace_id: BaseMetaColumn;
35
- product_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
- created_at: BaseMetaColumn;
46
- }
47
- constructor(database: NSBaseMetaDatabase<NamirasoftCostServer>)
48
- {
49
- super(database, "cost", "Cost", new BaseUUID("cst"));
50
- this.columns = {
51
- id: new BaseMetaColumn(this, "id", "ID", "String", true),
52
- user_id: new BaseMetaColumn(this, "user_id", "User ID", "String", true),
53
- sales_item_id: new BaseMetaColumn(this, "sales_item_id", "Sales Item ID", "String", true),
54
- offer_id: new BaseMetaColumn(this, "offer_id", "Offer ID", "String", true),
55
- offer_item_id: new BaseMetaColumn(this, "offer_item_id", "Offer Item ID", "String", true),
56
- workspace_id: new BaseMetaColumn(this, "workspace_id", "Workspace ID", "String", true),
57
- product_id: new BaseMetaColumn(this, "product_id", "Product ID", "String", true),
58
- resource_entity: new BaseMetaColumn(this, "resource_entity", "Resource Entity", "String", true),
59
- resource_id: new BaseMetaColumn(this, "resource_id", "Resource ID", "String", true),
60
- usage_name: new BaseMetaColumn(this, "usage_name", "Usage Name", "String", true),
61
- usage_value: new BaseMetaColumn(this, "usage_value", "Usage Value", "Double", true),
62
- usage_unit: new BaseMetaColumn(this, "usage_unit", "Usage Unit", "String", true),
63
- period_start: new BaseMetaColumn(this, "period_start", "Period Start", "DateTime", true),
64
- period_end: new BaseMetaColumn(this, "period_end", "Period End", "DateTime", true),
65
- amount: new BaseMetaColumn(this, "amount", "Amount", "Double", true),
66
- currency: new BaseMetaColumn(this, "currency", "Currency", "String", true),
67
- created_at: new BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
68
- };
69
- this.back_end.get = async (id: string) =>
70
- {
71
- console.log(id);
72
- throw new Error("Cost.Get is not implemented");
73
- };
74
- this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
75
- {
76
- let server = this.database.getServer();
77
- return await server.cost.List(filters, page, size, sorts);
78
- };
79
- }
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
+ sales_item_id: BaseMetaColumn;
32
+ offer_id: BaseMetaColumn;
33
+ offer_item_id: BaseMetaColumn;
34
+ workspace_id: BaseMetaColumn;
35
+ product_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
+ created_at: BaseMetaColumn;
46
+ }
47
+ constructor(database: NSBaseMetaDatabase<NamirasoftCostServer>)
48
+ {
49
+ super(database, "cost", "Cost", new BaseUUID("cst"));
50
+ this.columns = {
51
+ id: new BaseMetaColumn(this, "id", "ID", "String", true),
52
+ user_id: new BaseMetaColumn(this, "user_id", "User ID", "String", true),
53
+ sales_item_id: new BaseMetaColumn(this, "sales_item_id", "Sales Item ID", "String", true),
54
+ offer_id: new BaseMetaColumn(this, "offer_id", "Offer ID", "String", true),
55
+ offer_item_id: new BaseMetaColumn(this, "offer_item_id", "Offer Item ID", "String", true),
56
+ workspace_id: new BaseMetaColumn(this, "workspace_id", "Workspace ID", "String", true),
57
+ product_id: new BaseMetaColumn(this, "product_id", "Product ID", "String", true),
58
+ resource_entity: new BaseMetaColumn(this, "resource_entity", "Resource Entity", "String", true),
59
+ resource_id: new BaseMetaColumn(this, "resource_id", "Resource ID", "String", true),
60
+ usage_name: new BaseMetaColumn(this, "usage_name", "Usage Name", "String", true),
61
+ usage_value: new BaseMetaColumn(this, "usage_value", "Usage Value", "Double", true),
62
+ usage_unit: new BaseMetaColumn(this, "usage_unit", "Usage Unit", "String", true),
63
+ period_start: new BaseMetaColumn(this, "period_start", "Period Start", "DateTime", true),
64
+ period_end: new BaseMetaColumn(this, "period_end", "Period End", "DateTime", true),
65
+ amount: new BaseMetaColumn(this, "amount", "Amount", "Double", true),
66
+ currency: new BaseMetaColumn(this, "currency", "Currency", "String", true),
67
+ created_at: new BaseMetaColumn(this, "created_at", "Created At", "DateTime", true),
68
+ };
69
+ this.back_end.get = async (id: string) =>
70
+ {
71
+ console.log(id);
72
+ throw new Error("Cost.Get is not implemented");
73
+ };
74
+ this.back_end.list = async (filters: FilterItem[] | null, page: (number | null), size: (number | null), sorts: SortItem[]) =>
75
+ {
76
+ let server = this.database.getServer();
77
+ return await server.cost.List(filters, page, size, sorts);
78
+ };
79
+ }
80
80
  };
@@ -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: "", 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: "", 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
  };