namirasoft-cost 1.4.9 → 1.4.11

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 (87) hide show
  1. package/dist/NamirasoftCostServer.d.ts +8 -2
  2. package/dist/NamirasoftCostServer.js +9 -3
  3. package/dist/NamirasoftCostServer.js.map +1 -1
  4. package/dist/NamirasoftCostServerBillWatchAWS.d.ts +2 -2
  5. package/dist/NamirasoftCostServerBillWatchAWS.js.map +1 -1
  6. package/dist/NamirasoftCostServerBillWatchAzure.d.ts +2 -2
  7. package/dist/NamirasoftCostServerBillWatchAzure.js.map +1 -1
  8. package/dist/NamirasoftCostServerBillWatchGCP.d.ts +2 -2
  9. package/dist/NamirasoftCostServerBillWatchGCP.js.map +1 -1
  10. package/dist/NamirasoftCostServerFieldCategory.d.ts +20 -0
  11. package/dist/NamirasoftCostServerFieldCategory.js +37 -0
  12. package/dist/NamirasoftCostServerFieldCategory.js.map +1 -0
  13. package/dist/NamirasoftCostServerFieldField.d.ts +20 -0
  14. package/dist/NamirasoftCostServerFieldField.js +37 -0
  15. package/dist/NamirasoftCostServerFieldField.js.map +1 -0
  16. package/dist/NamirasoftCostServerMetrics.d.ts +6 -0
  17. package/dist/NamirasoftCostServerMetrics.js +28 -0
  18. package/dist/NamirasoftCostServerMetrics.js.map +1 -0
  19. package/dist/command/BillWatchAWSEstimationCommand.js +5 -5
  20. package/dist/command/BillWatchAWSEstimationCommand.js.map +1 -1
  21. package/dist/command/BillWatchAWS_CreateForCommand.js +5 -5
  22. package/dist/command/BillWatchAWS_CreateForCommand.js.map +1 -1
  23. package/dist/command/BillWatchAzureEstimationCommand.js +4 -4
  24. package/dist/command/BillWatchAzureEstimationCommand.js.map +1 -1
  25. package/dist/command/BillWatchAzure_CreateForCommand.js +4 -4
  26. package/dist/command/BillWatchAzure_CreateForCommand.js.map +1 -1
  27. package/dist/command/BillWatchGCPEstimationCommand.js +5 -5
  28. package/dist/command/BillWatchGCPEstimationCommand.js.map +1 -1
  29. package/dist/command/BillWatchGCP_CreateForCommand.js +5 -5
  30. package/dist/command/BillWatchGCP_CreateForCommand.js.map +1 -1
  31. package/dist/command/FieldCategoryCommand.d.ts +4 -0
  32. package/dist/command/FieldCategoryCommand.js +17 -0
  33. package/dist/command/FieldCategoryCommand.js.map +1 -0
  34. package/dist/command/FieldCategoryEstimationCommand.d.ts +5 -0
  35. package/dist/command/FieldCategoryEstimationCommand.js +67 -0
  36. package/dist/command/FieldCategoryEstimationCommand.js.map +1 -0
  37. package/dist/command/FieldCategory_CreateForCommand.d.ts +5 -0
  38. package/dist/command/FieldCategory_CreateForCommand.js +85 -0
  39. package/dist/command/FieldCategory_CreateForCommand.js.map +1 -0
  40. package/dist/command/FieldFieldCommand.d.ts +4 -0
  41. package/dist/command/FieldFieldCommand.js +17 -0
  42. package/dist/command/FieldFieldCommand.js.map +1 -0
  43. package/dist/command/FieldFieldEstimationCommand.d.ts +5 -0
  44. package/dist/command/FieldFieldEstimationCommand.js +67 -0
  45. package/dist/command/FieldFieldEstimationCommand.js.map +1 -0
  46. package/dist/command/FieldField_CreateForCommand.d.ts +5 -0
  47. package/dist/command/FieldField_CreateForCommand.js +85 -0
  48. package/dist/command/FieldField_CreateForCommand.js.map +1 -0
  49. package/dist/command/MetricsCommand.d.ts +4 -0
  50. package/dist/command/MetricsCommand.js +15 -0
  51. package/dist/command/MetricsCommand.js.map +1 -0
  52. package/dist/command/MetricsGetCommand.d.ts +5 -0
  53. package/dist/command/MetricsGetCommand.js +38 -0
  54. package/dist/command/MetricsGetCommand.js.map +1 -0
  55. package/dist/command/cli.js +6 -0
  56. package/dist/command/cli.js.map +1 -1
  57. package/dist/index.d.ts +11 -0
  58. package/dist/index.js +11 -0
  59. package/dist/index.js.map +1 -1
  60. package/dist/meta/NamirasoftCostMetaDatabase.js +1 -1
  61. package/dist/meta/NamirasoftCostMetaDatabase.js.map +1 -1
  62. package/logo.png +0 -0
  63. package/package.json +4 -4
  64. package/src/NamirasoftCostServer.ts +14 -5
  65. package/src/NamirasoftCostServerBillWatchAWS.ts +2 -2
  66. package/src/NamirasoftCostServerBillWatchAzure.ts +2 -2
  67. package/src/NamirasoftCostServerBillWatchGCP.ts +2 -2
  68. package/src/NamirasoftCostServerFieldCategory.ts +47 -0
  69. package/src/NamirasoftCostServerFieldField.ts +47 -0
  70. package/src/NamirasoftCostServerMetrics.ts +36 -0
  71. package/src/command/BillWatchAWSEstimationCommand.ts +5 -5
  72. package/src/command/BillWatchAWS_CreateForCommand.ts +5 -5
  73. package/src/command/BillWatchAzureEstimationCommand.ts +4 -4
  74. package/src/command/BillWatchAzure_CreateForCommand.ts +4 -4
  75. package/src/command/BillWatchGCPEstimationCommand.ts +5 -5
  76. package/src/command/BillWatchGCP_CreateForCommand.ts +5 -5
  77. package/src/command/FieldCategoryCommand.ts +34 -0
  78. package/src/command/FieldCategoryEstimationCommand.ts +74 -0
  79. package/src/command/FieldCategory_CreateForCommand.ts +92 -0
  80. package/src/command/FieldFieldCommand.ts +34 -0
  81. package/src/command/FieldFieldEstimationCommand.ts +74 -0
  82. package/src/command/FieldField_CreateForCommand.ts +92 -0
  83. package/src/command/MetricsCommand.ts +32 -0
  84. package/src/command/MetricsGetCommand.ts +45 -0
  85. package/src/command/cli.ts +6 -0
  86. package/src/index.ts +11 -0
  87. package/src/meta/NamirasoftCostMetaDatabase.ts +1 -1
