@truelab/trueserver 0.0.4 → 0.1.0
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 +67 -0
- package/MIGRATION.md +508 -0
- package/README.md +114 -94
- package/dist/application.d.ts.map +1 -1
- package/dist/application.js +9 -5
- package/dist/application.js.map +1 -1
- package/dist/examples.d.ts +1 -0
- package/dist/examples.d.ts.map +1 -1
- package/dist/examples.js +3 -1
- package/dist/examples.js.map +1 -1
- package/dist/helpers/config.helper.d.ts +9 -1
- package/dist/helpers/config.helper.d.ts.map +1 -1
- package/dist/helpers/config.helper.js +29 -0
- package/dist/helpers/config.helper.js.map +1 -1
- package/dist/helpers/errors.helper.d.ts +19 -0
- package/dist/helpers/errors.helper.d.ts.map +1 -0
- package/dist/helpers/errors.helper.js +21 -0
- package/dist/helpers/errors.helper.js.map +1 -0
- package/dist/helpers/fastify.helper.d.ts +5 -1
- package/dist/helpers/fastify.helper.d.ts.map +1 -1
- package/dist/helpers/fastify.helper.js +3 -1
- package/dist/helpers/fastify.helper.js.map +1 -1
- package/dist/helpers/handlers.helper.d.ts +10 -1
- package/dist/helpers/handlers.helper.d.ts.map +1 -1
- package/dist/helpers/handlers.helper.js +2 -1
- package/dist/helpers/handlers.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/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -4
- package/dist/index.js.map +1 -1
- package/dist/plugins/404.plugin.d.ts.map +1 -1
- package/dist/plugins/404.plugin.js +2 -1
- package/dist/plugins/404.plugin.js.map +1 -1
- package/dist/plugins/apikey.plugin.d.ts.map +1 -1
- package/dist/plugins/apikey.plugin.js +6 -7
- package/dist/plugins/apikey.plugin.js.map +1 -1
- package/dist/plugins/error.plugin.d.ts.map +1 -1
- package/dist/plugins/error.plugin.js +6 -2
- package/dist/plugins/error.plugin.js.map +1 -1
- package/dist/plugins/sentry.plugin.d.ts.map +1 -1
- package/dist/plugins/sentry.plugin.js +1 -2
- package/dist/plugins/sentry.plugin.js.map +1 -1
- package/dist/plugins/swagger.plugin.d.ts.map +1 -1
- package/dist/plugins/swagger.plugin.js +5 -1
- package/dist/plugins/swagger.plugin.js.map +1 -1
- package/dist/routes/checksum/checksum.route.d.ts +3 -0
- package/dist/routes/checksum/checksum.route.d.ts.map +1 -0
- package/dist/routes/checksum/checksum.route.js +21 -0
- package/dist/routes/checksum/checksum.route.js.map +1 -0
- package/dist/routes/checksum/index.d.ts +3 -0
- package/dist/routes/checksum/index.d.ts.map +1 -0
- package/dist/routes/checksum/index.js +12 -0
- package/dist/routes/checksum/index.js.map +1 -0
- package/dist/routes/client/client.route.d.ts +3 -0
- package/dist/routes/client/client.route.d.ts.map +1 -0
- package/dist/routes/{client.route.js → client/client.route.js} +5 -5
- package/dist/routes/client/client.route.js.map +1 -0
- package/dist/routes/client/index.d.ts +3 -0
- package/dist/routes/client/index.d.ts.map +1 -0
- package/dist/routes/client/index.js +12 -0
- package/dist/routes/client/index.js.map +1 -0
- package/dist/routes/config/config.route.js +1 -1
- package/dist/routes/config/config.route.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 +48 -17
- package/dist/routes/config/config.route.validate.plugin.js.map +1 -1
- package/dist/routes/play/play.route.validate.plugin.d.ts +10 -9
- package/dist/routes/play/play.route.validate.plugin.d.ts.map +1 -1
- package/dist/routes/play/play.route.validate.plugin.js +90 -39
- 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 +5 -4
- package/dist/routes/validate/validate.route.validate.plugin.js.map +1 -1
- package/dist/routes-public/healthcheck.route.d.ts.map +1 -0
- package/dist/{routes → routes-public}/healthcheck.route.js +4 -10
- package/dist/routes-public/healthcheck.route.js.map +1 -0
- package/dist/schemas/checksum.schema.d.ts +11 -0
- package/dist/schemas/checksum.schema.d.ts.map +1 -0
- package/dist/schemas/checksum.schema.js +26 -0
- package/dist/schemas/checksum.schema.js.map +1 -0
- package/dist/schemas/client.schema.d.ts +1 -1
- package/dist/schemas/client.schema.js +4 -4
- package/dist/schemas/client.schema.js.map +1 -1
- package/dist/schemas/config.schema.d.ts +17 -20
- package/dist/schemas/config.schema.d.ts.map +1 -1
- package/dist/schemas/config.schema.js +42 -43
- package/dist/schemas/config.schema.js.map +1 -1
- package/dist/schemas/examples/checksum.schema.examples.d.ts +3 -0
- package/dist/schemas/examples/checksum.schema.examples.d.ts.map +1 -0
- package/dist/schemas/examples/checksum.schema.examples.js +26 -0
- package/dist/schemas/examples/checksum.schema.examples.js.map +1 -0
- package/dist/schemas/examples/client.schema.examples.d.ts.map +1 -1
- package/dist/schemas/examples/client.schema.examples.js +15 -18
- package/dist/schemas/examples/client.schema.examples.js.map +1 -1
- package/dist/schemas/examples/config.schema.examples.d.ts.map +1 -1
- package/dist/schemas/examples/config.schema.examples.js +65 -33
- package/dist/schemas/examples/config.schema.examples.js.map +1 -1
- package/dist/schemas/examples/healthcheck.schema.examples.d.ts.map +1 -1
- package/dist/schemas/examples/healthcheck.schema.examples.js +3 -14
- package/dist/schemas/examples/healthcheck.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 +94 -130
- 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 -41
- package/dist/schemas/examples/validate.schema.examples.js.map +1 -1
- package/dist/schemas/healthcheck.schema.d.ts +2 -20
- package/dist/schemas/healthcheck.schema.d.ts.map +1 -1
- package/dist/schemas/healthcheck.schema.js +10 -41
- package/dist/schemas/healthcheck.schema.js.map +1 -1
- package/dist/schemas/play.schema.d.ts +22 -17
- package/dist/schemas/play.schema.d.ts.map +1 -1
- package/dist/schemas/play.schema.js +37 -45
- package/dist/schemas/play.schema.js.map +1 -1
- package/dist/schemas/shared.d.ts +13 -21
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/schemas/shared.js +56 -72
- package/dist/schemas/shared.js.map +1 -1
- package/dist/schemas/validate.schema.d.ts +11 -7
- package/dist/schemas/validate.schema.d.ts.map +1 -1
- package/dist/schemas/validate.schema.js +14 -16
- package/dist/schemas/validate.schema.js.map +1 -1
- package/package.json +5 -2
- package/dist/plugins/metrics.plugin.d.ts +0 -9
- package/dist/plugins/metrics.plugin.d.ts.map +0 -1
- package/dist/plugins/metrics.plugin.js +0 -24
- package/dist/plugins/metrics.plugin.js.map +0 -1
- package/dist/routes/client.route.d.ts +0 -3
- package/dist/routes/client.route.d.ts.map +0 -1
- package/dist/routes/client.route.js.map +0 -1
- package/dist/routes/healthcheck.route.d.ts.map +0 -1
- package/dist/routes/healthcheck.route.js.map +0 -1
- /package/dist/{routes → routes-public}/healthcheck.route.d.ts +0 -0
|
@@ -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,69 +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
|
|
70
|
-
|
|
71
|
-
};
|
|
76
|
+
const validReply = { valid: true };
|
|
77
|
+
const invalidReply = { valid: false, reason: 'potential win exceeds maxExposure' };
|
|
72
78
|
exports.validateRequestExamples = {
|
|
73
79
|
minimal: {
|
|
74
80
|
summary: 'Minimal request',
|
|
75
81
|
value: minimalRequest,
|
|
76
82
|
},
|
|
83
|
+
withMeta: {
|
|
84
|
+
summary: 'With game meta',
|
|
85
|
+
value: withMetaRequest,
|
|
86
|
+
},
|
|
77
87
|
maximal: {
|
|
78
88
|
summary: 'Maximal request',
|
|
79
89
|
value: maximalRequest,
|
|
80
90
|
},
|
|
81
|
-
|
|
82
|
-
summary: '
|
|
83
|
-
value:
|
|
84
|
-
},
|
|
85
|
-
variabelLines: {
|
|
86
|
-
summary: 'Variable lines',
|
|
87
|
-
value: variabelLinesRequest,
|
|
91
|
+
variableLevels: {
|
|
92
|
+
summary: 'Variable levels',
|
|
93
|
+
value: variableLevelsRequest,
|
|
88
94
|
},
|
|
89
95
|
multiStake: {
|
|
90
|
-
summary: 'Multi stake',
|
|
96
|
+
summary: 'Multi stake (hasMultiStake=true)',
|
|
91
97
|
value: multiStakeRequest,
|
|
92
98
|
},
|
|
93
99
|
};
|
|
94
100
|
exports.validateReplyExamples = {
|
|
95
|
-
|
|
96
|
-
summary: '
|
|
97
|
-
value:
|
|
101
|
+
valid: {
|
|
102
|
+
summary: 'Stake set accepted',
|
|
103
|
+
value: validReply,
|
|
104
|
+
},
|
|
105
|
+
invalid: {
|
|
106
|
+
summary: 'Stake set rejected',
|
|
107
|
+
value: invalidReply,
|
|
98
108
|
},
|
|
99
109
|
};
|
|
100
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;gBACnB,KAAK,EAAE,EAAE;aACZ,CAAC;SACL,CA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C1B,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"}
|
|
@@ -1,31 +1,13 @@
|
|
|
1
1
|
import { Static, Type } from 'typebox';
|
|
2
2
|
import { EEnvironment } from './shared';
|
|
3
3
|
export declare const HealthcheckRequestSchema: Type.TObject<{}>;
|
|
4
|
-
export declare const MetricsSchema: Type.TObject<{
|
|
5
|
-
requests: Type.TObject<{
|
|
6
|
-
success: Type.TInteger;
|
|
7
|
-
failed: Type.TInteger;
|
|
8
|
-
}>;
|
|
9
|
-
}>;
|
|
10
4
|
export declare const HealthcheckReplySchema: Type.TObject<{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
service: Type.TString;
|
|
5
|
+
ok: Type.TLiteral<true>;
|
|
6
|
+
gameId: Type.TString;
|
|
14
7
|
environment: Type.TEnum<[EEnvironment.development, EEnvironment.staging, EEnvironment.production]>;
|
|
15
8
|
uptime: Type.TNumber;
|
|
16
|
-
message: Type.TString;
|
|
17
9
|
timestamp: Type.TInteger;
|
|
18
|
-
metrics: Type.TObject<{
|
|
19
|
-
requests: Type.TObject<{
|
|
20
|
-
success: Type.TInteger;
|
|
21
|
-
failed: Type.TInteger;
|
|
22
|
-
}>;
|
|
23
|
-
}>;
|
|
24
|
-
services: Type.TObject<{
|
|
25
|
-
sentry: Type.TBoolean;
|
|
26
|
-
}>;
|
|
27
10
|
}>;
|
|
28
11
|
export type THealthcheckRequest = Static<typeof HealthcheckRequestSchema>;
|
|
29
|
-
export type TMetrics = Static<typeof MetricsSchema>;
|
|
30
12
|
export type THealthcheckReply = Static<typeof HealthcheckReplySchema>;
|
|
31
13
|
//# sourceMappingURL=healthcheck.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healthcheck.schema.d.ts","sourceRoot":"","sources":["../../schemas/healthcheck.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,eAAO,MAAM,wBAAwB,kBAEnC,CAAA;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"healthcheck.schema.d.ts","sourceRoot":"","sources":["../../schemas/healthcheck.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAEvC,eAAO,MAAM,wBAAwB,kBAEnC,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;EAqBjC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAA;AACzE,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
|
@@ -1,62 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HealthcheckReplySchema = exports.
|
|
3
|
+
exports.HealthcheckReplySchema = exports.HealthcheckRequestSchema = void 0;
|
|
4
4
|
const typebox_1 = require("typebox");
|
|
5
5
|
const healthcheck_schema_examples_1 = require("./examples/healthcheck.schema.examples");
|
|
6
6
|
const shared_1 = require("./shared");
|
|
7
7
|
exports.HealthcheckRequestSchema = typebox_1.Type.Object({}, {
|
|
8
8
|
additionalProperties: false,
|
|
9
9
|
});
|
|
10
|
-
exports.MetricsSchema = typebox_1.Type.Object({
|
|
11
|
-
requests: typebox_1.Type.Object({
|
|
12
|
-
success: typebox_1.Type.Integer({
|
|
13
|
-
minimum: 0,
|
|
14
|
-
description: 'Count of success requests',
|
|
15
|
-
}),
|
|
16
|
-
failed: typebox_1.Type.Integer({
|
|
17
|
-
minimum: 0,
|
|
18
|
-
description: 'Count of failed requests',
|
|
19
|
-
}),
|
|
20
|
-
}, {
|
|
21
|
-
description: 'Info about requests',
|
|
22
|
-
additionalProperties: false,
|
|
23
|
-
}),
|
|
24
|
-
}, {
|
|
25
|
-
description: 'Different metrics',
|
|
26
|
-
additionalProperties: false,
|
|
27
|
-
});
|
|
28
10
|
exports.HealthcheckReplySchema = typebox_1.Type.Object({
|
|
29
|
-
|
|
30
|
-
description: '
|
|
11
|
+
ok: typebox_1.Type.Literal(true, {
|
|
12
|
+
description: 'true when the Game Server is healthy',
|
|
31
13
|
}),
|
|
32
|
-
|
|
33
|
-
description: '
|
|
34
|
-
}),
|
|
35
|
-
service: typebox_1.Type.String({
|
|
36
|
-
description: 'Name of service. (Game text code for Game Server)',
|
|
14
|
+
gameId: typebox_1.Type.String({
|
|
15
|
+
description: 'Identifier of the game this server serves (e.g. "book-of-odin")',
|
|
37
16
|
}),
|
|
38
17
|
environment: typebox_1.Type.Enum(shared_1.EEnvironment, {
|
|
39
|
-
description: '
|
|
18
|
+
description: 'Deployment environment',
|
|
40
19
|
}),
|
|
41
20
|
uptime: typebox_1.Type.Number({
|
|
42
|
-
description: 'Process uptime',
|
|
43
|
-
|
|
44
|
-
message: typebox_1.Type.String({
|
|
45
|
-
description: 'Some text message ("OK" for healthcheck)',
|
|
21
|
+
description: 'Process uptime in seconds (fractional)',
|
|
22
|
+
minimum: 0,
|
|
46
23
|
}),
|
|
47
24
|
timestamp: typebox_1.Type.Integer({
|
|
48
|
-
description: '
|
|
49
|
-
}),
|
|
50
|
-
metrics: exports.MetricsSchema,
|
|
51
|
-
services: typebox_1.Type.Object({
|
|
52
|
-
sentry: typebox_1.Type.Boolean({
|
|
53
|
-
description: 'true, if Sentry is available',
|
|
54
|
-
}),
|
|
55
|
-
}, {
|
|
56
|
-
description: 'Services availabiliy',
|
|
57
|
-
additionalProperties: false,
|
|
25
|
+
description: 'Unix epoch time in milliseconds when the response was generated',
|
|
58
26
|
}),
|
|
59
27
|
}, {
|
|
28
|
+
$id: 'HealthcheckReply',
|
|
60
29
|
additionalProperties: false,
|
|
61
30
|
'x-examples': healthcheck_schema_examples_1.healthcheckReplyExamples,
|
|
62
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"healthcheck.schema.js","sourceRoot":"","sources":["../../schemas/healthcheck.schema.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,wFAAiF;AACjF,qCAAuC;AAE1B,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAAC,EAAE,EAAE;IACpD,oBAAoB,EAAE,KAAK;CAC9B,CAAC,CAAA;AAEW,QAAA,
|
|
1
|
+
{"version":3,"file":"healthcheck.schema.js","sourceRoot":"","sources":["../../schemas/healthcheck.schema.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,wFAAiF;AACjF,qCAAuC;AAE1B,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAAC,EAAE,EAAE;IACpD,oBAAoB,EAAE,KAAK;CAC9B,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC9C,EAAE,EAAE,cAAI,CAAC,OAAO,CAAC,IAAI,EAAE;QACnB,WAAW,EAAE,sCAAsC;KACtD,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,iEAAiE;KACjF,CAAC;IACF,WAAW,EAAE,cAAI,CAAC,IAAI,CAAC,qBAAY,EAAE;QACjC,WAAW,EAAE,wBAAwB;KACxC,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,CAAC;KACb,CAAC;IACF,SAAS,EAAE,cAAI,CAAC,OAAO,CAAC;QACpB,WAAW,EAAE,iEAAiE;KACjF,CAAC;CACL,EAAE;IACC,GAAG,EAAE,kBAAkB;IACvB,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,sDAAwB;CACzC,CAAC,CAAA"}
|
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
import { Static, Type } from 'typebox';
|
|
2
2
|
export declare const PlayRequestSchema: Type.TObject<{
|
|
3
|
-
|
|
4
|
-
currencyDecimals: Type.
|
|
3
|
+
isDemo: Type.TBoolean;
|
|
4
|
+
currencyDecimals: Type.TInteger;
|
|
5
|
+
stepIndex: Type.TInteger;
|
|
5
6
|
stakes: Type.TOptional<Type.TArray<Type.TObject<{
|
|
6
7
|
name: Type.TString;
|
|
7
8
|
amount: Type.TNumber;
|
|
9
|
+
coinValue: Type.TOptional<Type.TNumber>;
|
|
8
10
|
level: Type.TOptional<Type.TInteger>;
|
|
9
11
|
qty: Type.TOptional<Type.TInteger>;
|
|
10
12
|
params: Type.TOptional<Type.TString>;
|
|
11
13
|
}>>>;
|
|
12
|
-
|
|
14
|
+
choice: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TString]>>;
|
|
15
|
+
meta: Type.TOptional<Type.TObject<{
|
|
16
|
+
public: Type.TAny;
|
|
17
|
+
private: Type.TAny;
|
|
18
|
+
}>>;
|
|
13
19
|
test: Type.TOptional<Type.TString>;
|
|
14
|
-
metaPrivate: Type.TOptional<Type.TString>;
|
|
15
|
-
metaPublic: Type.TOptional<Type.TString>;
|
|
16
|
-
choice: Type.TOptional<Type.TInteger>;
|
|
17
20
|
}>;
|
|
18
21
|
export declare const PlayReplySchema: Type.TObject<{
|
|
19
|
-
|
|
20
|
-
rng: Type.
|
|
22
|
+
gameResponse: Type.TAny;
|
|
23
|
+
rng: Type.TArray<Type.TObject<{
|
|
24
|
+
value: Type.TNumber;
|
|
25
|
+
}>>;
|
|
26
|
+
winCoins: Type.TOptional<Type.TNumber>;
|
|
27
|
+
winCash: Type.TNumber;
|
|
21
28
|
finished: Type.TBoolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
choices: Type.TOptional<Type.TArray<Type.TNumber>>;
|
|
30
|
-
analytics: Type.TOptional<Type.TArray<Type.TAny>>;
|
|
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
|
+
}>>;
|
|
31
36
|
}>;
|
|
32
37
|
export type TPlayRequest = Static<typeof PlayRequestSchema>;
|
|
33
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
|
|
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"}
|
|
@@ -5,31 +5,27 @@ const typebox_1 = require("typebox");
|
|
|
5
5
|
const play_schema_examples_1 = require("./examples/play.schema.examples");
|
|
6
6
|
const shared_1 = require("./shared");
|
|
7
7
|
exports.PlayRequestSchema = typebox_1.Type.Object({
|
|
8
|
-
|
|
9
|
-
description: 'true
|
|
8
|
+
isDemo: typebox_1.Type.Boolean({
|
|
9
|
+
description: 'true for demo sessions. A demo Game Server may use a different RNG',
|
|
10
10
|
}),
|
|
11
|
-
currencyDecimals: typebox_1.Type.
|
|
12
|
-
description: '
|
|
11
|
+
currencyDecimals: typebox_1.Type.Integer({
|
|
12
|
+
description: 'Decimal places of the currency — used to compute the win amount in currency',
|
|
13
13
|
minimum: 0,
|
|
14
|
-
})
|
|
14
|
+
}),
|
|
15
|
+
stepIndex: typebox_1.Type.Integer({
|
|
16
|
+
description: 'Index of this /play call within the round (opening step is 0, each continuation increments)',
|
|
17
|
+
minimum: 0,
|
|
18
|
+
}),
|
|
15
19
|
stakes: typebox_1.Type.Optional(typebox_1.Type.Array(shared_1.StakeSchema, {
|
|
16
|
-
description: '
|
|
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',
|
|
17
21
|
minItems: 1,
|
|
18
22
|
})),
|
|
19
|
-
|
|
20
|
-
description: '
|
|
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)',
|
|
21
25
|
})),
|
|
26
|
+
meta: typebox_1.Type.Optional(shared_1.MetaSchema),
|
|
22
27
|
test: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
23
|
-
description: '
|
|
24
|
-
})),
|
|
25
|
-
metaPrivate: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
26
|
-
description: 'Private part of meta data (json object transformed to string). Inner data for calculating average bet, double up payouts, etc.',
|
|
27
|
-
})),
|
|
28
|
-
metaPublic: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
29
|
-
description: 'Public part of meta data (json object transformed to string). Visual progress of cumulative features for client side or something like that',
|
|
30
|
-
})),
|
|
31
|
-
choice: typebox_1.Type.Optional(typebox_1.Type.Integer({
|
|
32
|
-
description: 'User choice. Available only for games with features that need user interaction during single game round',
|
|
28
|
+
description: 'String representation of cheat-tool parameters. MUST be ignored on production deployments',
|
|
33
29
|
})),
|
|
34
30
|
}, {
|
|
35
31
|
$id: 'PlayRequest',
|
|
@@ -37,41 +33,37 @@ exports.PlayRequestSchema = typebox_1.Type.Object({
|
|
|
37
33
|
'x-examples': play_schema_examples_1.playRequestExamples,
|
|
38
34
|
});
|
|
39
35
|
exports.PlayReplySchema = typebox_1.Type.Object({
|
|
40
|
-
|
|
41
|
-
description: '
|
|
36
|
+
gameResponse: typebox_1.Type.Any({
|
|
37
|
+
description: 'Math results generated by this call. Forwarded to the front-end; must not contain sensitive data',
|
|
42
38
|
}),
|
|
43
|
-
rng: typebox_1.Type.
|
|
44
|
-
|
|
39
|
+
rng: typebox_1.Type.Array(typebox_1.Type.Object({
|
|
40
|
+
value: typebox_1.Type.Number({
|
|
41
|
+
description: 'RNG value used to generate gameResponse',
|
|
42
|
+
}),
|
|
43
|
+
}, { additionalProperties: true }), {
|
|
44
|
+
description: 'RNG values used to generate gameResponse. Not forwarded to the client — kept by RGS for internal storage and validation only',
|
|
45
|
+
}),
|
|
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,
|
|
45
52
|
}),
|
|
46
53
|
finished: typebox_1.Type.Boolean({
|
|
47
|
-
description: 'true
|
|
54
|
+
description: 'When true, the round is finished. Canonical end-of-round indicator',
|
|
48
55
|
}),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
description: 'All game data for displaying game process in game client. Stringified JSON',
|
|
52
|
-
}),
|
|
53
|
-
winCash: typebox_1.Type.Number({
|
|
54
|
-
description: 'Calculated payout in currency',
|
|
55
|
-
}),
|
|
56
|
-
winCoins: typebox_1.Type.Optional(typebox_1.Type.Number({
|
|
57
|
-
description: 'Wining amount in coins',
|
|
58
|
-
})),
|
|
59
|
-
}, {
|
|
60
|
-
description: 'Results of generated game rounds. Includes game data for game client and coefficients for calculating payouts',
|
|
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',
|
|
61
58
|
}),
|
|
62
|
-
|
|
63
|
-
description: '
|
|
64
|
-
})),
|
|
65
|
-
metaPublic: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
66
|
-
description: 'Public part of meta data (json object transformed to string). Visual progress of cumulative features for client side or something like that. Only this part of meta must be provided to Game Client',
|
|
67
|
-
})),
|
|
68
|
-
choices: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Number(), {
|
|
69
|
-
description: 'List of available choices for next round to continue game process ',
|
|
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 []',
|
|
70
61
|
minItems: 1,
|
|
71
62
|
})),
|
|
72
|
-
|
|
73
|
-
description: '
|
|
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',
|
|
74
65
|
})),
|
|
66
|
+
meta: typebox_1.Type.Optional(shared_1.MetaSchema),
|
|
75
67
|
}, {
|
|
76
68
|
$id: 'PlayReply',
|
|
77
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,
|
|
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,KAAK,CAAC,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,cAAI,CAAC,MAAM,EAAE,CAAC,EAAE;QAC7D,WAAW,EAAE,0HAA0H;KAC1I,CAAC,CAAC;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,mBAAU,CAAC;IAC/B,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC;QAC5B,WAAW,EAAE,2FAA2F;KAC3G,CAAC,CAAC;CACN,EAAE;IACC,GAAG,EAAE,aAAa;IAClB,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,0CAAmB;CACpC,CAAC,CAAA;AAEW,QAAA,eAAe,GAAG,cAAI,CAAC,MAAM,CAAC;IACv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IAC3B,YAAY,EAAE,wCAAiB;CAClC,CAAC,CAAA"}
|
package/dist/schemas/shared.d.ts
CHANGED
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { Static, Type } from 'typebox';
|
|
2
|
-
export declare enum ECategory {
|
|
3
|
-
slots = "slots",
|
|
4
|
-
cluster = "cluster",
|
|
5
|
-
table = "table"
|
|
6
|
-
}
|
|
7
2
|
export declare enum EStakeType {
|
|
8
3
|
default = "default",
|
|
9
4
|
buy = "buy",
|
|
10
5
|
bonusBet = "bonusBet"
|
|
11
6
|
}
|
|
12
|
-
export declare enum EVolatility {
|
|
13
|
-
variable = "Variable",
|
|
14
|
-
low = "Low",
|
|
15
|
-
medLow = "Medium - Low",
|
|
16
|
-
med = "Medium",
|
|
17
|
-
medHigh = "Medium - High",
|
|
18
|
-
high = "High",
|
|
19
|
-
veryHigh = "Very High"
|
|
20
|
-
}
|
|
21
7
|
export declare enum EEnvironment {
|
|
22
8
|
development = "development",
|
|
23
9
|
staging = "staging",
|
|
@@ -33,6 +19,7 @@ export type TExamples = {
|
|
|
33
19
|
export declare const StakeSchema: Type.TObject<{
|
|
34
20
|
name: Type.TString;
|
|
35
21
|
amount: Type.TNumber;
|
|
22
|
+
coinValue: Type.TOptional<Type.TNumber>;
|
|
36
23
|
level: Type.TOptional<Type.TInteger>;
|
|
37
24
|
qty: Type.TOptional<Type.TInteger>;
|
|
38
25
|
params: Type.TOptional<Type.TString>;
|
|
@@ -42,29 +29,34 @@ export declare const StakeModeSchema: Type.TObject<{
|
|
|
42
29
|
type: Type.TEnum<[EStakeType.default, EStakeType.buy, EStakeType.bonusBet]>;
|
|
43
30
|
bets: Type.TNumber;
|
|
44
31
|
multiple: Type.TOptional<Type.TBoolean>;
|
|
45
|
-
parametric: Type.TBoolean;
|
|
46
32
|
maxQty: Type.TOptional<Type.TInteger>;
|
|
33
|
+
parametric: Type.TOptional<Type.TBoolean>;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const MetaSchema: Type.TObject<{
|
|
36
|
+
public: Type.TAny;
|
|
37
|
+
private: Type.TAny;
|
|
47
38
|
}>;
|
|
48
39
|
export declare const HeadersSchema: Type.TObject<{
|
|
49
40
|
"x-api-key": Type.TString;
|
|
50
41
|
}>;
|
|
51
42
|
export declare const InternalErrorSchema: Type.TObject<{
|
|
52
|
-
|
|
43
|
+
status: Type.TLiteral<false>;
|
|
44
|
+
code: Type.TInteger;
|
|
53
45
|
message: Type.TString;
|
|
54
|
-
custom: Type.TOptional<Type.TAny>;
|
|
55
46
|
}>;
|
|
56
47
|
export declare const RequestErrorSchema: Type.TObject<{
|
|
57
|
-
|
|
48
|
+
status: Type.TLiteral<false>;
|
|
49
|
+
code: Type.TInteger;
|
|
58
50
|
message: Type.TString;
|
|
59
|
-
custom: Type.TOptional<Type.TAny>;
|
|
60
51
|
}>;
|
|
61
52
|
export declare const AccessErrorSchema: Type.TObject<{
|
|
62
|
-
|
|
53
|
+
status: Type.TLiteral<false>;
|
|
54
|
+
code: Type.TInteger;
|
|
63
55
|
message: Type.TString;
|
|
64
|
-
custom: Type.TOptional<Type.TAny>;
|
|
65
56
|
}>;
|
|
66
57
|
export type TStake = Static<typeof StakeSchema>;
|
|
67
58
|
export type TStakeMode = Static<typeof StakeModeSchema>;
|
|
59
|
+
export type TMeta = Static<typeof MetaSchema>;
|
|
68
60
|
export type TInternalError = Static<typeof InternalErrorSchema>;
|
|
69
61
|
export type TRequestError = Static<typeof RequestErrorSchema>;
|
|
70
62
|
export type TAccessError = Static<typeof AccessErrorSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAItC,oBAAY,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA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