@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.
Files changed (137) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/MIGRATION.md +508 -0
  3. package/README.md +114 -94
  4. package/dist/application.d.ts.map +1 -1
  5. package/dist/application.js +9 -5
  6. package/dist/application.js.map +1 -1
  7. package/dist/examples.d.ts +1 -0
  8. package/dist/examples.d.ts.map +1 -1
  9. package/dist/examples.js +3 -1
  10. package/dist/examples.js.map +1 -1
  11. package/dist/helpers/config.helper.d.ts +9 -1
  12. package/dist/helpers/config.helper.d.ts.map +1 -1
  13. package/dist/helpers/config.helper.js +29 -0
  14. package/dist/helpers/config.helper.js.map +1 -1
  15. package/dist/helpers/errors.helper.d.ts +19 -0
  16. package/dist/helpers/errors.helper.d.ts.map +1 -0
  17. package/dist/helpers/errors.helper.js +21 -0
  18. package/dist/helpers/errors.helper.js.map +1 -0
  19. package/dist/helpers/fastify.helper.d.ts +5 -1
  20. package/dist/helpers/fastify.helper.d.ts.map +1 -1
  21. package/dist/helpers/fastify.helper.js +3 -1
  22. package/dist/helpers/fastify.helper.js.map +1 -1
  23. package/dist/helpers/handlers.helper.d.ts +10 -1
  24. package/dist/helpers/handlers.helper.d.ts.map +1 -1
  25. package/dist/helpers/handlers.helper.js +2 -1
  26. package/dist/helpers/handlers.helper.js.map +1 -1
  27. package/dist/helpers/money.helper.d.ts +13 -0
  28. package/dist/helpers/money.helper.d.ts.map +1 -0
  29. package/dist/helpers/money.helper.js +29 -0
  30. package/dist/helpers/money.helper.js.map +1 -0
  31. package/dist/index.d.ts +7 -4
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +11 -4
  34. package/dist/index.js.map +1 -1
  35. package/dist/plugins/404.plugin.d.ts.map +1 -1
  36. package/dist/plugins/404.plugin.js +2 -1
  37. package/dist/plugins/404.plugin.js.map +1 -1
  38. package/dist/plugins/apikey.plugin.d.ts.map +1 -1
  39. package/dist/plugins/apikey.plugin.js +6 -7
  40. package/dist/plugins/apikey.plugin.js.map +1 -1
  41. package/dist/plugins/error.plugin.d.ts.map +1 -1
  42. package/dist/plugins/error.plugin.js +6 -2
  43. package/dist/plugins/error.plugin.js.map +1 -1
  44. package/dist/plugins/sentry.plugin.d.ts.map +1 -1
  45. package/dist/plugins/sentry.plugin.js +1 -2
  46. package/dist/plugins/sentry.plugin.js.map +1 -1
  47. package/dist/plugins/swagger.plugin.d.ts.map +1 -1
  48. package/dist/plugins/swagger.plugin.js +5 -1
  49. package/dist/plugins/swagger.plugin.js.map +1 -1
  50. package/dist/routes/checksum/checksum.route.d.ts +3 -0
  51. package/dist/routes/checksum/checksum.route.d.ts.map +1 -0
  52. package/dist/routes/checksum/checksum.route.js +21 -0
  53. package/dist/routes/checksum/checksum.route.js.map +1 -0
  54. package/dist/routes/checksum/index.d.ts +3 -0
  55. package/dist/routes/checksum/index.d.ts.map +1 -0
  56. package/dist/routes/checksum/index.js +12 -0
  57. package/dist/routes/checksum/index.js.map +1 -0
  58. package/dist/routes/client/client.route.d.ts +3 -0
  59. package/dist/routes/client/client.route.d.ts.map +1 -0
  60. package/dist/routes/{client.route.js → client/client.route.js} +5 -5
  61. package/dist/routes/client/client.route.js.map +1 -0
  62. package/dist/routes/client/index.d.ts +3 -0
  63. package/dist/routes/client/index.d.ts.map +1 -0
  64. package/dist/routes/client/index.js +12 -0
  65. package/dist/routes/client/index.js.map +1 -0
  66. package/dist/routes/config/config.route.js +1 -1
  67. package/dist/routes/config/config.route.js.map +1 -1
  68. package/dist/routes/config/config.route.validate.plugin.d.ts.map +1 -1
  69. package/dist/routes/config/config.route.validate.plugin.js +48 -17
  70. package/dist/routes/config/config.route.validate.plugin.js.map +1 -1
  71. package/dist/routes/play/play.route.validate.plugin.d.ts +10 -9
  72. package/dist/routes/play/play.route.validate.plugin.d.ts.map +1 -1
  73. package/dist/routes/play/play.route.validate.plugin.js +90 -39
  74. package/dist/routes/play/play.route.validate.plugin.js.map +1 -1
  75. package/dist/routes/validate/validate.route.validate.plugin.d.ts.map +1 -1
  76. package/dist/routes/validate/validate.route.validate.plugin.js +5 -4
  77. package/dist/routes/validate/validate.route.validate.plugin.js.map +1 -1
  78. package/dist/routes-public/healthcheck.route.d.ts.map +1 -0
  79. package/dist/{routes → routes-public}/healthcheck.route.js +4 -10
  80. package/dist/routes-public/healthcheck.route.js.map +1 -0
  81. package/dist/schemas/checksum.schema.d.ts +11 -0
  82. package/dist/schemas/checksum.schema.d.ts.map +1 -0
  83. package/dist/schemas/checksum.schema.js +26 -0
  84. package/dist/schemas/checksum.schema.js.map +1 -0
  85. package/dist/schemas/client.schema.d.ts +1 -1
  86. package/dist/schemas/client.schema.js +4 -4
  87. package/dist/schemas/client.schema.js.map +1 -1
  88. package/dist/schemas/config.schema.d.ts +17 -20
  89. package/dist/schemas/config.schema.d.ts.map +1 -1
  90. package/dist/schemas/config.schema.js +42 -43
  91. package/dist/schemas/config.schema.js.map +1 -1
  92. package/dist/schemas/examples/checksum.schema.examples.d.ts +3 -0
  93. package/dist/schemas/examples/checksum.schema.examples.d.ts.map +1 -0
  94. package/dist/schemas/examples/checksum.schema.examples.js +26 -0
  95. package/dist/schemas/examples/checksum.schema.examples.js.map +1 -0
  96. package/dist/schemas/examples/client.schema.examples.d.ts.map +1 -1
  97. package/dist/schemas/examples/client.schema.examples.js +15 -18
  98. package/dist/schemas/examples/client.schema.examples.js.map +1 -1
  99. package/dist/schemas/examples/config.schema.examples.d.ts.map +1 -1
  100. package/dist/schemas/examples/config.schema.examples.js +65 -33
  101. package/dist/schemas/examples/config.schema.examples.js.map +1 -1
  102. package/dist/schemas/examples/healthcheck.schema.examples.d.ts.map +1 -1
  103. package/dist/schemas/examples/healthcheck.schema.examples.js +3 -14
  104. package/dist/schemas/examples/healthcheck.schema.examples.js.map +1 -1
  105. package/dist/schemas/examples/play.schema.examples.d.ts.map +1 -1
  106. package/dist/schemas/examples/play.schema.examples.js +94 -130
  107. package/dist/schemas/examples/play.schema.examples.js.map +1 -1
  108. package/dist/schemas/examples/validate.schema.examples.d.ts.map +1 -1
  109. package/dist/schemas/examples/validate.schema.examples.js +51 -41
  110. package/dist/schemas/examples/validate.schema.examples.js.map +1 -1
  111. package/dist/schemas/healthcheck.schema.d.ts +2 -20
  112. package/dist/schemas/healthcheck.schema.d.ts.map +1 -1
  113. package/dist/schemas/healthcheck.schema.js +10 -41
  114. package/dist/schemas/healthcheck.schema.js.map +1 -1
  115. package/dist/schemas/play.schema.d.ts +22 -17
  116. package/dist/schemas/play.schema.d.ts.map +1 -1
  117. package/dist/schemas/play.schema.js +37 -45
  118. package/dist/schemas/play.schema.js.map +1 -1
  119. package/dist/schemas/shared.d.ts +13 -21
  120. package/dist/schemas/shared.d.ts.map +1 -1
  121. package/dist/schemas/shared.js +56 -72
  122. package/dist/schemas/shared.js.map +1 -1
  123. package/dist/schemas/validate.schema.d.ts +11 -7
  124. package/dist/schemas/validate.schema.d.ts.map +1 -1
  125. package/dist/schemas/validate.schema.js +14 -16
  126. package/dist/schemas/validate.schema.js.map +1 -1
  127. package/package.json +5 -2
  128. package/dist/plugins/metrics.plugin.d.ts +0 -9
  129. package/dist/plugins/metrics.plugin.d.ts.map +0 -1
  130. package/dist/plugins/metrics.plugin.js +0 -24
  131. package/dist/plugins/metrics.plugin.js.map +0 -1
  132. package/dist/routes/client.route.d.ts +0 -3
  133. package/dist/routes/client.route.d.ts.map +0 -1
  134. package/dist/routes/client.route.js.map +0 -1
  135. package/dist/routes/healthcheck.route.d.ts.map +0 -1
  136. package/dist/routes/healthcheck.route.js.map +0 -1
  137. /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
