@smartico/public-api 0.0.359 → 0.0.360

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.
@@ -1,34 +1,65 @@
1
1
  # Interface: SAWTemplateUI
2
2
 
3
+ UI configuration for a SAW (Spin-And-Win) mini-game template.
4
+
5
+ This interface is returned as the `saw_template_ui_definition` property of
6
+ [SAWTemplate](SAWTemplate.md) and [TMiniGameTemplate](TMiniGameTemplate.md). It covers all visual,
7
+ behavioural and game-type-specific settings that the operator can configure
8
+ in the Back-Office for every mini-game variant (Spin the Wheel, Scratch Card,
9
+ Gift Box, MatchX / Quiz, Treasure Hunt, Lootbox, Voyager, Prize Drop, etc.).
10
+
3
11
  ## Properties
4
12
 
5
13
  ### skin
6
14
 
7
15
  • **skin**: `string`
8
16
 
17
+ CSS skin key that selects the overall visual theme of the game.
18
+ Resolved at runtime to the matching skin folder / CSS bundle.
19
+
9
20
  ___
10
21
 
11
22
  ### name
12
23
 
13
24
  • **name**: `string`
14
25
 
26
+ Display name of the mini-game template shown to players and in the
27
+ Back-Office listing. Supports translations via
28
+ `saw_template_ui_definition._translations.<lang>.name`.
29
+
15
30
  ___
16
31
 
17
32
  ### description
18
33
 
19
34
  • `Optional` **description**: `string`
20
35
 
36
+ HTML-capable description / rules text shown to the player before or
37
+ during the game. Supports translations via
38
+ `saw_template_ui_definition._translations.<lang>.description`.
39
+
21
40
  ___
22
41
 
23
- ### over\_limit\_message
42
+ ### thumbnail
24
43
 
25
- • `Optional` **over\_limit\_message**: `string`
44
+ • `Optional` **thumbnail**: `string`
45
+
46
+ URL of the thumbnail image (typically 256 × 256 px) shown in
47
+ mini-game selection lists and galleries.
26
48
 
27
49
  ___
28
50
 
29
- ### hide\_prize\_names
51
+ ### over\_limit\_message
30
52
 
31
- • `Optional` **hide\_prize\_names**: `boolean`
53
+ • `Optional` **over\_limit\_message**: `string`
54
+
55
+ HTML-capable message shown to a player who has reached the maximum
56
+ number of allowed attempts for the current period.
57
+ Rendered when the server rejects a spin with
58
+ `SAWSpinErrorCode.SAW_FAILED_MAX_SPINS_REACHED`.
59
+ Supports translations via
60
+ `saw_template_ui_definition._translations.<lang>.over_limit_message`.
61
+
62
+ Only relevant when `max_spins_count` is configured on the template.
32
63
 
33
64
  ___
34
65
 
@@ -36,11 +67,12 @@ ___
36
67
 
37
68
  • `Optional` **no\_attempts\_message**: `string`
38
69
 
39
- ___
40
-
41
- ### thumbnail
70
+ HTML-capable message shown when the player has no spin attempts or
71
+ insufficient points / gems / diamonds to play.
72
+ Supports translations via
73
+ `saw_template_ui_definition._translations.<lang>.no_attempts_message`.
42
74
 
43
- `Optional` **thumbnail**: `string`
75
+ Only relevant for buy-in types `Spins`, `Points`, `Gems`, or `Diamonds`.
44
76
 
45
77
  ___
46
78
 
@@ -48,155 +80,292 @@ ___
48
80
 
49
81
  • **sectors\_count**: `number`
50
82
 
83
+ Number of prize sectors on the wheel or gift-box grid.
84
+ For Spin-the-Wheel games the Back-Office enforces a range of 3 – 10.
85
+
51
86
  ___
52
87
 
53
88
  ### priority
54
89
 
55
90
  • **priority**: `number`
56
91
 
92
+ Relative display order of the mini-game within a list.
93
+ Lower values appear first. Configurable in the Back-Office
94
+ "Priority" field (Advanced section).
95
+
57
96
  ___
58
97
 
59
98
  ### flow\_builder\_only
60
99
 
61
100
  • **flow\_builder\_only**: `boolean`
62
101
 
102
+ When `true` the mini-game is **excluded from the widget's automatic
103
+ game listing** and is only accessible when it is explicitly triggered
104
+ via a Campaign Flow Builder action or accessed by deep links or triggered over the api.
105
+
106
+ Back-Office label:
107
+ _"Available only from campaign (won't be visible in the widget)"_
108
+
63
109
  ___
64
110
 
65
111
  ### background\_image
66
112
 