@@ -23,26 +23,35 @@ import { NamirasoftCostServerBillWatchAWS } from "./NamirasoftCostServerBillWatc
23
23
  import { NamirasoftCostServerBillWatchAzure } from "./NamirasoftCostServerBillWatchAzure";
24
24
  import { NamirasoftCostServerBillWatchGCP } from "./NamirasoftCostServerBillWatchGCP";
25
25
  import { NamirasoftCostServerCost } from "./NamirasoftCostServerCost";
26
+ import { NamirasoftCostServerFieldCategory } from "./NamirasoftCostServerFieldCategory";
27
+ import { NamirasoftCostServerFieldField } from "./NamirasoftCostServerFieldField";
26
28
  import { NamirasoftCostServerHealthz } from "./NamirasoftCostServerHealthz";
29
+ import { NamirasoftCostServerMetrics } from "./NamirasoftCostServerMetrics";
27
30
  import { NamirasoftCostServerValue } from "./NamirasoftCostServerValue";
28
31
  import { TokenManager } from "namirasoft-account";
29
32
 
30
33
  export class NamirasoftCostServer extends NSABaseServer
31
34
  {
32
35
  healthz: NamirasoftCostServerHealthz;
36
+ metrics: NamirasoftCostServerMetrics;
33
37
  value: NamirasoftCostServerValue;
34
- bill_watch_a_w_s: NamirasoftCostServerBillWatchAWS;
38
+ bill_watch_aws: NamirasoftCostServerBillWatchAWS;
35
39
  bill_watch_azure: NamirasoftCostServerBillWatchAzure;
36
- bill_watch_g_c_p: NamirasoftCostServerBillWatchGCP;
40
+ bill_watch_gcp: NamirasoftCostServerBillWatchGCP;
41
+ field_category: NamirasoftCostServerFieldCategory;
42
+ field_field: NamirasoftCostServerFieldField;
37
43
  cost: NamirasoftCostServerCost;
38
44
  constructor(base_url: string, manager: TokenManager, onError: (error: Error) => void)
39
45
  {
40
- super(base_url, `1.4.9`, manager, onError);
46
+ super(base_url, `1.4.11`, manager, onError);
41
47
  this.healthz = new NamirasoftCostServerHealthz(this);
48
+ this.metrics = new NamirasoftCostServerMetrics(this);
42
49
  this.value = new NamirasoftCostServerValue(this);
43
- this.bill_watch_a_w_s = new NamirasoftCostServerBillWatchAWS(this);
50
+ this.bill_watch_aws = new NamirasoftCostServerBillWatchAWS(this);
44
51
  this.bill_watch_azure = new NamirasoftCostServerBillWatchAzure(this);
45
- this.bill_watch_g_c_p = new NamirasoftCostServerBillWatchGCP(this);
52
+ this.bill_watch_gcp = new NamirasoftCostServerBillWatchGCP(this);
53
+ this.field_category = new NamirasoftCostServerFieldCategory(this);
54
+ this.field_field = new NamirasoftCostServerFieldField(this);
46
55
  this.cost = new NamirasoftCostServerCost(this);
47
56
  }
48
57
  };
