@smartico/public-api 0.0.439 → 0.0.440

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.439",
3
+ "version": "0.0.440",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -163,7 +163,7 @@ export interface QuizEventMeta {
163
163
  }
164
164
 
165
165
  /**
166
- * GamePickEventMeta describes metadata for a MatchX or Quiz event, including team info and sport context
166
+ * GamePickEventMeta describes metadata for a MatchX, Quiz or Bingo event, including team info and sport context
167
167
  */
168
168
  export interface GamePickEventMeta extends QuizEventMeta {
169
169
  /** Display name of the event/match */
@@ -457,7 +457,7 @@ export interface GamesApiResponse<T> {
457
457
  * GamePickRequestParams describes the base parameters required for GamePick API calls
458
458
  */
459
459
  export interface GamePickRequestParams {
460
- /** ID of the MatchX or Quiz game template. The only field the consumer supplies. */
460
+ /** ID of the MatchX, Quiz or Bingo game template. The only field the consumer supplies. */
461
461
  saw_template_id: number;
462
462
  /** External user ID. Injected by the SDK from the active session; consumers omit it. */
463
463
  ext_user_id?: string;
@@ -12,6 +12,7 @@ export enum SAWGameType {
12
12
  Plinko = 11,
13
13
  CoinFlip = 12,
14
14
  CustomMinigame = 13,
15
+ Bingo = 14,
15
16
  }
16
17
 
17
18
  export enum SAWGameTypeName {
@@ -28,6 +29,7 @@ export enum SAWGameTypeName {
28
29
  Plinko = 'plinko',
29
30
  CoinFlip = 'coin_flip',
30
31
  CustomMinigame = 'custom_minigame',
32
+ Bingo = 'bingo',
31
33
  Unknown = 'unknown',
32
34
  }
33
35
 
@@ -48,6 +50,7 @@ export const SAWGameTypeNamed = (type: SAWGameType): SAWGameTypeName => {
48
50
  [SAWGameType.Plinko]: SAWGameTypeName.Plinko,
49
51
  [SAWGameType.CoinFlip]: SAWGameTypeName.CoinFlip,
50
52
  [SAWGameType.CustomMinigame]: SAWGameTypeName.CustomMinigame,
53
+ [SAWGameType.Bingo]: SAWGameTypeName.Bingo,
51
54
  }[type] || SAWGameTypeName.Unknown
52
55
  );
53
56
  };
@@ -11,13 +11,13 @@ export interface SAWPrize {
11
11
  prize_value?: number;
12
12
  /** The type of the prize — see {@link SAWPrizeType} */
13
13
  prize_type_id: SAWPrizeType;
14
- /** Competition games (MatchX / Quiz): first finishing place this prize applies to */
14
+ /** Competition games (MatchX / Quiz / Bingo): first finishing place this prize applies to */
15
15
  place_from?: number;
16
- /** Competition games (MatchX / Quiz): last finishing place this prize applies to; equals `place_from` for a single-place prize */
16
+ /** Competition games (MatchX / Quiz / Bingo): last finishing place this prize applies to; equals `place_from` for a single-place prize */
17
17
  place_to?: number;
18
18
  /** Client-side only — unique id of a win instance generated by the default Smartico UI to dedupe render effects; never sent by the server */
19
19
  sawUniqueWinId?: string;
20
- /** Remaining stock. Present only when the template's `expose_game_stat_on_api` is enabled; always present for MatchX / Quiz games */
20
+ /** Remaining stock. Present only when the template's `expose_game_stat_on_api` is enabled; always present for MatchX / Quiz / Bingo games */
21
21
  pool?: number;
22
22
  /** Initial (configured) stock. Present regardless of `expose_game_stat_on_api` */
23
23
  pool_initial?: number;
@@ -64,7 +64,7 @@ export interface SAWTemplate {
64
64
  lottie_animation_speed?: number;
65
65
  };
66
66
 
67
- /** 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). */
67
+ /** 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 / Bingo games). */
68
68
  expose_game_stat_on_api?: boolean;
69
69
 
70
70
  /** Prize Drop only: when true, the pushed prize requires an explicit claim by the user before it is credited */
@@ -478,8 +478,8 @@ export interface SAWTemplateUI {
478
478
  * widget loads `custom_game_url` in an iframe instead of rendering the
479
479
  * built-in game. `saw_game_type_id` still reports the original type, so
480
480
  * treat this flag — not the type — as the answer to "is this played as a
481
- * custom game", together with `SAWGameType.CustomMinigame`, which is always
482
- * played that way.
481
+ * custom game", together with `SAWGameType.CustomMinigame` and
482
+ * `SAWGameType.Bingo`, which are always played that way.
483
483
  *
484
484
  * When `false` or omitted, the template is played as its own game type.
485
485
  * Back-Office label: _"Use Custom Game"_.
@@ -4,7 +4,7 @@ import { WSAPIAvatars } from './WSAPIAvatars';
4
4
  /** @group GamePick */
5
5
  export class WSAPIGamePick extends WSAPIAvatars {
6
6
  /**
7
- * Returns every open round for a MatchX or Quiz game template, with the full
7
+ * Returns every open round for a MatchX, Quiz or Bingo game template, with the full
8
8
  * event list (matches / questions) and the current user's selections per event.
9
9
  *
10
10
  * Use to power the rounds-lobby screen — typically a list of round cards a user
@@ -14,7 +14,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
14
14
  * @remarks
15
15
  * **Preconditions**
16
16
  * - User must be authenticated.
17
- * - `saw_template_id` must reference a MatchX or Quiz game template. The SDK
17
+ * - `saw_template_id` must reference a MatchX, Quiz or Bingo game template. The SDK
18
18
  * throws synchronously if it's missing.
19
19
  *
20
20
  * **Transport**
@@ -47,7 +47,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
47
47
  *
48
48
  * **UI guidance**: see [UI Guide — `gamePickGetActiveRounds`](../../docs/ui/gamepick/UIGuide_gamePickGetActiveRounds.md).
49
49
  *
50
- * @param props.saw_template_id ID of the MatchX or Quiz game template.
50
+ * @param props.saw_template_id ID of the MatchX, Quiz or Bingo game template.
51
51
  * @returns Wrapped {@link GamesApiResponse} of {@link GamePickRound} array.
52
52
  *
53
53
  * @example
@@ -73,7 +73,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
73
73
 
74
74
  /**
75
75
  * Returns a single round (events, user selections, scoring rules) for a
76
- * MatchX or Quiz game. Use to power the round-detail / prediction-input
76
+ * MatchX, Quiz or Bingo game. Use to power the round-detail / prediction-input
77
77
  * screen the user lands on after picking a round from the lobby.
78
78
  *
79
79
  * Same shape as one entry of {@link gamePickGetActiveRounds}; cheaper when the
@@ -105,7 +105,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
105
105
  *
106
106
  * **UI guidance**: see [UI Guide — `gamePickGetActiveRound`](../../docs/ui/gamepick/UIGuide_gamePickGetActiveRound.md).
107
107
  *
108
- * @param props.saw_template_id ID of the MatchX or Quiz game template.
108
+ * @param props.saw_template_id ID of the MatchX, Quiz or Bingo game template.
109
109
  * @param props.round_id ID of the round to fetch.
110
110
  * @returns Wrapped {@link GamesApiResponse} of a single {@link GamePickRound}.
111
111
  *
@@ -134,7 +134,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
134
134
  }
135
135
 
136
136
  /**
137
- * Returns the full round history (active + resolved) for a MatchX or Quiz game
137
+ * Returns the full round history (active + resolved) for a MatchX, Quiz or Bingo game
138
138
  * template, newest-first. Each round carries the user's predictions plus the
139
139
  * server-resolved outcome on each event.
140
140
  *
@@ -168,7 +168,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
168
168
  *
169
169
  * **UI guidance**: see [UI Guide — `gamePickGetHistory`](../../docs/ui/gamepick/UIGuide_gamePickGetHistory.md).
170
170
  *
171
- * @param props.saw_template_id ID of the MatchX or Quiz game template.
171
+ * @param props.saw_template_id ID of the MatchX, Quiz or Bingo game template.
172
172
  * @returns Wrapped {@link GamesApiResponse} of {@link GamePickRound} array,
173
173
  * newest-first.
174
174
  *
@@ -189,7 +189,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
189
189
  }
190
190
 
191
191
  /**
192
- * Returns the leaderboard for a MatchX or Quiz game round — ranked list of
192
+ * Returns the leaderboard for a MatchX, Quiz or Bingo game round — ranked list of
193
193
  * players plus the current user's entry (`my_user`). Pass `round_id: -1` for
194
194
  * the season / overall leaderboard across every round in the template.
195
195
  *
@@ -229,7 +229,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
229
229
  *
230
230
  * **UI guidance**: see [UI Guide — `gamePickGetBoard`](../../docs/ui/gamepick/UIGuide_gamePickGetBoard.md).
231
231
  *
232
- * @param props.saw_template_id ID of the MatchX or Quiz game template.
232
+ * @param props.saw_template_id ID of the MatchX, Quiz or Bingo game template.
233
233
  * @param props.round_id Round ID, or `-1` for the season leaderboard.
234
234
  * @returns Wrapped {@link GamesApiResponse} of {@link GamePickRoundBoard}.
235
235
  *
@@ -497,7 +497,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
497
497
  *
498
498
  * **UI guidance**: see [UI Guide — `gamePickGetUserInfo`](../../docs/ui/gamepick/UIGuide_gamePickGetUserInfo.md).
499
499
  *
500
- * @param props.saw_template_id ID of the MatchX or Quiz game template.
500
+ * @param props.saw_template_id ID of the MatchX, Quiz or Bingo game template.
501
501
  * @returns Wrapped {@link GamesApiResponse} of {@link GamePickUserInfo}.
502
502
  *
503
503
  * @example
@@ -555,7 +555,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
555
555
  *
556
556
  * **UI guidance**: see [UI Guide — `gamePickGetGameInfo`](../../docs/ui/gamepick/UIGuide_gamePickGetGameInfo.md).
557
557
  *
558
- * @param props.saw_template_id ID of the MatchX or Quiz game template.
558
+ * @param props.saw_template_id ID of the MatchX, Quiz or Bingo game template.
559
559
  * @returns Wrapped {@link GamesApiResponse} of {@link GamePickGameInfo}.
560
560
  *
561
561
  * @example
@@ -616,7 +616,7 @@ export class WSAPIGamePick extends WSAPIAvatars {
616
616
  *
617
617
  * **UI guidance**: see [UI Guide — `gamePickGetRoundInfoForUser`](../../docs/ui/gamepick/UIGuide_gamePickGetRoundInfoForUser.md).
618
618
  *
619
- * @param props.saw_template_id ID of the MatchX or Quiz game template.
619
+ * @param props.saw_template_id ID of the MatchX, Quiz or Bingo game template.
620
620
  * @param props.round_id ID of the round to inspect.
621
621
  * @param props.int_user_id Internal user ID from
622
622
  * `gamePickGetBoard.users[].int_user_id`.
@@ -53,14 +53,14 @@ export class WSAPIMiniGames extends WSAPIRaffles {
53
53
  * substitution at fetch time.
54
54
  *
55
55
  * **Game-type variants**
56
- * All twelve `SAWGameType` values (`SpinAWheel`, `ScratchCard`,
56
+ * All `SAWGameType` values (`SpinAWheel`, `ScratchCard`,
57
57
  * `MatchX`, `GiftBox`, `PrizeDrop`, `Quiz`, `LootboxWeekdays`,
58
58
  * `LootboxCalendarDays`, `TreasureHunt`, `Voyager`, `Plinko`,
59
- * `CoinFlip`) surface through the same template shape. Most are
59
+ * `CoinFlip`, `CustomMinigame`, `Bingo`) surface through the same template shape. Most are
60
60
  * played via {@link playMiniGame}; the exceptions are:
61
61
  * - `PrizeDrop` — server-push only; the consumer does NOT call
62
62
  * `playMiniGame`. Prizes arrive via the prize-drop push channel.
63
- * - `MatchX` / `Quiz` — predictions are submitted via a separate
63
+ * - `MatchX` / `Quiz` / `Bingo` — predictions are submitted via a separate
64
64
  * games server (not this SDK); the SAW spin is fired
65
65
  * server-internally to deduct the buy-in.
66
66
  *
@@ -239,7 +239,7 @@ export class WSAPIMiniGames extends WSAPIRaffles {
239
239
  * Works for all `SAWGameType` values EXCEPT:
240
240
  * - `PrizeDrop` — prizes arrive server-pushed; do NOT call
241
241
  * `playMiniGame` for this type.
242
- * - `MatchX` / `Quiz` — prediction submission goes through a
242
+ * - `MatchX` / `Quiz` / `Bingo` — prediction submission goes through a
243
243
  * separate games server; `playMiniGame` is not the entry point.
244
244
  *
245
245
  * @remarks
@@ -65,7 +65,7 @@ export interface TMiniGamePrize {
65
65
  second_btn_action_title?: string;
66
66
  /** Message when the prize pool is empty for that specific prize */
67
67
  out_of_stock_message?: string;
68
- /** Remaining stock of the prize — decrements on each win, refunded if the spin is finalised as lost. Populated only when the template's `expose_game_stat_on_api` is enabled; always populated for MatchX / Quiz games */
68
+ /** Remaining stock of the prize — decrements on each win, refunded if the spin is finalised as lost. Populated only when the template's `expose_game_stat_on_api` is enabled; always populated for MatchX / Quiz / Bingo games */
69
69
  pool?: number;
70
70
  /** Initial (configured) stock of the prize. Populated regardless of `expose_game_stat_on_api` */
71
71
  pool_initial?: number;