@truelab/trueserver 0.0.3 → 0.0.6
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 +33 -0
- package/MIGRATION.md +303 -0
- package/README.md +96 -98
- 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 +7 -0
- package/dist/examples.d.ts.map +1 -0
- package/dist/examples.js +18 -0
- package/dist/examples.js.map +1 -0
- package/dist/helpers/config.helper.d.ts +4 -1
- package/dist/helpers/config.helper.d.ts.map +1 -1
- package/dist/helpers/config.helper.js +26 -0
- package/dist/helpers/config.helper.js.map +1 -1
- package/dist/helpers/errors.helper.d.ts +18 -0
- package/dist/helpers/errors.helper.d.ts.map +1 -0
- package/dist/helpers/errors.helper.js +20 -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/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -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.js +2 -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 +43 -17
- package/dist/routes/config/config.route.validate.plugin.js.map +1 -1
- package/dist/routes/play/play.route.validate.plugin.d.ts +9 -9
- package/dist/routes/play/play.route.validate.plugin.d.ts.map +1 -1
- package/dist/routes/play/play.route.validate.plugin.js +84 -40
- 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 +9 -3
- 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 +41 -42
- 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 +30 -34
- 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 +66 -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 +1 -3
- 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 +21 -16
- package/dist/schemas/play.schema.d.ts.map +1 -1
- package/dist/schemas/play.schema.js +36 -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 +2 -3
- package/dist/schemas/validate.schema.d.ts.map +1 -1
- package/dist/schemas/validate.schema.js +2 -5
- package/dist/schemas/validate.schema.js.map +1 -1
- package/package.json +10 -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
|
@@ -1,165 +1,101 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.playReplyExamples = exports.playRequestExamples = void 0;
|
|
4
|
-
const
|
|
5
|
-
|
|
4
|
+
const openingStepRequest = {
|
|
5
|
+
isDemo: false,
|
|
6
6
|
currencyDecimals: 2,
|
|
7
|
+
stepIndex: 0,
|
|
7
8
|
stakes: [{
|
|
8
|
-
name: 'default',
|
|
9
|
+
name: 'default',
|
|
10
|
+
amount: 1.0,
|
|
11
|
+
coinValue: 0.1,
|
|
12
|
+
level: 9,
|
|
9
13
|
}],
|
|
10
|
-
isGambleAllowed: false,
|
|
11
|
-
metaPublic: '{}',
|
|
12
|
-
metaPrivate: '{}',
|
|
13
14
|
};
|
|
14
|
-
const
|
|
15
|
-
|
|
15
|
+
const continuationStepRequest = {
|
|
16
|
+
isDemo: false,
|
|
16
17
|
currencyDecimals: 2,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
}],
|
|
18
|
+
stepIndex: 1,
|
|
19
|
+
choice: 3,
|
|
20
|
+
meta: {
|
|
21
|
+
public: { someProgress: 15 },
|
|
22
|
+
private: { coinsTotal: 1480 },
|
|
23
|
+
},
|
|
91
24
|
};
|
|
92
25
|
const multiStakeRequest = {
|
|
93
|
-
|
|
26
|
+
isDemo: false,
|
|
27
|
+
currencyDecimals: 2,
|
|
28
|
+
stepIndex: 0,
|
|
94
29
|
stakes: [{
|
|
95
30
|
name: 'red',
|
|
96
|
-
amount:
|
|
31
|
+
amount: 30,
|
|
97
32
|
qty: 3,
|
|
98
33
|
}, {
|
|
99
34
|
name: 'single-27',
|
|
100
|
-
amount:
|
|
35
|
+
amount: 22,
|
|
101
36
|
qty: 11,
|
|
102
37
|
}],
|
|
103
38
|
};
|
|
104
|
-
const
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
39
|
+
const cheatRequest = {
|
|
40
|
+
...openingStepRequest,
|
|
41
|
+
test: JSON.stringify({
|
|
42
|
+
symbols: { value: 'Wild' },
|
|
43
|
+
randomNumbers: { value: '0,0,0,0,0' },
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
46
|
+
const finishedReply = {
|
|
47
|
+
gameResponse: {},
|
|
48
|
+
rng: [
|
|
49
|
+
{ value: 0.1234567 },
|
|
50
|
+
{ value: 0.9876543 },
|
|
51
|
+
],
|
|
108
52
|
results: {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
53
|
+
coins: 250,
|
|
54
|
+
cashWin: 2.5,
|
|
55
|
+
finished: true,
|
|
112
56
|
},
|
|
113
57
|
};
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
58
|
+
const continuesWithChoiceReply = {
|
|
59
|
+
gameResponse: {},
|
|
60
|
+
rng: [
|
|
61
|
+
{ value: 0.1234567 },
|
|
62
|
+
],
|
|
63
|
+
results: {
|
|
64
|
+
cashWin: 0,
|
|
65
|
+
finished: false,
|
|
66
|
+
choices: [1, 3, 5],
|
|
67
|
+
meta: {
|
|
68
|
+
public: {},
|
|
69
|
+
private: {},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
120
72
|
};
|
|
121
73
|
exports.playRequestExamples = {
|
|
122
|
-
|
|
123
|
-
summary: '
|
|
124
|
-
value:
|
|
125
|
-
},
|
|
126
|
-
maximal: {
|
|
127
|
-
summary: 'Maximal request',
|
|
128
|
-
value: maximalRequest,
|
|
74
|
+
openingStep: {
|
|
75
|
+
summary: 'Opening step (round open)',
|
|
76
|
+
value: openingStepRequest,
|
|
129
77
|
},
|
|
130
|
-
|
|
131
|
-
summary: '
|
|
132
|
-
value:
|
|
78
|
+
continuationStep: {
|
|
79
|
+
summary: 'Continuation step (in-round choice)',
|
|
80
|
+
value: continuationStepRequest,
|
|
133
81
|
},
|
|
134
|
-
|
|
135
|
-
summary: '
|
|
136
|
-
value:
|
|
137
|
-
},
|
|
138
|
-
metaData: {
|
|
139
|
-
summary: 'Meta data',
|
|
140
|
-
value: metaDataRequest,
|
|
82
|
+
multiStake: {
|
|
83
|
+
summary: 'Multi stake (hasMultiStake=true)',
|
|
84
|
+
value: multiStakeRequest,
|
|
141
85
|
},
|
|
142
86
|
cheat: {
|
|
143
|
-
summary: 'Cheat',
|
|
87
|
+
summary: 'Cheat tool (non-production only)',
|
|
144
88
|
value: cheatRequest,
|
|
145
89
|
},
|
|
146
|
-
variabelLines: {
|
|
147
|
-
summary: 'Variable lines',
|
|
148
|
-
value: variabelLinesRequest,
|
|
149
|
-
},
|
|
150
|
-
multiStake: {
|
|
151
|
-
summary: 'Multi stake',
|
|
152
|
-
value: multiStakeRequest,
|
|
153
|
-
},
|
|
154
90
|
};
|
|
155
91
|
exports.playReplyExamples = {
|
|
156
|
-
|
|
157
|
-
summary: '
|
|
158
|
-
value:
|
|
92
|
+
finished: {
|
|
93
|
+
summary: 'Round finishes in one step',
|
|
94
|
+
value: finishedReply,
|
|
159
95
|
},
|
|
160
|
-
|
|
161
|
-
summary: '
|
|
162
|
-
value:
|
|
96
|
+
continuesWithChoice: {
|
|
97
|
+
summary: 'Round continues with a choice',
|
|
98
|
+
value: continuesWithChoiceReply,
|
|
163
99
|
},
|
|
164
100
|
};
|
|
165
101
|
//# sourceMappingURL=play.schema.examples.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"play.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/play.schema.examples.ts"],"names":[],"mappings":";;;AAEA,MAAM,
|
|
1
|
+
{"version":3,"file":"play.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/play.schema.examples.ts"],"names":[],"mappings":";;;AAEA,MAAM,kBAAkB,GAAG;IACvB,MAAM,EAAE,KAAK;IACb,gBAAgB,EAAE,CAAC;IACnB,SAAS,EAAE,CAAC;IACZ,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,GAAG;YACX,SAAS,EAAE,GAAG;YACd,KAAK,EAAE,CAAC;SACX,CAAC;CACL,CAAA;AAED,MAAM,uBAAuB,GAAG;IAC5B,MAAM,EAAE,KAAK;IACb,gBAAgB,EAAE,CAAC;IACnB,SAAS,EAAE,CAAC;IACZ,MAAM,EAAE,CAAC;IACT,IAAI,EAAE;QACF,MAAM,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;QAC5B,OAAO,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;KAChC;CACJ,CAAA;AAED,MAAM,iBAAiB,GAAG;IACtB,MAAM,EAAE,KAAK;IACb,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AkC;QAC3C,KAAK,EAAE,iBAAiB;KAC3B;IACD,KAAK,EAAE;QACH,OAAO,EAAE,kCAAkC;QAC3C,KAAK,EAAE,YAAY;KACtB;CACJ,CAAA;AAEY,QAAA,iBAAiB,GAAc;IACxC,QAAQ,EAAE;QACN,OAAO,EAAE,4BAA4B;QACrC,KAAK,EAAE,aAAa;KACvB;IACD,mBAAmB,EAAE;QACjB,OAAO,EAAE,+BAA+B;QACxC,KAAK,EAAE,wBAAwB;KAClC;CACJ,CAAA"}
|
|
@@ -1 +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;
|
|
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;AA0ErC,eAAO,MAAM,uBAAuB,EAAE,SAqBrC,CAAA;AAED,eAAO,MAAM,qBAAqB,EAAE,SAKnC,CAAA"}
|
|
@@ -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,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,WAAW,EAAE,MAAM;IACnB,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;CACL,CAAA;AAED,MAAM,eAAe,GAAG;IACpB,GAAG,cAAc;IACjB,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC;QACvB,YAAY,EAAE,EAAE;KACnB,CAAC;IACF,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC;QACxB,cAAc,EAAE,OAAO;KAC1B,CAAC;CACL,CAAA;AAED,MAAM,oBAAoB,GAAG;IACzB,GAAG,cAAc;IACjB,MAAM,EAAE,CAAC;YACL,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,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
|
|
1
|
+
{"version":3,"file":"validate.schema.examples.js","sourceRoot":"","sources":["../../../schemas/examples/validate.schema.exam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S,EAAE,MAAM,EAAE,EAAE,EAAE,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,EAAE,CAAA;AAEV,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,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
|
-
isGambleAllowed: Type.TOptional<Type.TBoolean>;
|
|
13
|
-
test: Type.TOptional<Type.TString>;
|
|
14
|
-
metaPrivate: Type.TOptional<Type.TString>;
|
|
15
|
-
metaPublic: Type.TOptional<Type.TString>;
|
|
16
14
|
choice: Type.TOptional<Type.TInteger>;
|
|
15
|
+
meta: Type.TOptional<Type.TObject<{
|
|
16
|
+
public: Type.TAny;
|
|
17
|
+
private: Type.TAny;
|
|
18
|
+
}>>;
|
|
19
|
+
test: Type.TOptional<Type.TString>;
|
|
17
20
|
}>;
|
|
18
21
|
export declare const PlayReplySchema: Type.TObject<{
|
|
19
|
-
|
|
20
|
-
rng: Type.
|
|
21
|
-
|
|
22
|
+
gameResponse: Type.TAny;
|
|
23
|
+
rng: Type.TArray<Type.TObject<{
|
|
24
|
+
value: Type.TNumber;
|
|
25
|
+
}>>;
|
|
22
26
|
results: Type.TObject<{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
coins: Type.TOptional<Type.TNumber>;
|
|
28
|
+
cashWin: Type.TNumber;
|
|
29
|
+
finished: Type.TBoolean;
|
|
30
|
+
choices: Type.TOptional<Type.TArray<Type.TInteger>>;
|
|
31
|
+
meta: Type.TOptional<Type.TObject<{
|
|
32
|
+
public: Type.TAny;
|
|
33
|
+
private: Type.TAny;
|
|
34
|
+
}>>;
|
|
26
35
|
}>;
|
|
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
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;;;;;;;;;;;;;;;EAmC1B,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.Integer({
|
|
24
|
+
description: 'User choice. Absent on opening step; required on every continuation step (must be one of results.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,36 @@ 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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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',
|
|
48
45
|
}),
|
|
49
46
|
results: typebox_1.Type.Object({
|
|
50
|
-
|
|
51
|
-
description: '
|
|
47
|
+
coins: typebox_1.Type.Optional(typebox_1.Type.Number({
|
|
48
|
+
description: 'Win for this step, in coin units',
|
|
49
|
+
})),
|
|
50
|
+
cashWin: typebox_1.Type.Number({
|
|
51
|
+
description: 'Win to add to the round for this step, in currency units (0 if the step has no win)',
|
|
52
|
+
minimum: 0,
|
|
52
53
|
}),
|
|
53
|
-
|
|
54
|
-
description: '
|
|
54
|
+
finished: typebox_1.Type.Boolean({
|
|
55
|
+
description: 'When true, the round is finished. Canonical end-of-round indicator',
|
|
55
56
|
}),
|
|
56
|
-
|
|
57
|
-
description: '
|
|
57
|
+
choices: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Integer(), {
|
|
58
|
+
description: 'Present only for hasChoice=true when the round must continue. Must be a non-empty array of integers; never null or []',
|
|
59
|
+
minItems: 1,
|
|
58
60
|
})),
|
|
61
|
+
meta: typebox_1.Type.Optional(shared_1.MetaSchema),
|
|
59
62
|
}, {
|
|
60
|
-
description: '
|
|
63
|
+
description: 'Step summary that RGS reads to drive its logic',
|
|
64
|
+
additionalProperties: false,
|
|
61
65
|
}),
|
|
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
66
|
}, {
|
|
76
67
|
$id: 'PlayReply',
|
|
77
68
|
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,OAAO,CAAC;QAC/B,WAAW,EAAE,kIAAkI;KAClJ,CAAC,CAAC;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,mBAAU,CAAC;IAC/B,IAAI,EAAE,cAAI,CAAC,QAA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