@@ -32,13 +32,13 @@ export class NamirasoftCostServerBillWatchAWS extends NamirasoftCostServerBase
32
32
  this.Estimation = this.Estimation.bind(this);
33
33
  this._CreateFor = this._CreateFor.bind(this);
34
34
  }
35
- async Estimation(body: { first_watch_created_at: (string | null), period: Period, active: boolean }): Promise<Estimation>
35
+ async Estimation(body: { first_entity_created_at: (Date | null), period: Period, active: boolean }): Promise<Estimation>
36
36
  {
37
37
  let path = `/estimation/bill-watch/aws`;
38
38
  let { data } = await this.server._post<Estimation>(path, {}, body);
39
39
  return data;
40
40
  }
41
- async _CreateFor(user_id: string, body: { first_watch_created_at: (string | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
41
+ async _CreateFor(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
42
  {
43
43
  let path = `/application/user/${user_id}/cost/bill-watch/aws`;
44
44
  let { data } = await this.server._post<CostRow>(path, {}, body);
@@ -32,13 +32,13 @@ export class NamirasoftCostServerBillWatchAzure extends NamirasoftCostServerBase
32
32
  this.Estimation = this.Estimation.bind(this);
33
33
  this._CreateFor = this._CreateFor.bind(this);
34
34
  }
35
- async Estimation(body: { first_watch_created_at: (string | null), period: Period, active: boolean }): Promise<Estimation>
35
+ async Estimation(body: { first_entity_created_at: (Date | null), period: Period, active: boolean }): Promise<Estimation>
36
36
  {
37
37
  let path = `/estimation/bill-watch/azure`;
38
38
  let { data } = await this.server._post<Estimation>(path, {}, body);
39
39
  return data;
40
40
  }
41
- async _CreateFor(user_id: string, body: { first_watch_created_at: (string | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
41
+ async _CreateFor(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
42
  {
43
43
  let path = `/application/user/${user_id}/cost/bill-watch/azure`;
44
44
  let { data } = await this.server._post<CostRow>(path, {}, body);
@@ -32,13 +32,13 @@ export class NamirasoftCostServerBillWatchGCP extends NamirasoftCostServerBase
32
32
  this.Estimation = this.Estimation.bind(this);
33
33
  this._CreateFor = this._CreateFor.bind(this);
34
34
  }
35
- async Estimation(body: { first_watch_created_at: (string | null), period: Period, active: boolean }): Promise<Estimation>
35
+ async Estimation(body: { first_entity_created_at: (Date | null), period: Period, active: boolean }): Promise<Estimation>
36
36
  {
37
37
  let path = `/estimation/bill-watch/gcp`;
38
38
  let { data } = await this.server._post<Estimation>(path, {}, body);
39
39
  return data;
40
40
  }
41
- async _CreateFor(user_id: string, body: { first_watch_created_at: (string | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
41
+ async _CreateFor(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
42
  {
43
43
  let path = `/application/user/${user_id}/cost/bill-watch/gcp`;
44
44
  let { data } = await this.server._post<CostRow>(path, {}, body);
@@ -0,0 +1,47 @@
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 { CostRow } from "./row/CostRow";
22
+ import { Estimation } from "./type/Estimation";
23
+ import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
+ import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
+ import { Period } from "./type/Period";
26
+
27
+ export class NamirasoftCostServerFieldCategory extends NamirasoftCostServerBase
28
+ {
29
+ constructor(server: NamirasoftCostServer)
30
+ {
31
+ super(server);
32
+ this.Estimation = this.Estimation.bind(this);
33
+ this._CreateFor = this._CreateFor.bind(this);
34
+ }
35
+ async Estimation(body: { first_entity_created_at: (Date | null), period: Period, active: boolean }): Promise<Estimation>
36
+ {
37
+ let path = `/estimation/field/category`;
38
+ let { data } = await this.server._post<Estimation>(path, {}, body);
39
+ return data;
40
+ }
41
+ async _CreateFor(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
+ {
43
+ let path = `/application/user/${user_id}/cost/field/category`;
44
+ let { data } = await this.server._post<CostRow>(path, {}, body);
45
+ return data;
46
+ }
47
+ };
@@ -0,0 +1,47 @@
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 { CostRow } from "./row/CostRow";
22
+ import { Estimation } from "./type/Estimation";
23
+ import { NamirasoftCostServer } from "./NamirasoftCostServer";
24
+ import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
25
+ import { Period } from "./type/Period";
26
+
27
+ export class NamirasoftCostServerFieldField extends NamirasoftCostServerBase
28
+ {
29
+ constructor(server: NamirasoftCostServer)
30
+ {
31
+ super(server);
32
+ this.Estimation = this.Estimation.bind(this);
33
+ this._CreateFor = this._CreateFor.bind(this);
34
+ }
35
+ async Estimation(body: { first_entity_created_at: (Date | null), period: Period, active: boolean }): Promise<Estimation>
36
+ {
37
+ let path = `/estimation/field/field`;
38
+ let { data } = await this.server._post<Estimation>(path, {}, body);
39
+ return data;
40
+ }
41
+ async _CreateFor(user_id: string, body: { first_entity_created_at: (Date | null), period: Period, active: boolean, workspace_id: string, resource_id: string }): Promise<CostRow>
42
+ {
43
+ let path = `/application/user/${user_id}/cost/field/field`;
44
+ let { data } = await this.server._post<CostRow>(path, {}, body);
45
+ return data;
46
+ }
47
+ };
@@ -0,0 +1,36 @@
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 { NamirasoftCostServer } from "./NamirasoftCostServer";
22
+ import { NamirasoftCostServerBase } from "./NamirasoftCostServerBase";
23
+
24
+ export class NamirasoftCostServerMetrics extends NamirasoftCostServerBase
25
+ {
26
+ constructor(server: NamirasoftCostServer)
27
+ {
28
+ super(server);
29
+ this.Get = this.Get.bind(this);
30
+ }
31
+ async Get(): Promise<void>
32
+ {
33
+ let path = `/metrics`;
34
+ await this.server._get<void>(path, {});
35
+ }
36
+ };
@@ -29,11 +29,11 @@ export class BillWatchAWSEstimationCommand extends BaseFinalCommand
29
29
  {
30
30
  super(argv, [], [
31
31
  {
32
- name: "first_watch_created_at",
32
+ name: "first_entity_created_at",
33
33
  short: "",
34
- description: "Provides the value of 'first_watch_created_at' in body",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
35
  optional: true,
36
- args: ["first_watch_created_at"],
36
+ args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
38
  },
39
39
  {
@@ -64,8 +64,8 @@ export class BillWatchAWSEstimationCommand extends BaseFinalCommand
64
64
  manager.setValue(token, false);
65
65
  let url = this.app.storage.getItem("ns-cost-server-url");
66
66
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
67
- let ans = await server.bill_watch_a_w_s.Estimation({
68
- first_watch_created_at: this.option_values.first_watch_created_at,
67
+ let ans = await server.bill_watch_aws.Estimation({
68
+ first_entity_created_at: this.option_values.first_entity_created_at,
69
69
  period: this.option_values.period,
70
70
  active: this.option_values.active
71
71
  });
@@ -29,11 +29,11 @@ export class BillWatchAWS_CreateForCommand extends BaseFinalCommand
29
29
  {
30
30
  super(argv, ["user_id"], [
31
31
  {
32
- name: "first_watch_created_at",
32
+ name: "first_entity_created_at",
33
33
  short: "",
34
- description: "Provides the value of 'first_watch_created_at' in body",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
35
  optional: true,
36
- args: ["first_watch_created_at"],
36
+ args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
38
  },
39
39
  {
@@ -80,8 +80,8 @@ export class BillWatchAWS_CreateForCommand extends BaseFinalCommand
80
80
  manager.setValue(token, false);
81
81
  let url = this.app.storage.getItem("ns-cost-server-url");
82
82
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
83
- let ans = await server.bill_watch_a_w_s._CreateFor(this.arg_values[0], {
84
- first_watch_created_at: this.option_values.first_watch_created_at,
83
+ let ans = await server.bill_watch_aws._CreateFor(this.arg_values[0], {
84
+ first_entity_created_at: this.option_values.first_entity_created_at,
85
85
  period: this.option_values.period,
86
86
  active: this.option_values.active,
87
87
  workspace_id: this.option_values.workspace_id,
@@ -29,11 +29,11 @@ export class BillWatchAzureEstimationCommand extends BaseFinalCommand
29
29
  {
30
30
  super(argv, [], [
31
31
  {
32
- name: "first_watch_created_at",
32
+ name: "first_entity_created_at",
33
33
  short: "",
34
- description: "Provides the value of 'first_watch_created_at' in body",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
35
  optional: true,
36
- args: ["first_watch_created_at"],
36
+ args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
38
  },
39
39
  {
@@ -65,7 +65,7 @@ export class BillWatchAzureEstimationCommand extends BaseFinalCommand
65
65
  let url = this.app.storage.getItem("ns-cost-server-url");
66
66
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
67
67
  let ans = await server.bill_watch_azure.Estimation({
68
- first_watch_created_at: this.option_values.first_watch_created_at,
68
+ first_entity_created_at: this.option_values.first_entity_created_at,
69
69
  period: this.option_values.period,
70
70
  active: this.option_values.active
71
71
  });
@@ -29,11 +29,11 @@ export class BillWatchAzure_CreateForCommand extends BaseFinalCommand
29
29
  {
30
30
  super(argv, ["user_id"], [
31
31
  {
32
- name: "first_watch_created_at",
32
+ name: "first_entity_created_at",
33
33
  short: "",
34
- description: "Provides the value of 'first_watch_created_at' in body",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
35
  optional: true,
36
- args: ["first_watch_created_at"],
36
+ args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
38
  },
39
39
  {
@@ -81,7 +81,7 @@ export class BillWatchAzure_CreateForCommand extends BaseFinalCommand
81
81
  let url = this.app.storage.getItem("ns-cost-server-url");
82
82
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
83
83
  let ans = await server.bill_watch_azure._CreateFor(this.arg_values[0], {
84
- first_watch_created_at: this.option_values.first_watch_created_at,
84
+ first_entity_created_at: this.option_values.first_entity_created_at,
85
85
  period: this.option_values.period,
86
86
  active: this.option_values.active,
87
87
  workspace_id: this.option_values.workspace_id,
@@ -29,11 +29,11 @@ export class BillWatchGCPEstimationCommand extends BaseFinalCommand
29
29
  {
30
30
  super(argv, [], [
31
31
  {
32
- name: "first_watch_created_at",
32
+ name: "first_entity_created_at",
33
33
  short: "",
34
- description: "Provides the value of 'first_watch_created_at' in body",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
35
  optional: true,
36
- args: ["first_watch_created_at"],
36
+ args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
38
  },
39
39
  {
@@ -64,8 +64,8 @@ export class BillWatchGCPEstimationCommand extends BaseFinalCommand
64
64
  manager.setValue(token, false);
65
65
  let url = this.app.storage.getItem("ns-cost-server-url");
66
66
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
67
- let ans = await server.bill_watch_g_c_p.Estimation({
68
- first_watch_created_at: this.option_values.first_watch_created_at,
67
+ let ans = await server.bill_watch_gcp.Estimation({
68
+ first_entity_created_at: this.option_values.first_entity_created_at,
69
69
  period: this.option_values.period,
70
70
  active: this.option_values.active
71
71
  });
@@ -29,11 +29,11 @@ export class BillWatchGCP_CreateForCommand extends BaseFinalCommand
29
29
  {
30
30
  super(argv, ["user_id"], [
31
31
  {
32
- name: "first_watch_created_at",
32
+ name: "first_entity_created_at",
33
33
  short: "",
34
- description: "Provides the value of 'first_watch_created_at' in body",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
35
  optional: true,
36
- args: ["first_watch_created_at"],
36
+ args: ["first_entity_created_at"],
37
37
  defaults: [""]
38
38
  },
39
39
  {
@@ -80,8 +80,8 @@ export class BillWatchGCP_CreateForCommand extends BaseFinalCommand
80
80
  manager.setValue(token, false);
81
81
  let url = this.app.storage.getItem("ns-cost-server-url");
82
82
  let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
83
- let ans = await server.bill_watch_g_c_p._CreateFor(this.arg_values[0], {
84
- first_watch_created_at: this.option_values.first_watch_created_at,
83
+ let ans = await server.bill_watch_gcp._CreateFor(this.arg_values[0], {
84
+ first_entity_created_at: this.option_values.first_entity_created_at,
85
85
  period: this.option_values.period,
86
86
  active: this.option_values.active,
87
87
  workspace_id: this.option_values.workspace_id,
@@ -0,0 +1,34 @@
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 { FieldCategoryEstimationCommand } from "./FieldCategoryEstimationCommand";
23
+ import { FieldCategory_CreateForCommand } from "./FieldCategory_CreateForCommand";
24
+
25
+ export class FieldCategoryCommand extends BaseNavigatorCommand
26
+ {
27
+ constructor(argv: string[])
28
+ {
29
+ super(argv, {
30
+ "estimation": FieldCategoryEstimationCommand,
31
+ "_createfor": FieldCategory_CreateForCommand,
32
+ });
33
+ }
34
+ };
@@ -0,0 +1,74 @@
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 FieldCategoryEstimationCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, [], [
31
+ {
32
+ name: "first_entity_created_at",
33
+ short: "",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
+ optional: true,
36
+ args: ["first_entity_created_at"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "period",
41
+ short: "",
42
+ description: "Provides the value of 'period' in body",
43
+ optional: false,
44
+ args: ["period"],
45
+ defaults: [""]
46
+ },
47
+ {
48
+ name: "active",
49
+ short: "",
50
+ description: "Provides the value of 'active' in body",
51
+ optional: false,
52
+ args: ["active"],
53
+ defaults: [""]
54
+ }
55
+ ]);
56
+ }
57
+ override async exec()
58
+ {
59
+ let token = this.app.storage.getNSAToken();
60
+ if (token == null)
61
+ throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
62
+ let storage = new IStorageMemoryDedicated();
63
+ let manager = new TokenManager(storage, () => { });
64
+ manager.setValue(token, false);
65
+ let url = this.app.storage.getItem("ns-cost-server-url");
66
+ let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
67
+ let ans = await server.field_category.Estimation({
68
+ first_entity_created_at: this.option_values.first_entity_created_at,
69
+ period: this.option_values.period,
70
+ active: this.option_values.active
71
+ });
72
+ this.app.logger.success(JSON.stringify(ans));
73
+ }
74
+ };
@@ -0,0 +1,92 @@
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 FieldCategory_CreateForCommand extends BaseFinalCommand
27
+ {
28
+ constructor(argv: string[])
29
+ {
30
+ super(argv, ["user_id"], [
31
+ {
32
+ name: "first_entity_created_at",
33
+ short: "",
34
+ description: "Provides the value of 'first_entity_created_at' in body",
35
+ optional: true,
36
+ args: ["first_entity_created_at"],
37
+ defaults: [""]
38
+ },
39
+ {
40
+ name: "period",
41
+ short: "",
42
+ description: "Provides the value of 'period' in body",
43
+ optional: false,
44
+ args: ["period"],
45
+ defaults: [""]
46
+ },
47
+ {
48
+ name: "active",
49
+ short: "",
50
+ description: "Provides the value of 'active' in body",
51
+ optional: false,
52
+ args: ["active"],
53
+ defaults: [""]
54
+ },
55
+ {
56
+ name: "workspace_id",
57
+ short: "",
58
+ description: "Provides the value of 'workspace_id' in body",
59
+ optional: false,
60
+ args: ["workspace_id"],
61
+ defaults: [""]
62
+ },
63
+ {
64
+ name: "resource_id",
65
+ short: "",
66
+ description: "Provides the value of 'resource_id' in body",
67
+ optional: false,
68
+ args: ["resource_id"],
69
+ defaults: [""]
70
+ }
71
+ ]);
72
+ }
73
+ override async exec()
74
+ {
75
+ let token = this.app.storage.getNSAToken();
76
+ if (token == null)
77
+ throw new Error("Token is not available. Please login first using:\nns-cost account config \nor \nns-cost account login.");
78
+ let storage = new IStorageMemoryDedicated();
79
+ let manager = new TokenManager(storage, () => { });
80
+ manager.setValue(token, false);
81
+ let url = this.app.storage.getItem("ns-cost-server-url");
82
+ let server = new NamirasoftCostServer(url, manager, e => this.app.logger.error(e.message));
83
+ let ans = await server.field_category._CreateFor(this.arg_values[0], {
84
+ first_entity_created_at: this.option_values.first_entity_created_at,
85
+ period: this.option_values.period,
86
+ active: this.option_values.active,
87
+ workspace_id: this.option_values.workspace_id,
88
+ resource_id: this.option_values.resource_id
89
+ });
90
+ this.app.logger.success(JSON.stringify(ans));
91
+ }
92
+ };
@@ -0,0 +1,34 @@
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 { FieldFieldEstimationCommand } from "./FieldFieldEstimationCommand";
23
+ import { FieldField_CreateForCommand } from "./FieldField_CreateForCommand";
24
+
25
+ export class FieldFieldCommand extends BaseNavigatorCommand
26
+ {
27
+ constructor(argv: string[])
28
+ {
29
+ super(argv, {
30
+ "estimation": FieldFieldEstimationCommand,
31
+ "_createfor": FieldField_CreateForCommand,
32
+ });
33
+ }
34
+ };