@ludeo/cloud-common 1.0.15 → 1.0.16

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.
@@ -1,5 +1,6 @@
1
+ import { CloudProvider } from "../types";
1
2
  export declare class CreateCloudResourceRequestContext {
2
3
  poolId: string;
3
4
  resourceId: string;
4
- cloudProvider: string;
5
+ cloudProvider: CloudProvider;
5
6
  }
@@ -1 +1 @@
1
- {"version":3,"file":"create-cloud-resource-request-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/create-cloud-resource-request-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,oCAAyC;AAEzC,MAAa,iCAAiC;CAS7C;AATD,8EASC;AAPC;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,wBAAM,GAAE;;qEACU;AAGnB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;wEACA"}
1
+ {"version":3,"file":"create-cloud-resource-request-context.js","sourceRoot":"","sources":["../../../src/v2/contexts/create-cloud-resource-request-context.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AACjD,oCAAyC;AAEzC,MAAa,iCAAiC;CAS7C;AATD,8EASC;AAPC;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,wBAAM,GAAE;;qEACU;AAGnB;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;wEACO"}
@@ -34,7 +34,7 @@ export declare class AWSCreationResponse {
34
34
  }
35
35
  export type CreationResponse = AWSCreationResponse;
36
36
  export declare class AllocationRequestData {
37
- authToken: string;
38
- appToken: string;
37
+ authToken?: string;
38
+ appToken?: string;
39
39
  cloudProviderRequest: CloudProviderRequest;
40
40
  }
@@ -75,15 +75,18 @@ class AllocationRequestData {
75
75
  }
76
76
  exports.AllocationRequestData = AllocationRequestData;
77
77
  __decorate([
78
- (0, class_validator_1.IsString)(),
78
+ (0, class_validator_1.IsUUID)(),
79
+ (0, class_validator_1.IsOptional)(),
79
80
  __metadata("design:type", String)
80
81
  ], AllocationRequestData.prototype, "authToken", void 0);
81
82
  __decorate([
82
- (0, class_validator_1.IsString)(),
83
+ (0, class_validator_1.IsOptional)(),
84
+ (0, class_validator_1.IsUUID)(),
83
85
  __metadata("design:type", String)
84
86
  ], AllocationRequestData.prototype, "appToken", void 0);
85
87
  __decorate([
86
88
  (0, decorators_1.ValidateNestedType)(() => AWSRequestData),
89
+ (0, class_validator_1.IsDefined)(),
87
90
  __metadata("design:type", Object)
88
91
  ], AllocationRequestData.prototype, "cloudProviderRequest", void 0);
89
92
  //# sourceMappingURL=cloud.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud.js","sourceRoot":"","sources":["../../../src/v2/types/cloud.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8DAAmD;AACnD,qDAA2E;AAC3E,iDAAsD;AAEtD,MAAa,cAAc;CAI1B;AAJD,wCAIC;AADC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACS;AAKxB,IAAY,aAEX;AAFD,WAAY,aAAa;IACvB,4BAAW,CAAA;AACb,CAAC,EAFW,aAAa,6BAAb,aAAa,QAExB;AAED,MAAa,mBAAmB;CAQ/B;AARD,kDAQC;AAID,MAAa,iBAAiB;CAS7B;AATD,8CASC;AAPC;IADC,IAAA,0BAAQ,GAAE;;wDACW;AAGtB;IADC,IAAA,0BAAQ,GAAE;;0DACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;yDACY;AAKzB,MAAa,2BAA2B;CAUvC;AAVD,kEAUC;AARC;IADC,IAAA,0BAAQ,GAAE;;oEACa;AAGxB;IADC,IAAA,0BAAQ,GAAE;;kEACW;AAItB;IAFC,IAAA,wBAAM,EAAC,aAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;kEACiB;AAKhC,MAAa,mBAAmB;CAO/B;AAPD,kDAOC;AALC;IADC,IAAA,4BAAU,GAAE;;2DAC4B;AAIzC;IAF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,4BAAU,GAAE;IACZ,IAAA,wBAAM,GAAE;;uDACS;AAIlB;IAFC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,cAAc,CAAC;IACxC,IAAA,2BAAS,GAAE;;mEAC+B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ludeo/cloud-common",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "Yahil Didi",
@@ -9,5 +9,5 @@ export class CreateCloudResourceRequestContext {
9
9
  resourceId: string;
10
10
 
11
11
  @IsEnum(CloudProvider)
12
- cloudProvider: string;
12
+ cloudProvider: CloudProvider;
13
13
  }
@@ -1,5 +1,12 @@
1
1
  import { GameCast } from "@ludeo/aws-gamecast-sdk";
2
- import { IsEnum, IsNotEmpty, IsOptional, IsString } from "class-validator";
2
+ import {
3
+ IsDefined,
4
+ IsEnum,
5
+ IsNotEmpty,
6
+ IsOptional,
7
+ IsString,
8
+ IsUUID,
9
+ } from "class-validator";
3
10
  import { ValidateNestedType } from "../../decorators";
4
11
 
5
12
  export class AWSRequestData {
@@ -65,12 +72,15 @@ export class AWSCreationResponse {
65
72
  export type CreationResponse = AWSCreationResponse;
66
73
 
67
74
  export class AllocationRequestData {
68
- @IsString()
69
- authToken: string;
75
+ @IsUUID()
76
+ @IsOptional()
77
+ authToken?: string;
70
78
 
71
- @IsString()
72
- appToken: string;
79
+ @IsOptional()
80
+ @IsUUID()
81
+ appToken?: string;
73
82
 
74
83
  @ValidateNestedType(() => AWSRequestData)
84
+ @IsDefined()
75
85
  cloudProviderRequest: CloudProviderRequest;
76
86
  }
@@ -1,9 +0,0 @@
1
- import { CloudPoolConfiguration, CloudPoolStatus, CloudResourcesMap } from "../types";
2
- export declare class CloudPool {
3
- id: string;
4
- status: CloudPoolStatus;
5
- createdAt: number;
6
- updatedAt?: number;
7
- config: CloudPoolConfiguration;
8
- resources?: CloudResourcesMap;
9
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CloudPool = void 0;
4
- class CloudPool {
5
- }
6
- exports.CloudPool = CloudPool;
7
- //# sourceMappingURL=cloud-pool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cloud-pool.js","sourceRoot":"","sources":["../../../src/v2/models/cloud-pool.ts"],"names":[],"mappings":";;;AAMA,MAAa,SAAS;CAOrB;AAPD,8BAOC"}
@@ -1 +0,0 @@
1
- export * from "./cloud-pool";
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./cloud-pool"), exports);
18
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v2/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B"}