- demo: true,
5
+ isDemo: true,
6
6
  currencyDecimals: 2,
7
7
  stakes: [{
8
8
  name: 'default', amount: 3,
9
9
  }],
10
10
  maxExposure: 100000,
11
- metaPublic: '{}',
12
- metaPrivate: '{}',
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
- demo: true,
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
- 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
- }),
45
+ meta: {
46
+ public: { someProgress: 15 },
47
+ private: { coinsTotal: 1480 },
48
+ },
50
49
  };
51
- const variabelLinesRequest = {
52
- ...minimalRequest,
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
- ...minimalRequest,
59
+ isDemo: false,
60
+ currencyDecimals: 2,
59
61
  stakes: [{
60
- name: 'default',
62
+ name: 'straight',
61
63
  amount: 10,
62
- qty: 75,
64
+ qty: 1,
65
+ params: '17',
63
66
  }, {
64
- name: 'buyBonus',
65
- amount: 100,
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 minimalReply = {
70
- ok: true,
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
- metaData: {
82
- summary: 'Meta data',
83
- value: metaDataRequest,
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
- minimal: {
96
- summary: 'Minimal reply',
97
- value: minimalReply,
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,IAAI,EAAE,IAAI;IACV,gBAAgB,EAAE,CAAC;IACnB,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;SAC7B,CAAC;IACF,WAAW,EAAE,MAAM;IACnB,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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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"}
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,QA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,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,mCAAmC,EAAE,CAAA;AAErE,QAAA,uBAAuB,GAAc;IAC9C,OAAO,EAAE;QACL,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE,cAAc;KACxB;IACD,QAAQ,EAAE;QACN,OAAO,EAAE,gBAAgB;QACzB,KAAK,EAAE,eAAe;KACzB;IACD,OAAO,EAAE;QACL,OAAO,EAAE,iBAAiB;QAC1B,KAAK,EAAE,cAAc;KACxB;IACD,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"}
@@ -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
- code: Type.TInteger;
12
- status: Type.TBoolean;
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,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"}
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.MetricsSchema = exports.HealthcheckRequestSchema = void 0;
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
- code: typebox_1.Type.Integer({
30
- description: 'Always 200 for success responses',
11
+ ok: typebox_1.Type.Literal(true, {
12
+ description: 'true when the Game Server is healthy',
31
13
  }),
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)',
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: 'Current environment',
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: '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,
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,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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F,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
- demo: Type.TBoolean;
4
- currencyDecimals: Type.TOptional<Type.TInteger>;
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
- isGambleAllowed: Type.TOptional<Type.TBoolean>;
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
- ok: Type.TBoolean;
20
- rng: Type.TString;
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
- 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>>;
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;;;;;;;;;;;;;;;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"}
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
- demo: typebox_1.Type.Boolean({
9
- description: 'true if it is demo game',
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.Optional(typebox_1.Type.Integer({
12
- description: 'Floating point number for current currency profile',
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: 'List of stakes of the round',
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
- 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',
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: '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',
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
- ok: typebox_1.Type.Boolean({
41
- description: 'Always true for success responses',
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.String({
44
- description: 'List of all random numbers with additional service info. Stringified JSON',
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 if game round is finished. Can be false for stepped games',
54
+ description: 'When true, the round is finished. Canonical end-of-round indicator',
48
55
  }),
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',
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
- 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 ',
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
- analytics: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Any(), {
73
- description: 'List of some analytics data...',
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,qCAAsC;AAEzB,QAAA,iBAAiB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,cAAI,CAAC,OAAO,CAAC;QACf,WAAW,EAAE,yBAAyB;KACzC,CAAC;IACF,gBAAgB,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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"}
@@ -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
- ok: Type.TBoolean;
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
- ok: Type.TBoolean;
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
- ok: Type.TBoolean;
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,SAAS;IACjB,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,KAAK,UAAU;CAClB;AAED,oBAAY,UAAU;IAClB,OAAO,YAAY;IACnB,GAAG,QAAQ;IACX,QAAQ,aAAa;CACxB;AAED,oBAAY,WAAW;IACnB,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,MAAM,iBAAiB;IACvB,GAAG,WAAW;IACd,OAAO,kBAAkB;IACzB,IAAI,SAAS;IACb,QAAQ,cAAc;CACzB;AAED,oBAAY,YAAY;IACpB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,UAAU,eAAe;CAC5B;AAED,MAAM,MAAM,SAAS,GAAG;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG;QACX,KAAK,EAAE,GAAG,CAAC;QACX,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAA;KACvB,CAAA;CACJ,CAAA;AAED,eAAO,MAAM,WAAW;;;;;;EAuBtB,CAAA;AAEF,eAAO,MAAM,eAAe;;;;;;;EAyB1B,CAAA;AAEF,eAAO,MAAM,aAAa;;EAKxB,CAAA;AAEF,eAAO,MAAM,mBAAmB;;;;EAkB9B,CAAA;AAEF,eAAO,MAAM,kBAAkB;;;;EAkB7B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;EAkB5B,CAAA;AAEF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,WAAW,CAAC,CAAA;AAC/C,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC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