@smartico/public-api 0.0.420 → 0.0.421

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.
Files changed (131) hide show
  1. package/dist/ActivityLog/ActivityLogActivities.d.ts +1 -1
  2. package/dist/ActivityLog/ActivityLogEntry.d.ts +35 -17
  3. package/dist/ActivityLog/ActivityLogMeta.d.ts +31 -0
  4. package/dist/ActivityLog/GetActivityLogRequest.d.ts +2 -0
  5. package/dist/ActivityLog/GetActivityLogResponse.d.ts +1 -2
  6. package/dist/Jackpots/JackPotWinPushWinner.d.ts +34 -0
  7. package/dist/Jackpots/JackPotWinner.d.ts +3 -1
  8. package/dist/Jackpots/JackpotContributionRule.d.ts +23 -0
  9. package/dist/Jackpots/JackpotDetails.d.ts +8 -0
  10. package/dist/Jackpots/JackpotPot.d.ts +4 -2
  11. package/dist/Jackpots/JackpotPublicMeta.d.ts +6 -2
  12. package/dist/Jackpots/JackpotWinPush.d.ts +14 -2
  13. package/dist/Jackpots/index.d.ts +2 -0
  14. package/dist/SmarticoAPI.d.ts +1 -3
  15. package/dist/WSAPI/WSAPIBase.d.ts +0 -1
  16. package/dist/WSAPI/WSAPIJackpots.d.ts +2 -0
  17. package/dist/WSAPI/WSAPITypes.d.ts +17 -17
  18. package/dist/WSAPI/WSAPIUser.d.ts +11 -36
  19. package/dist/index.js +35 -128
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.modern.mjs +33 -100
  22. package/dist/index.modern.mjs.map +1 -1
  23. package/docs/Callbacks.md +1 -1
  24. package/docs/api/README.md +4 -4
  25. package/docs/api/classes/WSAPIJackpots.md +2 -0
  26. package/docs/api/classes/WSAPIUser.md +30 -59
  27. package/docs/api/documents/Callbacks.md +1 -1
  28. package/docs/api/enumerations/ActivityLogActivities.md +1 -1
  29. package/docs/api/enumerations/PointChangeSourceType.md +6 -0
  30. package/docs/api/interfaces/ActivityLogEntry.md +124 -0
  31. package/docs/api/interfaces/ActivityLogMeta.md +100 -0
  32. package/docs/api/interfaces/JackPotWinPushWinner.md +103 -0
  33. package/docs/api/interfaces/JackPotWinner.md +9 -1
  34. package/docs/api/interfaces/JackpotContributionRule.md +49 -0
  35. package/docs/api/interfaces/JackpotDetails.md +24 -0
  36. package/docs/api/interfaces/JackpotPot.md +9 -1
  37. package/docs/api/interfaces/JackpotPublicMeta.md +12 -2
  38. package/docs/api/interfaces/JackpotWinPush.md +14 -1
  39. package/docs/api/interfaces/TActivityLog.md +70 -2
  40. package/docs/api/type-aliases/TActivityLogEntry.md +7 -0
  41. package/docs/capabilities/_responses/gamePickGetActiveRound.json +37 -37
  42. package/docs/capabilities/_responses/gamePickGetActiveRounds.json +37 -131
  43. package/docs/capabilities/_responses/gamePickGetBoard.json +25 -14
  44. package/docs/capabilities/_responses/gamePickGetGameInfo.json +93 -79
  45. package/docs/capabilities/_responses/gamePickGetHistory.json +37 -131
  46. package/docs/capabilities/_responses/gamePickGetUserInfo.json +5 -5
  47. package/docs/capabilities/_responses/getActivityLog.json +106 -1
  48. package/docs/capabilities/_responses/getAvatarsCustomized.json +4 -4
  49. package/docs/capabilities/_responses/getAvatarsList.json +2 -2
  50. package/docs/capabilities/_responses/getBadges.json +27 -29
  51. package/docs/capabilities/_responses/getBonuses.json +1 -18
  52. package/docs/capabilities/_responses/getClanInfo.json +13 -13
  53. package/docs/capabilities/_responses/getClans.json +6 -6
  54. package/docs/capabilities/_responses/getCurrentLevel.json +12 -12
  55. package/docs/capabilities/_responses/getInboxMessageBody.json +2 -2
  56. package/docs/capabilities/_responses/getInboxMessages.json +6 -6
  57. package/docs/capabilities/_responses/getInboxUnreadCount.json +1 -1
  58. package/docs/capabilities/_responses/getJackpotWinners.json +14 -14
  59. package/docs/capabilities/_responses/getLeaderBoard.json +8 -8
  60. package/docs/capabilities/_responses/getMiniGames.json +92 -90
  61. package/docs/capabilities/_responses/getMiniGamesHistory.json +874 -1
  62. package/docs/capabilities/_responses/getMissions.json +2 -2
  63. package/docs/capabilities/_responses/getRaffleDrawRun.json +7 -7
  64. package/docs/capabilities/_responses/getRaffleDrawRunsHistory.json +6 -6
  65. package/docs/capabilities/_responses/getRaffles.json +14 -14
  66. package/docs/capabilities/_responses/getStorePurchasedItems.json +5 -5
  67. package/docs/capabilities/_responses/getTournamentInstanceInfo.json +100 -53
  68. package/docs/capabilities/_responses/getTournamentsList.json +12 -12
  69. package/docs/capabilities/_responses/getTranslations.json +1 -1
  70. package/docs/capabilities/_responses/getUserProfile.json +10 -10
  71. package/docs/capabilities/_responses/jackpotGet.json +33 -34
  72. package/docs/capabilities/gamePickGetActiveRound.md +22 -23
  73. package/docs/capabilities/gamePickGetActiveRounds.md +22 -23
  74. package/docs/capabilities/gamePickGetBoard.md +14 -14
  75. package/docs/capabilities/gamePickGetGameInfo.md +24 -44
  76. package/docs/capabilities/gamePickGetHistory.md +22 -23
  77. package/docs/capabilities/gamePickGetUserInfo.md +5 -5
  78. package/docs/capabilities/getActivityLog.md +69 -9
  79. package/docs/capabilities/getAvatarsCustomized.md +3 -3
  80. package/docs/capabilities/getBadges.md +13 -14
  81. package/docs/capabilities/getBonuses.md +2 -17
  82. package/docs/capabilities/getClanInfo.md +8 -8
  83. package/docs/capabilities/getClans.md +4 -4
  84. package/docs/capabilities/getCurrentLevel.md +12 -12
  85. package/docs/capabilities/getInboxMessageBody.md +2 -2
  86. package/docs/capabilities/getInboxMessages.md +3 -3
  87. package/docs/capabilities/getInboxUnreadCount.md +6 -0
  88. package/docs/capabilities/getJackpotWinners.md +9 -8
  89. package/docs/capabilities/getLeaderBoard.md +5 -5
  90. package/docs/capabilities/getMiniGames.md +35 -37
  91. package/docs/capabilities/getMiniGamesHistory.md +83 -2
  92. package/docs/capabilities/getMissions.md +1 -1
  93. package/docs/capabilities/getRaffleDrawRun.md +7 -7
  94. package/docs/capabilities/getRaffleDrawRunsHistory.md +3 -3
  95. package/docs/capabilities/getRaffles.md +8 -8
  96. package/docs/capabilities/getStorePurchasedItems.md +2 -2
  97. package/docs/capabilities/getTournamentInstanceInfo.md +45 -37
  98. package/docs/capabilities/getTournamentsList.md +6 -6
  99. package/docs/capabilities/getTranslations.md +1 -1
  100. package/docs/capabilities/getUserProfile.md +10 -10
  101. package/docs/capabilities/jackpotGet.md +56 -28
  102. package/docs/capabilities/jackpotOptIn.md +2 -0
  103. package/docs/capabilities/smarticoCallbacks.md +1 -1
  104. package/docs/native/PROTOCOL.md +141 -18
  105. package/docs/ui/jackpots/UIGuide_jackpotGet.md +1 -1
  106. package/docs/ui/user/UIGuide_getActivityLog.md +4 -2
  107. package/package.json +4 -3
  108. package/scripts/capture-responses-browser.mjs +8 -1
  109. package/src/ActivityLog/ActivityLogActivities.ts +1 -1
  110. package/src/ActivityLog/ActivityLogEntry.ts +33 -21
  111. package/src/ActivityLog/ActivityLogMeta.ts +31 -0
  112. package/src/ActivityLog/GetActivityLogRequest.ts +2 -0
  113. package/src/ActivityLog/GetActivityLogResponse.ts +23 -49
  114. package/src/Jackpots/JackPotWinPushWinner.ts +35 -0
  115. package/src/Jackpots/JackPotWinner.ts +3 -1
  116. package/src/Jackpots/JackpotContributionRule.ts +25 -0
  117. package/src/Jackpots/JackpotDetails.ts +8 -0
  118. package/src/Jackpots/JackpotPot.ts +4 -2
  119. package/src/Jackpots/JackpotPublicMeta.ts +6 -2
  120. package/src/Jackpots/JackpotWinPush.ts +14 -2
  121. package/src/Jackpots/index.ts +2 -0
  122. package/src/SmarticoAPI.ts +1 -44
  123. package/src/WSAPI/WSAPIBase.ts +0 -1
  124. package/src/WSAPI/WSAPIJackpots.ts +2 -0
  125. package/src/WSAPI/WSAPITypes.ts +18 -18
  126. package/src/WSAPI/WSAPIUser.ts +10 -53
  127. package/docs/api/interfaces/GemsDiamondsLog.md +0 -45
  128. package/docs/api/interfaces/PointsLog.md +0 -45
  129. package/docs/api/interfaces/TActivityLogEntry.md +0 -100
  130. package/docs/api/type-aliases/ActivityLogEntry.md +0 -3
  131. package/docs/capabilities/getActivityLogV2.md +0 -62
