@truelab/trueserver 0.0.3
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 +36 -0
- package/README.md +220 -0
- package/dist/application.d.ts +7 -0
- package/dist/application.d.ts.map +1 -0
- package/dist/application.js +41 -0
- package/dist/application.js.map +1 -0
- package/dist/helpers/config.helper.d.ts +5 -0
- package/dist/helpers/config.helper.d.ts.map +1 -0
- package/dist/helpers/config.helper.js +12 -0
- package/dist/helpers/config.helper.js.map +1 -0
- package/dist/helpers/env.helper.d.ts +5 -0
- package/dist/helpers/env.helper.d.ts.map +1 -0
- package/dist/helpers/env.helper.js +29 -0
- package/dist/helpers/env.helper.js.map +1 -0
- package/dist/helpers/fastify.helper.d.ts +9 -0
- package/dist/helpers/fastify.helper.d.ts.map +1 -0
- package/dist/helpers/fastify.helper.js +27 -0
- package/dist/helpers/fastify.helper.js.map +1 -0
- package/dist/helpers/handlers.helper.d.ts +39 -0
- package/dist/helpers/handlers.helper.d.ts.map +1 -0
- package/dist/helpers/handlers.helper.js +25 -0
- package/dist/helpers/handlers.helper.js.map +1 -0
- package/dist/helpers/logger.helper.d.ts +6 -0
- package/dist/helpers/logger.helper.d.ts.map +1 -0
- package/dist/helpers/logger.helper.js +21 -0
- package/dist/helpers/logger.helper.js.map +1 -0
- package/dist/helpers/pkg-version.helper.d.ts +5 -0
- package/dist/helpers/pkg-version.helper.d.ts.map +1 -0
- package/dist/helpers/pkg-version.helper.js +22 -0
- package/dist/helpers/pkg-version.helper.js.map +1 -0
- package/dist/helpers/random.helper.d.ts +7 -0
- package/dist/helpers/random.helper.d.ts.map +1 -0
- package/dist/helpers/random.helper.js +18 -0
- package/dist/helpers/random.helper.js.map +1 -0
- package/dist/helpers/tests.helper.d.ts +9 -0
- package/dist/helpers/tests.helper.d.ts.map +1 -0
- package/dist/helpers/tests.helper.js +45 -0
- package/dist/helpers/tests.helper.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/plugins/404.plugin.d.ts +3 -0
- package/dist/plugins/404.plugin.d.ts.map +1 -0
- package/dist/plugins/404.plugin.js +10 -0
- package/dist/plugins/404.plugin.js.map +1 -0
- package/dist/plugins/apikey.plugin.d.ts +3 -0
- package/dist/plugins/apikey.plugin.d.ts.map +1 -0
- package/dist/plugins/apikey.plugin.js +18 -0
- package/dist/plugins/apikey.plugin.js.map +1 -0
- package/dist/plugins/cors.plugin.d.ts +3 -0
- package/dist/plugins/cors.plugin.d.ts.map +1 -0
- package/dist/plugins/cors.plugin.js +15 -0
- package/dist/plugins/cors.plugin.js.map +1 -0
- package/dist/plugins/error.plugin.d.ts +3 -0
- package/dist/plugins/error.plugin.d.ts.map +1 -0
- package/dist/plugins/error.plugin.js +18 -0
- package/dist/plugins/error.plugin.js.map +1 -0
- package/dist/plugins/logger.plugin.d.ts +3 -0
- package/dist/plugins/logger.plugin.d.ts.map +1 -0
- package/dist/plugins/logger.plugin.js +51 -0
- package/dist/plugins/logger.plugin.js.map +1 -0
- package/dist/plugins/metrics.plugin.d.ts +9 -0
- package/dist/plugins/metrics.plugin.d.ts.map +1 -0
- package/dist/plugins/metrics.plugin.js +24 -0
- package/dist/plugins/metrics.plugin.js.map +1 -0
- package/dist/plugins/sentry.plugin.d.ts +3 -0
- package/dist/plugins/sentry.plugin.d.ts.map +1 -0
- package/dist/plugins/sentry.plugin.js +24 -0
- package/dist/plugins/sentry.plugin.js.map +1 -0
- package/dist/plugins/swagger.plugin.d.ts +3 -0
- package/dist/plugins/swagger.plugin.d.ts.map +1 -0
- package/dist/plugins/swagger.plugin.js +58 -0
- package/dist/plugins/swagger.plugin.js.map +1 -0
- package/dist/routes/client.route.d.ts +3 -0
- package/dist/routes/client.route.d.ts.map +1 -0
- package/dist/routes/client.route.js +21 -0
- package/dist/routes/client.route.js.map +1 -0
- package/dist/routes/config/config.route.d.ts +3 -0
- package/dist/routes/config/config.route.d.ts.map +1 -0
- package/dist/routes/config/config.route.js +21 -0
- package/dist/routes/config/config.route.js.map +1 -0
- package/dist/routes/config/config.route.validate.plugin.d.ts +3 -0
- package/dist/routes/config/config.route.validate.plugin.d.ts.map +1 -0
- package/dist/routes/config/config.route.validate.plugin.js +42 -0
- package/dist/routes/config/config.route.validate.plugin.js.map +1 -0
- package/dist/routes/config/index.d.ts +3 -0
- package/dist/routes/config/index.d.ts.map +1 -0
- package/dist/routes/config/index.js +14 -0
- package/dist/routes/config/index.js.map +1 -0
- package/dist/routes/healthcheck.route.d.ts +3 -0
- package/dist/routes/healthcheck.route.d.ts.map +1 -0
- package/dist/routes/healthcheck.route.js +34 -0
- package/dist/routes/healthcheck.route.js.map +1 -0
- package/dist/routes/play/index.d.ts +3 -0
- package/dist/routes/play/index.d.ts.map +1 -0
- package/dist/routes/play/index.js +14 -0
- package/dist/routes/play/index.js.map +1 -0
- package/dist/routes/play/play.route.d.ts +3 -0
- package/dist/routes/play/play.route.d.ts.map +1 -0
- package/dist/routes/play/play.route.js +22 -0
- package/dist/routes/play/play.route.js.map +1 -0
- package/dist/routes/play/play.route.validate.plugin.d.ts +13 -0
- package/dist/routes/play/play.route.validate.plugin.d.ts.map +1 -0
- package/dist/routes/play/play.route.validate.plugin.js +108 -0
- package/dist/routes/play/play.route.validate.plugin.js.map +1 -0
- package/dist/routes/validate/index.d.ts +3 -0
- package/dist/routes/validate/index.d.ts.map +1 -0
- package/dist/routes/validate/index.js +14 -0
- package/dist/routes/validate/index.js.map +1 -0
- package/dist/routes/validate/validate.route.d.ts +3 -0
- package/dist/routes/validate/validate.route.d.ts.map +1 -0
- package/dist/routes/validate/validate.route.js +22 -0
- package/dist/routes/validate/validate.route.js.map +1 -0
- package/dist/routes/validate/validate.route.validate.plugin.d.ts +3 -0
- package/dist/routes/validate/validate.route.validate.plugin.d.ts.map +1 -0
- package/dist/routes/validate/validate.route.validate.plugin.js +28 -0
- package/dist/routes/validate/validate.route.validate.plugin.js.map +1 -0
- package/dist/schemas/client.schema.d.ts +9 -0
- package/dist/schemas/client.schema.d.ts.map +1 -0
- package/dist/schemas/client.schema.js +22 -0
- package/dist/schemas/client.schema.js.map +1 -0
- package/dist/schemas/config.schema.d.ts +34 -0
- package/dist/schemas/config.schema.d.ts.map +1 -0
- package/dist/schemas/config.schema.js +78 -0
- package/dist/schemas/config.schema.js.map +1 -0
- package/dist/schemas/examples/client.schema.examples.d.ts +3 -0
- package/dist/schemas/examples/client.schema.examples.d.ts.map +1 -0
- package/dist/schemas/examples/client.schema.examples.js +32 -0
- package/dist/schemas/examples/client.schema.examples.js.map +1 -0
- package/dist/schemas/examples/config.schema.examples.d.ts +3 -0
- package/dist/schemas/examples/config.schema.examples.d.ts.map +1 -0
- package/dist/schemas/examples/config.schema.examples.js +56 -0
- package/dist/schemas/examples/config.schema.examples.js.map +1 -0
- package/dist/schemas/examples/healthcheck.schema.examples.d.ts +3 -0
- package/dist/schemas/examples/healthcheck.schema.examples.d.ts.map +1 -0
- package/dist/schemas/examples/healthcheck.schema.examples.js +28 -0
- package/dist/schemas/examples/healthcheck.schema.examples.js.map +1 -0
- package/dist/schemas/examples/play.schema.examples.d.ts +4 -0
- package/dist/schemas/examples/play.schema.examples.d.ts.map +1 -0
- package/dist/schemas/examples/play.schema.examples.js +165 -0
- package/dist/schemas/examples/play.schema.examples.js.map +1 -0
- package/dist/schemas/examples/validate.schema.examples.d.ts +4 -0
- package/dist/schemas/examples/validate.schema.examples.d.ts.map +1 -0
- package/dist/schemas/examples/validate.schema.examples.js +100 -0
- package/dist/schemas/examples/validate.schema.examples.js.map +1 -0
- package/dist/schemas/healthcheck.schema.d.ts +31 -0
- package/dist/schemas/healthcheck.schema.d.ts.map +1 -0
- package/dist/schemas/healthcheck.schema.js +63 -0
- package/dist/schemas/healthcheck.schema.js.map +1 -0
- package/dist/schemas/play.schema.d.ts +34 -0
- package/dist/schemas/play.schema.d.ts.map +1 -0
- package/dist/schemas/play.schema.js +80 -0
- package/dist/schemas/play.schema.js.map +1 -0
- package/dist/schemas/shared.d.ts +71 -0
- package/dist/schemas/shared.d.ts.map +1 -0
- package/dist/schemas/shared.js +147 -0
- package/dist/schemas/shared.js.map +1 -0
- package/dist/schemas/validate.schema.d.ts +21 -0
- package/dist/schemas/validate.schema.d.ts.map +1 -0
- package/dist/schemas/validate.schema.js +43 -0
- package/dist/schemas/validate.schema.js.map +1 -0
- package/dist/test-utils.d.ts +6 -0
- package/dist/test-utils.d.ts.map +1 -0
- package/dist/test-utils.js +13 -0
- package/dist/test-utils.js.map +1 -0
- package/package.json +80 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configReplyExamples = void 0;
|
|
4
|
+
const shared_1 = require("../shared");
|
|
5
|
+
const defaultReply = {
|
|
6
|
+
ok: true,
|
|
7
|
+
name: 'Base game server',
|
|
8
|
+
category: 'slots',
|
|
9
|
+
stakeModes: [
|
|
10
|
+
{
|
|
11
|
+
name: 'default',
|
|
12
|
+
type: 'default',
|
|
13
|
+
bets: 1,
|
|
14
|
+
parametric: false,
|
|
15
|
+
multiple: true,
|
|
16
|
+
maxQty: 100,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'bonusBet',
|
|
20
|
+
type: shared_1.EStakeType.bonusBet,
|
|
21
|
+
bets: 1.25,
|
|
22
|
+
parametric: false,
|
|
23
|
+
multiple: true,
|
|
24
|
+
maxQty: 100,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'buyBonus',
|
|
28
|
+
type: shared_1.EStakeType.buy,
|
|
29
|
+
bets: 100,
|
|
30
|
+
parametric: false,
|
|
31
|
+
multiple: true,
|
|
32
|
+
maxQty: 100,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
rtp: 98.76,
|
|
36
|
+
hitrate: 0.12,
|
|
37
|
+
volatility: shared_1.EVolatility.medLow,
|
|
38
|
+
hasMeta: true,
|
|
39
|
+
hasChoice: true,
|
|
40
|
+
hasBuy: true,
|
|
41
|
+
hasMultiStake: true,
|
|
42
|
+
hasValidation: true,
|
|
43
|
+
hasGamble: false,
|
|
44
|
+
freeroundsAllowed: true,
|
|
45
|
+
minWin: 0.5,
|
|
46
|
+
maxWin: 500,
|
|
47
|
+
apiVersion: 0,
|
|
48
|
+
coinRatio: 20,
|
|
49
|
+
};
|
|
50
|
+
exports.configReplyExamples = {
|
|
51
|
+
default: {
|
|
52
|
+
summary: 'Default reply',
|
|
53
|
+
value: defaultReply,
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=config.schema.examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/config.schema.examples.ts"],"names":[],"mappings":";;;AAAA,sCAA8D;AAE9D,MAAM,YAAY,GAAG;IACjB,EAAE,EAAE,IAAI;IACR,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE;QACR;YACI,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,CAAC;YACP,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,GAAG;SACd;QACD;YACI,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,mBAAU,CAAC,QAAQ;YACzB,IAAI,EAAE,IAAI;YACV,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,GAAG;SACd;QACD;YACI,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,mBAAU,CAAC,GAAG;YACpB,IAAI,EAAE,GAAG;YACT,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,GAAG;SACd;KACJ;IACD,GAAG,EAAE,KAAK;IACV,OAAO,EAAE,IAAI;IACb,UAAU,EAAE,oBAAW,CAAC,MAAM;IAC9B,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,IAAI;IACnB,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,KAAK;IAChB,iBAAiB,EAAE,IAAI;IACvB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,EAAE;CAChB,CAAA;AAEY,QAAA,mBAAmB,GAAc;IAC1C,OAAO,EAAE;QACL,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,YAAY;KACtB;CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"healthcheck.schema.examples.d.ts","sourceRoot":"","sources":["../../../schemas/examples/healthcheck.schema.examples.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAqBrC,eAAO,MAAM,wBAAwB,EAAE,SAKtC,CAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.healthcheckReplyExamples = void 0;
|
|
4
|
+
const defaultReply = {
|
|
5
|
+
code: 200,
|
|
6
|
+
status: true,
|
|
7
|
+
environment: 'staging',
|
|
8
|
+
service: 'crazy-mix',
|
|
9
|
+
uptime: 423.825598962,
|
|
10
|
+
message: 'OK',
|
|
11
|
+
timestamp: 1666026861687,
|
|
12
|
+
metrics: {
|
|
13
|
+
requests: {
|
|
14
|
+
success: 18526,
|
|
15
|
+
failed: 2,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
services: {
|
|
19
|
+
sentry: true,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
exports.healthcheckReplyExamples = {
|
|
23
|
+
default: {
|
|
24
|
+
summary: 'Default reply',
|
|
25
|
+
value: defaultReply,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=healthcheck.schema.examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"healthcheck.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/healthcheck.schema.examples.ts"],"names":[],"mappings":";;;AAEA,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,GAAG;IACT,MAAM,EAAE,IAAI;IACZ,WAAW,EAAE,SAAS;IACtB,OAAO,EAAE,WAAW;IACpB,MAAM,EAAE,aAAa;IACrB,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,aAAa;IACxB,OAAO,EAAE;QACL,QAAQ,EAAE;YACN,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,CAAC;SACZ;KACJ;IACD,QAAQ,EAAE;QACN,MAAM,EAAE,IAAI;KACf;CACJ,CAAA;AAEY,QAAA,wBAAwB,GAAc;IAC/C,OAAO,EAAE;QACL,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,YAAY;KACtB;CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"play.schema.examples.d.ts","sourceRoot":"","sources":["../../../schemas/examples/play.schema.examples.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAiIrC,eAAO,MAAM,mBAAmB,EAAE,SAiCjC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,SAS/B,CAAA"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.playReplyExamples = exports.playRequestExamples = void 0;
|
|
4
|
+
const minimalRequest = {
|
|
5
|
+
demo: true,
|
|
6
|
+
currencyDecimals: 2,
|
|
7
|
+
stakes: [{
|
|
8
|
+
name: 'default', amount: 3,
|
|
9
|
+
}],
|
|
10
|
+
isGambleAllowed: false,
|
|
11
|
+
metaPublic: '{}',
|
|
12
|
+
metaPrivate: '{}',
|
|
13
|
+
};
|
|
14
|
+
const maximalRequest = {
|
|
15
|
+
demo: true,
|
|
16
|
+
currencyDecimals: 2,
|
|
17
|
+
stakes: [{
|
|
18
|
+
name: 'slider',
|
|
19
|
+
amount: 6,
|
|
20
|
+
level: 1,
|
|
21
|
+
qty: 1,
|
|
22
|
+
params: JSON.stringify({
|
|
23
|
+
left: 10, right: 90,
|
|
24
|
+
}),
|
|
25
|
+
}, {
|
|
26
|
+
name: 'cell',
|
|
27
|
+
amount: 75,
|
|
28
|
+
level: 2,
|
|
29
|
+
qty: 6,
|
|
30
|
+
params: JSON.stringify({
|
|
31
|
+
value: 14,
|
|
32
|
+
}),
|
|
33
|
+
}],
|
|
34
|
+
isGambleAllowed: true,
|
|
35
|
+
test: JSON.stringify({
|
|
36
|
+
symbols: {
|
|
37
|
+
value: 'Wild',
|
|
38
|
+
},
|
|
39
|
+
randomNumbers: {
|
|
40
|
+
value: '0,0,0,0,0',
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
metaPublic: JSON.stringify({
|
|
44
|
+
someProgress: 15,
|
|
45
|
+
}),
|
|
46
|
+
metaPrivate: JSON.stringify({
|
|
47
|
+
coinsTotal: 1480,
|
|
48
|
+
}),
|
|
49
|
+
choice: 2,
|
|
50
|
+
};
|
|
51
|
+
const buyBonusRequest = {
|
|
52
|
+
...minimalRequest,
|
|
53
|
+
stakes: [{
|
|
54
|
+
name: 'buyBonus', amount: 30,
|
|
55
|
+
}],
|
|
56
|
+
};
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
58
|
+
const { stakes, ...withoutStakes } = minimalRequest;
|
|
59
|
+
const makeChoiceRequest = {
|
|
60
|
+
...withoutStakes,
|
|
61
|
+
choice: 0,
|
|
62
|
+
metaPrivate: JSON.stringify({
|
|
63
|
+
coinsTotal: 100,
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
const metaDataRequest = {
|
|
67
|
+
...minimalRequest,
|
|
68
|
+
metaPublic: JSON.stringify({
|
|
69
|
+
someProgress: 15,
|
|
70
|
+
}),
|
|
71
|
+
metaPrivate: JSON.stringify({
|
|
72
|
+
hiddenProperty: 'value',
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
const cheatRequest = {
|
|
76
|
+
...minimalRequest,
|
|
77
|
+
test: JSON.stringify({
|
|
78
|
+
symbols: {
|
|
79
|
+
value: 'Wild',
|
|
80
|
+
},
|
|
81
|
+
randomNumbers: {
|
|
82
|
+
value: '0,0,0,0,0',
|
|
83
|
+
},
|
|
84
|
+
}),
|
|
85
|
+
};
|
|
86
|
+
const variabelLinesRequest = {
|
|
87
|
+
...minimalRequest,
|
|
88
|
+
stakes: [{
|
|
89
|
+
name: 'default', amount: 75, level: 2,
|
|
90
|
+
}],
|
|
91
|
+
};
|
|
92
|
+
const multiStakeRequest = {
|
|
93
|
+
...minimalRequest,
|
|
94
|
+
stakes: [{
|
|
95
|
+
name: 'red',
|
|
96
|
+
amount: 10,
|
|
97
|
+
qty: 3,
|
|
98
|
+
}, {
|
|
99
|
+
name: 'single-27',
|
|
100
|
+
amount: 2,
|
|
101
|
+
qty: 11,
|
|
102
|
+
}],
|
|
103
|
+
};
|
|
104
|
+
const minimalReply = {
|
|
105
|
+
ok: true,
|
|
106
|
+
rng: '[{"value":57,"range":110},{"value":19,"range":126},{"value":4,"range":108},{"value":81,"range":122},{"value":2,"range":108}]',
|
|
107
|
+
finished: true,
|
|
108
|
+
results: {
|
|
109
|
+
response: '{"games":[{"type":"regular","spins":[{"coins":0,"fields":[{"coins":0,"symbols":{"coins":0,"original":[8,7,10,10,1,4,8,7,2,1,0,11,4,5,1],"final":[8,7,10,10,1,4,8,7,2,1,0,11,4,5,1],"payouts":[]},"features":{"scatters":{"positions":[2,3]}}}],"added":0}],"coins":0}],"totalResults":{"coins":0,"hasMaxWin":false,"hasChoices":false}}',
|
|
110
|
+
winCash: 0.5,
|
|
111
|
+
winCoins: 10,
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
const maximalReply = {
|
|
115
|
+
...minimalReply,
|
|
116
|
+
metaPrivate: '{"coinsTotal":1480}',
|
|
117
|
+
metaPublic: '{"someProgress":15}',
|
|
118
|
+
choices: [0],
|
|
119
|
+
analytics: [{}],
|
|
120
|
+
};
|
|
121
|
+
exports.playRequestExamples = {
|
|
122
|
+
minimal: {
|
|
123
|
+
summary: 'Minimal request',
|
|
124
|
+
value: minimalRequest,
|
|
125
|
+
},
|
|
126
|
+
maximal: {
|
|
127
|
+
summary: 'Maximal request',
|
|
128
|
+
value: maximalRequest,
|
|
129
|
+
},
|
|
130
|
+
buyBonus: {
|
|
131
|
+
summary: 'Buy bonus',
|
|
132
|
+
value: buyBonusRequest,
|
|
133
|
+
},
|
|
134
|
+
makeChoice: {
|
|
135
|
+
summary: 'Make choice',
|
|
136
|
+
value: makeChoiceRequest,
|
|
137
|
+
},
|
|
138
|
+
metaData: {
|
|
139
|
+
summary: 'Meta data',
|
|
140
|
+
value: metaDataRequest,
|
|
141
|
+
},
|
|
142
|
+
cheat: {
|
|
143
|
+
summary: 'Cheat',
|
|
144
|
+
value: cheatRequest,
|
|
145
|
+
},
|
|
146
|
+
variabelLines: {
|
|
147
|
+
summary: 'Variable lines',
|
|
148
|
+
value: variabelLinesRequest,
|
|
149
|
+
},
|
|
150
|
+
multiStake: {
|
|
151
|
+
summary: 'Multi stake',
|
|
152
|
+
value: multiStakeRequest,
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
exports.playReplyExamples = {
|
|
156
|
+
minimal: {
|
|
157
|
+
summary: 'Minimal reply',
|
|
158
|
+
value: minimalReply,
|
|
159
|
+
},
|
|
160
|
+
maximal: {
|
|
161
|
+
summary: 'Maximal reply',
|
|
162
|
+
value: maximalReply,
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
//# sourceMappingURL=play.schema.examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"play.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/play.schema.examples.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG;IACnB,IAAI,EAAE,IAAI;IACV,gBAAgB,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;SAC7B,CAAC;IACF,eAAe,EAAE,KAAK;IACtB,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,IAAI;CACpB,CAAA;AAED,MAAM,cAAc,GAAG;IACnB,IAAI,EAAE,IAAI;IACV,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,CAAC;IACF,eAAe,EAAE,IAAI;IACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;QACjB,OAAO,EAAE;YACL,KAAK,EAAE,MAAM;SAChB;QACD,aAAa,EAAE;YACX,KAAK,EAAE,WAAW;SACrB;KACJ,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;QACvB,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;QACxB,UAAU,EAAE,IAAI;KACnB,CAAC;IACF,MAAM,EAAE,CAAC;CACZ,CAAA;AAED,MAAM,eAAe,GAAG;IACpB,GAAG,cAAc;IACjB,MAAM,EAAE,CAAC;YACL,I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,EAAE,yUAAyU;QACnV,OAAO,EAAE,GAAG;QACZ,QAAQ,EAAE,EAAE;KACf;CACJ,CAAA;AAED,MAAM,YAAY,GAAG;IACjB,GAAG,YAAY;IACf,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE,qBAAqB;IACjC,OAAO,EAAE,CAAC,CAAC,CAAC;IACZ,SAAS,EAAE,CAAC,EAAE,CAAC;CAClB,CAAA;AAEY,QAAA,mBAAmB,GAAc;IAC1C,OAAO,EAAE;QACL,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE,cAAc;KACxB;IACD,OAAO,EAAE;QACL,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE,cAAc;KACxB;IACD,QAAQ,EAAE;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,eAAe;KACzB;IACD,UAAU,EAAE;QACR,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,iBAAiB;KAC3B;IACD,QAAQ,EAAE;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,eAAe;KACzB;IACD,KAAK,EAAE;QACH,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,YAAY;KACtB;IACD,aAAa,EAAE;QACX,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE,oBAAoB;KAC9B;IACD,UAAU,EAAE;QACR,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,iBAAiB;KAC3B;CACJ,CAAA;AAEY,QAAA,iBAAiB,GAAc;IACxC,OAAO,EAAE;QACL,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,YAAY;KACtB;IACD,OAAO,EAAE;QACL,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,YAAY;KACtB;CACJ,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.schema.examples.d.ts","sourceRoot":"","sources":["../../../schemas/examples/validate.schema.examples.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AA4ErC,eAAO,MAAM,uBAAuB,EAAE,SAqBrC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,SAKnC,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateReplyExamples = exports.validateRequestExamples = void 0;
|
|
4
|
+
const minimalRequest = {
|
|
5
|
+
demo: true,
|
|
6
|
+
currencyDecimals: 2,
|
|
7
|
+
stakes: [{
|
|
8
|
+
name: 'default', amount: 3,
|
|
9
|
+
}],
|
|
10
|
+
maxExposure: 100000,
|
|
11
|
+
metaPublic: '{}',
|
|
12
|
+
metaPrivate: '{}',
|
|
13
|
+
};
|
|
14
|
+
const maximalRequest = {
|
|
15
|
+
demo: true,
|
|
16
|
+
currencyDecimals: 2,
|
|
17
|
+
stakes: [{
|
|
18
|
+
name: 'slider',
|
|
19
|
+
amount: 6,
|
|
20
|
+
level: 1,
|
|
21
|
+
qty: 1,
|
|
22
|
+
params: JSON.stringify({
|
|
23
|
+
left: 10, right: 90,
|
|
24
|
+
}),
|
|
25
|
+
}, {
|
|
26
|
+
name: 'cell',
|
|
27
|
+
amount: 75,
|
|
28
|
+
level: 2,
|
|
29
|
+
qty: 6,
|
|
30
|
+
params: JSON.stringify({
|
|
31
|
+
value: 14,
|
|
32
|
+
}),
|
|
33
|
+
}],
|
|
34
|
+
maxExposure: 100000,
|
|
35
|
+
metaPublic: JSON.stringify({
|
|
36
|
+
someProgress: 15,
|
|
37
|
+
}),
|
|
38
|
+
metaPrivate: JSON.stringify({
|
|
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
|
+
}),
|
|
50
|
+
};
|
|
51
|
+
const variabelLinesRequest = {
|
|
52
|
+
...minimalRequest,
|
|
53
|
+
stakes: [{
|
|
54
|
+
name: 'default', amount: 75, level: 2,
|
|
55
|
+
}],
|
|
56
|
+
};
|
|
57
|
+
const multiStakeRequest = {
|
|
58
|
+
...minimalRequest,
|
|
59
|
+
stakes: [{
|
|
60
|
+
name: 'default',
|
|
61
|
+
amount: 10,
|
|
62
|
+
qty: 75,
|
|
63
|
+
}, {
|
|
64
|
+
name: 'buyBonus',
|
|
65
|
+
amount: 100,
|
|
66
|
+
qty: 35,
|
|
67
|
+
}],
|
|
68
|
+
};
|
|
69
|
+
const minimalReply = {
|
|
70
|
+
ok: true,
|
|
71
|
+
};
|
|
72
|
+
exports.validateRequestExamples = {
|
|
73
|
+
minimal: {
|
|
74
|
+
summary: 'Minimal request',
|
|
75
|
+
value: minimalRequest,
|
|
76
|
+
},
|
|
77
|
+
maximal: {
|
|
78
|
+
summary: 'Maximal request',
|
|
79
|
+
value: maximalRequest,
|
|
80
|
+
},
|
|
81
|
+
metaData: {
|
|
82
|
+
summary: 'Meta data',
|
|
83
|
+
value: metaDataRequest,
|
|
84
|
+
},
|
|
85
|
+
variabelLines: {
|
|
86
|
+
summary: 'Variable lines',
|
|
87
|
+
value: variabelLinesRequest,
|
|
88
|
+
},
|
|
89
|
+
multiStake: {
|
|
90
|
+
summary: 'Multi stake',
|
|
91
|
+
value: multiStakeRequest,
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
exports.validateReplyExamples = {
|
|
95
|
+
minimal: {
|
|
96
|
+
summary: 'Minimal reply',
|
|
97
|
+
value: minimalReply,
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=validate.schema.examples.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/validate.schema.examples.ts"],"names":[],"mappings":";;;AAEA,MAA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KAAK,EAAE,CAAC;SACxC,CAAC;CACL,CAAA;AAED,MAAM,iBAAiB,GAAG;IACtB,GAAG,cAAc;IACjB,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,EAAE;YACV,GAAG,EAAE,EAAE;SACV,EAAE;YACC,IAAI,EAAE,UAAU;YAChB,MAAM,EAAE,GAAG;YACX,GAAG,EAAE,EAAE;SACV,CAAC;CACL,CAAA;AAED,MAAM,YAAY,GAAG;IACjB,EAAE,EAAE,IAAI;CACX,CAAA;AAEY,QAAA,uBAAuB,GAAc;IAC9C,OAAO,EAAE;QACL,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE,cAAc;KACxB;IACD,OAAO,EAAE;QACL,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE,cAAc;KACxB;IACD,QAAQ,EAAE;QACN,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,eAAe;KACzB;IACD,aAAa,EAAE;QACX,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE,oBAAoB;KAC9B;IACD,UAAU,EAAE;QACR,OAAO,EAAE,aAAa;QACtB,KAAK,EAAE,iBAAiB;KAC3B;CACJ,CAAA;AAEY,QAAA,qBAAqB,GAAc;IAC5C,OAAO,EAAE;QACL,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,YAAY;KACtB;CACJ,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Static, Type } from 'typebox';
|
|
2
|
+
import { EEnvironment } from './shared';
|
|
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
|
+
export declare const HealthcheckReplySchema: Type.TObject<{
|
|
11
|
+
code: Type.TInteger;
|
|
12
|
+
status: Type.TBoolean;
|
|
13
|
+
service: Type.TString;
|
|
14
|
+
environment: Type.TEnum<[EEnvironment.development, EEnvironment.staging, EEnvironment.production]>;
|
|
15
|
+
uptime: Type.TNumber;
|
|
16
|
+
message: Type.TString;
|
|
17
|
+
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
|
+
}>;
|
|
28
|
+
export type THealthcheckRequest = Static<typeof HealthcheckRequestSchema>;
|
|
29
|
+
export type TMetrics = Static<typeof MetricsSchema>;
|
|
30
|
+
export type THealthcheckReply = Static<typeof HealthcheckReplySchema>;
|
|
31
|
+
//# sourceMappingURL=healthcheck.schema.d.ts.map
|
|
@@ -0,0 +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,aAAa;;;;;EAiBxB,CAAA;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;EAkCjC,CAAA;AAEF,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAA;AACzE,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAA;AACnD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HealthcheckReplySchema = exports.MetricsSchema = exports.HealthcheckRequestSchema = void 0;
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
|
+
const healthcheck_schema_examples_1 = require("./examples/healthcheck.schema.examples");
|
|
6
|
+
const shared_1 = require("./shared");
|
|
7
|
+
exports.HealthcheckRequestSchema = typebox_1.Type.Object({}, {
|
|
8
|
+
additionalProperties: false,
|
|
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
|
+
exports.HealthcheckReplySchema = typebox_1.Type.Object({
|
|
29
|
+
code: typebox_1.Type.Integer({
|
|
30
|
+
description: 'Always 200 for success responses',
|
|
31
|
+
}),
|
|
32
|
+
status: typebox_1.Type.Boolean({
|
|
33
|
+
description: 'Always true for success responses',
|
|
34
|
+
}),
|
|
35
|
+
service: typebox_1.Type.String({
|
|
36
|
+
description: 'Name of service. (Game text code for Game Server)',
|
|
37
|
+
}),
|
|
38
|
+
environment: typebox_1.Type.Enum(shared_1.EEnvironment, {
|
|
39
|
+
description: 'Current environment',
|
|
40
|
+
}),
|
|
41
|
+
uptime: typebox_1.Type.Number({
|
|
42
|
+
description: 'Process uptime',
|
|
43
|
+
}),
|
|
44
|
+
message: typebox_1.Type.String({
|
|
45
|
+
description: 'Some text message ("OK" for healthcheck)',
|
|
46
|
+
}),
|
|
47
|
+
timestamp: typebox_1.Type.Integer({
|
|
48
|
+
description: 'Current timestamp (UTC)',
|
|
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,
|
|
58
|
+
}),
|
|
59
|
+
}, {
|
|
60
|
+
additionalProperties: false,
|
|
61
|
+
'x-examples': healthcheck_schema_examples_1.healthcheckReplyExamples,
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=healthcheck.schema.js.map
|
|
@@ -0,0 +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,aAAa,GAAG,cAAI,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,cAAI,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC;YAClB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,2BAA2B;SAC3C,CAAC;QACF,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC;YACjB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,0BAA0B;SAC1C,CAAC;KACL,EAAE;QACC,WAAW,EAAE,qBAAqB;QAClC,oBAAoB,EAAE,KAAK;KAC9B,CAAC;CACL,EAAE;IACC,WAAW,EAAE,mBAAmB;IAChC,oBAAoB,EAAE,KAAK;CAC9B,CAAC,CAAA;AAEW,QAAA,sBAAsB,GAAG,cAAI,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,cAAI,CAAC,OAAO,CAAC;QACf,WAAW,EAAE,kCAAkC;KAClD,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC;QACjB,WAAW,EAAE,mCAAmC;KACnD,CAAC;IACF,OAAO,EAAE,cAAI,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,mDAAmD;KACnE,CAAC;IACF,WAAW,EAAE,cAAI,CAAC,IAAI,CAAC,qBAAY,EAAE;QACjC,WAAW,EAAE,qBAAqB;KACrC,CAAC;IACF,MAAM,EAAE,cAAI,CAAC,MAAM,CAAC;QAChB,WAAW,EAAE,gBAAgB;KAChC,CAAC;IACF,OAAO,EAAE,cAAI,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,0CAA0C;KAC1D,CAAC;IACF,SAAS,EAAE,cAAI,CAAC,OAAO,CAAC;QACpB,WAAW,EAAE,yBAAyB;KACzC,CAAC;IACF,OAAO,EAAE,qBAAa;IACtB,QAAQ,EAAE,cAAI,CAAC,MAAM,CAAC;QAClB,MAAM,EAAE,cAAI,CAAC,OAAO,CAAC;YACjB,WAAW,EAAE,8BAA8B;SAC9C,CAAC;KACL,EAAE;QACC,WAAW,EAAE,sBAAsB;QACnC,oBAAoB,EAAE,KAAK;KAC9B,CAAC;CACL,EAAE;IACC,oBAAoB,EAAE,KAAK;IAC3B,YAAY,EAAE,sDAAwB;CACzC,CAAC,CAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Static, Type } from 'typebox';
|
|
2
|
+
export declare const PlayRequestSchema: Type.TObject<{
|
|
3
|
+
demo: Type.TBoolean;
|
|
4
|
+
currencyDecimals: Type.TOptional<Type.TInteger>;
|
|
5
|
+
stakes: Type.TOptional<Type.TArray<Type.TObject<{
|
|
6
|
+
name: Type.TString;
|
|
7
|
+
amount: Type.TNumber;
|
|
8
|
+
level: Type.TOptional<Type.TInteger>;
|
|
9
|
+
qty: Type.TOptional<Type.TInteger>;
|
|
10
|
+
params: Type.TOptional<Type.TString>;
|
|
11
|
+
}>>>;
|
|
12
|
+
isGambleAllowed: Type.TOptional<Type.TBoolean>;
|
|
13
|
+
test: Type.TOptional<Type.TString>;
|
|
14
|
+
metaPrivate: Type.TOptional<Type.TString>;
|
|
15
|
+
metaPublic: Type.TOptional<Type.TString>;
|
|
16
|
+
choice: Type.TOptional<Type.TInteger>;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const PlayReplySchema: Type.TObject<{
|
|
19
|
+
ok: Type.TBoolean;
|
|
20
|
+
rng: Type.TString;
|
|
21
|
+
finished: Type.TBoolean;
|
|
22
|
+
results: Type.TObject<{
|
|
23
|
+
response: Type.TString;
|
|
24
|
+
winCash: Type.TNumber;
|
|
25
|
+
winCoins: Type.TOptional<Type.TNumber>;
|
|
26
|
+
}>;
|
|
27
|
+
metaPrivate: Type.TOptional<Type.TString>;
|
|
28
|
+
metaPublic: Type.TOptional<Type.TString>;
|
|
29
|
+
choices: Type.TOptional<Type.TArray<Type.TNumber>>;
|
|
30
|
+
analytics: Type.TOptional<Type.TArray<Type.TAny>>;
|
|
31
|
+
}>;
|
|
32
|
+
export type TPlayRequest = Static<typeof PlayRequestSchema>;
|
|
33
|
+
export type TPlayReply = Static<typeof PlayReplySchema>;
|
|
34
|
+
//# sourceMappingURL=play.schema.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;EA+B5B,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;EAwC1B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAC3D,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlayReplySchema = exports.PlayRequestSchema = void 0;
|
|
4
|
+
const typebox_1 = require("typebox");
|
|
5
|
+
const play_schema_examples_1 = require("./examples/play.schema.examples");
|
|
6
|
+
const shared_1 = require("./shared");
|
|
7
|
+
exports.PlayRequestSchema = typebox_1.Type.Object({
|
|
8
|
+
demo: typebox_1.Type.Boolean({
|
|
9
|
+
description: 'true if it is demo game',
|
|
10
|
+
}),
|
|
11
|
+
currencyDecimals: typebox_1.Type.Optional(typebox_1.Type.Integer({
|
|
12
|
+
description: 'Floating point number for current currency profile',
|
|
13
|
+
minimum: 0,
|
|
14
|
+
})),
|
|
15
|
+
stakes: typebox_1.Type.Optional(typebox_1.Type.Array(shared_1.StakeSchema, {
|
|
16
|
+
description: 'List of stakes of the round',
|
|
17
|
+
minItems: 1,
|
|
18
|
+
})),
|
|
19
|
+
isGambleAllowed: typebox_1.Type.Optional(typebox_1.Type.Boolean({
|
|
20
|
+
description: 'Provided if only game has any “double up” mechanics. true if gamble feature allowed by license settings',
|
|
21
|
+
})),
|
|
22
|
+
test: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
23
|
+
description: 'Object with cheat config transformed to string (available only for local development and for real game of test operator on preproduction stage)',
|
|
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',
|
|
33
|
+
})),
|
|
34
|
+
}, {
|
|
35
|
+
$id: 'PlayRequest',
|
|
36
|
+
additionalProperties: false,
|
|
37
|
+
'x-examples': play_schema_examples_1.playRequestExamples,
|
|
38
|
+
});
|
|
39
|
+
exports.PlayReplySchema = typebox_1.Type.Object({
|
|
40
|
+
ok: typebox_1.Type.Boolean({
|
|
41
|
+
description: 'Always true for success responses',
|
|
42
|
+
}),
|
|
43
|
+
rng: typebox_1.Type.String({
|
|
44
|
+
description: 'List of all random numbers with additional service info. Stringified JSON',
|
|
45
|
+
}),
|
|
46
|
+
finished: typebox_1.Type.Boolean({
|
|
47
|
+
description: 'true if game round is finished. Can be false for stepped games',
|
|
48
|
+
}),
|
|
49
|
+
results: typebox_1.Type.Object({
|
|
50
|
+
response: typebox_1.Type.String({
|
|
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',
|
|
61
|
+
}),
|
|
62
|
+
metaPrivate: typebox_1.Type.Optional(typebox_1.Type.String({
|
|
63
|
+
description: 'Private part of meta data (json object transformed to string). Inner data for calculating average bet, double up payouts, etc.',
|
|
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 ',
|
|
70
|
+
minItems: 1,
|
|
71
|
+
})),
|
|
72
|
+
analytics: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Any(), {
|
|
73
|
+
description: 'List of some analytics data...',
|
|
74
|
+
})),
|
|
75
|
+
}, {
|
|
76
|
+
$id: 'PlayReply',
|
|
77
|
+
additionalProperties: false,
|
|
78
|
+
'x-examples': play_schema_examples_1.playReplyExamples,
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=play.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"play.schema.js","sourceRoot":"","sources":["../../schemas/play.schema.ts"],"names":[],"mappings":";;;AAAA,qCAAsC;AAEtC,0EAAwF;AACxF,qCAAsC;AAEzB,QAAA,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,cAAI,CAAC,OAAO,CAAC;QACf,WAAW,EAAE,yBAAyB;KACzC,CAAC;IACF,gBAAgB,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,CAAC;QACzC,WAAW,EAAE,oDAAoD;QACjE,OAAO,EAAE,CAAC;KACb,CAAC,CAAC;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,oBAAW,EAAE;QAC1C,WAAW,EAAE,6BAA6B;QAC1C,QAAQ,EAAE,CAAC;KACd,CAAC,CAAC;IACH,eAAe,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,OAAO,CAAC;QACxC,WAAW,EAAE,yGAAyG;KACzH,CAAC,CAAC;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC;QAC5B,WAAW,EAAE,iJAAiJ;KACjK,CAAC,CAAC;IACH,WAAW,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC;QACnC,WAAW,EAAE,gIAAgI;KAChJ,CAAC,CAAC;IACH,UAAU,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC;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