@truelab/truelogic 4.6.0-2 → 4.6.0-3

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.
@@ -7,14 +7,13 @@ import { TAppThunkAction } from '../../../shared/lib/store';
7
7
  */
8
8
  export declare const setSandboxBonusMode: TAppThunkAction<string | null>;
9
9
  /**
10
- * What the GUI's bonus modes control shows: the Bonus Bet stake, the Buy Feature mode, whether its
11
- * SPIN buys now and how many purchases the mode made (the series reported to analytics)
10
+ * What the GUI's bonus modes control shows: the Bonus Bet stake, the Buy Feature mode and whether its
11
+ * SPIN buys now
12
12
  */
13
13
  export type TSandboxBonusModesReport = {
14
14
  bonusBetName: string | null;
15
15
  buyFeatureModeName: string | null;
16
16
  isBuyFeatureModeActive: boolean;
17
- buyFeatureModePurchases: number;
18
17
  };
19
18
  /**
20
19
  * Dev-only channel from the sandbox GUI: it lives on another page (the game runs in an iframe),
@@ -2,9 +2,9 @@ import { EStakeType, TStakeMode } from '../../../shared/api/config';
2
2
  import { TAppThunkAction } from '../../../shared/lib/store';
3
3
  import { TBonusConfig, TBonusModes, TBonusSpinPriceChip, TBonusState, TBonusWithStakeType, TBuyFeatureModeOffReason } from '../../../shared/model/bonus';
4
4
  /**
5
- * Only the Buy Feature mode and its series of purchases survive a reload: the rest of the slice comes
6
- * with `configure`. The shop needs no stored preselection for it — the chip that switches the mode
7
- * off preselects its card right before the shop becomes reachable (see PanelBonus)
5
+ * Only the Buy Feature mode survives a reload: the rest of the slice comes with `configure`. The shop
6
+ * needs no stored preselection for it — the chip that switches the mode off preselects its card right
7
+ * before the shop becomes reachable (see PanelBonus)
8
8
  */
9
9
  export declare const persistBonusTransform: import("redux-persist").Transform<TBonusState, Partial<TBonusState>, any, any>;
10
10
  export declare const setBonusCurrentBonusModeNames: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