67
113
  • `Optional` **background\_image**: `string`
68
114
 
115
+ URL of the full-bleed background image shown on desktop devices.
116
+ Not used for Plinko and Coin Flip game types.
117
+
69
118
  ___
70
119
 
71
120
  ### background\_image\_mobile
72
121
 
73
122
  • `Optional` **background\_image\_mobile**: `string`
74
123
 
124
+ URL of the full-bleed background image shown on mobile devices.
125
+ Falls back to [background_image](SAWTemplateUI.md#background_image) when absent.
126
+ Not used for Plinko and Coin Flip game types.
127
+
75
128
  ___
76
129
 
77
130
  ### background\_sound
78
131
 
79
132
  • `Optional` **background\_sound**: `string`
80
133
 
134
+ URL of the audio file (MP3 / WAV) played as background music
135
+ during gameplay. Silenced when [disable_background_music](SAWTemplateUI.md#disable_background_music)
136
+ is `true` or the player has muted audio.
137
+
138
+ ___
139
+
140
+ ### background\_music\_volume
141
+
142
+ • `Optional` **background\_music\_volume**: `number`
143
+
144
+ Volume level of the background music, expressed as a percentage
145
+ in the range `0` – `100`.
146
+
147
+ ___
148
+
149
+ ### disable\_background\_music
150
+
151
+ • `Optional` **disable\_background\_music**: `boolean`
152
+
153
+ When `true`, background music is muted even if a
154
+ [background_sound](SAWTemplateUI.md#background_sound) URL is provided.
155
+ Defaults to `true` in the Skin Editor preview scaffolding.
156
+
81
157
  ___
82
158
 
83
159
  ### spin\_animation\_duration
84
160
 
85
161
  • `Optional` **spin\_animation\_duration**: `number`
86
162
 
163
+ Duration in milliseconds of the spin animation before the result
164
+ is revealed (e.g. `3000` = 3 seconds).
165
+ Applies to Spin-the-Wheel and similar animated game types.
166
+
87
167
  ___
88
168
 
89
169
  ### wheel\_pointer\_rotation
90
170
 
91
171
  • `Optional` **wheel\_pointer\_rotation**: `number`
92
172
 
173
+ Rotation offset in degrees applied to the visual pointer / arrow
174
+ on the wheel to compensate for skin-specific alignment differences.
175
+
176
+ ___
177
+
178
+ ### wheel\_layout
179
+
180
+ • `Optional` **wheel\_layout**: [`SAWWheelLayout`](../enums/SAWWheelLayout.md)
181
+
182
+ Screen positioning of the wheel relative to the game panel.
183
+
184
+ | Value | Meaning |
185
+ | --- | --- |
186
+ | `SAWWheelLayout.Centered = 1` | Wheel centred in the panel |
187
+ | `SAWWheelLayout.LeftAligned = 2` | Wheel pinned to the left |
188
+ | `SAWWheelLayout.RightAligned = 3` | Wheel pinned to the right |
189
+ | `SAWWheelLayout.BottomAligned = 4` | Wheel pinned to the bottom |
190
+
191
+ Applies to Spin-the-Wheel games only.
192
+ Back-Office label: _"Wheel layout"_.
193
+
93
194
  ___
94
195
 
95
196
  ### scratch\_logo
96
197
 
97
198
  • `Optional` **scratch\_logo**: `string`
98
199
 
200
+ URL of the logo image overlaid on the scratch-card surface
201
+ before the player scratches.
202
+
99
203
  ___
100
204
 
101
205
  ### scratch\_cover
102
206
 
103
207
  • `Optional` **scratch\_cover**: `string`
104
208
 
209
+ URL of the cover / foil image that the player scratches away
210
+ to reveal the prize beneath.
211
+
105
212
  ___
106
213
 
107
214
  ### scratch\_bg\_desktop
108
215
 
109
216
  • `Optional` **scratch\_bg\_desktop**: `string`
110
217
 
218
+ URL of the background image shown behind the scratch card on
219
+ desktop devices.
220
+ Back-Office label: _"Scratch main desktop background"_.
221
+
111
222
  ___
112
223
 
113
224
  ### scratch\_bg\_mobile
114
225
 
115
226
  • `Optional` **scratch\_bg\_mobile**: `string`
116
227
 
228
+ URL of the background image shown behind the scratch card on
229
+ mobile devices.
230
+ Back-Office label: _"Scratch main mobile background"_.
231
+
117
232
  ___
118
233
 
119
234
  ### scratch\_cursor
120
235
 
121
236
  • `Optional` **scratch\_cursor**: `string`
122
237
 
238
+ URL of a custom cursor image used when the pointer hovers over
239
+ the scratchable area.
240
+ Back-Office label: _"Scratch mouse cursor"_.
241
+
242
+ ___
243
+
244
+ ### hide\_prize\_names
245
+
246
+ • `Optional` **hide\_prize\_names**: `boolean`
247
+
248
+ When `true`, prize / reward names are hidden inside the scratch-card
249
+ UI so the player does not know what they won until they have fully
250
+ scratched the card.
251
+
252
+ Only rendered for `SAWGameType.ScratchCard`.
253
+ Back-Office label: _"Hide prize names"_.
254
+
123
255
  ___
124
256
 
125
257
  ### custom\_css
126
258
 
127
259
  • `Optional` **custom\_css**: `string`
128
260
 
261
+ Raw CSS injected into the game iframe, allowing fine-grained
262
+ overrides beyond what the selected skin provides.
263
+
129
264
  ___
130
265
 
131
266
  ### custom\_skin\_folder
132
267
 
133
268
  • `Optional` **custom\_skin\_folder**: `string`
134
269
 
270
+ Path to an alternative folder from which skin assets (images,
271
+ CSS, JS) are loaded instead of the default skin bundle.
272
+
135
273
  ___
136
274
 
137
275
  ### jackpot\_symbol
138
276
 
139
277
  • `Optional` **jackpot\_symbol**: `string`
140
278
 
279
+ Label / symbol appended to the jackpot amount to give it semantic
280
+ meaning (e.g. `"EUR"`, `"Free spins"`).
281
+ Displayed alongside [jackpot_current](SAWTemplate.md#jackpot_current).
282
+ Back-Office label: _"Jackpot symbol"_.
283
+
141
284
  ___
142
285
 
143
286
  ### promo\_image
144
287
 
145
288
  • `Optional` **promo\_image**: `string`
146
289
 
290
+ URL of a promotional banner image (recommended 500 × 240 px)
291
+ displayed inside the game UI to advertise an offer or campaign.
292
+ Supports per-language variants via
293
+ `saw_template_ui_definition.promo_image_<lang>`.
294
+
147
295
  ___
148
296
 
149
297
  ### promo\_text
150
298
 
151
299
  • `Optional` **promo\_text**: `string`
152
300
 
301
+ HTML-capable promotional text displayed alongside
302
+ [promo_image](SAWTemplateUI.md#promo_image). Supports translations via
303
+ `saw_template_ui_definition._translations.<lang>.promo_text`.
304
+
153
305
  ___
154
306
 
155
307
  ### matchx\_banner
156
308
 
157
309
  • `Optional` **matchx\_banner**: `string`
158
310
 
311
+ URL of the banner image shown at the top of the MatchX / Quiz
312
+ tournament leaderboard on desktop.
313
+ Back-Office label: _"Banner"_.
314
+
159
315
  ___
160
316
 
161
317
  ### matchx\_banner\_mobile
162
318
 
163
319
  • `Optional` **matchx\_banner\_mobile**: `string`
164
320
 
321
+ URL of the mobile-optimised banner image for the MatchX / Quiz
322
+ tournament leaderboard.
323
+
165
324
  ___
166
325
 
167
326
  ### matchx\_seasonal\_ranking
168
327
 
169
328
  • `Optional` **matchx\_seasonal\_ranking**: `boolean`
170
329
 
330
+ When `true`, tournament rankings are reset on a seasonal cadence
331
+ rather than being continuous.
332
+
171
333
  ___
172
334
 
173
335
  ### matchx\_is\_completed
174
336
 
175
337
  • `Optional` **matchx\_is\_completed**: `boolean`
176
338
 
339
+ When `true`, the MatchX / Quiz tournament has concluded.
340
+ New entries are blocked and the final leaderboard is shown.
341
+
177
342
  ___
178
343
 
179
344
  ### matchx\_general\_board\_users\_count
180
345
 
181
346
  • `Optional` **matchx\_general\_board\_users\_count**: `number`
182
347
 
348
+ Maximum number of players visible on the general leaderboard
349
+ inside the MatchX / Quiz game.
350
+
183
351
  ___
184
352
 
185
353
  ### matchx\_hide\_ranking
186
354
 
187
355
  • `Optional` **matchx\_hide\_ranking**: `boolean`
188
356
 
357
+ When `true`, the ranking / leaderboard panel is hidden from
358
+ players inside the MatchX / Quiz game.
359
+ Back-Office label: _"Hide ranking"_.
360
+
189
361
  ___
190
362
 
191
363
  ### prize\_pool\_image
192
364
 
193
365
  • `Optional` **prize\_pool\_image**: `string`
194
366
 
195
- ___
196
-
197
- ### ask\_for\_username
198
-
199
- • `Optional` **ask\_for\_username**: [`SAWAskForUsername`](../enums/SAWAskForUsername.md)
367
+ URL of an image used to illustrate the prize pool (e.g. a trophy
368
+ or coins graphic).
200
369
 
201
370
  ___
202
371
 
@@ -204,23 +373,54 @@ ___
204
373
 
205
374
  • `Optional` **show\_prize\_board**: `boolean`
206
375
 
376
+ When `true`, a panel listing the available prizes is displayed
377
+ inside the game.
378
+
379
+ Back-Office label: _"Show the list of the prizes"_.
380
+ Defaults to `true` in the MatchX / Quiz game form.
381
+
207
382
  ___
208
383
 
209
384
  ### max\_spins\_period\_ms
210
385
 
211
386
  • `Optional` **max\_spins\_period\_ms**: `number`
212
387
 
388
+ The rolling time-window in milliseconds within which
389
+ `SAWTemplate.maxSpinsCount` attempts are allowed
390
+ (e.g. `86400000` = 24 hours).
391
+
392
+ Stored on the template root as `max_spins_period_ms`; mirrored here
393
+ for convenience in UI preview payloads.
394
+
213
395
  ___
214
396
 
215
397
  ### show\_countdown\_for\_next\_availability
216
398
 
217
399
  • `Optional` **show\_countdown\_for\_next\_availability**: `boolean`
218
400
 
401
+ When `true`, a countdown timer showing when the next spin becomes
402
+ available is displayed to the player.
403
+
404
+ Only active when `max_spins_count === 1` **and** `max_spins_period_ms`
405
+ is set; automatically forced to `false`.
406
+
407
+ Back-Office label: _"Show time to the next available spin"_.
408
+
219
409
  ___
220
410
 
221
- ### disable\_background\_music
411
+ ### ask\_for\_username
222
412
 
223
- • `Optional` **disable\_background\_music**: `boolean`
413
+ • `Optional` **ask\_for\_username**: [`SAWAskForUsername`](../enums/SAWAskForUsername.md)
414
+
415
+ Controls when (or whether) the player is asked to provide a
416
+ display name before or after playing.
417
+
418
+ | Value | Meaning |
419
+ | --- | --- |
420
+ | `SAWAskForUsername.NOASK = 'no-ask'` | Never ask |
421
+ | `SAWAskForUsername.ONSUMBIT = 'on-submit'` | Ask when submitting |
422
+
423
+ Back-Office label: _"Ask for username"_.
224
424
 
225
425
  ___
226
426
 
@@ -228,48 +428,81 @@ ___
228
428
 
229
429
  • `Optional` **custom\_section\_id**: `number`
230
430
 
431
+ ID of the custom section (category / tab) this mini-game belongs to,
432
+ allowing operators to group games in bespoke widget sections.
433
+ Back-Office label: _"Custom section"_.
434
+
231
435
  ___
232
436
 
233
437
  ### only\_in\_custom\_section
234
438
 
235
439
  • `Optional` **only\_in\_custom\_section**: `boolean`
236
440
 
441
+ When `true`, the template is shown **only** inside its assigned
442
+ custom section and is suppressed from all standard game listings.
443
+
237
444
  ___
238
445
 
239
446
  ### expose\_user\_spin\_id
240
447
 
241
448
  • `Optional` **expose\_user\_spin\_id**: [`SAWExposeUserSpinId`](../enums/SAWExposeUserSpinId.md)
242
449
 
450
+ Determines which identifier is forwarded in webhooks and the
451
+ Retention API when a spin result is produced.
452
+
453
+ | Value | Meaning |
454
+ | --- | --- |
455
+ | `SAWExposeUserSpinId.UserId = 1` | Expose the operator's external user ID |
456
+ | `SAWExposeUserSpinId.SpinId = 2` | Expose the internal spin transaction ID |
457
+
458
+ Back-Office label:
459
+ _"Expose 'External user ID' or 'Spin transaction ID'"_.
460
+
243
461
  ___
244
462
 
245
463
  ### custom\_data
246
464
 
247
465
  • **custom\_data**: `any`
248
466
 
467
+ Arbitrary operator-defined payload attached to the template.
468
+ Can be a JSON object, plain string, or number. Passed through to
469
+ the front-end as-is and accessible via the public API.
470
+ Back-Office label: _"Custom data field"_.
471
+
249
472
  ___
250
473
 
251
474
  ### placeholder1
252
475
 
253
476
  • `Optional` **placeholder1**: `string`
254
477
 
478
+ First free-form placeholder string used by Prize Drop game skins
479
+ to inject operator-defined copy into the game UI.
480
+
255
481
  ___
256
482
 
257
483
  ### placeholder2
258
484
 
259
485
  • `Optional` **placeholder2**: `string`
260
486
 
487
+ Second free-form placeholder string used by Prize Drop game skins
488
+ to inject operator-defined copy into the game UI.
489
+
261
490
  ___
262
491
 
263
492
  ### prize\_drop\_template
264
493
 
265
494
  • `Optional` **prize\_drop\_template**: `Object`
266
495
 
496
+ Template definition for the Prize Drop game overlay.
497
+ `id` is the unique template identifier; `content` is the raw HTML
498
+ rendered inside the drop panel.
499
+
267
500
  #### Type declaration
268
501
 
269
- | Name | Type |
270
- | :------ | :------ |
271
- | `id` | `string` |
272
- | `content` | `string` |
502
+ | Name | Type | Description |
503
+ | :------ | :------ | :------ |
504
+ | `id` | `string` | Unique identifier for this prize-drop HTML template. |
505
+ | `content` | `string` | HTML content rendered inside the prize-drop panel. |
273
506
 
274
507
  ___
275
508
 
@@ -277,23 +510,26 @@ ___
277
510
 
278
511
  • `Optional` **game\_layout**: [`SAWGameLayout`](../enums/SAWGameLayout.md)
279
512
 
280
- ___
513
+ Visual arrangement of items in Lootbox (Weekly / Calendar Days)
514
+ game types.
281
515
 
282
- ### steps\_to\_finish\_game
516
+ | Value | Meaning |
517
+ | --- | --- |
518
+ | `SAWGameLayout.Horizontal = 1` | Items laid out in a horizontal row |
519
+ | `SAWGameLayout.VerticalMap = 2` | Items arranged as a vertical map path |
283
520
 
284
- `Optional` **steps\_to\_finish\_game**: `number`
521
+ Back-Office label: _"Visual layout"_.
285
522
 
286
523
  ___
287
524
 
288
- ### wheel\_layout
289
-
290
- • `Optional` **wheel\_layout**: [`SAWWheelLayout`](../enums/SAWWheelLayout.md)
291
-
292
- ___
525
+ ### steps\_to\_finish\_game
293
526
 
294
- ### background\_music\_volume
527
+ `Optional` **steps\_to\_finish\_game**: `number`
295
528
 
296
- `Optional` **background\_music\_volume**: `number`
529
+ Total number of path steps / cells a player must progress through
530
+ to complete a Treasure Hunt game and receive the final prize.
531
+ Higher values result in longer gameplay sessions.
532
+ Back-Office label: _"Steps to finish game"_.
297
533
 
298
534
  ___
299
535
 
@@ -301,4 +537,11 @@ ___
301
537
 
302
538
  • `Optional` **game\_difficulty**: [`SAWGameDifficultyType`](../enums/SAWGameDifficultyType.md)
303
539
 
304
- Voyager specific
540
+ Difficulty level of the Voyager (space-exploration) mini-game,
541
+ controlling obstacle frequency and game speed.
542
+
543
+ | Value | Meaning |
544
+ | --- | --- |
545
+ | `SAWGameDifficultyType.EASY = 1` | Easy |
546
+ | `SAWGameDifficultyType.MEDIUM = 2` | Medium |
547
+ | `SAWGameDifficultyType.HARD = 3` | Hard |
@@ -41,3 +41,9 @@ ___
41
41
  ### activeTillDate
42
42
 
43
43
  • `Optional` **activeTillDate**: `number`
44
+
45
+ ___
46
+
47
+ ### related\_games
48
+
49
+ • `Optional` **related\_games**: [`AchRelatedGame`](AchRelatedGame.md)[]
@@ -96,6 +96,14 @@ The list of IDs of the related items. Can be used to show the related items in t
96
96
 
97
97
  ___
98
98
 
99
+ ### related\_games
100
+
101
+ • `Optional` **related\_games**: [`AchRelatedGame`](AchRelatedGame-1.md)[]
102
+
103
+ List of casino games (or other types of entities) related to the store item
104
+
105
+ ___
106
+
99
107
  ### can\_buy
100
108
 
101
109
  • **can\_buy**: `boolean`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.359",
3
+ "version": "0.0.360",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,4 +1,3 @@
1
- import { AchRelatedGame } from '../Base/AchRelatedGame';
2
1
  import { ProtocolResponse } from '../Base/ProtocolResponse';
3
2
  import { JackpotDetails } from './JackpotDetails';
4
3