@ludeo/cloud-common 1.0.28 → 1.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,4 +9,6 @@ export declare class CloudSessionContext {
9
9
  poolId?: string;
10
10
  cloudProvider: CloudProvider;
11
11
  resourceId?: string;
12
+ streamGroupId?: string;
13
+ streamSessionId?: string;
12
14
  }
@@ -58,4 +58,14 @@ __decorate([
58
58
  (0, class_validator_1.IsUUID)(),
59
59
  __metadata("design:type", String)
60
60
  ], CloudSessionContext.prototype, "resourceId", void 0);
61
+ __decorate([
62
+ (0, class_validator_1.IsOptional)(),
63
+ (0, class_validator_1.IsString)(),
64
+ __metadata("design:type", String)
65
+ ], CloudSessionContext.prototype, "streamGroupId", void 0);
66
+ __decorate([
67
+ (0, class_validator_1.IsOptional)(),
68
+ (0, class_validator_1.IsString)(),
69
+ __metadata("design:type", String)
70
+ ], CloudSessionContext.prototype, "streamSessionId", void 0);
61
71
  //# sourceMappingURL=cloud-session-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6D;AAC7D,oCAAyC;AAEzC,MAAa,mBAAmB;CAkC/B;AAlCD,kDAkCC;AA/BC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;gEACoB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACgB;AAGzB;IADC,IAAA,wBAAM,GAAE;;2DACc;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;oDACQ;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAGhB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0DACO;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW"}
1
+ {"version":3,"file":"cloud-session-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/cloud-session-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,oCAAyC;AAEzC,MAAa,mBAAmB;CA0C/B;AA1CD,kDA0CC;AAvCC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;gEACoB;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;4DACgB;AAGzB;IADC,IAAA,wBAAM,GAAE;;2DACc;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;oDACQ;AAIjB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;mDACO;AAGhB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;0DACO;AAI7B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACW;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;0DACY;AAIvB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACc"}
@@ -0,0 +1,10 @@
1
+ import { LudeoEvent } from "../../infra/ludeo-event";
2
+ export declare class CloudSessionTimeoutEventTaskEventPayload {
3
+ cloudSessionId: string;
4
+ }
5
+ export declare class CloudSessionTimeoutTaskEvent extends LudeoEvent {
6
+ static readonly EVENT_NAME = "cloud-sessions.cloud-session-timeout-task";
7
+ constructor(payload: CloudSessionTimeoutEventTaskEventPayload, context: never);
8
+ context: never;
9
+ payload: CloudSessionTimeoutEventTaskEventPayload;
10
+ }
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CloudSessionTimeoutTaskEvent = exports.CloudSessionTimeoutEventTaskEventPayload = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const ludeo_event_1 = require("../../infra/ludeo-event");
15
+ const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
16
+ class CloudSessionTimeoutEventTaskEventPayload {
17
+ }
18
+ exports.CloudSessionTimeoutEventTaskEventPayload = CloudSessionTimeoutEventTaskEventPayload;
19
+ __decorate([
20
+ (0, class_validator_1.IsUUID)(),
21
+ __metadata("design:type", String)
22
+ ], CloudSessionTimeoutEventTaskEventPayload.prototype, "cloudSessionId", void 0);
23
+ class CloudSessionTimeoutTaskEvent extends ludeo_event_1.LudeoEvent {
24
+ constructor(payload, context) {
25
+ super(CloudSessionTimeoutTaskEvent.EVENT_NAME);
26
+ this.payload = payload;
27
+ this.context = context;
28
+ }
29
+ }
30
+ exports.CloudSessionTimeoutTaskEvent = CloudSessionTimeoutTaskEvent;
31
+ CloudSessionTimeoutTaskEvent.EVENT_NAME = "cloud-sessions.cloud-session-timeout-task";
32
+ __decorate([
33
+ (0, validate_nested_type_decorator_1.ValidateNestedType)(() => CloudSessionTimeoutEventTaskEventPayload),
34
+ __metadata("design:type", CloudSessionTimeoutEventTaskEventPayload)
35
+ ], CloudSessionTimeoutTaskEvent.prototype, "payload", void 0);
36
+ //# sourceMappingURL=cloud-session-timeout-task.event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-session-timeout-task.event.js","sourceRoot":"","sources":["../../../src/v2/events/cloud-session-timeout-task.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyC;AACzC,yDAAqD;AACrD,oGAAqF;AAErF,MAAa,wCAAwC;CAGpD;AAHD,4FAGC;AADC;IADC,IAAA,wBAAM,GAAE;;gFACc;AAGzB,MAAa,4BAA6B,SAAQ,wBAAU;IAG1D,YACE,OAAiD,EACjD,OAAc;QAEd,KAAK,CAAC,4BAA4B,CAAC,UAAU,CAAC,CAAC;QAC/C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,oEAgBC;AAfiB,uCAAU,GAAG,2CAA2C,CAAC;AAczE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,wCAAwC,CAAC;8BAC1D,wCAAwC;6DAAC"}
@@ -29,3 +29,4 @@ export * from "./terminate-cloud-resource-request.event";
29
29
  export * from "./terminate-cloud-resource-failed.event";