@@ -5041,17 +5041,17 @@ export declare const getBonusSpinPriceChip: ((state: {
5041
5041
  memoize: typeof import("reselect").weakMapMemoize;
5042
5042
  };
5043
5043
  /**
5044
- * A purchase of a bonus game the server accepted: the Buy Feature mode is on and its series grows —
5045
- * from the shop the mode starts, from the mode's SPIN it just goes on (GTT-2875). The switch on is
5046
- * reported once per series, and only where the built-in panel shows the mode: with the game's own
5047
- * panel (External UI) nothing shows it or switches it off (GTT-2879)
5044
+ * A purchase of a bonus game the server accepted: the Buy Feature mode is on — from the shop the mode
5045
+ * starts, from the mode's SPIN it just goes on (GTT-2875). The switch on is reported once, and only
5046
+ * where the built-in panel shows the mode: with the game's own panel (External UI) nothing shows it
5047
+ * or switches it off (GTT-2879)
5048
5048
  */
5049
5049
  export declare const addBonusBuyFeaturePurchase: TAppThunkAction<string>;
5050
5050
  /**
5051
5051
  * Switches the Buy Feature mode off and reports it: `reason` tells the chip on the shop button, a
5052
- * Bonus Bet that replaced the mode and the mode's card gone from sale apart, `purchases` is the length
5053
- * of the series the mode made (GTT-2879). The mode belongs to the built-in panel: with the panel
5054
- * replaced by the game's own (External UI) nothing ever showed it, so nothing is reported
5052
+ * Bonus Bet that replaced the mode and the mode's card gone from sale apart (GTT-2879). The mode
5053
+ * belongs to the built-in panel: with the panel replaced by the game's own (External UI) nothing ever
5054
+ * showed it, so nothing is reported
5055
5055
  */
5056
5056
  export declare const turnBonusBuyFeatureModeOff: TAppThunkAction<TBuyFeatureModeOffReason>;
5057
5057
  /**
@@ -3,7 +3,7 @@ import type { GUI } from '../../../../sandbox/gui/gui';
3
3
  * QA control of the bonus modes (a Bonus Bet stake, the Buy Feature mode — GTT-2875), a live game
4
4
  * state rather than a configuration: the game reports it on every change, Apply switches to the
5
5
  * picked card without a reload — the game tells a Bonus Bet from a bonus game by the card's stake
6
- * type. `state` mirrors the game: the mode, whether its SPIN buys now and the purchases of the series
7
- * the analytics report — Apply of a buy card counts as the first one (GTT-2879).
6
+ * type. `state` mirrors the game: the mode and whether its SPIN buys now. Apply switches the mode the
7
+ * way a purchase and the chip do, so the mode analytics are paired here too (GTT-2879).
8
8
  */
9
9
  export declare function setupBonusModes(gui: GUI): void;
@@ -40,6 +40,8 @@ export declare enum EAnalyticsEvents {
40
40
  setCurrency = "currency",
41
41
  spinHold = "spin_hold",
42
42
  bonusPurchase = "bonus_purchase",
43
+ bonusPurchaseSuccess = "bonus_purchase_success",
44
+ bonusPurchaseFailed = "bonus_purchase_failed",
43
45
  bonusBetActivate = "bonus_bet_activate",
44
46
  timeToBuyBonus = "time_to_buy_bonus",
45
47
  buyFeatureModeOn = "buy_feature_mode_on",
@@ -102,16 +102,22 @@ export type TAnalyticsEvents = {
102
102
  ['walletConvertSuccess:opened']: (params: TAnalyticsCustomParams) => void;
103
103
  ['walletConvertSuccess:continuePlayingClicked']: (params: TAnalyticsCustomParams) => void;
104
104
  ['bonus:purchase']: (options: TEventOptions) => void;
105
+ /** The server accepted a purchase reported by `bonus:purchase`: the same price and `purchase_source` (GTT-2879) */
106
+ ['bonus:purchaseSuccess']: (options: TEventOptions) => void;
107
+ /**
108
+ * The server rejected a purchase reported by `bonus:purchase`: the same price and `purchase_source`,
109
+ * plus `error_code` / `error_name` of the rejection (GTT-2879)
110
+ */
111
+ ['bonus:purchaseFailed']: (options: TEventOptions) => void;
105
112
  ['bonus:betActivate']: (options: TEventOptions) => void;
106
113
  /** The Buy Feature mode switched on by a purchase from the shop (GTT-2879) */
107
114
  ['buyFeatureMode:on']: (params: {
108
115
  bonus_mode: string;
109
116
  }) => void;
110
- /** The Buy Feature mode switched off; `purchases` is the length of the series it made (GTT-2879) */
117
+ /** The Buy Feature mode switched off (GTT-2879) */
111
118
  ['buyFeatureMode:off']: (params: {
112
119
  bonus_mode: string;
113
120
  off_reason: TBuyFeatureModeOffReason;
114
- purchases: number;
115
121
  }) => void;
116
122
  ['gameLoad.phase:completed']: (phase: TGameLoadPhase, params: TAnalyticsCustomParams) => void;
117
123
  ['gameLoad:completed']: (params: TAnalyticsCustomParams) => void;
@@ -48,11 +48,6 @@ export type TBonusState = {
48
48
  * mode is off. Set by a purchase, persisted like a Bonus Bet stake (GTT-2875)
49
49
  */
50
50
  buyFeatureModeName: string | null;
51
- /**
52
- * The series of purchases in the mode: the one that turned it on and every one by SPIN since,
53
- * `0` while the mode is off. Reported when the mode goes off (GTT-2879)
54
- */
55
- buyFeatureModePurchases: number;
56
51
  };
57
52
  /**
58
53
  * What switched the Buy Feature mode off, for analytics: the chip on the shop button, a Bonus Bet
@@ -752,7 +752,6 @@ declare const meta: {
752
752
  customBonusBets?: boolean;
753
753
  maxBonusCards?: number;
754
754
  buyFeatureModeName?: string | null;
755
- buyFeatureModePurchases?: number;
756
755
  };
757
756
  realityCheck?: {
758
757
  isActive?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truelab/truelogic",
3
- "version": "4.6.0-2",
3
+ "version": "4.6.0-3",
4
4
  "description": "",
5
5
  "main": "./dist/truelogic.min.js",
6
6
  "types": "./dist/types/src/index.d.ts",