@smartico/public-api 0.0.409 → 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/SAWDoAknowledgeRequest.d.ts +2 -0
- package/dist/MiniGames/SAWPrize.d.ts +18 -0
- package/dist/MiniGames/SAWPrizeUI.d.ts +1 -0
- package/dist/MiniGames/SAWTemplate.d.ts +24 -0
- package/dist/SmarticoAPI.d.ts +1 -1
- package/dist/SmarticoLib/index.d.ts +1 -1
- package/dist/WSAPI/WSAPIJackpots.d.ts +11 -2
- package/dist/WSAPI/WSAPIMiniGames.d.ts +92 -23
- package/dist/WSAPI/WSAPITypes.d.ts +45 -44
- package/dist/index.js +112 -31
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +109 -28
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/classes/WSAPIJackpots.md +11 -2
- package/docs/api/classes/WSAPIMiniGames.md +92 -23
- package/docs/api/interfaces/SAWDoAknowledgeRequest.md +8 -0
- package/docs/api/interfaces/SAWPrize.md +36 -0
- package/docs/api/interfaces/SAWPrizeUI.md +2 -0
- package/docs/api/interfaces/SAWTemplate.md +48 -0
- package/docs/api/interfaces/TMiniGamePrize.md +51 -27
- package/docs/api/interfaces/TMiniGameTemplate.md +15 -16
- package/docs/capabilities/getJackpotEligibleGames.md +11 -2
- package/docs/capabilities/getMiniGames.md +63 -39
- package/docs/capabilities/miniGameWinAcknowledgeRequest.md +36 -7
- package/docs/capabilities/playMiniGame.md +27 -14
- package/docs/native/PROTOCOL.md +7 -0
- package/docs/ui/jackpots/UIGuide_getJackpotEligibleGames.md +8 -0
- package/docs/ui/minigames/UIGuide_getMiniGames.md +46 -0
- package/docs/ui/minigames/UIGuide_getMiniGamesHistory.md +1 -1
- package/docs/ui/minigames/UIGuide_miniGameWinAcknowledgeRequest.md +90 -0
- package/docs/ui/minigames/UIGuide_playMiniGame.md +38 -2
- package/package.json +1 -1
- package/src/MiniGames/SAWDoAknowledgeRequest.ts +2 -0
- package/src/MiniGames/SAWGetTemplatesResponse.ts +1 -0
- package/src/MiniGames/SAWPrize.ts +18 -0
- package/src/MiniGames/SAWPrizeUI.ts +2 -1
- package/src/MiniGames/SAWTemplate.ts +27 -4
- package/src/SmarticoAPI.ts +7 -1
- package/src/SmarticoLib/index.ts +1 -1
- package/src/WSAPI/WSAPIJackpots.ts +11 -2
- package/src/WSAPI/WSAPIMiniGames.ts +91 -24
- package/src/WSAPI/WSAPITypes.ts +47 -46
|
@@ -400,7 +400,7 @@ Optional callback; not auto-invoked today.
|
|
|
400
400
|
#### Remarks
|
|
401
401
|
|
|
402
402
|
**Preconditions**
|
|
403
|
-
-
|
|
403
|
+
- No authentication required — works in both identified and visitor mode.
|
|
404
404
|
- `jp_template_id` is mandatory.
|
|
405
405
|
|
|
406
406
|
**`onUpdate` caveat**
|
|
@@ -418,7 +418,12 @@ Treat it as a no-op for now.
|
|
|
418
418
|
Non-zero `errCode` on control-group users or generic server errors.
|
|
419
419
|
Branch on `errCode === 0` and surface `errMsg` on failure.
|
|
420
420
|
|
|
421
|
-
**Visitor mode**:
|
|
421
|
+
**Visitor mode**: supported via
|
|
422
|
+
`_smartico.vapi(lang).getJackpotEligibleGames(...)`. The eligible-games
|
|
423
|
+
list is template-level (which games contribute to the pot) and carries no
|
|
424
|
+
per-user fields, so a visitor session receives the same list an identified
|
|
425
|
+
user would. The `lang` passed to `_smartico.vapi(lang)` drives the
|
|
426
|
+
translation of game names.
|
|
422
427
|
|
|
423
428
|
**UI guidance**: see [UI Guide — `getJackpotEligibleGames`](../_media/UIGuide_getJackpotEligibleGames.md).
|
|
424
429
|
|
|
@@ -434,6 +439,10 @@ if (jp?.ach_related_game_allow_all) {
|
|
|
434
439
|
|
|
435
440
|
const r = await window._smartico.api.getJackpotEligibleGames({ jp_template_id: 42 });
|
|
436
441
|
console.log('[smartico] render', r.eligible_games.length, 'eligible game tiles');
|
|
442
|
+
|
|
443
|
+
// Visitor mode — same shape, language driven by the vapi(lang) argument
|
|
444
|
+
const visitor = await window._smartico.vapi('EN').getJackpotEligibleGames({ jp_template_id: 42 });
|
|
445
|
+
console.log('[smartico] visitor eligible games:', visitor.eligible_games.length);
|
|
437
446
|
```
|
|
438
447
|
|
|
439
448
|
***
|
|
@@ -78,6 +78,27 @@ played via [playMiniGame](#playminigame); the exceptions are:
|
|
|
78
78
|
games server (not this SDK); the SAW spin is fired
|
|
79
79
|
server-internally to deduct the buy-in.
|
|
80
80
|
|
|
81
|
+
**Per-prize statistics (`expose_game_stat_on_api`)**
|
|
82
|
+
Each template's `prizes` array always carries the definition
|
|
83
|
+
fields — name, icon, `prize_type`, `prize_value`, acknowledge
|
|
84
|
+
configuration. The stock-statistics fields are gated by an
|
|
85
|
+
operator template setting, surfaced as
|
|
86
|
+
`expose_game_stat_on_api`:
|
|
87
|
+
- Populated when enabled: `pool` (remaining stock),
|
|
88
|
+
`wins_count` (total wins across all players), `weekdays`
|
|
89
|
+
(ISO 1–7 days the prize can be won), `active_from_ts` /
|
|
90
|
+
`active_till_ts` (prize availability window).
|
|
91
|
+
- Omitted when disabled (the default) — this keeps the live
|
|
92
|
+
prize economy (stock levels, win rates, schedules) hidden
|
|
93
|
+
from players.
|
|
94
|
+
- Exception: `pool` is always populated for `MatchX` / `Quiz`
|
|
95
|
+
templates, whose game flow needs the remaining stock.
|
|
96
|
+
- `pool_initial` is populated regardless of the setting.
|
|
97
|
+
When enabled, the values are also kept current — the server
|
|
98
|
+
refreshes the prize rows on each fetch and drops its template
|
|
99
|
+
caches after every play, so `pool` / `wins_count` are safe to
|
|
100
|
+
drive an "X prizes left" scarcity UI.
|
|
101
|
+
|
|
81
102
|
**Cache TTL**: the SDK caches the response for 30 seconds. Cache
|
|
82
103
|
is fully cleared on login / logout.
|
|
83
104
|
|
|
@@ -345,14 +366,19 @@ without waiting for the win to be marked delivered. You finalise
|
|
|
345
366
|
it later by calling [miniGameWinAcknowledgeRequest](#minigamewinacknowledgerequest) with the
|
|
346
367
|
`request_id` returned on this result.
|
|
347
368
|
|
|
348
|
-
What `acknowledge: false`
|
|
349
|
-
- For STANDARD prizes the value is credited
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
explicit acknowledge
|
|
369
|
+
What `acknowledge: false` defers:
|
|
370
|
+
- For STANDARD prizes the value is credited when the spin is
|
|
371
|
+
finalised — by your later acknowledge or, failing that, by the
|
|
372
|
+
server-side fallback below — so opting out delays the balance
|
|
373
|
+
change by at most that fallback window. The `is_claimed` flag in
|
|
374
|
+
[getMiniGamesHistory](#getminigameshistory) flips on the same finalisation.
|
|
375
|
+
- For operator-configured "explicit claim" prizes the credit is
|
|
376
|
+
deferred until your explicit acknowledge — the fallback does not
|
|
377
|
+
cover them.
|
|
378
|
+
|
|
379
|
+
While the spin is un-finalised it can also be finalised as LOST —
|
|
380
|
+
prize discarded back to the pool — via
|
|
381
|
+
[miniGameWinAcknowledgeRequest](#minigamewinacknowledgerequest) with `{ lose: true }`.
|
|
356
382
|
|
|
357
383
|
A server-side fallback auto-acknowledges ordinary un-acknowledged
|
|
358
384
|
spins after a short delay (about 1–3 minutes), so an ordinary
|
|
@@ -383,8 +409,10 @@ refreshed array.
|
|
|
383
409
|
time the call resolves. Balance updates flow via the
|
|
384
410
|
user-properties channel (observe via [getUserProfile](WSAPIUser.md#getuserprofile)).
|
|
385
411
|
- Prize value credited per the prize's type (see "Prize handling"
|
|
386
|
-
above)
|
|
387
|
-
|
|
412
|
+
above) when the spin is finalised — with the default
|
|
413
|
+
auto-acknowledge that happens before the call resolves;
|
|
414
|
+
"explicit claim" prizes are credited only by an explicit
|
|
415
|
+
acknowledge.
|
|
388
416
|
- The play is recorded server-side for analytics / reporting.
|
|
389
417
|
|
|
390
418
|
**UI guidance**: see [UI Guide — `playMiniGame`](../_media/UIGuide_playMiniGame.md).
|
|
@@ -432,18 +460,24 @@ if (r.err_code === 0) {
|
|
|
432
460
|
```
|
|
433
461
|
|
|
434
462
|
Manual finalisation (`acknowledge: false`) — e.g. an explicit
|
|
435
|
-
"Claim" CTA, or finalising on your own
|
|
463
|
+
"Claim" CTA, a decline/forfeit flow, or finalising on your own
|
|
464
|
+
schedule:
|
|
436
465
|
```ts
|
|
437
466
|
const r = await window._smartico.api.playMiniGame(game.id, { acknowledge: false });
|
|
438
467
|
if (r.err_code === 0) {
|
|
439
|
-
// Spin resolved but not yet
|
|
440
|
-
//
|
|
441
|
-
//
|
|
468
|
+
// Spin resolved but not yet finalised — the prize is not credited
|
|
469
|
+
// yet. Your acknowledge below credits it (for standard prizes the
|
|
470
|
+
// server-side fallback would eventually do the same).
|
|
442
471
|
console.log('[smartico] prize won — show the result / Claim CTA, then finalise');
|
|
443
472
|
|
|
444
473
|
// On the user's Claim click, finalise with the request_id from the result.
|
|
445
474
|
await window._smartico.api.miniGameWinAcknowledgeRequest(r.request_id);
|
|
446
475
|
console.log('[smartico] win finalised — refresh getUserProfile / getMiniGames to reflect it');
|
|
476
|
+
|
|
477
|
+
// Or, if the game flow ends in the player declining / losing the
|
|
478
|
+
// drawn prize, finalise the spin as lost instead — the prize is
|
|
479
|
+
// not credited and returns to the prize pool:
|
|
480
|
+
// await window._smartico.api.miniGameWinAcknowledgeRequest(r.request_id, { lose: true });
|
|
447
481
|
}
|
|
448
482
|
```
|
|
449
483
|
|
|
@@ -451,12 +485,13 @@ if (r.err_code === 0) {
|
|
|
451
485
|
|
|
452
486
|
### miniGameWinAcknowledgeRequest()
|
|
453
487
|
|
|
454
|
-
> **miniGameWinAcknowledgeRequest**(`request_id`): `Promise`\<[`SAWDoAknowledgeResponse`](../interfaces/SAWDoAknowledgeResponse.md)\>
|
|
488
|
+
> **miniGameWinAcknowledgeRequest**(`request_id`, `__namedParameters?`): `Promise`\<[`SAWDoAknowledgeResponse`](../interfaces/SAWDoAknowledgeResponse.md)\>
|
|
455
489
|
|
|
456
490
|
Manually acknowledges a mini-game spin — marks the win delivered
|
|
457
|
-
server-side
|
|
458
|
-
|
|
459
|
-
[
|
|
491
|
+
server-side, or (with `lose: true`) finalises it as lost and
|
|
492
|
+
returns the prize to the pool. Most consumers do NOT need this:
|
|
493
|
+
[playMiniGame](#playminigame) acknowledges by default (`acknowledge: true`)
|
|
494
|
+
and [playMiniGameBatch](#playminigamebatch) acknowledges automatically. Call this
|
|
460
495
|
directly only when you took ownership of the acknowledge step or
|
|
461
496
|
need to recover a lost one.
|
|
462
497
|
|
|
@@ -472,6 +507,12 @@ Correlation id of the spin to finalise: the
|
|
|
472
507
|
`client_request_id` of a
|
|
473
508
|
[getMiniGamesHistory](#getminigameshistory) row.
|
|
474
509
|
|
|
510
|
+
##### \_\_namedParameters?
|
|
511
|
+
|
|
512
|
+
###### lose?
|
|
513
|
+
|
|
514
|
+
`boolean`
|
|
515
|
+
|
|
475
516
|
#### Returns
|
|
476
517
|
|
|
477
518
|
`Promise`\<[`SAWDoAknowledgeResponse`](../interfaces/SAWDoAknowledgeResponse.md)\>
|
|
@@ -496,6 +537,27 @@ The `request_id` on a [playMiniGame](#playminigame) result and the
|
|
|
496
537
|
`client_request_id` on a [getMiniGamesHistory](#getminigameshistory) row are the
|
|
497
538
|
same correlation id — this method accepts either.
|
|
498
539
|
|
|
540
|
+
**Finalising as lost (`lose: true`)**
|
|
541
|
+
Pass `{ lose: true }` to finalise the spin as LOST instead of won:
|
|
542
|
+
the prize is NOT credited and is returned to the game's prize pool
|
|
543
|
+
(available again for other players), and the spin fires the
|
|
544
|
+
mini-game "lose" engagement event instead of the win one. On the
|
|
545
|
+
next [getMiniGamesHistory](#getminigameshistory) fetch the row shows `is_claimed:
|
|
546
|
+
true` with no prize attached. Use this for game mechanics where the
|
|
547
|
+
player can decline or forfeit the drawn prize — e.g. a
|
|
548
|
+
gamble/discard step, or a client-driven game where the user's final
|
|
549
|
+
action decides whether the pre-drawn prize is actually won (the
|
|
550
|
+
default Smartico UI does this for the Voyager game: failing the
|
|
551
|
+
star-collection run finalises the spin as lost). When configured,
|
|
552
|
+
the prize's `aknowledge_message_lose` is the operator's result copy
|
|
553
|
+
for this case — show it instead of `aknowledge_message`. It only
|
|
554
|
+
works on a spin that is not yet finalised, so it requires playing
|
|
555
|
+
with `acknowledge: false` and calling promptly — once the automatic
|
|
556
|
+
acknowledge or the server-side fallback (below) has finalised the
|
|
557
|
+
spin, `lose: true` is a no-op and the prize stays credited.
|
|
558
|
+
("Explicit claim" prizes are exempt from the fallback, so for them
|
|
559
|
+
there is no time pressure.)
|
|
560
|
+
|
|
499
561
|
**Idempotency**: safe. Acknowledging a spin that is already
|
|
500
562
|
finalised — by you, by the automatic acknowledge, or by the
|
|
501
563
|
fallback — is a no-op with no double credit. Acknowledging a
|
|
@@ -510,13 +572,16 @@ exception — excluded from the fallback, they require an explicit
|
|
|
510
572
|
call here.
|
|
511
573
|
|
|
512
574
|
**Side effects** (first successful call for an un-acknowledged spin)
|
|
513
|
-
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
575
|
+
- Default (win): the prize value is credited on this call — this is
|
|
576
|
+
the finalisation step that credits standard and "explicit claim"
|
|
577
|
+
prizes alike (see [playMiniGame](#playminigame) "Prize handling").
|
|
578
|
+
- With `lose: true`: no credit; the prize returns to the prize pool
|
|
579
|
+
and the "lose" engagement event fires.
|
|
580
|
+
- Either way the spin's `is_claimed` flips to `true` on the next
|
|
518
581
|
[getMiniGamesHistory](#getminigameshistory) fetch.
|
|
519
582
|
|
|
583
|
+
**UI guidance**: see [UI Guide — `miniGameWinAcknowledgeRequest`](../_media/UIGuide_miniGameWinAcknowledgeRequest.md).
|
|
584
|
+
|
|
520
585
|
**Visitor mode**: not supported.
|
|
521
586
|
|
|
522
587
|
#### Example
|
|
@@ -529,6 +594,10 @@ if (r.err_code === 0) {
|
|
|
529
594
|
await window._smartico.api.miniGameWinAcknowledgeRequest(r.request_id);
|
|
530
595
|
}
|
|
531
596
|
|
|
597
|
+
// Decline / forfeit — finalise the same spin as lost instead:
|
|
598
|
+
// the prize is not credited and goes back to the prize pool.
|
|
599
|
+
await window._smartico.api.miniGameWinAcknowledgeRequest(r.request_id, { lose: true });
|
|
600
|
+
|
|
532
601
|
// Recovery — re-acknowledge any spins a batch acknowledge missed.
|
|
533
602
|
const history = await window._smartico.api.getMiniGamesHistory({ limit: 20 });
|
|
534
603
|
for (const row of history.filter(h => !h.is_claimed)) {
|
|
@@ -6,102 +6,136 @@
|
|
|
6
6
|
|
|
7
7
|
> **saw\_prize\_id**: `number`
|
|
8
8
|
|
|
9
|
+
ID of the prize
|
|
10
|
+
|
|
9
11
|
***
|
|
10
12
|
|
|
11
13
|
### saw\_prize\_ui\_definition
|
|
12
14
|
|
|
13
15
|
> **saw\_prize\_ui\_definition**: [`SAWPrizeUI`](SAWPrizeUI.md)
|
|
14
16
|
|
|
17
|
+
Visual definition of the prize (name, icon, win-modal buttons, per-game rendering hints)
|
|
18
|
+
|
|
15
19
|
***
|
|
16
20
|
|
|
17
21
|
### prize\_value?
|
|
18
22
|
|
|
19
23
|
> `optional` **prize\_value?**: `number`
|
|
20
24
|
|
|
25
|
+
Numeric value for 'points' / 'spin' prize types (e.g. 100 for "100 points"); not relevant for other types
|
|
26
|
+
|
|
21
27
|
***
|
|
22
28
|
|
|
23
29
|
### prize\_type\_id
|
|
24
30
|
|
|
25
31
|
> **prize\_type\_id**: [`SAWPrizeType`](../enumerations/SAWPrizeType.md)
|
|
26
32
|
|
|
33
|
+
The type of the prize — see [SAWPrizeType](../enumerations/SAWPrizeType.md)
|
|
34
|
+
|
|
27
35
|
***
|
|
28
36
|
|
|
29
37
|
### place\_from?
|
|
30
38
|
|
|
31
39
|
> `optional` **place\_from?**: `number`
|
|
32
40
|
|
|
41
|
+
Competition games (MatchX / Quiz): first finishing place this prize applies to
|
|
42
|
+
|
|
33
43
|
***
|
|
34
44
|
|
|
35
45
|
### place\_to?
|
|
36
46
|
|
|
37
47
|
> `optional` **place\_to?**: `number`
|
|
38
48
|
|
|
49
|
+
Competition games (MatchX / Quiz): last finishing place this prize applies to; equals `place_from` for a single-place prize
|
|
50
|
+
|
|
39
51
|
***
|
|
40
52
|
|
|
41
53
|
### sawUniqueWinId?
|
|
42
54
|
|
|
43
55
|
> `optional` **sawUniqueWinId?**: `string`
|
|
44
56
|
|
|
57
|
+
Client-side only — unique id of a win instance generated by the default Smartico UI to dedupe render effects; never sent by the server
|
|
58
|
+
|
|
45
59
|
***
|
|
46
60
|
|
|
47
61
|
### pool?
|
|
48
62
|
|
|
49
63
|
> `optional` **pool?**: `number`
|
|
50
64
|
|
|
65
|
+
Remaining stock. Present only when the template's `expose_game_stat_on_api` is enabled; always present for MatchX / Quiz games
|
|
66
|
+
|
|
51
67
|
***
|
|
52
68
|
|
|
53
69
|
### pool\_initial?
|
|
54
70
|
|
|
55
71
|
> `optional` **pool\_initial?**: `number`
|
|
56
72
|
|
|
73
|
+
Initial (configured) stock. Present regardless of `expose_game_stat_on_api`
|
|
74
|
+
|
|
57
75
|
***
|
|
58
76
|
|
|
59
77
|
### wins\_count?
|
|
60
78
|
|
|
61
79
|
> `optional` **wins\_count?**: `number`
|
|
62
80
|
|
|
81
|
+
Times the prize has been won, across all players. Present only when `expose_game_stat_on_api` is enabled
|
|
82
|
+
|
|
63
83
|
***
|
|
64
84
|
|
|
65
85
|
### weekdays?
|
|
66
86
|
|
|
67
87
|
> `optional` **weekdays?**: `number`[]
|
|
68
88
|
|
|
89
|
+
ISO weekday numbers (1 = Monday … 7 = Sunday) the prize can be won on; absent = any day. Present only when `expose_game_stat_on_api` is enabled
|
|
90
|
+
|
|
69
91
|
***
|
|
70
92
|
|
|
71
93
|
### active\_from\_ts?
|
|
72
94
|
|
|
73
95
|
> `optional` **active\_from\_ts?**: `number`
|
|
74
96
|
|
|
97
|
+
Prize availability window start (epoch ms), evaluated against `relative_period_timezone`. Present only when `expose_game_stat_on_api` is enabled
|
|
98
|
+
|
|
75
99
|
***
|
|
76
100
|
|
|
77
101
|
### active\_till\_ts?
|
|
78
102
|
|
|
79
103
|
> `optional` **active\_till\_ts?**: `number`
|
|
80
104
|
|
|
105
|
+
Prize availability window end (epoch ms), evaluated against `relative_period_timezone`. Present only when `expose_game_stat_on_api` is enabled
|
|
106
|
+
|
|
81
107
|
***
|
|
82
108
|
|
|
83
109
|
### relative\_period\_timezone?
|
|
84
110
|
|
|
85
111
|
> `optional` **relative\_period\_timezone?**: `number`
|
|
86
112
|
|
|
113
|
+
Timezone offset in minutes for `weekdays` / active-window evaluation (UTC minus local, as in JS `Date.getTimezoneOffset()`)
|
|
114
|
+
|
|
87
115
|
***
|
|
88
116
|
|
|
89
117
|
### is\_surcharge?
|
|
90
118
|
|
|
91
119
|
> `optional` **is\_surcharge?**: `boolean`
|
|
92
120
|
|
|
121
|
+
When true, the prize stays winnable at `pool` 0 (unlimited stock)
|
|
122
|
+
|
|
93
123
|
***
|
|
94
124
|
|
|
95
125
|
### is\_deleted?
|
|
96
126
|
|
|
97
127
|
> `optional` **is\_deleted?**: `boolean`
|
|
98
128
|
|
|
129
|
+
Always `false` in API responses — deleted prizes are excluded server-side
|
|
130
|
+
|
|
99
131
|
***
|
|
100
132
|
|
|
101
133
|
### prize\_details\_json?
|
|
102
134
|
|
|
103
135
|
> `optional` **prize\_details\_json?**: `object`
|
|
104
136
|
|
|
137
|
+
Type-specific prize details — e.g. `gems` / `_gems_diamonds_type` for gems-and-diamonds prizes, `tickets_count` for raffle-ticket prizes
|
|
138
|
+
|
|
105
139
|
#### Index Signature
|
|
106
140
|
|
|
107
141
|
\[`key`: `string`\]: `any`
|
|
@@ -111,3 +145,5 @@
|
|
|
111
145
|
### max\_give\_period\_type\_id?
|
|
112
146
|
|
|
113
147
|
> `optional` **max\_give\_period\_type\_id?**: [`AttemptPeriodType`](../enumerations/AttemptPeriodType.md)
|
|
148
|
+
|
|
149
|
+
Period basis for the prize availability restriction — see [AttemptPeriodType](../enumerations/AttemptPeriodType.md)
|
|
@@ -6,108 +6,144 @@
|
|
|
6
6
|
|
|
7
7
|
> **saw\_template\_id**: `number`
|
|
8
8
|
|
|
9
|
+
ID of the mini-game template
|
|
10
|
+
|
|
9
11
|
***
|
|
10
12
|
|
|
11
13
|
### saw\_game\_type\_id
|
|
12
14
|
|
|
13
15
|
> **saw\_game\_type\_id**: [`SAWGameType`](../enumerations/SAWGameType.md)
|
|
14
16
|
|
|
17
|
+
The type of the game — see [SAWGameType](../enumerations/SAWGameType.md)
|
|
18
|
+
|
|
15
19
|
***
|
|
16
20
|
|
|
17
21
|
### saw\_template\_ui\_definition
|
|
18
22
|
|
|
19
23
|
> **saw\_template\_ui\_definition**: [`SAWTemplateUI`](SAWTemplateUI.md)
|
|
20
24
|
|
|
25
|
+
Full UI definition of the mini-game (name, description, skin, colors, per-game visual settings)
|
|
26
|
+
|
|
21
27
|
***
|
|
22
28
|
|
|
23
29
|
### saw\_buyin\_type\_id
|
|
24
30
|
|
|
25
31
|
> **saw\_buyin\_type\_id**: [`SAWBuyInType`](../enumerations/SAWBuyInType.md)
|
|
26
32
|
|
|
33
|
+
How the user is charged per attempt — see [SAWBuyInType](../enumerations/SAWBuyInType.md)
|
|
34
|
+
|
|
27
35
|
***
|
|
28
36
|
|
|
29
37
|
### buyin\_cost\_points?
|
|
30
38
|
|
|
31
39
|
> `optional` **buyin\_cost\_points?**: `number`
|
|
32
40
|
|
|
41
|
+
Cost per attempt in the buy-in currency (points, gems or diamonds per `saw_buyin_type_id`)
|
|
42
|
+
|
|
33
43
|
***
|
|
34
44
|
|
|
35
45
|
### visibile\_when\_can\_spin
|
|
36
46
|
|
|
37
47
|
> **visibile\_when\_can\_spin**: `boolean`
|
|
38
48
|
|
|
49
|
+
Operator hint: show the game only while the user can actually play it (has attempts / sufficient balance)
|
|
50
|
+
|
|
39
51
|
***
|
|
40
52
|
|
|
41
53
|
### spin\_count?
|
|
42
54
|
|
|
43
55
|
> `optional` **spin\_count?**: `number`
|
|
44
56
|
|
|
57
|
+
Number of spin attempts the user currently has (initial value; later changes arrive as spin-count pushes)
|
|
58
|
+
|
|
45
59
|
***
|
|
46
60
|
|
|
47
61
|
### prizes
|
|
48
62
|
|
|
49
63
|
> **prizes**: [`SAWPrize`](SAWPrize.md)[]
|
|
50
64
|
|
|
65
|
+
Prizes configured for this game — see [SAWPrize](SAWPrize.md)
|
|
66
|
+
|
|
51
67
|
***
|
|
52
68
|
|
|
53
69
|
### is\_visible
|
|
54
70
|
|
|
55
71
|
> **is\_visible**: `boolean`
|
|
56
72
|
|
|
73
|
+
Operator visibility flag for the template
|
|
74
|
+
|
|
57
75
|
***
|
|
58
76
|
|
|
59
77
|
### activeFromDate?
|
|
60
78
|
|
|
61
79
|
> `optional` **activeFromDate?**: `number`
|
|
62
80
|
|
|
81
|
+
Time from which the template becomes available (epoch ms); absent when not restricted
|
|
82
|
+
|
|
63
83
|
***
|
|
64
84
|
|
|
65
85
|
### activeTillDate?
|
|
66
86
|
|
|
67
87
|
> `optional` **activeTillDate?**: `number`
|
|
68
88
|
|
|
89
|
+
Time until which the template stays available (epoch ms); absent when not restricted
|
|
90
|
+
|
|
69
91
|
***
|
|
70
92
|
|
|
71
93
|
### jackpot\_add\_on\_attempt
|
|
72
94
|
|
|
73
95
|
> **jackpot\_add\_on\_attempt**: `number`
|
|
74
96
|
|
|
97
|
+
Amount added to the jackpot on every play (abstract contribution — nothing is deducted from the player)
|
|
98
|
+
|
|
75
99
|
***
|
|
76
100
|
|
|
77
101
|
### jackpot\_current
|
|
78
102
|
|
|
79
103
|
> **jackpot\_current**: `number`
|
|
80
104
|
|
|
105
|
+
Current jackpot accumulator value
|
|
106
|
+
|
|
81
107
|
***
|
|
82
108
|
|
|
83
109
|
### jackpot\_guaranteed
|
|
84
110
|
|
|
85
111
|
> **jackpot\_guaranteed**: `number`
|
|
86
112
|
|
|
113
|
+
Seed value of the jackpot — the accumulator starts at (and resets to) this amount after a jackpot win
|
|
114
|
+
|
|
87
115
|
***
|
|
88
116
|
|
|
89
117
|
### maxActiveSpinsAllowed
|
|
90
118
|
|
|
91
119
|
> **maxActiveSpinsAllowed**: `number`
|
|
92
120
|
|
|
121
|
+
Maximum number of unspent spin attempts a user can accumulate
|
|
122
|
+
|
|
93
123
|
***
|
|
94
124
|
|
|
95
125
|
### maxSpinsCount
|
|
96
126
|
|
|
97
127
|
> **maxSpinsCount**: `number`
|
|
98
128
|
|
|
129
|
+
Maximum number of attempts a user can make during `maxSpinsPediodMs`
|
|
130
|
+
|
|
99
131
|
***
|
|
100
132
|
|
|
101
133
|
### maxSpinsPediodMs
|
|
102
134
|
|
|
103
135
|
> **maxSpinsPediodMs**: `number`
|
|
104
136
|
|
|
137
|
+
Length of the attempt-limit period in ms (note the field-name spelling)
|
|
138
|
+
|
|
105
139
|
***
|
|
106
140
|
|
|
107
141
|
### next\_available\_spin\_ts?
|
|
108
142
|
|
|
109
143
|
> `optional` **next\_available\_spin\_ts?**: `number`
|
|
110
144
|
|
|
145
|
+
Epoch-ms time when the next attempt becomes available; populated only when the operator enabled the "show time to the next available spin" setting and max attempts per period is 1
|
|
146
|
+
|
|
111
147
|
***
|
|
112
148
|
|
|
113
149
|
### earliest\_expiration\_dt?
|
|
@@ -130,12 +166,16 @@ Latest-expiring spin's expiration time for this user (epoch ms); `null`/absent w
|
|
|
130
166
|
|
|
131
167
|
> **saw\_skin\_key**: `string`
|
|
132
168
|
|
|
169
|
+
Key of the visual skin the operator selected for the game
|
|
170
|
+
|
|
133
171
|
***
|
|
134
172
|
|
|
135
173
|
### saw\_skin\_ui\_definition
|
|
136
174
|
|
|
137
175
|
> **saw\_skin\_ui\_definition**: `object`
|
|
138
176
|
|
|
177
|
+
Skin assets of the game: `skin_folder` is the base URL for the skin's images, `skin_css` custom CSS overrides, plus optional popup/animation tweaks
|
|
178
|
+
|
|
139
179
|
#### skin\_folder
|
|
140
180
|
|
|
141
181
|
> **skin\_folder**: `string`
|
|
@@ -158,20 +198,28 @@ Latest-expiring spin's expiration time for this user (epoch ms); `null`/absent w
|
|
|
158
198
|
|
|
159
199
|
> `optional` **expose\_game\_stat\_on\_api?**: `boolean`
|
|
160
200
|
|
|
201
|
+
Operator template setting. When enabled, the per-prize stock statistics (`pool`, `wins_count`, `weekdays`, `active_from_ts` / `active_till_ts`) are populated on `prizes`; when disabled (default) the server strips them from the response (`pool` is kept for MatchX / Quiz games).
|
|
202
|
+
|
|
161
203
|
***
|
|
162
204
|
|
|
163
205
|
### requires\_prize\_claim?
|
|
164
206
|
|
|
165
207
|
> `optional` **requires\_prize\_claim?**: `boolean`
|
|
166
208
|
|
|
209
|
+
Prize Drop only: when true, the pushed prize requires an explicit claim by the user before it is credited
|
|
210
|
+
|
|
167
211
|
***
|
|
168
212
|
|
|
169
213
|
### relative\_period\_timezone?
|
|
170
214
|
|
|
171
215
|
> `optional` **relative\_period\_timezone?**: `number`
|
|
172
216
|
|
|
217
|
+
Timezone offset in minutes used to evaluate the template's period-based rules (UTC minus local, as in JS `Date.getTimezoneOffset()`)
|
|
218
|
+
|
|
173
219
|
***
|
|
174
220
|
|
|
175
221
|
### show\_prize\_history?
|
|
176
222
|
|
|
177
223
|
> `optional` **show\_prize\_history?**: `boolean`
|
|
224
|
+
|
|
225
|
+
Operator setting: show a prize-history entry point (icon / button) on this game's view
|