@@ -1,4 +1,4 @@
1
- /** Activity-log entry type as returned on the v2 wire (`type_id`). */
1
+ /** Activity-log entry type as returned on the wire (`type_id`). */
2
2
  export declare enum ActivityLogActivities {
3
3
  Gems = 1,
4
4
  Diamonds = 2,
@@ -1,23 +1,41 @@
1
+ import { ActivityLogActivities } from './ActivityLogActivities';
2
+ import { ActivityLogMeta } from './ActivityLogMeta';
1
3
  import { PointChangeSourceType } from './PointChangeSourceType';
2
- import { UserBalanceType } from './UserBalanceType';
3
- export interface PointsLog {
4
- /** Epoch timestamp in SECONDS (not ms — unlike most SDK timestamps). */
5
- create_date: number;
4
+ /**
5
+ * One raw activity-log row as it arrives on the wire.
6
+ *
7
+ * JS consumers receive the friendlier {@link TActivityLog} instead — this is the
8
+ * pre-transform shape, documented for native clients that read the protocol directly.
9
+ */
10
+ export interface ActivityLogEntry {
11
+ /** Creation time; `seconds` is the epoch value in SECONDS (not ms). */
12
+ create_date: {
13
+ seconds: number;
14
+ nanos?: number;
15
+ };
6
16
  user_ext_id: string;
7
- crm_brand_id: number;
8
- points_collected: number;
9
- user_points_ever: number;
10
- user_points_balance: number;
17
+ /** Sent as a string on the wire. */
18
+ crm_brand_id: string;
19
+ /** Kind of activity this row records. */
20
+ type: ActivityLogActivities;
21
+ /** Sub-action within `type` (e.g. unlock vs complete, add vs deduct). */
22
+ ctx_1: number;
23
+ /** Extra display payload for the row; contents vary by `type`. */
24
+ ctx_meta?: ActivityLogMeta;
25
+ /** What triggered the change. */
11
26
  source_type_id: PointChangeSourceType;
12
- }
13
- export interface GemsDiamondsLog {
14
- /** Epoch timestamp in SECONDS (not ms — unlike most SDK timestamps). */
15
- create_date: number;
16
- user_ext_id: string;
17
- crm_brand_id: number;
18
- type: UserBalanceType;
27
+ /** More specific id within the source (e.g. level id, draw id, win id). */
28
+ source_ref_id: number;
29
+ /** Root / parent entity id when the source is nested. */
30
+ source_root_id: number;
31
+ /** Delta applied by this row, in the balance named by `type`. */
19
32
  amount: number;
33
+ /** Balance after this row, in the balance named by `type`. */
20
34
  balance: number;
21
- source_type_id: PointChangeSourceType;
35
+ /** Points balance after this row; points rows only. */
36
+ user_points_balance?: number;
37
+ /** Total points ever collected after this row; points rows only. */
38
+ user_points_ever?: number;
39
+ /** Placeholder on points rows (`-1`) — read `amount` for the real delta. */
40
+ points_collected?: number;
22
41
  }
23
- export type ActivityLogEntry = PointsLog | GemsDiamondsLog;
@@ -1,8 +1,39 @@
1
+ /**
2
+ * Extra display payload attached to an activity-log row (`ctx_meta` on the wire).
3
+ * Which keys are present depends on the row's activity type — treat every field
4
+ * as optional and render only what is there.
5
+ */
1
6
  export interface ActivityLogMeta {
7
+ /** Display name of the source entity (mission, tournament, raffle, …). */
2
8
  name?: string;
3
9
  image_url?: string;
4
10
  position?: number;
11
+ /** Points balance before this row; points rows. */
5
12
  user_points_balance_before?: number;
13
+ /** Points the awarding rule asked for; points rows. */
6
14
  points_requested?: number;
15
+ /** Total points ever collected after this row; points rows. */
7
16
  user_points_ever?: number;
17
+ /** Gems / diamonds the awarding rule asked for; gems / diamonds rows. */
18
+ amount_requested?: number;
19
+ /** Gems / diamonds balance before this row. */
20
+ balance_before?: number;
21
+ /** Whether this row counts toward level progress. */
22
+ affects_level?: boolean;
23
+ /** Whether this row counts toward leaderboards. */
24
+ affects_leaderboard?: boolean;
25
+ /** Whether this row moved the spendable balance. */
26
+ affects_current_balance?: boolean;
27
+ /** Set on the row that seeds a brand-new user's wallet. */
28
+ user_initialization?: boolean;
29
+ /** Set on mission rows for repeatable missions. */
30
+ is_recurring?: boolean;
31
+ /** Level moved from; level-change rows. */
32
+ from_level_id?: number;
33
+ /** Level moved to; level-change rows. */
34
+ to_level_id?: number;
35
+ /** Public meta of the level moved from; level-change rows. */
36
+ from_level_public_meta?: any;
37
+ /** Public meta of the level moved to; level-change rows. */
38
+ to_level_public_meta?: any;
8
39
  }
@@ -5,6 +5,8 @@ export interface GetActivityLogRequest extends ProtocolMessage {
5
5
  endTimeSeconds: number;
6
6
  limit: number;
7
7
  offset: number;
8
+ /** Optional filter — {@link ActivityLogActivities} values to include. */
8
9
  types?: number[];
10
+ /** Optional filter — {@link PointChangeSourceType} values to include. */
9
11
  src_types?: number[];
10
12
  }
@@ -1,8 +1,7 @@
1
1
  import { ProtocolResponse } from '../Base/ProtocolResponse';
2
2
  import { ActivityLogEntry } from './ActivityLogEntry';
3
- import { TActivityLog, TActivityLogEntry } from '../WSAPI/WSAPITypes';
3
+ import { TActivityLog } from '../WSAPI/WSAPITypes';
4
4
  export interface GetActivityLogResponse extends ProtocolResponse {
5
5
  logHistory: ActivityLogEntry[];
6
6
  }
7
7
  export declare const ActivityLogTransform: (items: ActivityLogEntry[]) => TActivityLog[];
8
- export declare const ActivityLogV2Transform: (items: any[]) => TActivityLogEntry[];
@@ -0,0 +1,34 @@
1
+ /**
2
+ * One winner entry inside a {@link JackpotWinPush}.
3
+ *
4
+ * Distinct from {@link JackPotWinner}, which is the winner shape returned by the
5
+ * `getJackpotWinners()` history — the live win push carries bet / trigger context
6
+ * and no avatar.
7
+ */
8
+ interface JackPotWinPushWinner {
9
+ /** Smartico user ID of the winner */
10
+ user_id: number;
11
+ /** Operator's external user ID of the winner */
12
+ ext_user_id: string;
13
+ /** Flag indicating that this copy of the push was delivered to the winner themselves */
14
+ is_me: boolean;
15
+ /** Name of the winner, masked for everyone except `is_me` unless masking is disabled by request to Smartico AM team */
16
+ public_username: string;
17
+ /** Custom display name; falls back to `public_username` when not set */
18
+ public_username_custom: string;
19
+ /** Won amount in the Jackpot currency; real and bonus parts are combined */
20
+ winning_amount_jp_currency: number;
21
+ /** Won amount in the user Wallet currency; real and bonus parts are combined */
22
+ winning_amount_wallet_currency: number;
23
+ /** Position of the winner. Relevant for jackpots where there could be multiple winners */
24
+ winning_position: number;
25
+ /** External game ID of the game whose bet triggered the win; `null` when the triggering bet context is unavailable */
26
+ winning_game_id: string | null;
27
+ /** External provider ID of the triggering game's provider; `null` when the triggering bet context is unavailable */
28
+ winning_provider_id: string | null;
29
+ /** Placement time of the triggering bet as reported by the operator (epoch milliseconds) — not the time Smartico processed it; `null` when unavailable */
30
+ bet_original_date: number | null;
31
+ /** Present only on the `is_me` copy; `true` while the win awaits manual approval before payout */
32
+ pending_approve?: boolean;
33
+ }
34
+ export { JackPotWinPushWinner };
@@ -9,7 +9,9 @@ interface JackPotWinner {
9
9
  winning_amount_wallet_currency: number;
10
10
  /** Position of the winner. Relevant for jackpots where there could be multiple winners */
11
11
  winning_position: number;
12
- /** Avatar of the winner */
12
+ /** Avatar image URL of the winner */
13
13
  avatar_id: string;
14
+ /** Numeric ID of the winner's avatar; `null` when the winner has not picked one */
15
+ avatar_real_id: number | null;
14
16
  }
15
17
  export { JackPotWinner };
@@ -0,0 +1,23 @@
1
+ import { JackpotContributionType } from './JackpotContributionType';
2
+ /**
3
+ * One per-game / per-provider override of a jackpot's default contribution.
4
+ *
5
+ * When a qualifying bet matches a rule's `extEntityIds`, that rule's
6
+ * `contributionValue` and `type` are used instead of the template-level
7
+ * `contribution_value` / `contribution_type`. Rules are informational for
8
+ * consumers — the server applies them. Note the camelCase field names; the rest
9
+ * of the jackpot payload is snake_case.
10
+ */
11
+ interface JackpotContributionRule {
12
+ /** Stable ID of the rule within its template */
13
+ ruleId: number;
14
+ /** Template this rule belongs to */
15
+ jpTemplateId: number;
16
+ /** Whether `contributionValue` is a fixed amount or a percentage; see {@link JackpotContributionType} */
17
+ type: JackpotContributionType;
18
+ /** Operator-side game or provider IDs this rule applies to */
19
+ extEntityIds: string[];
20
+ /** Contribution to apply for matching bets — fixed amount or percentage depending on `type` */
21
+ contributionValue: number;
22
+ }
23
+ export { JackpotContributionRule };
@@ -1,3 +1,5 @@
1
+ import { AchRelatedGame } from '../Base/AchRelatedGame';
2
+ import { JackpotContributionRule } from './JackpotContributionRule';
1
3
  import { JackpotContributionType } from './JackpotContributionType';
2
4
  import { JackpotPot } from './JackpotPot';
3
5
  import { JackpotPublicMeta } from './JackpotPublicMeta';
@@ -21,10 +23,16 @@ interface JackpotDetails {
21
23
  contribution_type: JackpotContributionType;
22
24
  /** Amount of contribution per qualifying bet — fixed value or percentage depending on `contribution_type`. */
23
25
  contribution_value: number;
26
+ /** Per-game / per-provider overrides of `contribution_type` + `contribution_value`; see {@link JackpotContributionRule}. Empty when the template contributes at a flat rate. */
27
+ contribution_rules: JackpotContributionRule[];
28
+ /** Reserved — the server currently always sends an empty array. Use `getJackpotEligibleGames()` for the eligible-games list. */
29
+ related_games: AchRelatedGame[];
24
30
  /** Live pot snapshot (amount, temperature, last explosion timestamp). */
25
31
  pot: JackpotPot;
26
32
  /** `true` when the current user is currently opted in. */
27
33
  is_opted_in: boolean;
34
+ /** `true` when eligible users are opted in automatically, so no opt-in CTA is needed; `false` means `jackpotOptIn()` must be called explicitly. */
35
+ is_auto_opt_in: boolean;
28
36
  /** `true` when every game in the operator catalog contributes; if `true`, skip `getJackpotEligibleGames`. */
29
37
  ach_related_game_allow_all: boolean;
30
38
  /** Number of users currently opted in; always `1` for `JackpotType.Personal`. */
@@ -21,8 +21,10 @@ interface JackpotPot {
21
21
  current_pot_amount: number;
22
22
  /** Current pot amount converted to the user's wallet currency (`user_currency`). */
23
23
  current_pot_amount_user_currency: number;
24
- /** Unix ms timestamp of when this pot last exploded; `0` if it has never exploded. */
25
- explode_date_ts: number;
24
+ /** Unix ms timestamp of when this pot last exploded; `null` while the pot is still running. */
25
+ explode_date_ts: number | null;
26
+ /** Owning user for `JackpotType.Personal` pots; `null` for shared `MultiUser` pots. */
27
+ user_id: number | null;
26
28
  /** Heat band of the pot relative to its explosion range; see {@link JackPotTemparature}. */
27
29
  current_pot_temperature: JackPotTemparature;
28
30
  }
@@ -14,11 +14,15 @@ interface JackpotPublicMeta {
14
14
  placeholder1: string;
15
15
  /** custom value of placeholder2 defined by operator and can be used in the HTML templates */
16
16
  placeholder2: string;
17
+ /** operator-defined display order, ascending; sent as a string */
18
+ priority: string;
17
19
  /**
18
- * Custom data as string or JSON string that can be used in API to build custom UI
20
+ * Custom data that can be used in API to build custom UI.
21
+ * `jackpotGet()` returns this already parsed — an object when the operator stored JSON,
22
+ * otherwise the raw string. Elsewhere (e.g. the jackpot-win push) it arrives unparsed.
19
23
  * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
20
24
  * Read more here - <https://help.smartico.ai/welcome/products/tools-and-guides/custom-fields-attributes>
21
25
  */
22
- custom_data: string;
26
+ custom_data: any;
23
27
  }
24
28
  export { JackpotPublicMeta };
@@ -1,7 +1,19 @@
1
1
  import { ProtocolMessage } from '../Base/ProtocolMessage';
2
- import { JackPotWinner } from './JackPotWinner';
2
+ import { JackPotWinPushWinner } from './JackPotWinPushWinner';
3
3
  import { JackpotDetails } from './JackpotDetails';
4
+ /**
5
+ * Live jackpot-win notification. Delivered both to the winner and to other players
6
+ * taking part in the same jackpot — use `winners[].is_me` to tell the two apart;
7
+ * the copy sent to other players has its `public_username` masked.
8
+ *
9
+ * Surfaced to consumers through the `jackpot_win` callback
10
+ * (`_smartico.on('jackpot_win', …)`).
11
+ *
12
+ * The explosion time is `jackpot.pot.explode_date_ts` (epoch milliseconds).
13
+ */
4
14
  export interface JackpotWinPush extends ProtocolMessage {
15
+ /** The jackpot that exploded, including its live `pot` snapshot */
5
16
  jackpot: JackpotDetails;
6
- winners: JackPotWinner[];
17
+ /** Winner entries; currently always a single entry */
18
+ winners: JackPotWinPushWinner[];
7
19
  }
@@ -3,6 +3,8 @@ export * from './GetJackpotsPotsResponse';
3
3
  export * from './GetJackpotsRequest';
4
4
  export * from './GetJackpotsResponse';
5
5
  export * from './JackPotWinner';
6
+ export * from './JackPotWinPushWinner';
7
+ export * from './JackpotContributionRule';
6
8
  export * from './JackpotContributionType';
7
9
  export * from './JackpotDetails';
8
10
  export * from './JackpotPot';
@@ -11,7 +11,7 @@ import { GetTournamentInfoResponse, GetTournamentsResponse, TournamentRegisterRe
11
11
  import { LeaderBoardDetails, LeaderBoardPeriodType } from './Leaderboard';
12
12
  import { GetLevelMapResponse } from './Level';
13
13
  import { WSAPI } from './WSAPI/WSAPI';
14
- import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult, TUICustomSection, TBonus, TRaffle, TLevelCurrent, TActivityLog, TActivityLogEntry, TRaffleDraw, TAvatarDefinition, TAvatarCustomized, TAvatarPrompt, TClans, TClanInfo, TClanJoinResult, TClanTournamentPlayers } from './WSAPI/WSAPITypes';
14
+ import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult, TUICustomSection, TBonus, TRaffle, TLevelCurrent, TActivityLog, TRaffleDraw, TAvatarDefinition, TAvatarCustomized, TAvatarPrompt, TClans, TClanInfo, TClanJoinResult, TClanTournamentPlayers } from './WSAPI/WSAPITypes';
15
15
  import { GetAchievementsUserInfoResponse } from './Core/GetAchievementsUserInfoResponse';
16
16
  import { GetJackpotsPotsResponse, GetJackpotsResponse, JackpotsOptinResponse, JackpotsOptoutResponse } from './Jackpots';
17
17
  import { GetCustomSectionsResponse } from './CustomSections';
@@ -232,8 +232,6 @@ declare class SmarticoAPI {
232
232
  limit: number;
233
233
  }): Promise<GetRaffleWonPrizesResponse>;
234
234
  getActivityLog(user_ext_id: string, startTimeSeconds: number, endTimeSeconds: number, limit: number, offset: number, types?: number[], src_types?: number[]): Promise<GetActivityLogResponse>;
235
- getActivityLogV2(user_ext_id: string, startTimeSeconds: number, endTimeSeconds: number, limit: number, offset: number, types?: number[], src_types?: number[]): Promise<GetActivityLogResponse>;
236
235
  getActivityLogT(user_ext_id: string, startTimeSeconds: number, endTimeSeconds: number, from?: number, to?: number, types?: number[], src_types?: number[]): Promise<TActivityLog[]>;
237
- getActivityLogV2T(user_ext_id: string, startTimeSeconds: number, endTimeSeconds: number, from?: number, to?: number, types?: number[], src_types?: number[]): Promise<TActivityLogEntry[]>;
238
236
  }