30
30
  export * from "./terminate-pool-item-request.event";
31
31
  export * from "./terminate-cloud-session-request.event";
32
+ export * from "./cloud-session-timeout-task.event";
@@ -45,4 +45,5 @@ __exportStar(require("./terminate-cloud-resource-request.event"), exports);
45
45
  __exportStar(require("./terminate-cloud-resource-failed.event"), exports);
46
46
  __exportStar(require("./terminate-pool-item-request.event"), exports);
47
47
  __exportStar(require("./terminate-cloud-session-request.event"), exports);
48
+ __exportStar(require("./cloud-session-timeout-task.event"), exports);
48
49
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v2/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAAwD;AACxD,wEAAsD;AACtD,yEAAuD;AACvD,oEAAkD;AAClD,qEAAmD;AACnD,mEAAiD;AACjD,iEAA+C;AAC/C,yEAAuD;AACvD,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAC5C,wEAAsD;AACtD,4DAA0C;AAC1C,uDAAqC;AACrC,8DAA4C;AAC5C,8DAA4C;AAC5C,sDAAoC;AACpC,uDAAqC;AACrC,wEAAsD;AACtD,8DAA4C;AAC5C,gEAA8C;AAC9C,mDAAiC;AACjC,yDAAuC;AACvC,gEAA8C;AAC9C,6DAA2C;AAC3C,2EAAyD;AACzD,oEAAkD;AAClD,2EAAyD;AACzD,0EAAwD;AACxD,sEAAoD;AACpD,0EAAwD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v2/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0EAAwD;AACxD,wEAAsD;AACtD,yEAAuD;AACvD,oEAAkD;AAClD,qEAAmD;AACnD,mEAAiD;AACjD,iEAA+C;AAC/C,yEAAuD;AACvD,gEAA8C;AAC9C,kEAAgD;AAChD,8DAA4C;AAC5C,wEAAsD;AACtD,4DAA0C;AAC1C,uDAAqC;AACrC,8DAA4C;AAC5C,8DAA4C;AAC5C,sDAAoC;AACpC,uDAAqC;AACrC,wEAAsD;AACtD,8DAA4C;AAC5C,gEAA8C;AAC9C,mDAAiC;AACjC,yDAAuC;AACvC,gEAA8C;AAC9C,6DAA2C;AAC3C,2EAAyD;AACzD,oEAAkD;AAClD,2EAAyD;AACzD,0EAAwD;AACxD,sEAAoD;AACpD,0EAAwD;AACxD,qEAAmD"}
@@ -3,6 +3,7 @@ export declare class SchedulingData {
3
3
  repeat?: number;
4
4
  interval?: number;
5
5
  retries?: number;
6
+ delay?: number;
6
7
  }
