@ludeo/cloud-common 1.0.1 → 1.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -21,3 +21,4 @@ export * from "./resize-pool-request.event";
21
21
  export * from "./schedule-task-request.event";
22
22
  export * from "./set-pool.event";
23
23
  export * from "./token-required.event";
24
+ export * from "./monitor-resource-task.event";
@@ -0,0 +1,29 @@
1
+ import { IsString, ValidateNested } from "class-validator";
2
+ import { LudeoEvent } from "../../infra/ludeo-event";
3
+ import { AWSResourceProviderSettings } from "../types";
4
+ import { ValidateNestedType } from "../../decorators";
5
+
6
+ export class MonitorResourceTaskEventPayload {
7
+ @IsString()
8
+ resourceId: string;
9
+
10
+ @IsString()
11
+ poolId: string;
12
+
13
+ @ValidateNested()
14
+ providerSettings: AWSResourceProviderSettings;
15
+ }
16
+
17
+ export class MonitorResourceTaskEvent extends LudeoEvent {
18
+ static readonly EVENT_NAME = "cloud-resources.monitor-resource-task";
19
+
20
+ constructor(payload: MonitorResourceTaskEventPayload) {
21
+ super(MonitorResourceTaskEvent.EVENT_NAME);
22
+ this.payload = payload;
23
+ }
24
+
25
+ context: never;
26
+
27
+ @ValidateNestedType(() => MonitorResourceTaskEventPayload)
28
+ payload: MonitorResourceTaskEventPayload;
29
+ }
@@ -71,7 +71,10 @@ export class AwsAllocationData {
71
71
  export type CloudProviderAllocationData = AwsAllocationData;
72
72
 
73
73
  export class AWSResourceProviderSettings {
74
+ @IsString()
74
75
  streamSessionId: string;
76
+
77
+ @IsString()
75
78
  streamGroupId: string;
76
79
  }
77
80