239
237
  export { SmarticoAPI, MessageSender };
@@ -36,7 +36,6 @@ export declare enum onUpdateContextKey {
36
36
  CurrentLevel = "currentLevel",
37
37
  InboxUnreadCount = "inboxUnreadCount",
38
38
  ActivityLog = "activityLog",
39
- ActivityLogV2 = "activityLogV2",
40
39
  AvatarsList = "avatarsList",
41
40
  AvatarsCustomized = "avatarsCustomized",
42
41
  AvatarPrompts = "avatarPrompts"
@@ -103,6 +103,8 @@ export declare class WSAPIJackpots extends WSAPIClans {
103
103
  * - The jackpot must currently be active and the user must be in its
104
104
  * eligibility segment. Ineligible jackpots are filtered out of
105
105
  * {@link jackpotGet} entirely, so a card the user sees is opt-in-able.
106
+ * - Skip the opt-in CTA when the template reports `is_auto_opt_in: true` —
107
+ * eligible users are enrolled automatically and there is nothing to join.
106
108
  *
107
109
  * **Error handling**
108
110
  * The server returns a non-zero `errCode` with a human-readable `errMsg`
@@ -1679,8 +1679,12 @@ export interface TransformedRaffleClaimPrizeResponse {
1679
1679
  errorMessage?: string;
1680
1680
  }
1681
1681
  /**
1682
- * TActivityLog describes a unified history log entry for points, gems, or diamonds changes.
1683
- * The structure is the same regardless of balance type, making it easy to iterate and display.
1682
+ * One activity-log row from {@link WSAPIUser.getActivityLog}.
1683
+ *
1684
+ * Always includes the wallet fields (`type` / `amount` / `balance` / …). When the
1685
+ * server returns richer activity rows (missions, badges, levels, …), the optional
1686
+ * fields below are populated — same method, same CID; clients that ignore unknown
1687
+ * fields keep working.
1684
1688
  */
1685
1689
  export interface TActivityLog {
1686
1690
  /** Date when the change was created (epoch timestamp in seconds) */
@@ -1699,29 +1703,25 @@ export interface TActivityLog {
1699
1703
  total_ever?: number;
1700
1704
  /** Source type ID indicating what triggered this change */
1701
1705
  source_type_id: PointChangeSourceType;
1702
- }
1703
- /**
1704
- * Full activity-log row returned by {@link WSAPIUser.getActivityLogV2}.
1705
- * Includes wallet changes and non-wallet activities (missions, badges, levels, …).
1706
- */
1707
- export interface TActivityLogEntry {
1708
- create_date: number;
1709
- user_ext_id: string;
1710
- crm_brand_id: number;
1711
- type: UserBalanceType;
1712
- amount: number;
1713
- balance: number;
1714
- total_ever?: number;
1715
- source_type_id: PointChangeSourceType;
1706
+ /** Activity kind — see {@link ActivityLogActivities} (`type` on the wire). */
1716
1707
  activity_type_id?: ActivityLogActivities;
1708
+ /** Sub-action for `activity_type_id` (e.g. unlock vs complete, add vs deduct, raffle win vs register). */
1717
1709
  context_value_1?: number;
1710
+ /** Extra display payload for the row (name, image, position, …) — see {@link ActivityLogMeta}. */
1718
1711
  meta?: ActivityLogMeta;
1712
+ /** Human-readable name of the source entity (mission, tournament, raffle, …). */
1719
1713
  source_entity_name?: string;
1714
+ /** Primary id of the source entity (mission / badge / tournament / …). */
1720
1715
  source_entity_id?: number;
1716
+ /** More specific id within the source (e.g. level id, draw id, win id). */
1721
1717
  source_reference_id?: number;
1718
+ /** Root / parent entity id when the source is nested (e.g. raffle id owning a draw). */
1722
1719
  source_root_id?: number;
1723
- is_wallet_entry: boolean;
1720
+ /** True when the row is a points/gems/diamonds wallet change. */
1721
+ is_wallet_entry?: boolean;
1724
1722
  }
1723
+ /** @deprecated Use {@link TActivityLog} — same shape; kept as an alias for early adopters. */
1724
+ export type TActivityLogEntry = TActivityLog;
1725
1725
  /**
1726
1726
  * Result of `_smartico.api.requestRaffleOptin({raffle_id, draw_id, raffle_run_id})`.
1727
1727
  */
@@ -1,4 +1,4 @@
1
- import { TActivityLog, TActivityLogEntry, TLevel, TLevelCurrent, TSegmentCheckResult, TUserProfile, UserLevelExtraCountersT } from './WSAPITypes';
1
+ import { TActivityLog, TLevel, TLevelCurrent, TSegmentCheckResult, TUserProfile, UserLevelExtraCountersT } from './WSAPITypes';
2
2
  import { WSAPIBase } from './WSAPIBase';
3
3
  /** @group User */
4
4
  export declare class WSAPIUser extends WSAPIBase {
@@ -465,15 +465,16 @@ export declare class WSAPIUser extends WSAPIBase {
465
465
  */
466
466
  getUserLevelExtraCounters(): Promise<UserLevelExtraCountersT>;
467
467
  /**
468
- * Returns the user's unified balance-change history — every points, gems, and
469
- * diamonds transaction within the requested time window, ordered newest-first.
470
- * Use to power an "Activity" / "History" tab showing wins, claims, purchases,
471
- * level-up rewards, and operator adjustments.
468
+ * Returns the user's activity history within the requested time window,
469
+ * ordered newest-first. Today that is primarily wallet changes (points /
470
+ * gems / diamonds); when the server starts returning richer activity rows
471
+ * (missions, badges, levels, …), the same method surfaces them via optional
472
+ * fields on {@link TActivityLog} — no separate call, same wire CID.
472
473
  *
473
- * The returned shape is the same regardless of currency type — `type` (see
474
- * {@link UserBalanceType}) distinguishes points / gems / diamonds and
475
- * `source_type_id` (see {@link PointChangeSourceType}) names the originating
476
- * event.
474
+ * Existing wallet fields (`type`, `amount`, `balance`, `source_type_id`, …)
475
+ * stay stable. Clients that only read those keep working; clients that want
476
+ * the fuller feed can also read `activity_type_id`, `meta`,
477
+ * `source_entity_*`, and `is_wallet_entry` when present.
477
478
  *
478
479
  * @remarks
479
480
  * **Preconditions**
@@ -486,7 +487,7 @@ export declare class WSAPIUser extends WSAPIBase {
486
487
  * `from` by 50 between calls. Both `startTimeSeconds` and `endTimeSeconds`
487
488
  * are epoch seconds bounding the window the server scans.
488
489
  *
489
- * **Filtering** — optional server-side filters (SMR-52608):
490
+ * **Filtering** — optional server-side filters:
490
491
  * - `types` — {@link ActivityLogActivities} / `type_id` values (e.g. Points=3, Gems=1)
491
492
  * - `src_types` — {@link PointChangeSourceType} / `source_type_id` values
492
493
  * Omit both for an unfiltered window.
@@ -555,30 +556,4 @@ export declare class WSAPIUser extends WSAPIBase {
555
556
  * refresh re-fetches the same window and updates its matching composite cache key. */
556
557
  private activityLogOnUpdateParams;
557
558
  protected notifyActivityLogUpdate(): Promise<void>;
558
- /**
559
- * Returns the full activity log (v2) — wallet changes **and** non-wallet
560
- * activities (missions, badges, levels, tournaments, avatars, …).
561
- *
562
- * **Backwards compatibility**: existing integrations should keep using
563
- * {@link getActivityLog}, which returns wallet-only {@link TActivityLog}
564
- * rows with the original field contract unchanged.
565
- *
566
- * **Pagination** — same `from` / `to` offset model as {@link getActivityLog}
567
- * (server caps a single response at 50 entries).
568
- *
569
- * **Filtering** — optional server-side filters:
570
- * - `types` — {@link ActivityLogActivities} values (`type_id`)
571
- * - `src_types` — {@link PointChangeSourceType} values (`source_type_id`)
572
- * Omit both for all activity types / sources.
573
- *
574
- * @returns Array of {@link TActivityLogEntry} ordered newest-first.
575
- */
576
- getActivityLogV2({ startTimeSeconds, endTimeSeconds, from, to, types, src_types, }: {
577
- startTimeSeconds: number;
578
- endTimeSeconds: number;
579
- from: number;
580
- to: number;
581
- types?: number[];
582
- src_types?: number[];
583
- }): Promise<TActivityLogEntry[]>;
584
559
  }