@smartico/public-api 0.0.410 → 0.0.411
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/README.md +1 -1
- package/dist/MiniGames/SAWPrize.d.ts +9 -0
- package/dist/MiniGames/SAWPrizeUI.d.ts +1 -0
- package/dist/MiniGames/SAWTemplate.d.ts +23 -0
- package/dist/WSAPI/WSAPIMiniGames.d.ts +7 -1
- package/dist/WSAPI/WSAPITypes.d.ts +33 -32
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +9 -1
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/classes/WSAPIMiniGames.md +7 -1
- package/docs/api/interfaces/SAWPrize.md +18 -0
- package/docs/api/interfaces/SAWPrizeUI.md +2 -0
- package/docs/api/interfaces/SAWTemplate.md +46 -0
- package/docs/api/interfaces/TMiniGamePrize.md +28 -20
- package/docs/api/interfaces/TMiniGameTemplate.md +12 -13
- package/docs/capabilities/getMiniGames.md +30 -29
- package/docs/capabilities/miniGameWinAcknowledgeRequest.md +7 -1
- package/docs/native/PROTOCOL.md +4 -0
- package/docs/ui/minigames/UIGuide_getMiniGames.md +22 -0
- package/docs/ui/minigames/UIGuide_miniGameWinAcknowledgeRequest.md +90 -0
- package/docs/ui/minigames/UIGuide_playMiniGame.md +12 -3
- package/package.json +1 -1
- package/src/MiniGames/SAWGetTemplatesResponse.ts +1 -0
- package/src/MiniGames/SAWPrize.ts +9 -0
- package/src/MiniGames/SAWPrizeUI.ts +2 -1
- package/src/MiniGames/SAWTemplate.ts +26 -4
- package/src/SmarticoAPI.ts +5 -0
- package/src/WSAPI/WSAPIMiniGames.ts +7 -1
- package/src/WSAPI/WSAPITypes.ts +35 -34
package/dist/index.modern.mjs
CHANGED
|
@@ -535,6 +535,7 @@ const SAWTemplatesTransform = items => {
|
|
|
535
535
|
sectors: p.saw_prize_ui_definition.sectors,
|
|
536
536
|
acknowledge_type: SAWAcknowledgeTypeNamed(p.saw_prize_ui_definition.acknowledge_type),
|
|
537
537
|
aknowledge_message: p.saw_prize_ui_definition.aknowledge_message,
|
|
538
|
+
aknowledge_message_lose: p.saw_prize_ui_definition.aknowledge_message_lose,
|
|
538
539
|
acknowledge_dp: p.saw_prize_ui_definition.acknowledge_dp,
|
|
539
540
|
acknowledge_action_title: p.saw_prize_ui_definition.acknowledge_action_title,
|
|
540
541
|
acknowledge_dp_additional: p.saw_prize_ui_definition.acknowledge_dp_additional,
|
|
@@ -7199,7 +7200,11 @@ class WSAPIMiniGames extends WSAPIRaffles {
|
|
|
7199
7200
|
* true` with no prize attached. Use this for game mechanics where the
|
|
7200
7201
|
* player can decline or forfeit the drawn prize — e.g. a
|
|
7201
7202
|
* gamble/discard step, or a client-driven game where the user's final
|
|
7202
|
-
* action decides whether the pre-drawn prize is actually won
|
|
7203
|
+
* action decides whether the pre-drawn prize is actually won (the
|
|
7204
|
+
* default Smartico UI does this for the Voyager game: failing the
|
|
7205
|
+
* star-collection run finalises the spin as lost). When configured,
|
|
7206
|
+
* the prize's `aknowledge_message_lose` is the operator's result copy
|
|
7207
|
+
* for this case — show it instead of `aknowledge_message`. It only
|
|
7203
7208
|
* works on a spin that is not yet finalised, so it requires playing
|
|
7204
7209
|
* with `acknowledge: false` and calling promptly — once the automatic
|
|
7205
7210
|
* acknowledge or the server-side fallback (below) has finalised the
|
|
@@ -7229,6 +7234,8 @@ class WSAPIMiniGames extends WSAPIRaffles {
|
|
|
7229
7234
|
* - Either way the spin's `is_claimed` flips to `true` on the next
|
|
7230
7235
|
* {@link getMiniGamesHistory} fetch.
|
|
7231
7236
|
*
|
|
7237
|
+
* **UI guidance**: see [UI Guide — `miniGameWinAcknowledgeRequest`](../../docs/ui/minigames/UIGuide_miniGameWinAcknowledgeRequest.md).
|
|
7238
|
+
*
|
|
7232
7239
|
* **Visitor mode**: not supported.
|
|
7233
7240
|
*
|
|
7234
7241
|
* @param request_id Correlation id of the spin to finalise: the
|
|
@@ -9997,6 +10004,7 @@ class SmarticoAPI {
|
|
|
9997
10004
|
t.prizes.forEach(p => {
|
|
9998
10005
|
p.saw_prize_ui_definition.name = IntUtils.replaceAll(p.saw_prize_ui_definition.name, '{{jackpot}}', jackpotValue);
|
|
9999
10006
|
p.saw_prize_ui_definition.aknowledge_message = IntUtils.replaceAll(p.saw_prize_ui_definition.aknowledge_message, '{{jackpot}}', jackpotValue);
|
|
10007
|
+
p.saw_prize_ui_definition.aknowledge_message_lose = IntUtils.replaceAll(p.saw_prize_ui_definition.aknowledge_message_lose, '{{jackpot}}', jackpotValue);
|
|
10000
10008
|
});
|
|
10001
10009
|
}
|
|
10002
10010
|
});
|