@ludeo/cloud-common 1.2.57 → 1.2.58
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/dist/decorators/is-uuid-or-empty.decorator.d.ts +2 -0
- package/dist/decorators/is-uuid-or-empty.decorator.js +26 -0
- package/dist/decorators/is-uuid-or-empty.decorator.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/v4/events/allocate-game-request.js +2 -1
- package/dist/v4/events/allocate-game-request.js.map +1 -1
- package/dist/v4/events/game-allocated-response.js +2 -1
- package/dist/v4/events/game-allocated-response.js.map +1 -1
- package/dist/v4/events/load-ludeo-resource.js +2 -1
- package/dist/v4/events/load-ludeo-resource.js.map +1 -1
- package/dist/v4/events/ludeo-resource-loaded.js +2 -1
- package/dist/v4/events/ludeo-resource-loaded.js.map +1 -1
- package/dist/v4/events/pool-status.js +2 -1
- package/dist/v4/events/pool-status.js.map +1 -1
- package/dist/v4/events/swap-to-default-user-completed.js +2 -1
- package/dist/v4/events/swap-to-default-user-completed.js.map +1 -1
- package/dist/v4/events/swap-to-default-user.js +2 -1
- package/dist/v4/events/swap-to-default-user.js.map +1 -1
- package/dist/v4/types/pools/configuration/ludeo.js +2 -1
- package/dist/v4/types/pools/configuration/ludeo.js.map +1 -1
- package/dist/v4/types/pools/resource/ludeo.js +2 -1
- package/dist/v4/types/pools/resource/ludeo.js.map +1 -1
- package/package.json +1 -1
- package/src/decorators/is-uuid-or-empty.decorator.ts +31 -0
- package/src/v4/events/allocate-game-request.ts +2 -1
- package/src/v4/events/game-allocated-response.ts +2 -1
- package/src/v4/events/load-ludeo-resource.ts +2 -1
- package/src/v4/events/ludeo-resource-loaded.ts +2 -1
- package/src/v4/events/pool-status.ts +2 -1
- package/src/v4/events/swap-to-default-user-completed.ts +2 -1
- package/src/v4/events/swap-to-default-user.ts +2 -1
- package/src/v4/types/pools/configuration/ludeo.ts +2 -1
- package/src/v4/types/pools/resource/ludeo.ts +3 -2
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const contexts_1 = require("../contexts");
|
|
15
15
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
16
16
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
|
+
const is_uuid_or_empty_decorator_1 = require("../../decorators/is-uuid-or-empty.decorator");
|
|
17
18
|
class AllocateGameRequestPayload {
|
|
18
19
|
}
|
|
19
20
|
exports.AllocateGameRequestPayload = AllocateGameRequestPayload;
|
|
@@ -31,7 +32,7 @@ __decorate([
|
|
|
31
32
|
], AllocateGameRequestPayload.prototype, "ludeoPoolId", void 0);
|
|
32
33
|
__decorate([
|
|
33
34
|
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
(0,
|
|
35
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
35
36
|
__metadata("design:type", String)
|
|
36
37
|
], AllocateGameRequestPayload.prototype, "ludeoId", void 0);
|
|
37
38
|
class AllocateGameRequest extends ludeo_event_1.LudeoEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"allocate-game-request.js","sourceRoot":"","sources":["../../../src/v4/events/allocate-game-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AAErD,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;
|
|
1
|
+
{"version":3,"file":"allocate-game-request.js","sourceRoot":"","sources":["../../../src/v4/events/allocate-game-request.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AAErD,0CAAmD;AACnD,yDAAqD;AACrD,oGAAqF;AACrF,4FAA4E;AAE5E,MAAa,0BAA0B;CAatC;AAbD,gEAaC;AAXC;IADC,IAAA,wBAAM,GAAE;;mEACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;8DACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;+DACW;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;2DACC;AAGnB,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YACE,OAAmC,EACnC,OAA6B;QAE7B,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kDAiBC;AAhBiB,8BAAU,GAAG,+CAA+C,CAAC;AAY7E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;oDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BAC5C,0BAA0B;oDAAC"}
|
|
@@ -15,6 +15,7 @@ const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
|
15
15
|
const types_1 = require("../types");
|
|
16
16
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
17
|
const class_validator_1 = require("class-validator");
|
|
18
|
+
const is_uuid_or_empty_decorator_1 = require("../../decorators/is-uuid-or-empty.decorator");
|
|
18
19
|
class GameAllocatedResponsePayload {
|
|
19
20
|
}
|
|
20
21
|
exports.GameAllocatedResponsePayload = GameAllocatedResponsePayload;
|
|
@@ -36,7 +37,7 @@ __decorate([
|
|
|
36
37
|
], GameAllocatedResponsePayload.prototype, "ludeoPoolId", void 0);
|
|
37
38
|
__decorate([
|
|
38
39
|
(0, class_validator_1.IsOptional)(),
|
|
39
|
-
(0,
|
|
40
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
40
41
|
__metadata("design:type", String)
|
|
41
42
|
], GameAllocatedResponsePayload.prototype, "ludeoId", void 0);
|
|
42
43
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"game-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/game-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAmD;AACnD,yDAAqD;AACrD,oCAKkB;AAClB,oGAAqF;AACrF,qDAA6D;
|
|
1
|
+
{"version":3,"file":"game-allocated-response.js","sourceRoot":"","sources":["../../../src/v4/events/game-allocated-response.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0CAAmD;AACnD,yDAAqD;AACrD,oCAKkB;AAClB,oGAAqF;AACrF,qDAA6D;AAC7D,4FAA4E;AAE5E,MAAa,4BAA4B;CA4BxC;AA5BD,oEA4BC;AA1BC;IADC,IAAA,wBAAM,GAAE;;oEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;gEACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;qEACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;iEACW;AAIpB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;6DACC;AAGjB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;sEACN;AAGxC;IADC,IAAA,wBAAM,GAAE;;4DACM;AAGf;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAAoB,CAAC;8BACzB,4BAAoB;0EAAC;AAG3C;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;mEACO;AAG/B,MAAa,qBAAsB,SAAQ,wBAAU;IAGnD,YACE,OAAqC,EACrC,OAA6B;QAE7B,KAAK,CAAC,qBAAqB,CAAC,UAAU,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,sDAiBC;AAhBiB,gCAAU,GAAG,qCAAqC,CAAC;AAYnE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;sDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAA4B,CAAC;8BAC9C,4BAA4B;sDAAC"}
|
|
@@ -15,6 +15,7 @@ const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
16
|
const contexts_1 = require("../contexts");
|
|
17
17
|
const types_1 = require("../types");
|
|
18
|
+
const is_uuid_or_empty_decorator_1 = require("../../decorators/is-uuid-or-empty.decorator");
|
|
18
19
|
class LoadLudeoResourcePayload {
|
|
19
20
|
}
|
|
20
21
|
exports.LoadLudeoResourcePayload = LoadLudeoResourcePayload;
|
|
@@ -40,7 +41,7 @@ __decorate([
|
|
|
40
41
|
], LoadLudeoResourcePayload.prototype, "gameId", void 0);
|
|
41
42
|
__decorate([
|
|
42
43
|
(0, class_validator_1.IsOptional)(),
|
|
43
|
-
(0,
|
|
44
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
44
45
|
__metadata("design:type", String)
|
|
45
46
|
], LoadLudeoResourcePayload.prototype, "ludeoId", void 0);
|
|
46
47
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-ludeo-resource.js","sourceRoot":"","sources":["../../../src/v4/events/load-ludeo-resource.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;AACnD,oCAKkB;
|
|
1
|
+
{"version":3,"file":"load-ludeo-resource.js","sourceRoot":"","sources":["../../../src/v4/events/load-ludeo-resource.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuE;AACvE,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;AACnD,oCAKkB;AAClB,4FAA4E;AAE5E,MAAa,wBAAwB;CA+BpC;AA/BD,4DA+BC;AA7BC;IADC,IAAA,wBAAM,GAAE;;gEACc;AAGvB;IADC,IAAA,wBAAM,GAAE;;4DACU;AAGnB;IADC,IAAA,wBAAM,GAAE;;iEACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;wDACM;AAGf;IADC,IAAA,wBAAM,GAAE;;wDACM;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;yDACC;AAGjB;IADC,IAAA,wBAAM,GAAE;;6DACW;AAGpB;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,4BAAoB,CAAC;8BACzB,4BAAoB;sEAAC;AAG3C;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,2BAAmB,CAAC;;kEACN;AAGxC;IADC,IAAA,wBAAM,EAAC,qBAAa,CAAC;;+DACO;AAG/B,MAAa,iBAAkB,SAAQ,wBAAU;IAG/C,YACE,OAAiC,EACjC,OAA6B;QAE7B,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,8CAiBC;AAhBiB,4BAAU,GAAG,iCAAiC,CAAC;AAY/D;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;kDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;8BAC1C,wBAAwB;kDAAC"}
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
16
|
const contexts_1 = require("../contexts");
|
|
17
|
+
const is_uuid_or_empty_decorator_1 = require("../../decorators/is-uuid-or-empty.decorator");
|
|
17
18
|
class LudeoResourceLoadedPayload {
|
|
18
19
|
}
|
|
19
20
|
exports.LudeoResourceLoadedPayload = LudeoResourceLoadedPayload;
|
|
@@ -23,7 +24,7 @@ __decorate([
|
|
|
23
24
|
], LudeoResourceLoadedPayload.prototype, "ludeoResourceId", void 0);
|
|
24
25
|
__decorate([
|
|
25
26
|
(0, class_validator_1.IsOptional)(),
|
|
26
|
-
(0,
|
|
27
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
27
28
|
__metadata("design:type", String)
|
|
28
29
|
], LudeoResourceLoadedPayload.prototype, "gameplayId", void 0);
|
|
29
30
|
class LudeoResourceLoaded extends ludeo_event_1.LudeoEvent {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ludeo-resource-loaded.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-resource-loaded.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AACrD,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;
|
|
1
|
+
{"version":3,"file":"ludeo-resource-loaded.js","sourceRoot":"","sources":["../../../src/v4/events/ludeo-resource-loaded.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AACrD,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;AACnD,4FAA4E;AAE5E,MAAa,0BAA0B;CAOtC;AAPD,gEAOC;AALC;IADC,IAAA,wBAAM,GAAE;;mEACe;AAIxB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;8DACI;AAGtB,MAAa,mBAAoB,SAAQ,wBAAU;IAGjD,YACE,OAAmC,EACnC,OAA6B;QAE7B,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,kDAiBC;AAhBiB,8BAAU,GAAG,uCAAuC,CAAC;AAYrE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;oDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAA0B,CAAC;8BAC5C,0BAA0B;oDAAC"}
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
15
|
const types_1 = require("../types");
|
|
16
16
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
17
|
+
const is_uuid_or_empty_decorator_1 = require("../../decorators/is-uuid-or-empty.decorator");
|
|
17
18
|
class PoolStatusEventBasePool {
|
|
18
19
|
}
|
|
19
20
|
exports.PoolStatusEventBasePool = PoolStatusEventBasePool;
|
|
@@ -34,7 +35,7 @@ __decorate([
|
|
|
34
35
|
], PoolStatusEventLudeoPool.prototype, "gamePoolId", void 0);
|
|
35
36
|
__decorate([
|
|
36
37
|
(0, class_validator_1.IsOptional)(),
|
|
37
|
-
(0,
|
|
38
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
38
39
|
__metadata("design:type", String)
|
|
39
40
|
], PoolStatusEventLudeoPool.prototype, "ludeoId", void 0);
|
|
40
41
|
class PoolStatusEventGamePool extends PoolStatusEventBasePool {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v4/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AAErD,yDAAqD;AACrD,oCAKkB;AAClB,oGAAqF;
|
|
1
|
+
{"version":3,"file":"pool-status.js","sourceRoot":"","sources":["../../../src/v4/events/pool-status.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqD;AAErD,yDAAqD;AACrD,oCAKkB;AAClB,oGAAqF;AAErF,4FAA4E;AAE5E,MAAa,uBAAuB;CAUnC;AAVD,0DAUC;AANC;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,0BAAkB,CAAC;;2DAC/B;AAKd;IADC,IAAA,wBAAM,GAAE;;uDACM;AAGjB,MAAa,wBAAyB,SAAQ,uBAA4C;CAOzF;AAPD,4DAOC;AALC;IADC,IAAA,wBAAM,GAAE;;4DACU;AAInB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;yDACC;AAGnB,MAAa,uBAAwB,SAAQ,uBAA2C;CAKvF;AALD,0DAKC;AAHC;IADC,IAAA,wBAAM,GAAE;;8DACa;AAKxB,MAAa,0BAA2B,SAAQ,uBAA8C;CAE7F;AAFD,gEAEC;AAED,MAAa,sBAAsB;CAKlC;AALD,wDAKC;AADC;IADC,IAAA,wBAAM,GAAE;;yDACS;AAGpB,MAAa,eAAgB,SAAQ,wBAAU;IAG7C,YAAY,OAA+B;QACzC,KAAK,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AANH,0CAUC;AATiB,0BAAU,GAAG,yBAAyB,CAAC;AAQvD;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,sBAAsB,CAAC;8BACxC,sBAAsB;gDAAC"}
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
16
|
const contexts_1 = require("../contexts");
|
|
17
|
+
const is_uuid_or_empty_decorator_1 = require("../../decorators/is-uuid-or-empty.decorator");
|
|
17
18
|
class SwapToDefaultUserCompletedPayload {
|
|
18
19
|
}
|
|
19
20
|
exports.SwapToDefaultUserCompletedPayload = SwapToDefaultUserCompletedPayload;
|
|
@@ -27,7 +28,7 @@ __decorate([
|
|
|
27
28
|
], SwapToDefaultUserCompletedPayload.prototype, "connectionId", void 0);
|
|
28
29
|
__decorate([
|
|
29
30
|
(0, class_validator_1.IsOptional)(),
|
|
30
|
-
(0,
|
|
31
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
31
32
|
__metadata("design:type", String)
|
|
32
33
|
], SwapToDefaultUserCompletedPayload.prototype, "ludeoId", void 0);
|
|
33
34
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap-to-default-user-completed.js","sourceRoot":"","sources":["../../../src/v4/events/swap-to-default-user-completed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;
|
|
1
|
+
{"version":3,"file":"swap-to-default-user-completed.js","sourceRoot":"","sources":["../../../src/v4/events/swap-to-default-user-completed.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;AACnD,4FAA4E;AAE5E,MAAa,iCAAiC;CAmB7C;AAnBD,8EAmBC;AAjBC;IADC,IAAA,wBAAM,GAAE;;0EACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;uEACY;AAIrB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;kEACC;AAGjB;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,wBAAM,GAAE;;iEACM;AAGf;IADC,IAAA,0BAAQ,GAAE;;wEACW;AAGxB,MAAa,0BAA2B,SAAQ,wBAAU;IAGxD,YACE,OAA0C,EAC1C,OAA6B;QAE7B,KAAK,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,gEAiBC;AAhBiB,qCAAU,GAAG,+CAA+C,CAAC;AAY7E;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;2DAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,iCAAiC,CAAC;8BACnD,iCAAiC;2DAAC"}
|
|
@@ -14,6 +14,7 @@ const class_validator_1 = require("class-validator");
|
|
|
14
14
|
const ludeo_event_1 = require("../../infra/ludeo-event");
|
|
15
15
|
const validate_nested_type_decorator_1 = require("../../decorators/validate-nested-type.decorator");
|
|
16
16
|
const contexts_1 = require("../contexts");
|
|
17
|
+
const is_uuid_or_empty_decorator_1 = require("../../decorators/is-uuid-or-empty.decorator");
|
|
17
18
|
class SwapToDefaultUserPayload {
|
|
18
19
|
}
|
|
19
20
|
exports.SwapToDefaultUserPayload = SwapToDefaultUserPayload;
|
|
@@ -31,7 +32,7 @@ __decorate([
|
|
|
31
32
|
], SwapToDefaultUserPayload.prototype, "gameId", void 0);
|
|
32
33
|
__decorate([
|
|
33
34
|
(0, class_validator_1.IsOptional)(),
|
|
34
|
-
(0,
|
|
35
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
35
36
|
__metadata("design:type", String)
|
|
36
37
|
], SwapToDefaultUserPayload.prototype, "ludeoId", void 0);
|
|
37
38
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap-to-default-user.js","sourceRoot":"","sources":["../../../src/v4/events/swap-to-default-user.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;
|
|
1
|
+
{"version":3,"file":"swap-to-default-user.js","sourceRoot":"","sources":["../../../src/v4/events/swap-to-default-user.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA+D;AAC/D,yDAAqD;AACrD,oGAAqF;AACrF,0CAAmD;AACnD,4FAA4E;AAE5E,MAAa,wBAAwB;CAmBpC;AAnBD,4DAmBC;AAjBC;IADC,IAAA,wBAAM,GAAE;;iEACe;AAGxB;IADC,IAAA,wBAAM,GAAE;;8DACY;AAGrB;IADC,IAAA,wBAAM,GAAE;;wDACM;AAIf;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;yDACC;AAGjB;IADC,IAAA,wBAAM,GAAE;;wDACM;AAGf;IADC,IAAA,0BAAQ,GAAE;;yEACqB;AAGlC,MAAa,iBAAkB,SAAQ,wBAAU;IAG/C,YACE,OAAiC,EACjC,OAA6B;QAE7B,KAAK,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;QACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;;AAVH,8CAiBC;AAhBiB,4BAAU,GAAG,sCAAsC,CAAC;AAYpE;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,+BAAoB,CAAC;8BACtC,+BAAoB;kDAAC;AAG9B;IADC,IAAA,mDAAkB,EAAC,GAAG,EAAE,CAAC,wBAAwB,CAAC;8BAC1C,wBAAwB;kDAAC"}
|
|
@@ -15,6 +15,7 @@ const type_1 = require("../type");
|
|
|
15
15
|
const attributes_1 = require("./attributes");
|
|
16
16
|
const base_1 = require("./base");
|
|
17
17
|
const decorators_1 = require("../../../../decorators");
|
|
18
|
+
const is_uuid_or_empty_decorator_1 = require("../../../../decorators/is-uuid-or-empty.decorator");
|
|
18
19
|
class LudeoPoolConfiguration extends base_1.BaseCloudPoolConfiguration {
|
|
19
20
|
}
|
|
20
21
|
exports.LudeoPoolConfiguration = LudeoPoolConfiguration;
|
|
@@ -24,7 +25,7 @@ __decorate([
|
|
|
24
25
|
], LudeoPoolConfiguration.prototype, "type", void 0);
|
|
25
26
|
__decorate([
|
|
26
27
|
(0, class_validator_1.IsOptional)(),
|
|
27
|
-
(0,
|
|
28
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
28
29
|
__metadata("design:type", String)
|
|
29
30
|
], LudeoPoolConfiguration.prototype, "ludeoId", void 0);
|
|
30
31
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ludeo.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/ludeo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6D;AAE7D,kCAAwC;AACxC,6CAAmD;AACnD,iCAAoD;AACpD,uDAA4D;
|
|
1
|
+
{"version":3,"file":"ludeo.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/configuration/ludeo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6D;AAE7D,kCAAwC;AACxC,6CAAmD;AACnD,iCAAoD;AACpD,uDAA4D;AAC5D,kGAAkF;AAElF,MAAa,sBAAuB,SAAQ,iCAA0B;CAarE;AAbD,wDAaC;AAXC;IADC,IAAA,wBAAM,EAAC,oBAAa,CAAC;;oDACI;AAI1B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;uDACC;AAGjB;IADC,IAAA,wBAAM,GAAE;;0DACU;AAGnB;IADC,IAAA,+BAAkB,EAAC,GAAG,EAAE,CAAC,gCAAmB,CAAC;8BAClC,gCAAmB;0DAAC"}
|
|
@@ -12,12 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.LudeoCloudResource = exports.LudeoResourceSettings = void 0;
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const base_1 = require("./base");
|
|
15
|
+
const is_uuid_or_empty_decorator_1 = require("../../../../decorators/is-uuid-or-empty.decorator");
|
|
15
16
|
class LudeoResourceSettings {
|
|
16
17
|
}
|
|
17
18
|
exports.LudeoResourceSettings = LudeoResourceSettings;
|
|
18
19
|
__decorate([
|
|
19
20
|
(0, class_validator_1.IsOptional)(),
|
|
20
|
-
(0,
|
|
21
|
+
(0, is_uuid_or_empty_decorator_1.IsUUIDOrEmpty)(),
|
|
21
22
|
__metadata("design:type", String)
|
|
22
23
|
], LudeoResourceSettings.prototype, "gameplayId", void 0);
|
|
23
24
|
class LudeoCloudResource extends base_1.BaseCloudResource {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ludeo.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/resource/ludeo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ludeo.js","sourceRoot":"","sources":["../../../../../src/v4/types/pools/resource/ludeo.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiE;AAEjE,iCAA2C;AAC3C,kGAAkF;AAElF,MAAa,qBAAqB;CAIjC;AAJD,sDAIC;AADC;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0CAAa,GAAE;;yDACI;AAGtB,MAAa,kBAAmB,SAAQ,wBAAiB;CAexD;AAfD,gDAeC;AAZC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;sDACO;AAGpB;IADC,IAAA,4BAAU,GAAE;8BACF,qBAAqB;oDAAC;AAIjC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;qDACM"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
registerDecorator,
|
|
3
|
+
ValidationOptions,
|
|
4
|
+
ValidationArguments,
|
|
5
|
+
isUUID,
|
|
6
|
+
} from "class-validator";
|
|
7
|
+
|
|
8
|
+
export function IsUUIDOrEmpty(validationOptions?: ValidationOptions) {
|
|
9
|
+
return function (object: Object, propertyName: string) {
|
|
10
|
+
registerDecorator({
|
|
11
|
+
name: "isUUIDOrEmpty",
|
|
12
|
+
target: object.constructor,
|
|
13
|
+
propertyName: propertyName,
|
|
14
|
+
options: validationOptions,
|
|
15
|
+
validator: {
|
|
16
|
+
validate(value: any, _args: ValidationArguments) {
|
|
17
|
+
// Allow empty string
|
|
18
|
+
if (value === "") {
|
|
19
|
+
return true;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Delegate to `isUUID` from class-validator
|
|
23
|
+
return isUUID(value);
|
|
24
|
+
},
|
|
25
|
+
defaultMessage(_args: ValidationArguments) {
|
|
26
|
+
return "Field must be a valid UUID or an empty string";
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -3,6 +3,7 @@ import { IsOptional, IsUUID } from "class-validator";
|
|
|
3
3
|
import { CloudResourceContext } from "../contexts";
|
|
4
4
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
5
5
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
6
|
+
import { IsUUIDOrEmpty } from "../../decorators/is-uuid-or-empty.decorator";
|
|
6
7
|
|
|
7
8
|
export class AllocateGameRequestPayload {
|
|
8
9
|
@IsUUID()
|
|
@@ -15,7 +16,7 @@ export class AllocateGameRequestPayload {
|
|
|
15
16
|
ludeoPoolId: string;
|
|
16
17
|
|
|
17
18
|
@IsOptional()
|
|
18
|
-
@
|
|
19
|
+
@IsUUIDOrEmpty()
|
|
19
20
|
ludeoId?: string;
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from "../types";
|
|
9
9
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
10
10
|
import { IsEnum, IsUUID, IsOptional } from "class-validator";
|
|
11
|
+
import { IsUUIDOrEmpty } from "../../decorators/is-uuid-or-empty.decorator";
|
|
11
12
|
|
|
12
13
|
export class GameAllocatedResponsePayload {
|
|
13
14
|
@IsUUID()
|
|
@@ -23,7 +24,7 @@ export class GameAllocatedResponsePayload {
|
|
|
23
24
|
ludeoPoolId: string;
|
|
24
25
|
|
|
25
26
|
@IsOptional()
|
|
26
|
-
@
|
|
27
|
+
@IsUUIDOrEmpty()
|
|
27
28
|
ludeoId?: string;
|
|
28
29
|
|
|
29
30
|
@ValidateNestedType(() => AWSProviderSettings)
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
CloudProviderSettings,
|
|
9
9
|
GameResourceSettings,
|
|
10
10
|
} from "../types";
|
|
11
|
+
import { IsUUIDOrEmpty } from "../../decorators/is-uuid-or-empty.decorator";
|
|
11
12
|
|
|
12
13
|
export class LoadLudeoResourcePayload {
|
|
13
14
|
@IsUUID()
|
|
@@ -26,7 +27,7 @@ export class LoadLudeoResourcePayload {
|
|
|
26
27
|
gameId: string;
|
|
27
28
|
|
|
28
29
|
@IsOptional()
|
|
29
|
-
@
|
|
30
|
+
@IsUUIDOrEmpty()
|
|
30
31
|
ludeoId?: string;
|
|
31
32
|
|
|
32
33
|
@IsUUID()
|
|
@@ -2,13 +2,14 @@ import { IsOptional, IsUUID } from "class-validator";
|
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
3
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
4
|
import { CloudResourceContext } from "../contexts";
|
|
5
|
+
import { IsUUIDOrEmpty } from "../../decorators/is-uuid-or-empty.decorator";
|
|
5
6
|
|
|
6
7
|
export class LudeoResourceLoadedPayload {
|
|
7
8
|
@IsUUID()
|
|
8
9
|
ludeoResourceId: string;
|
|
9
10
|
|
|
10
11
|
@IsOptional()
|
|
11
|
-
@
|
|
12
|
+
@IsUUIDOrEmpty()
|
|
12
13
|
gameplayId?: string;
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from "../types";
|
|
10
10
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
11
11
|
import { GamePoolAttributes } from "../../v3/types";
|
|
12
|
+
import { IsUUIDOrEmpty } from "../../decorators/is-uuid-or-empty.decorator";
|
|
12
13
|
|
|
13
14
|
export class PoolStatusEventBasePool<
|
|
14
15
|
T extends BasePoolAttributes = BasePoolAttributes
|
|
@@ -27,7 +28,7 @@ export class PoolStatusEventLudeoPool extends PoolStatusEventBasePool<LudeoPoolA
|
|
|
27
28
|
gamePoolId: string;
|
|
28
29
|
|
|
29
30
|
@IsOptional()
|
|
30
|
-
@
|
|
31
|
+
@IsUUIDOrEmpty()
|
|
31
32
|
ludeoId?: string;
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -2,6 +2,7 @@ import { IsOptional, IsString, IsUUID } from "class-validator";
|
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
3
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
4
|
import { CloudResourceContext } from "../contexts";
|
|
5
|
+
import { IsUUIDOrEmpty } from "../../decorators/is-uuid-or-empty.decorator";
|
|
5
6
|
|
|
6
7
|
export class SwapToDefaultUserCompletedPayload {
|
|
7
8
|
@IsUUID()
|
|
@@ -11,7 +12,7 @@ export class SwapToDefaultUserCompletedPayload {
|
|
|
11
12
|
connectionId: string;
|
|
12
13
|
|
|
13
14
|
@IsOptional()
|
|
14
|
-
@
|
|
15
|
+
@IsUUIDOrEmpty()
|
|
15
16
|
ludeoId?: string;
|
|
16
17
|
|
|
17
18
|
@IsUUID()
|
|
@@ -2,6 +2,7 @@ import { IsOptional, IsString, IsUUID } from "class-validator";
|
|
|
2
2
|
import { LudeoEvent } from "../../infra/ludeo-event";
|
|
3
3
|
import { ValidateNestedType } from "../../decorators/validate-nested-type.decorator";
|
|
4
4
|
import { CloudResourceContext } from "../contexts";
|
|
5
|
+
import { IsUUIDOrEmpty } from "../../decorators/is-uuid-or-empty.decorator";
|
|
5
6
|
|
|
6
7
|
export class SwapToDefaultUserPayload {
|
|
7
8
|
@IsUUID()
|
|
@@ -14,7 +15,7 @@ export class SwapToDefaultUserPayload {
|
|
|
14
15
|
gameId: string;
|
|
15
16
|
|
|
16
17
|
@IsOptional()
|
|
17
|
-
@
|
|
18
|
+
@IsUUIDOrEmpty()
|
|
18
19
|
ludeoId?: string;
|
|
19
20
|
|
|
20
21
|
@IsUUID()
|
|
@@ -4,13 +4,14 @@ import { CloudPoolType } from "../type";
|
|
|
4
4
|
import { LudeoPoolAttributes } from "./attributes";
|
|
5
5
|
import { BaseCloudPoolConfiguration } from "./base";
|
|
6
6
|
import { ValidateNestedType } from "../../../../decorators";
|
|
7
|
+
import { IsUUIDOrEmpty } from "../../../../decorators/is-uuid-or-empty.decorator";
|
|
7
8
|
|
|
8
9
|
export class LudeoPoolConfiguration extends BaseCloudPoolConfiguration {
|
|
9
10
|
@IsEnum(CloudPoolType)
|
|
10
11
|
type: CloudPoolType.LUDEO;
|
|
11
12
|
|
|
12
13
|
@IsOptional()
|
|
13
|
-
@
|
|
14
|
+
@IsUUIDOrEmpty()
|
|
14
15
|
ludeoId?: string;
|
|
15
16
|
|
|
16
17
|
@IsUUID()
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { IsNumber, IsOptional, IsString
|
|
1
|
+
import { IsNumber, IsOptional, IsString } from "class-validator";
|
|
2
2
|
|
|
3
3
|
import { BaseCloudResource } from "./base";
|
|
4
|
+
import { IsUUIDOrEmpty } from "../../../../decorators/is-uuid-or-empty.decorator";
|
|
4
5
|
|
|
5
6
|
export class LudeoResourceSettings {
|
|
6
7
|
@IsOptional()
|
|
7
|
-
@
|
|
8
|
+
@IsUUIDOrEmpty()
|
|
8
9
|
gameplayId?: string;
|
|
9
10
|
}
|
|
10
11
|
|