@truelab/trueserver 0.0.6 → 0.1.1
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/CHANGELOG.md +34 -0
- package/MIGRATION.md +206 -1
- package/README.md +38 -16
- package/dist/helpers/config.helper.d.ts +8 -3
- package/dist/helpers/config.helper.d.ts.map +1 -1
- package/dist/helpers/config.helper.js +11 -8
- package/dist/helpers/config.helper.js.map +1 -1
- package/dist/helpers/errors.helper.d.ts +1 -0
- package/dist/helpers/errors.helper.d.ts.map +1 -1
- package/dist/helpers/errors.helper.js +1 -0
- package/dist/helpers/errors.helper.js.map +1 -1
- package/dist/helpers/money.helper.d.ts +13 -0
- package/dist/helpers/money.helper.d.ts.map +1 -0
- package/dist/helpers/money.helper.js +29 -0
- package/dist/helpers/money.helper.js.map +1 -0
- package/dist/helpers/pkg-version.helper.d.ts +1 -1
- package/dist/helpers/pkg-version.helper.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/plugins/sentry.plugin.d.ts.map +1 -1
- package/dist/plugins/sentry.plugin.js +0 -1
- package/dist/plugins/sentry.plugin.js.map +1 -1
- package/dist/plugins/swagger.plugin.js +1 -1
- package/dist/plugins/swagger.plugin.js.map +1 -1
- package/dist/routes/config/config.route.validate.plugin.d.ts.map +1 -1
- package/dist/routes/config/config.route.validate.plugin.js +15 -10
- package/dist/routes/config/config.route.validate.plugin.js.map +1 -1
- package/dist/routes/play/play.route.validate.plugin.d.ts +5 -4
- package/dist/routes/play/play.route.validate.plugin.d.ts.map +1 -1
- package/dist/routes/play/play.route.validate.plugin.js +21 -14
- package/dist/routes/play/play.route.validate.plugin.js.map +1 -1
- package/dist/routes/validate/validate.route.validate.plugin.d.ts.map +1 -1
- package/dist/routes/validate/validate.route.validate.plugin.js +2 -7
- package/dist/routes/validate/validate.route.validate.plugin.js.map +1 -1
- package/dist/schemas/config.schema.d.ts +3 -3
- package/dist/schemas/config.schema.js +8 -8
- package/dist/schemas/config.schema.js.map +1 -1
- package/dist/schemas/examples/config.schema.examples.d.ts.map +1 -1
- package/dist/schemas/examples/config.schema.examples.js +48 -12
- package/dist/schemas/examples/config.schema.examples.js.map +1 -1
- package/dist/schemas/examples/play.schema.examples.d.ts.map +1 -1
- package/dist/schemas/examples/play.schema.examples.js +41 -13
- package/dist/schemas/examples/play.schema.examples.js.map +1 -1
- package/dist/schemas/examples/validate.schema.examples.d.ts.map +1 -1
- package/dist/schemas/examples/validate.schema.examples.js +51 -39
- package/dist/schemas/examples/validate.schema.examples.js.map +1 -1
- package/dist/schemas/play.schema.d.ts +11 -11
- package/dist/schemas/play.schema.d.ts.map +1 -1
- package/dist/schemas/play.schema.js +22 -21
- package/dist/schemas/play.schema.js.map +1 -1
- package/dist/schemas/shared.d.ts +1 -1
- package/dist/schemas/shared.js +4 -4
- package/dist/schemas/shared.js.map +1 -1
- package/dist/schemas/validate.schema.d.ts +12 -7
- package/dist/schemas/validate.schema.d.ts.map +1 -1
- package/dist/schemas/validate.schema.js +17 -16
- package/dist/schemas/validate.schema.js.map +1 -1
- package/dist/test-utils.d.ts +1 -1
- package/dist/test-utils.js +1 -1
- package/package.json +7 -9
|
@@ -2,17 +2,27 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateReplyExamples = exports.validateRequestExamples = void 0;
|
|
4
4
|
const minimalRequest = {
|
|
5
|
-
|
|
5
|
+
isDemo: true,
|
|
6
6
|
currencyDecimals: 2,
|
|
7
7
|
stakes: [{
|
|
8
8
|
name: 'default', amount: 3,
|
|
9
9
|
}],
|
|
10
10
|
maxExposure: 100000,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
};
|
|
12
|
+
const withMetaRequest = {
|
|
13
|
+
isDemo: false,
|
|
14
|
+
currencyDecimals: 2,
|
|
15
|
+
stakes: [{
|
|
16
|
+
name: 'default', amount: 3,
|
|
17
|
+
}],
|
|
18
|
+
maxExposure: 100000,
|
|
19
|
+
meta: {
|
|
20
|
+
public: { someProgress: 15 },
|
|
21
|
+
private: { hiddenProperty: 'value' },
|
|
22
|
+
},
|
|
13
23
|
};
|
|
14
24
|
const maximalRequest = {
|
|
15
|
-
|
|
25
|
+
isDemo: true,
|
|
16
26
|
currencyDecimals: 2,
|
|
17
27
|
stakes: [{
|
|
18
28
|
name: 'slider',
|
|
@@ -32,67 +42,69 @@ const maximalRequest = {
|
|
|
32
42
|
}),
|
|
33
43
|
}],
|
|
34
44
|
maxExposure: 100000,
|
|
35
|
-
|
|
36
|
-
someProgress: 15,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
coinsTotal: 1480,
|
|
40
|
-
}),
|
|
41
|
-
};
|
|
42
|
-
const metaDataRequest = {
|
|
43
|
-
...minimalRequest,
|
|
44
|
-
metaPublic: JSON.stringify({
|
|
45
|
-
someProgress: 15,
|
|
46
|
-
}),
|
|
47
|
-
metaPrivate: JSON.stringify({
|
|
48
|
-
hiddenProperty: 'value',
|
|
49
|
-
}),
|
|
45
|
+
meta: {
|
|
46
|
+
public: { someProgress: 15 },
|
|
47
|
+
private: { coinsTotal: 1480 },
|
|
48
|
+
},
|
|
50
49
|
};
|
|
51
|
-
const
|
|
52
|
-
|
|
50
|
+
const variableLevelsRequest = {
|
|
51
|
+
isDemo: true,
|
|
52
|
+
currencyDecimals: 2,
|
|
53
53
|
stakes: [{
|
|
54
54
|
name: 'default', amount: 75, level: 2,
|
|
55
55
|
}],
|
|
56
|
+
maxExposure: 100000,
|
|
56
57
|
};
|
|
57
58
|
const multiStakeRequest = {
|
|
58
|
-
|
|
59
|
+
isDemo: false,
|
|
60
|
+
currencyDecimals: 2,
|
|
59
61
|
stakes: [{
|
|
60
|
-
name: '
|
|
62
|
+
name: 'straight',
|
|
61
63
|
amount: 10,
|
|
62
|
-
qty:
|
|
64
|
+
qty: 1,
|
|
65
|
+
params: '17',
|
|
63
66
|
}, {
|
|
64
|
-
name: '
|
|
65
|
-
amount:
|
|
66
|
-
qty: 35,
|
|
67
|
+
name: 'red',
|
|
68
|
+
amount: 20,
|
|
67
69
|
}],
|
|
70
|
+
maxExposure: 100000,
|
|
71
|
+
meta: {
|
|
72
|
+
public: { round: 3 },
|
|
73
|
+
private: { seed: '...' },
|
|
74
|
+
},
|
|
68
75
|
};
|
|
69
|
-
const
|
|
76
|
+
const validReply = { valid: true };
|
|
77
|
+
const invalidReply = { valid: false, reason: 'potential win exceeds maxExposure' };
|
|
70
78
|
exports.validateRequestExamples = {
|
|
71
79
|
minimal: {
|
|
72
80
|
summary: 'Minimal request',
|
|
73
81
|
value: minimalRequest,
|
|
74
82
|
},
|
|
83
|
+
withMeta: {
|
|
84
|
+
summary: 'With game meta',
|
|
85
|
+
value: withMetaRequest,
|
|
86
|
+
},
|
|
75
87
|
maximal: {
|
|
76
88
|
summary: 'Maximal request',
|
|
77
89
|
value: maximalRequest,
|
|
78
90
|
},
|
|
79
|
-
|
|
80
|
-
summary: '
|
|
81
|
-
value:
|
|
82
|
-
},
|
|
83
|
-
variabelLines: {
|
|
84
|
-
summary: 'Variable lines',
|
|
85
|
-
value: variabelLinesRequest,
|
|
91
|
+
variableLevels: {
|
|
92
|
+
summary: 'Variable levels',
|
|
93
|
+
value: variableLevelsRequest,
|
|
86
94
|
},
|
|
87
95
|
multiStake: {
|
|
88
|
-
summary: 'Multi stake',
|
|
96
|
+
summary: 'Multi stake (hasMultiStake=true)',
|
|
89
97
|
value: multiStakeRequest,
|
|
90
98
|
},
|
|
91
99
|
};
|
|
92
100
|
exports.validateReplyExamples = {
|
|
93
|
-
|
|
94
|
-
summary: '
|
|
95
|
-
value:
|
|
101
|
+
valid: {
|
|
102
|
+
summary: 'Stake set accepted',
|
|
103
|
+
value: validReply,
|
|
104
|
+
},
|
|
105
|
+
invalid: {
|
|
106
|
+
summary: 'Stake set rejected',
|
|
107
|
+
value: invalidReply,
|
|
96
108
|
},
|
|
97
109
|
};
|
|
98
110
|
//# sourceMappingURL=validate.schema.examples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/validate.schema.examples.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG;IACnB,
|
|
1
|
+
{"version":3,"file":"validate.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/validate.schema.examples.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE,IAAI;IACZ,gBAAgB,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;SAC7B,CAAC;IACF,WAAW,EAAE,MAAM;CACtB,CAAA;AAED,MAAM,eAAe,GAAG;IACpB,MAAM,EAAE,KAAK;IACb,gBAAgB,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;SAC7B,CAAC;IACF,WAAW,EAAE,MAAM;IACnB,IAAI,EAAE;QACF,MAAM,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;QAC5B,OAAO,EAAE,EAAE,cAAc,EAAE,OAAO,EAAE;KACvC;CACJ,CAAA;AAED,MAAM,cAAc,GAAG;IACnB,MAAM,EAAE,IAAI;IACZ,gBAAgB,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;gBACnB,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE;aACtB,CAAC;SACL,EAAE;YACC,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,CAAC;YACR,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC;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ACD,cAAc,EAAE;QACZ,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE,qBAAqB;KAC/B;IACD,UAAU,EAAE;QACR,OAAO,EAAE,kCAAkC;QAC3C,KAAK,EAAE,iBAAiB;KAC3B;CACJ,CAAA;AAEY,QAAA,qBAAqB,GAAc;IAC5C,KAAK,EAAE;QACH,OAAO,EAAE,oBAAoB;QAC7B,KAAK,EAAE,UAAU;KACpB;IACD,OAAO,EAAE;QACL,OAAO,EAAE,oBAAoB;QAC7B,KAAK,EAAE,YAAY;KACtB;CACJ,CAAA"}
|
|
@@ -11,7 +11,7 @@ export declare const PlayRequestSchema: Type.TObject<{
|
|
|
11
11
|
qty: Type.TOptional<Type.TInteger>;
|
|
12
12
|
params: Type.TOptional<Type.TString>;
|
|
13
13
|
}>>>;
|
|
14
|
-
choice: Type.TOptional<Type.
|
|
14
|
+
choice: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TString]>>;
|
|
15
15
|
meta: Type.TOptional<Type.TObject<{
|
|
16
16
|
public: Type.TAny;
|
|
17
17
|
private: Type.TAny;
|
|
@@ -23,16 +23,16 @@ export declare const PlayReplySchema: Type.TObject<{
|
|
|
23
23
|
rng: Type.TArray<Type.TObject<{
|
|
24
24
|
value: Type.TNumber;
|
|
25
25
|
}>>;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
26
|
+
winCoins: Type.TOptional<Type.TNumber>;
|
|
27
|
+
winCash: Type.TNumber;
|
|
28
|
+
finished: Type.TBoolean;
|
|
29
|
+
hasMaxWin: Type.TBoolean;
|
|
30
|
+
choices: Type.TOptional<Type.TArray<Type.TUnion<[Type.TNumber, Type.TString]>>>;
|
|
31
|
+
choice: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TString]>>;
|
|
32
|
+
meta: Type.TOptional<Type.TObject<{
|
|
33
|
+
public: Type.TAny;
|
|
34
|
+
private: Type.TAny;
|
|
35
|
+
}>>;
|
|
36
36
|
}>;
|
|
37
37
|
export type TPlayRequest = Static<typeof PlayRequestSchema>;
|
|
38
38
|
export type TPlayReply = Static<typeof PlayReplySchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play.schema.d.ts","sourceRoot":"","sources":["../../schemas/play.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAKtC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EA2B5B,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"play.schema.d.ts","sourceRoot":"","sources":["../../schemas/play.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAKtC,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EA2B5B,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAoC1B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -20,8 +20,8 @@ exports.PlayRequestSchema = typebox_1.Type.Object({
|
|
|
20
20
|
description: 'Sent only on the opening step. With hasMultiStake=true may contain more than one stake; otherwise exactly one. Each element must have a unique name',
|
|
21
21
|
minItems: 1,
|
|
22
22
|
})),
|
|
23
|
-
choice: typebox_1.Type.Optional(typebox_1.Type.
|
|
24
|
-
description: 'User choice. Absent on opening step; required on every continuation step (must be one of
|
|
23
|
+
choice: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Number(), typebox_1.Type.String()], {
|
|
24
|
+
description: 'User choice. Absent on opening step; required on every continuation step (must be one of choices from the previous step)',
|
|
25
25
|
})),
|
|
26
26
|
meta: typebox_1.Type.Optional(shared_1.MetaSchema),
|
|
27
27
|
test: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
@@ -43,26 +43,27 @@ exports.PlayReplySchema = typebox_1.Type.Object({
|
|
|
43
43
|
}, { additionalProperties: true }), {
|
|
44
44
|
description: 'RNG values used to generate gameResponse. Not forwarded to the client — kept by RGS for internal storage and validation only',
|
|
45
45
|
}),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
description: 'When true, the round is finished. Canonical end-of-round indicator',
|
|
56
|
-
}),
|
|
57
|
-
choices: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Integer(), {
|
|
58
|
-
description: 'Present only for hasChoice=true when the round must continue. Must be a non-empty array of integers; never null or []',
|
|
59
|
-
minItems: 1,
|
|
60
|
-
})),
|
|
61
|
-
meta: typebox_1.Type.Optional(shared_1.MetaSchema),
|
|
62
|
-
}, {
|
|
63
|
-
description: 'Step summary that RGS reads to drive its logic',
|
|
64
|
-
additionalProperties: false,
|
|
46
|
+
winCoins: typebox_1.Type.Optional(typebox_1.Type.Number({
|
|
47
|
+
description: 'Win for this step, in coin units',
|
|
48
|
+
})),
|
|
49
|
+
winCash: typebox_1.Type.Number({
|
|
50
|
+
description: 'Win to add to the round for this step, in currency units (0 if the step has no win)',
|
|
51
|
+
minimum: 0,
|
|
52
|
+
}),
|
|
53
|
+
finished: typebox_1.Type.Boolean({
|
|
54
|
+
description: 'When true, the round is finished. Canonical end-of-round indicator',
|
|
65
55
|
}),
|
|
56
|
+
hasMaxWin: typebox_1.Type.Boolean({
|
|
57
|
+
description: 'true if this round hit the game max-win cap (config.maxWin ×bet). For multi-step games the step that sets hasMaxWin=true MUST also set finished=true',
|
|
58
|
+
}),
|
|
59
|
+
choices: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Union([typebox_1.Type.Number(), typebox_1.Type.String()]), {
|
|
60
|
+
description: 'Present only for hasChoice=true when the round must continue. Non-empty array of choice ids (number or string); never null or []',
|
|
61
|
+
minItems: 1,
|
|
62
|
+
})),
|
|
63
|
+
choice: typebox_1.Type.Optional(typebox_1.Type.Union([typebox_1.Type.Number(), typebox_1.Type.String()], {
|
|
64
|
+
description: 'Mirrors the request choice — absent on the opening step; echoed back on every continuation step',
|
|
65
|
+
})),
|
|
66
|
+
meta: typebox_1.Type.Optional(shared_1.MetaSchema),
|
|
66
67
|
}, {
|
|
67
68
|
$id: 'PlayReply',
|
|
68
69
|
additionalProperties: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play.schema.js","sourceRoot":"","sources":["../../schemas/play.schema.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,0EAAwF;AACxF,qCAAkD;AAErC,QAAA,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC;QACjB,WAAW,EAAE,oEAAoE;KACpF,CAAC;IACF,gBAAgB,EAAE,cAAI,CAAC,OAAO,CAAC;QAC3B,WAAW,EAAE,6EAA6E;QAC1F,OAAO,EAAE,CAAC;KACb,CAAC;IACF,SAAS,EAAE,cAAI,CAAC,OAAO,CAAC;QACpB,WAAW,EAAE,6FAA6F;QAC1G,OAAO,EAAE,CAAC;KACb,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,oBAAW,EAAE;QAC1C,WAAW,EAAE,qJAAqJ;QAClK,QAAQ,EAAE,CAAC;KACd,CAAC,CAAC;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"play.schema.js","sourceRoot":"","sources":["../../schemas/play.schema.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,0EAAwF;AACxF,qCAAkD;AAErC,QAAA,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oBAAoB,EAAE,IAAI,EAAE,CAAC,EAAE;QAChC,WAAW,EAAE,8HAA8H;KAC9I,CAAC;IACF,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC;QAChC,WAAW,EAAE,kCAAkC;KAClD,CAAC,CAAC;IACH,OAAO,EAAE,cAAI,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,qFAAqF;QAClG,OAAO,EAAE,CAAC;KACb,CAAC;IACF,QAAQ,EAAE,cAAI,CAAC,OAAO,CAAC;QACnB,WAAW,EAAE,oEAAoE;KACpF,CAAC;IACF,SAAS,EAAE,cAAI,CAAC,OAAO,CAAC;QACpB,WAAW,EAAE,sJAAsJ;KACtK,CAAC;IACF,OAAO,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,KAAK,CAAC,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE;QAC1E,WAAW,EAAE,kIAAkI;QAC/I,QAAQ,EAAE,CAAC;KACd,CAAC,CAAC;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC,EAAE;QAC7D,WAAW,EAAE,iGAAiG;KACjH,CAAC,CAAC;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,mBAAU,CAAC;CAClC,EAAE;IACC,GAAG,EAAE,WAAW;IAChB,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,wCAAiB;CAClC,CAAC,CAAA"}
|
package/dist/schemas/shared.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare const StakeModeSchema: Type.TObject<{
|
|
|
30
30
|
bets: Type.TNumber;
|
|
31
31
|
multiple: Type.TOptional<Type.TBoolean>;
|
|
32
32
|
maxQty: Type.TOptional<Type.TInteger>;
|
|
33
|
-
parametric: Type.TBoolean
|
|
33
|
+
parametric: Type.TOptional<Type.TBoolean>;
|
|
34
34
|
}>;
|
|
35
35
|
export declare const MetaSchema: Type.TObject<{
|
|
36
36
|
public: Type.TAny;
|
package/dist/schemas/shared.js
CHANGED
|
@@ -28,7 +28,7 @@ exports.StakeSchema = typebox_1.Type.Object({
|
|
|
28
28
|
exclusiveMinimum: 0,
|
|
29
29
|
})),
|
|
30
30
|
level: typebox_1.Type.Optional(typebox_1.Type.Integer({
|
|
31
|
-
description: 'Chosen
|
|
31
|
+
description: 'Chosen bet level. Required when hasVariableLevels=true; must be one of variableLevels',
|
|
32
32
|
minimum: 0,
|
|
33
33
|
})),
|
|
34
34
|
qty: typebox_1.Type.Optional(typebox_1.Type.Integer({
|
|
@@ -61,9 +61,9 @@ exports.StakeModeSchema = typebox_1.Type.Object({
|
|
|
61
61
|
description: 'Only when multiple=true: maximum allowed number of such stakes',
|
|
62
62
|
minimum: 1,
|
|
63
63
|
})),
|
|
64
|
-
parametric: typebox_1.Type.Boolean({
|
|
65
|
-
description: 'true if a stake of this mode carries an extra params payload that can affect the round',
|
|
66
|
-
}),
|
|
64
|
+
parametric: typebox_1.Type.Optional(typebox_1.Type.Boolean({
|
|
65
|
+
description: 'true if a stake of this mode carries an extra params payload that can affect the round. Absence is equivalent to false',
|
|
66
|
+
})),
|
|
67
67
|
}, {
|
|
68
68
|
$id: 'StakeMode',
|
|
69
69
|
description: 'Bet template the game advertises in /config → stakeModes',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../schemas/shared.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,sDAA8C;AAE9C,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,yBAAW,CAAA;IACX,mCAAqB,CAAA;AACzB,CAAC,EAJW,UAAU,0BAAV,UAAU,QAIrB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,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,CAAC,CAAA;AAEW,QAAA,kBAAkB,GAAG,cAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE;IAC9D,GAAG,EAAE,cAAc;IACnB,WAAW,EAAE,+DAA+D;IAC5E,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC;YACP,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,2CAA2C;SACvD,CAAC;CACL,CAAC,CAAA;AAEW,QAAA,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC,kBAAkB,EAAE;IAC7D,GAAG,EAAE,aAAa;IAClB,WAAW,EAAE,8BAA8B;IAC3C,oBAAoB,EAAE,KAAK;IAC3B,QAAQ,EAAE,CAAC;YACP,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,mBAAmB;SAC/B,CAAC;CACL,CAAC,CAAA"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import { Static, Type } from 'typebox';
|
|
2
2
|
export declare const ValidateRequestSchema: Type.TObject<{
|
|
3
|
-
|
|
4
|
-
currencyDecimals: Type.
|
|
5
|
-
stakes: Type.
|
|
3
|
+
isDemo: Type.TBoolean;
|
|
4
|
+
currencyDecimals: Type.TInteger;
|
|
5
|
+
stakes: Type.TArray<Type.TObject<{
|
|
6
6
|
name: Type.TString;
|
|
7
7
|
amount: Type.TNumber;
|
|
8
8
|
coinValue: Type.TOptional<Type.TNumber>;
|
|
9
9
|
level: Type.TOptional<Type.TInteger>;
|
|
10
10
|
qty: Type.TOptional<Type.TInteger>;
|
|
11
11
|
params: Type.TOptional<Type.TString>;
|
|
12
|
-
}
|
|
12
|
+
}>>;
|
|
13
13
|
maxExposure: Type.TNumber;
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
meta: Type.TOptional<Type.TObject<{
|
|
15
|
+
public: Type.TAny;
|
|
16
|
+
private: Type.TAny;
|
|
17
|
+
}>>;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const ValidateReplySchema: Type.TObject<{
|
|
20
|
+
valid: Type.TBoolean;
|
|
21
|
+
reason: Type.TOptional<Type.TString>;
|
|
16
22
|
}>;
|
|
17
|
-
export declare const ValidateReplySchema: Type.TObject<{}>;
|
|
18
23
|
export type TValidateRequest = Static<typeof ValidateRequestSchema>;
|
|
19
24
|
export type TValidateReply = Static<typeof ValidateReplySchema>;
|
|
20
25
|
//# sourceMappingURL=validate.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.schema.d.ts","sourceRoot":"","sources":["../../schemas/validate.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAKtC,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"validate.schema.d.ts","sourceRoot":"","sources":["../../schemas/validate.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAKtC,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;EAqBhC,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;EAW9B,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AACnE,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
|
|
@@ -5,35 +5,36 @@ const typebox_1 = require("typebox");
|
|
|
5
5
|
const validate_schema_examples_1 = require("./examples/validate.schema.examples");
|
|
6
6
|
const shared_1 = require("./shared");
|
|
7
7
|
exports.ValidateRequestSchema = typebox_1.Type.Object({
|
|
8
|
-
|
|
9
|
-
description: 'true
|
|
8
|
+
isDemo: typebox_1.Type.Boolean({
|
|
9
|
+
description: 'true for demo sessions',
|
|
10
10
|
}),
|
|
11
|
-
currencyDecimals: typebox_1.Type.
|
|
12
|
-
description: '
|
|
11
|
+
currencyDecimals: typebox_1.Type.Integer({
|
|
12
|
+
description: 'Decimal places of the currency',
|
|
13
13
|
minimum: 0,
|
|
14
|
-
})
|
|
15
|
-
stakes: typebox_1.Type.
|
|
16
|
-
description: '
|
|
14
|
+
}),
|
|
15
|
+
stakes: typebox_1.Type.Array(shared_1.StakeSchema, {
|
|
16
|
+
description: 'The stake set the round would open with — same shape as the opening /play stakes',
|
|
17
17
|
minItems: 1,
|
|
18
|
-
})
|
|
18
|
+
}),
|
|
19
19
|
maxExposure: typebox_1.Type.Number({
|
|
20
20
|
description: 'Maximum available winning amount in currency',
|
|
21
21
|
exclusiveMinimum: 0,
|
|
22
22
|
}),
|
|
23
|
-
|
|
24
|
-
description: 'Private part of meta data (json object transformed to string). Inner data for calculating average bet, double up payouts, etc.',
|
|
25
|
-
})),
|
|
26
|
-
metaPublic: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
27
|
-
description: 'Public part of meta data (json object transformed to string). Visual progress of cumulative features for client side or something like that',
|
|
28
|
-
})),
|
|
23
|
+
meta: typebox_1.Type.Optional(shared_1.MetaSchema),
|
|
29
24
|
}, {
|
|
30
25
|
$id: 'ValidateRequest',
|
|
31
26
|
additionalProperties: false,
|
|
32
27
|
'x-examples': validate_schema_examples_1.validateRequestExamples,
|
|
33
28
|
});
|
|
34
|
-
exports.ValidateReplySchema = typebox_1.Type.Object({
|
|
29
|
+
exports.ValidateReplySchema = typebox_1.Type.Object({
|
|
30
|
+
valid: typebox_1.Type.Boolean({
|
|
31
|
+
description: 'true if the stake set may open a round; false → RGS rejects it',
|
|
32
|
+
}),
|
|
33
|
+
reason: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
34
|
+
description: 'Human-readable rejection reason (for RGS logs; not shown to the player)',
|
|
35
|
+
})),
|
|
36
|
+
}, {
|
|
35
37
|
$id: 'ValidateReply',
|
|
36
|
-
description: 'Empty success body; non-2xx with error envelope on failure',
|
|
37
38
|
additionalProperties: false,
|
|
38
39
|
'x-examples': validate_schema_examples_1.validateReplyExamples,
|
|
39
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.schema.js","sourceRoot":"","sources":["../../schemas/validate.schema.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,kFAAoG;AACpG,
|
|
1
|
+
{"version":3,"file":"validate.schema.js","sourceRoot":"","sources":["../../schemas/validate.schema.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,kFAAoG;AACpG,qCAAkD;AAErC,QAAA,qBAAqB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC;QACjB,WAAW,EAAE,wBAAwB;KACxC,CAAC;IACF,gBAAgB,EAAE,cAAI,CAAC,OAAO,CAAC;QAC3B,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,CAAC;KACb,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,KAAK,CAAC,oBAAW,EAAE;QAC5B,WAAW,EAAE,kFAAkF;QAC/F,QAAQ,EAAE,CAAC;KACd,CAAC;IACF,WAAW,EAAE,cAAI,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,8CAA8C;QAC3D,gBAAgB,EAAE,CAAC;KACtB,CAAC;IACF,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,mBAAU,CAAC;CAClC,EAAE;IACC,GAAG,EAAE,iBAAiB;IACtB,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,kDAAuB;CACxC,CAAC,CAAA;AAEW,QAAA,mBAAmB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC3C,KAAK,EAAE,cAAI,CAAC,OAAO,CAAC;QAChB,WAAW,EAAE,gEAAgE;KAChF,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC;QAC9B,WAAW,EAAE,yEAAyE;KACzF,CAAC,CAAC;CACN,EAAE;IACC,GAAG,EAAE,eAAe;IACpB,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,gDAAqB;CACtC,CAAC,CAAA"}
|
package/dist/test-utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Test utilities for route/integration tests (`testBuild`, `validator`, etc.).
|
|
3
|
-
* Uses
|
|
3
|
+
* Uses a global `expect` — run under a test runner that provides one (e.g. Vitest or Jest) with globals enabled.
|
|
4
4
|
*/
|
|
5
5
|
export { checkSchemaPropertyDescriptions, testBuild, testHeaders, validator, } from './helpers/tests.helper';
|
|
6
6
|
//# sourceMappingURL=test-utils.d.ts.map
|
package/dist/test-utils.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validator = exports.testHeaders = exports.testBuild = exports.checkSchemaPropertyDescriptions = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Test utilities for route/integration tests (`testBuild`, `validator`, etc.).
|
|
6
|
-
* Uses
|
|
6
|
+
* Uses a global `expect` — run under a test runner that provides one (e.g. Vitest or Jest) with globals enabled.
|
|
7
7
|
*/
|
|
8
8
|
var tests_helper_1 = require("./helpers/tests.helper");
|
|
9
9
|
Object.defineProperty(exports, "checkSchemaPropertyDescriptions", { enumerable: true, get: function () { return tests_helper_1.checkSchemaPropertyDescriptions; } });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truelab/trueserver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "TrueLab Fastify server package: routes, schemas, and plugins for TrueLab game backends",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"clean": "rm -rf dist",
|
|
42
42
|
"build": "tsc -p tsconfig.json",
|
|
43
43
|
"prepack": "npm run clean && npm run build",
|
|
44
|
-
"test": "
|
|
45
|
-
"test:watch": "
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"test:watch": "vitest"
|
|
46
46
|
},
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public",
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"@fastify/type-provider-typebox": "^6.1.0",
|
|
70
70
|
"@immobiliarelabs/fastify-sentry": "^9.0.1",
|
|
71
71
|
"ajv": "^8.20.0",
|
|
72
|
+
"big.js": "^6.2.2",
|
|
72
73
|
"dotenv": "^17.4.2",
|
|
73
74
|
"fastify": "^5.8.5",
|
|
74
75
|
"fastify-plugin": "^5.1.0",
|
|
@@ -77,12 +78,9 @@
|
|
|
77
78
|
"typebox": "^1.1.38"
|
|
78
79
|
},
|
|
79
80
|
"devDependencies": {
|
|
80
|
-
"@
|
|
81
|
-
"@babel/preset-env": "^7.29.5",
|
|
82
|
-
"@types/jest": "^30.0.0",
|
|
81
|
+
"@types/big.js": "^6.2.2",
|
|
83
82
|
"@types/node": "^25.8.0",
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"typescript": "^5.9.3"
|
|
83
|
+
"typescript": "^5.9.3",
|
|
84
|
+
"vitest": "^4.1.9"
|
|
87
85
|
}
|
|
88
86
|
}
|