7
8
  export declare enum JobType {
8
9
  KafkaEvent = "KAFKA_EVENT"
@@ -28,6 +28,10 @@ __decorate([
28
28
  (0, class_validator_1.IsNumber)(),
29
29
  __metadata("design:type", Number)
30
30
  ], SchedulingData.prototype, "retries", void 0);
31
+ __decorate([
32
+ (0, class_validator_1.IsNumber)(),
33
+ __metadata("design:type", Number)
34
+ ], SchedulingData.prototype, "delay", void 0);
31
35
  var JobType;
32
36
  (function (JobType) {
33
37
  JobType["KafkaEvent"] = "KAFKA_EVENT";
@@ -1 +1 @@
1
- {"version":3,"file":"schedule-task-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/schedule-task-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyE;AACzE,yDAAqD;AACrD,iDAAsD;AAEtD,MAAa,cAAc;CAS1B;AATD,wCASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;8CACK;AAGhB;IADC,IAAA,0BAAQ,GAAE;;gDACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;+CACM;AAGnB,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,qCAA0B,CAAA;AAC5B,CAAC,EAFW,OAAO,uBAAP,OAAO,QAElB;AAED,MAAa,iBAAiB;CAK7B;AALD,8CAKC;AAHC;IADC,IAAA,0BAAQ,GAAE;;qDACQ;AAKrB,MAAa,GAAG;CAMf;AAND,kBAMC;AAJC;IADC,IAAA,wBAAM,EAAC,OAAO,CAAC;;iCACF;AAGd;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC;8BACnC,iBAAiB;oCAAC;AAG7B,MAAM,4BAA4B;CAYjC;AAVC;IADC,IAAA,0BAAQ,GAAE;;yDACC;AAGZ;IADC,IAAA,4BAAU,GAAE;;mEACU;AAGvB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC;8BAC7B,cAAc;gEAAC;AAG3B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,GAAG,CAAC;8BACzB,GAAG;yDAAC;AAEX,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YAAY,OAAqC,EAAE,OAAe;QAChE,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,kDAaC;AAZiB,8BAAU,GAAG,sCAAsC,CAAC;AAWpE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;oDAAC"}
1
+ {"version":3,"file":"schedule-task-request.event.js","sourceRoot":"","sources":["../../../src/v2/events/schedule-task-request.event.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAyE;AACzE,yDAAqD;AACrD,iDAAsD;AAEtD,MAAa,cAAc;CAY1B;AAZD,wCAYC;AAVC;IADC,IAAA,0BAAQ,GAAE;;8CACK;AAGhB;IADC,IAAA,0BAAQ,GAAE;;gDACO;AAGlB;IADC,IAAA,0BAAQ,GAAE;;+CACM;AAGjB;IADC,IAAA,0BAAQ,GAAE;;6CACI;AAGjB,IAAY,OAEX;AAFD,WAAY,OAAO;IACjB,qCAA0B,CAAA;AAC5B,CAAC,EAFW,OAAO,uBAAP,OAAO,QAElB;AAED,MAAa,iBAAiB;CAK7B;AALD,8CAKC;AAHC;IADC,IAAA,0BAAQ,GAAE;;qDACQ;AAKrB,MAAa,GAAG;CAMf;AAND,kBAMC;AAJC;IADC,IAAA,wBAAM,EAAC,OAAO,CAAC;;iCACF;AAGd;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC;8BACnC,iBAAiB;oCAAC;AAG7B,MAAM,4BAA4B;CAYjC;AAVC;IADC,IAAA,0BAAQ,GAAE;;yDACC;AAGZ;IADC,IAAA,4BAAU,GAAE;;mEACU;AAGvB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC;8BAC7B,cAAc;gEAAC;AAG3B;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,GAAG,CAAC;8BACzB,GAAG;yDAAC;AAEX,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YAAY,OAAqC,EAAE,OAAe;QAChE,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAPH,kDAaC;AAZiB,8BAAU,GAAG,sCAAsC,CAAC;AAWpE;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;oDAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -1,4 +1,4 @@
1
- import { IsEnum, IsOptional, IsUUID } from "class-validator";
1
+ import { IsEnum, IsOptional, IsString, IsUUID } from "class-validator";
2
2
  import { CloudProvider } from "../types";
3
3
 
4
4
  export class CloudSessionContext {
@@ -35,4 +35,12 @@ export class CloudSessionContext {
35
35
  @IsOptional()
36
36
  @IsUUID()
37
37
  resourceId?: string;
38
+
39
+ @IsOptional()
40
+ @IsString()
41
+ streamGroupId?: string;
42
+
43
+ @IsOptional()
44
+ @IsString()
45
+ streamSessionId?: string;
38
46
  }
@@ -0,0 +1,26 @@
1
+ import { IsUUID } from "class-validator";
2
+ import { LudeoEvent } from "../../infra/ludeo-event";
3
+ import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
4
+
5
+ export class CloudSessionTimeoutEventTaskEventPayload {
6
+ @IsUUID()
7
+ cloudSessionId: string;
8
+ }
9
+
10
+ export class CloudSessionTimeoutTaskEvent extends LudeoEvent {
11
+ static readonly EVENT_NAME = "cloud-sessions.cloud-session-timeout-task";
12
+
13
+ constructor(
14
+ payload: CloudSessionTimeoutEventTaskEventPayload,
15
+ context: never
16
+ ) {
17
+ super(CloudSessionTimeoutTaskEvent.EVENT_NAME);
18
+ this.payload = payload;
19
+ this.context = context;
20
+ }
21
+
22
+ context: never;
23
+
24
+ @ValidateNestedType(() => CloudSessionTimeoutEventTaskEventPayload)
25
+ payload: CloudSessionTimeoutEventTaskEventPayload;
26
+ }
@@ -29,3 +29,4 @@ export * from "./terminate-cloud-resource-request.event";
29
29
  export * from "./terminate-cloud-resource-failed.event";
30
30
  export * from "./terminate-pool-item-request.event";
31
31
  export * from "./terminate-cloud-session-request.event";
32
+ export * from "./cloud-session-timeout-task.event";
@@ -11,6 +11,9 @@ export class SchedulingData {
11
11
 
12
12
  @IsNumber()
13
13
  retries?: number; // number of retries in case of failure. default 3
14
+
15
+ @IsNumber()
16
+ delay?: number; // delay before the first execution in milliseconds
14
17
  }
15
18
 
16
19
  export enum JobType {