@smartico/public-api 0.0.419 → 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 (133) 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 +3 -1
  5. package/dist/ActivityLog/GetActivityLogResponse.d.ts +1 -2
  6. package/dist/ActivityLog/PointChangeSourceType.d.ts +1 -0
  7. package/dist/Jackpots/JackPotWinPushWinner.d.ts +34 -0
  8. package/dist/Jackpots/JackPotWinner.d.ts +3 -1
  9. package/dist/Jackpots/JackpotContributionRule.d.ts +23 -0
  10. package/dist/Jackpots/JackpotDetails.d.ts +8 -0
  11. package/dist/Jackpots/JackpotPot.d.ts +4 -2
  12. package/dist/Jackpots/JackpotPublicMeta.d.ts +6 -2
  13. package/dist/Jackpots/JackpotWinPush.d.ts +14 -2
  14. package/dist/Jackpots/index.d.ts +2 -0
  15. package/dist/SmarticoAPI.d.ts +3 -5
  16. package/dist/WSAPI/WSAPIBase.d.ts +0 -1
  17. package/dist/WSAPI/WSAPIJackpots.d.ts +2 -0
  18. package/dist/WSAPI/WSAPITypes.d.ts +17 -17
  19. package/dist/WSAPI/WSAPIUser.d.ts +24 -35
  20. package/dist/index.js +61 -131
  21. package/dist/index.js.map +1 -1
  22. package/dist/index.modern.mjs +58 -102
  23. package/dist/index.modern.mjs.map +1 -1
  24. package/docs/Callbacks.md +1 -1
  25. package/docs/api/README.md +4 -4
  26. package/docs/api/classes/WSAPIJackpots.md +2 -0
  27. package/docs/api/classes/WSAPIUser.md +30 -59
  28. package/docs/api/documents/Callbacks.md +1 -1
  29. package/docs/api/enumerations/ActivityLogActivities.md +1 -1
  30. package/docs/api/enumerations/PointChangeSourceType.md +6 -0
  31. package/docs/api/interfaces/ActivityLogEntry.md +124 -0
  32. package/docs/api/interfaces/ActivityLogMeta.md +100 -0
  33. package/docs/api/interfaces/JackPotWinPushWinner.md +103 -0
  34. package/docs/api/interfaces/JackPotWinner.md +9 -1
  35. package/docs/api/interfaces/JackpotContributionRule.md +49 -0
  36. package/docs/api/interfaces/JackpotDetails.md +24 -0
  37. package/docs/api/interfaces/JackpotPot.md +9 -1
  38. package/docs/api/interfaces/JackpotPublicMeta.md +12 -2
  39. package/docs/api/interfaces/JackpotWinPush.md +14 -1
  40. package/docs/api/interfaces/TActivityLog.md +70 -2
  41. package/docs/api/type-aliases/TActivityLogEntry.md +7 -0
  42. package/docs/capabilities/_responses/gamePickGetActiveRound.json +37 -37
  43. package/docs/capabilities/_responses/gamePickGetActiveRounds.json +37 -131
  44. package/docs/capabilities/_responses/gamePickGetBoard.json +25 -14
  45. package/docs/capabilities/_responses/gamePickGetGameInfo.json +93 -79
  46. package/docs/capabilities/_responses/gamePickGetHistory.json +37 -131
  47. package/docs/capabilities/_responses/gamePickGetUserInfo.json +5 -5
  48. package/docs/capabilities/_responses/getActivityLog.json +106 -1
  49. package/docs/capabilities/_responses/getAvatarsCustomized.json +4 -4
  50. package/docs/capabilities/_responses/getAvatarsList.json +2 -2
  51. package/docs/capabilities/_responses/getBadges.json +27 -29
  52. package/docs/capabilities/_responses/getBonuses.json +1 -18
  53. package/docs/capabilities/_responses/getClanInfo.json +13 -13
  54. package/docs/capabilities/_responses/getClans.json +6 -6
  55. package/docs/capabilities/_responses/getCurrentLevel.json +12 -12
  56. package/docs/capabilities/_responses/getInboxMessageBody.json +2 -2
  57. package/docs/capabilities/_responses/getInboxMessages.json +6 -6
  58. package/docs/capabilities/_responses/getInboxUnreadCount.json +1 -1
  59. package/docs/capabilities/_responses/getJackpotWinners.json +14 -14
  60. package/docs/capabilities/_responses/getLeaderBoard.json +8 -8
  61. package/docs/capabilities/_responses/getMiniGames.json +92 -90
  62. package/docs/capabilities/_responses/getMiniGamesHistory.json +874 -1
  63. package/docs/capabilities/_responses/getMissions.json +2 -2
  64. package/docs/capabilities/_responses/getRaffleDrawRun.json +7 -7
  65. package/docs/capabilities/_responses/getRaffleDrawRunsHistory.json +6 -6
  66. package/docs/capabilities/_responses/getRaffles.json +14 -14
  67. package/docs/capabilities/_responses/getStorePurchasedItems.json +5 -5
  68. package/docs/capabilities/_responses/getTournamentInstanceInfo.json +100 -53
  69. package/docs/capabilities/_responses/getTournamentsList.json +12 -12
  70. package/docs/capabilities/_responses/getTranslations.json +1 -1
  71. package/docs/capabilities/_responses/getUserProfile.json +10 -10
  72. package/docs/capabilities/_responses/jackpotGet.json +33 -34
  73. package/docs/capabilities/gamePickGetActiveRound.md +22 -23
  74. package/docs/capabilities/gamePickGetActiveRounds.md +22 -23
  75. package/docs/capabilities/gamePickGetBoard.md +14 -14
  76. package/docs/capabilities/gamePickGetGameInfo.md +24 -44
  77. package/docs/capabilities/gamePickGetHistory.md +22 -23
  78. package/docs/capabilities/gamePickGetUserInfo.md +5 -5
  79. package/docs/capabilities/getActivityLog.md +69 -9
  80. package/docs/capabilities/getAvatarsCustomized.md +3 -3
  81. package/docs/capabilities/getBadges.md +13 -14
  82. package/docs/capabilities/getBonuses.md +2 -17
  83. package/docs/capabilities/getClanInfo.md +8 -8
  84. package/docs/capabilities/getClans.md +4 -4
  85. package/docs/capabilities/getCurrentLevel.md +12 -12
  86. package/docs/capabilities/getInboxMessageBody.md +2 -2
  87. package/docs/capabilities/getInboxMessages.md +3 -3
  88. package/docs/capabilities/getInboxUnreadCount.md +6 -0
  89. package/docs/capabilities/getJackpotWinners.md +9 -8
  90. package/docs/capabilities/getLeaderBoard.md +5 -5
  91. package/docs/capabilities/getMiniGames.md +35 -37
  92. package/docs/capabilities/getMiniGamesHistory.md +83 -2
  93. package/docs/capabilities/getMissions.md +1 -1
  94. package/docs/capabilities/getRaffleDrawRun.md +7 -7
  95. package/docs/capabilities/getRaffleDrawRunsHistory.md +3 -3
  96. package/docs/capabilities/getRaffles.md +8 -8
  97. package/docs/capabilities/getStorePurchasedItems.md +2 -2
  98. package/docs/capabilities/getTournamentInstanceInfo.md +45 -37
  99. package/docs/capabilities/getTournamentsList.md +6 -6
  100. package/docs/capabilities/getTranslations.md +1 -1
  101. package/docs/capabilities/getUserProfile.md +10 -10
  102. package/docs/capabilities/jackpotGet.md +56 -28
  103. package/docs/capabilities/jackpotOptIn.md +2 -0
  104. package/docs/capabilities/smarticoCallbacks.md +1 -1
  105. package/docs/native/PROTOCOL.md +141 -18
  106. package/docs/ui/jackpots/UIGuide_jackpotGet.md +1 -1
  107. package/docs/ui/user/UIGuide_getActivityLog.md +4 -2
  108. package/package.json +4 -3
  109. package/scripts/capture-responses-browser.mjs +8 -1
  110. package/src/ActivityLog/ActivityLogActivities.ts +1 -1
  111. package/src/ActivityLog/ActivityLogEntry.ts +33 -21
  112. package/src/ActivityLog/ActivityLogMeta.ts +31 -0
  113. package/src/ActivityLog/GetActivityLogRequest.ts +3 -3
  114. package/src/ActivityLog/GetActivityLogResponse.ts +23 -49
  115. package/src/ActivityLog/PointChangeSourceType.ts +1 -0
  116. package/src/Jackpots/JackPotWinPushWinner.ts +35 -0
  117. package/src/Jackpots/JackPotWinner.ts +3 -1
  118. package/src/Jackpots/JackpotContributionRule.ts +25 -0
  119. package/src/Jackpots/JackpotDetails.ts +8 -0
  120. package/src/Jackpots/JackpotPot.ts +4 -2
  121. package/src/Jackpots/JackpotPublicMeta.ts +6 -2
  122. package/src/Jackpots/JackpotWinPush.ts +14 -2
  123. package/src/Jackpots/index.ts +2 -0
  124. package/src/SmarticoAPI.ts +6 -40
  125. package/src/WSAPI/WSAPIBase.ts +0 -1
  126. package/src/WSAPI/WSAPIJackpots.ts +2 -0
  127. package/src/WSAPI/WSAPITypes.ts +18 -18
  128. package/src/WSAPI/WSAPIUser.ts +38 -55
  129. package/docs/api/interfaces/GemsDiamondsLog.md +0 -45
  130. package/docs/api/interfaces/PointsLog.md +0 -45
  131. package/docs/api/interfaces/TActivityLogEntry.md +0 -100
  132. package/docs/api/type-aliases/ActivityLogEntry.md +0 -3
  133. package/docs/capabilities/getActivityLogV2.md +0 -62
@@ -2204,7 +2204,6 @@ var onUpdateContextKey;
2204
2204
  onUpdateContextKey["CurrentLevel"] = "currentLevel";
2205
2205
  onUpdateContextKey["InboxUnreadCount"] = "inboxUnreadCount";
2206
2206
  onUpdateContextKey["ActivityLog"] = "activityLog";
2207
- onUpdateContextKey["ActivityLogV2"] = "activityLogV2";
2208
2207
  onUpdateContextKey["AvatarsList"] = "avatarsList";
2209
2208
  onUpdateContextKey["AvatarsCustomized"] = "avatarsCustomized";
2210
2209
  onUpdateContextKey["AvatarPrompts"] = "avatarPrompts";
@@ -2948,15 +2947,16 @@ class WSAPIUser extends WSAPIBase {
2948
2947
  return OCache.use(onUpdateContextKey.LevelExtraCounters, ECacheContext.WSAPI, () => this.api.getUserGamificationInfoT(this.userExtId), CACHE_DATA_SEC);
2949
2948
  }
2950
2949
  /**
2951
- * Returns the user's unified balance-change history — every points, gems, and
2952
- * diamonds transaction within the requested time window, ordered newest-first.
2953
- * Use to power an "Activity" / "History" tab showing wins, claims, purchases,
2954
- * level-up rewards, and operator adjustments.
2950
+ * Returns the user's activity history within the requested time window,
2951
+ * ordered newest-first. Today that is primarily wallet changes (points /
2952
+ * gems / diamonds); when the server starts returning richer activity rows
2953
+ * (missions, badges, levels, …), the same method surfaces them via optional
2954
+ * fields on {@link TActivityLog} — no separate call, same wire CID.
2955
2955
  *
2956
- * The returned shape is the same regardless of currency type — `type` (see
2957
- * {@link UserBalanceType}) distinguishes points / gems / diamonds and
2958
- * `source_type_id` (see {@link PointChangeSourceType}) names the originating
2959
- * event.
2956
+ * Existing wallet fields (`type`, `amount`, `balance`, `source_type_id`, …)
2957
+ * stay stable. Clients that only read those keep working; clients that want
2958
+ * the fuller feed can also read `activity_type_id`, `meta`,
2959
+ * `source_entity_*`, and `is_wallet_entry` when present.
2960
2960
  *
2961
2961
  * @remarks
2962
2962
  * **Preconditions**
@@ -2969,13 +2969,18 @@ class WSAPIUser extends WSAPIBase {
2969
2969
  * `from` by 50 between calls. Both `startTimeSeconds` and `endTimeSeconds`
2970
2970
  * are epoch seconds bounding the window the server scans.
2971
2971
  *
2972
+ * **Filtering** — optional server-side filters:
2973
+ * - `types` — {@link ActivityLogActivities} / `type_id` values (e.g. Points=3, Gems=1)
2974
+ * - `src_types` — {@link PointChangeSourceType} / `source_type_id` values
2975
+ * Omit both for an unfiltered window.
2976
+ *
2972
2977
  * **Subscription model (`onUpdate`)**
2973
2978
  * The callback fires when the user's `ach_points_balance`,
2974
2979
  * `ach_gems_balance`, or `ach_diamonds_balance` changes (i.e. whenever a
2975
2980
  * wallet event lands). The pushed payload is a FIXED re-fetch of the
2976
2981
  * **last 10 minutes / first 50 entries** — it does NOT honor the original
2977
- * call's `startTimeSeconds` / `endTimeSeconds` / `from` / `to`. Consumers
2978
- * maintaining a long historical view must re-call `getActivityLog` with
2982
+ * call's `startTimeSeconds` / `endTimeSeconds` / `from` / `to` / filters.
2983
+ * Consumers maintaining a long historical view must re-call `getActivityLog` with
2979
2984
  * their own params after receiving an `onUpdate` notification.
2980
2985
  *
2981
2986
  * **Refresh**
@@ -2999,6 +3004,8 @@ class WSAPIUser extends WSAPIBase {
2999
3004
  * endTimeSeconds: now,
3000
3005
  * from: 0,
3001
3006
  * to: 50,
3007
+ * types: [1], // Gems only (ActivityLogActivities.Gems)
3008
+ * src_types: [11], // Tournament wins only (PointChangeSourceType.Tournament)
3002
3009
  * onUpdate: (refreshed) => {
3003
3010
  * console.log('[smartico] wallet changed — refreshed payload is last 10 min / 50 entries:', refreshed.length, 'rows');
3004
3011
  * // If the consumer is showing a full 30-day view, re-call getActivityLog with the original params here.
@@ -3016,9 +3023,12 @@ class WSAPIUser extends WSAPIBase {
3016
3023
  endTimeSeconds,
3017
3024
  from,
3018
3025
  to,
3026
+ types,
3027
+ src_types,
3019
3028
  onUpdate
3020
3029
  }) {
3021
- const cacheKey = `${onUpdateContextKey.ActivityLog}:${startTimeSeconds}:${endTimeSeconds}:${from}:${to}`;
3030
+ var _types$join, _src_types$join;
3031
+ const cacheKey = `${onUpdateContextKey.ActivityLog}:${startTimeSeconds}:${endTimeSeconds}:${from}:${to}:${(_types$join = types == null ? void 0 : types.join(',')) != null ? _types$join : ''}:${(_src_types$join = src_types == null ? void 0 : src_types.join(',')) != null ? _src_types$join : ''}`;
3022
3032
  if (typeof onUpdate === 'function') {
3023
3033
  this.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);
3024
3034
  // Remember the requested window so a push refresh re-fetches THIS window
@@ -3027,52 +3037,28 @@ class WSAPIUser extends WSAPIBase {
3027
3037
  startTimeSeconds,
3028
3038
  endTimeSeconds,
3029
3039
  from,
3030
- to
3040
+ to,
3041
+ types,
3042
+ src_types
3031
3043
  };
3032
3044
  }
3033
- return await OCache.use(cacheKey, ECacheContext.WSAPI, () => this.api.getActivityLogT(this.userExtId, startTimeSeconds, endTimeSeconds, from, to), CACHE_DATA_SEC);
3045
+ return await OCache.use(cacheKey, ECacheContext.WSAPI, () => this.api.getActivityLogT(this.userExtId, startTimeSeconds, endTimeSeconds, from, to, types, src_types), CACHE_DATA_SEC);
3034
3046
  }
3035
3047
  async notifyActivityLogUpdate() {
3048
+ var _params$types$join, _params$types, _params$src_types$joi, _params$src_types;
3036
3049
  const params = this.activityLogOnUpdateParams;
3037
3050
  // No consumer has subscribed to a specific window yet — nothing to refresh.
3038
3051
  if (!params) {
3039
3052
  return;
3040
3053
  }
3041
- const payload = await this.api.getActivityLogT(this.userExtId, params.startTimeSeconds, params.endTimeSeconds, params.from, params.to);
3042
- const cacheKey = `${onUpdateContextKey.ActivityLog}:${params.startTimeSeconds}:${params.endTimeSeconds}:${params.from}:${params.to}`;
3054
+ const payload = await this.api.getActivityLogT(this.userExtId, params.startTimeSeconds, params.endTimeSeconds, params.from, params.to, params.types, params.src_types);
3055
+ const cacheKey = `${onUpdateContextKey.ActivityLog}:${params.startTimeSeconds}:${params.endTimeSeconds}:${params.from}:${params.to}:${(_params$types$join = (_params$types = params.types) == null ? void 0 : _params$types.join(',')) != null ? _params$types$join : ''}:${(_params$src_types$joi = (_params$src_types = params.src_types) == null ? void 0 : _params$src_types.join(',')) != null ? _params$src_types$joi : ''}`;
3043
3056
  OCache.set(cacheKey, payload, ECacheContext.WSAPI);
3044
3057
  const onUpdate = this.onUpdateCallback.get(onUpdateContextKey.ActivityLog);
3045
3058
  if (typeof onUpdate === 'function') {
3046
3059
  onUpdate(payload);
3047
3060
  }
3048
3061
  }
3049
- /**
3050
- * Returns the full activity log (v2) — wallet changes **and** non-wallet
3051
- * activities (missions, badges, levels, tournaments, avatars, …).
3052
- *
3053
- * **Backwards compatibility**: existing integrations should keep using
3054
- * {@link getActivityLog}, which returns wallet-only {@link TActivityLog}
3055
- * rows with the original field contract unchanged.
3056
- *
3057
- * **Pagination** — same `from` / `to` offset model as {@link getActivityLog}
3058
- * (server caps a single response at 50 entries).
3059
- *
3060
- * **Filtering** — pass `types` with {@link ActivityLogActivities} values to
3061
- * request a server-side subset (e.g. missions only). Omit for all activity types.
3062
- *
3063
- * @returns Array of {@link TActivityLogEntry} ordered newest-first.
3064
- */
3065
- async getActivityLogV2({
3066
- startTimeSeconds,
3067
- endTimeSeconds,
3068
- from,
3069
- to,
3070
- types
3071
- }) {
3072
- var _types$join;
3073
- const cacheKey = `${onUpdateContextKey.ActivityLogV2}:${startTimeSeconds}:${endTimeSeconds}:${from}:${to}:${(_types$join = types == null ? void 0 : types.join(',')) != null ? _types$join : ''}`;
3074
- return await OCache.use(cacheKey, ECacheContext.WSAPI, () => this.api.getActivityLogV2T(this.userExtId, startTimeSeconds, endTimeSeconds, from, to, types), CACHE_DATA_SEC);
3075
- }
3076
3062
  }
3077
3063
 
3078
3064
  /** @group General */
@@ -5849,6 +5835,8 @@ class WSAPIJackpots extends WSAPIClans {
5849
5835
  * - The jackpot must currently be active and the user must be in its
5850
5836
  * eligibility segment. Ineligible jackpots are filtered out of
5851
5837
  * {@link jackpotGet} entirely, so a card the user sees is opt-in-able.
5838
+ * - Skip the opt-in CTA when the template reports `is_auto_opt_in: true` —
5839
+ * eligible users are enrolled automatically and there is nothing to join.
5852
5840
  *
5853
5841
  * **Error handling**
5854
5842
  * The server returns a non-zero `errCode` with a human-readable `errMsg`
@@ -9596,7 +9584,7 @@ var BonusStatus;
9596
9584
  BonusStatus[BonusStatus["EXPIRED"] = 6] = "EXPIRED";
9597
9585
  })(BonusStatus || (BonusStatus = {}));
9598
9586
 
9599
- /** Activity-log entry type as returned on the v2 wire (`type_id`). */
9587
+ /** Activity-log entry type as returned on the wire (`type_id`). */
9600
9588
  var ActivityLogActivities;
9601
9589
  (function (ActivityLogActivities) {
9602
9590
  ActivityLogActivities[ActivityLogActivities["Gems"] = 1] = "Gems";
@@ -9629,59 +9617,38 @@ var UserBalanceType;
9629
9617
  })(UserBalanceType || (UserBalanceType = {}));
9630
9618
 
9631
9619
  const ActivityLogTransform = items => {
9632
- if (!items) {
9633
- return [];
9634
- }
9635
- return items.map(item => {
9636
- var _item$create_date$sec, _item$create_date, _item$type;
9637
- const itemTransformed = {
9638
- create_date: (_item$create_date$sec = (_item$create_date = item.create_date) == null ? void 0 : _item$create_date.seconds) != null ? _item$create_date$sec : item.create_date,
9639
- user_ext_id: item.user_ext_id,
9640
- crm_brand_id: item.crm_brand_id,
9641
- source_type_id: item.source_type_id
9642
- };
9643
- item.type = (_item$type = item.type) != null ? _item$type : UserBalanceType.Points;
9644
- if (item.type === UserBalanceType.Diamonds || item.type === UserBalanceType.Gems) {
9645
- itemTransformed.type = item.type;
9646
- itemTransformed.amount = item.amount;
9647
- itemTransformed.balance = item.balance;
9648
- }
9649
- if (item.type === UserBalanceType.Points) {
9650
- itemTransformed.type = UserBalanceType.Points;
9651
- itemTransformed.amount = item.points_collected;
9652
- itemTransformed.balance = item.user_points_balance;
9653
- itemTransformed.total_ever = item.user_points_ever;
9654
- }
9655
- return itemTransformed;
9656
- });
9657
- };
9658
- const ActivityLogV2Transform = items => {
9659
9620
  if (!items) {
9660
9621
  return [];
9661
9622
  }
9662
9623
  return items.map(r => {
9663
- var _r$create_date$second, _r$create_date, _r$points_collected, _r$user_points_balanc;
9664
- const isGems = r.type_id === ActivityLogActivities.Gems || r.type === UserBalanceType.Gems;
9665
- const isDiamonds = r.type_id === ActivityLogActivities.Diamonds || r.type === UserBalanceType.Diamonds;
9666
- const x = {
9624
+ var _r$type_id, _r$ctx_meta, _r$create_date$second, _r$create_date, _r$amount, _r$user_points_balanc, _r$ctx_, _r$source_entity_name, _r$source_ref_id;
9625
+ // The wire sends the activity kind as `type` (an ActivityLogActivities value).
9626
+ // `type_id` is accepted as an alias so an older/newer server spelling still maps.
9627
+ const activityTypeId = (_r$type_id = r.type_id) != null ? _r$type_id : r.type;
9628
+ const isGems = activityTypeId === ActivityLogActivities.Gems;
9629
+ const isDiamonds = activityTypeId === ActivityLogActivities.Diamonds;
9630
+ const meta = (_r$ctx_meta = r.ctx_meta) != null ? _r$ctx_meta : r.context_value_meta;
9631
+ return {
9667
9632
  create_date: (_r$create_date$second = (_r$create_date = r.create_date) == null ? void 0 : _r$create_date.seconds) != null ? _r$create_date$second : r.create_date,
9668
9633
  user_ext_id: r.user_ext_id,
9669
- crm_brand_id: r.crm_brand_id,
9634
+ // Sent as a string on the wire.
9635
+ crm_brand_id: Number(r.crm_brand_id),
9670
9636
  type: isGems ? UserBalanceType.Gems : isDiamonds ? UserBalanceType.Diamonds : UserBalanceType.Points,
9671
- amount: (_r$points_collected = r.points_collected) != null ? _r$points_collected : r.amount,
9637
+ // `amount` carries the real delta; `points_collected` is a `-1` placeholder on points rows.
9638
+ amount: (_r$amount = r.amount) != null ? _r$amount : r.points_collected,
9672
9639
  balance: (_r$user_points_balanc = r.user_points_balance) != null ? _r$user_points_balanc : r.balance,
9673
9640
  total_ever: r.user_points_ever,
9674
9641
  source_type_id: r.source_type_id,
9675
- activity_type_id: r.type_id,
9676
- context_value_1: r.context_value_1,
9677
- meta: r.context_value_meta,
9678
- source_entity_name: r.source_entity_name,
9642
+ activity_type_id: activityTypeId,
9643
+ context_value_1: (_r$ctx_ = r.ctx_1) != null ? _r$ctx_ : r.context_value_1,
9644
+ meta,
9645
+ // Entity name travels inside the context meta, not as a top-level field.
9646
+ source_entity_name: (_r$source_entity_name = r.source_entity_name) != null ? _r$source_entity_name : meta == null ? void 0 : meta.name,
9679
9647
  source_entity_id: r.source_entity_id,
9680
- source_reference_id: r.source_reference_id,
9648
+ source_reference_id: (_r$source_ref_id = r.source_ref_id) != null ? _r$source_ref_id : r.source_reference_id,
9681
9649
  source_root_id: r.source_root_id,
9682
- is_wallet_entry: r.type_id == null || r.type_id === ActivityLogActivities.Gems || r.type_id === ActivityLogActivities.Diamonds || r.type_id === ActivityLogActivities.Points
9650
+ is_wallet_entry: activityTypeId == null || activityTypeId === ActivityLogActivities.Gems || activityTypeId === ActivityLogActivities.Diamonds || activityTypeId === ActivityLogActivities.Points
9683
9651
  };
9684
- return x;
9685
9652
  });
9686
9653
  };
9687
9654
 
@@ -9703,6 +9670,7 @@ var PointChangeSourceType;
9703
9670
  PointChangeSourceType[PointChangeSourceType["WinMiniGame"] = 17] = "WinMiniGame";
9704
9671
  PointChangeSourceType[PointChangeSourceType["API"] = 18] = "API";
9705
9672
  PointChangeSourceType[PointChangeSourceType["DynamicFormula"] = 19] = "DynamicFormula";
9673
+ PointChangeSourceType[PointChangeSourceType["Jackpot"] = 20] = "Jackpot";
9706
9674
  PointChangeSourceType[PointChangeSourceType["Raffle"] = 21] = "Raffle";
9707
9675
  PointChangeSourceType[PointChangeSourceType["Avatars"] = 22] = "Avatars";
9708
9676
  PointChangeSourceType[PointChangeSourceType["Clan"] = 23] = "Clan";
@@ -10881,16 +10849,7 @@ class SmarticoAPI {
10881
10849
  const message = this.buildMessage(user_ext_id, ClassId.RAF_GET_WON_PRIZES_REQUEST, props);
10882
10850
  return await this.send(message, ClassId.RAF_GET_WON_PRIZES_RESPONSE);
10883
10851
  }
10884
- async getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset) {
10885
- const message = this.buildMessage(user_ext_id, ClassId.GET_POINT_HISTORY_REQUEST, {
10886
- startTimeSeconds: Math.floor(startTimeSeconds),
10887
- endTimeSeconds: Math.floor(endTimeSeconds),
10888
- limit,
10889
- offset
10890
- });
10891
- return await this.send(message, ClassId.GET_POINT_HISTORY_RESPONSE);
10892
- }
10893
- async getActivityLogV2(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset, types) {
10852
+ async getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset, types, src_types) {
10894
10853
  const message = this.buildMessage(user_ext_id, ClassId.GET_POINT_HISTORY_REQUEST, _extends({
10895
10854
  startTimeSeconds: Math.floor(startTimeSeconds),
10896
10855
  endTimeSeconds: Math.floor(endTimeSeconds),
@@ -10898,18 +10857,15 @@ class SmarticoAPI {
10898
10857
  offset
10899
10858
  }, types ? {
10900
10859
  types
10860
+ } : {}, src_types ? {
10861
+ src_types
10901
10862
  } : {}));
10902
10863
  return await this.send(message, ClassId.GET_POINT_HISTORY_RESPONSE);
10903
10864
  }
10904
- async getActivityLogT(user_ext_id, startTimeSeconds, endTimeSeconds, from = 0, to = 50) {
10905
- const limit = to - from > 50 ? 50 : to - from;
10906
- const offset = from;
10907
- return ActivityLogTransform((await this.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).logHistory);
10908
- }
10909
- async getActivityLogV2T(user_ext_id, startTimeSeconds, endTimeSeconds, from = 0, to = 50, types) {
10865
+ async getActivityLogT(user_ext_id, startTimeSeconds, endTimeSeconds, from = 0, to = 50, types, src_types) {
10910
10866
  const limit = to - from > 50 ? 50 : to - from;
10911
10867
  const offset = from;
10912
- return ActivityLogV2Transform((await this.getActivityLogV2(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset, types)).logHistory);
10868
+ return ActivityLogTransform((await this.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset, types, src_types)).logHistory);
10913
10869
  }
10914
10870
  }
10915
10871
 
@@ -11560,5 +11516,5 @@ var JoinClanErrorCode;
11560
11516
  JoinClanErrorCode[JoinClanErrorCode["JOIN_CLAN_JOINED_AFTER_TOURNAMENT_START"] = 1011] = "JOIN_CLAN_JOINED_AFTER_TOURNAMENT_START";
11561
11517
  })(JoinClanErrorCode || (JoinClanErrorCode = {}));
11562
11518
 
11563
- export { AchCategoryTransform, AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, AchievementAvailabilityStatus, AchievementClaimPeriodTypeId, AchievementStatus, AchievementTaskType, AchievementType, ActivityLogActivities, ActivityLogTransform, ActivityLogV2Transform, ActivityTypeLimited, AllRoundsGameBoardID, AnalyticsInboxSubScreenNameId, AnalyticsInterfaceType, AnalyticsScreenNameId, AnalyticsTournamentsLobbySubScreenNameId, AttemptPeriodType, AvatarCustomizeErrorCode, BadgesTimeLimitStates, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GPRoundStatus, GamePickMarketType, GamePickResolutionType, GamePickScoreType, GamePickSportType, GameRoundOrderType, GetJackpotEligibleGamesResponseTransform, GetJackpotWinnersResponseTransform, GetLevelMapResponseTransform, InboxCategories, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, InboxReadStatus, JackPotTemparature, JackpotContributionType, JackpotType, JoinClanErrorCode, LeaderBoardPeriodType, LiquidEntityData, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, MissionCategory, MissionUtils, OCache, OpenLinksType, PointChangeSourceType, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, RaffleDrawInstanceState, RaffleDrawTypeExecution, RaffleTicketCapVisualization, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWExposeUserSpinId, SAWExposeUserSpinIdName, SAWExposeUserSpinIdNamed, SAWGPMarketType, SAWGameDifficultyType, SAWGameDifficultyTypeName, SAWGameLayout, SAWGameLayoutName, SAWGameLayoutNamed, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWHistoryTransform, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWheelLayout, SAWWinSoundFiles, SAWWinSoundType, SawGameDifficultyTypeNamed, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchaseType, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UICustomSectionTransform, UserAchievementTransform, UserBalanceType, WSAPI, avatarCustomizedTransform, avatarDefinitionTransform, avatarPromptTransform, clanTournamentPlayersTransform, drawRunHistoryTransform, drawRunTransform, drawTransform, enrichUserAchievementsWithBadgeState, getLeaderBoardTransform, marketsInfo, prizeTransform, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, raffleClaimPrizeResponseTransform, raffleTransform, ticketsTransform, tournamentInfoItemTransform, winnersTransform };
11519
+ export { AchCategoryTransform, AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, AchievementAvailabilityStatus, AchievementClaimPeriodTypeId, AchievementStatus, AchievementTaskType, AchievementType, ActivityLogActivities, ActivityLogTransform, ActivityTypeLimited, AllRoundsGameBoardID, AnalyticsInboxSubScreenNameId, AnalyticsInterfaceType, AnalyticsScreenNameId, AnalyticsTournamentsLobbySubScreenNameId, AttemptPeriodType, AvatarCustomizeErrorCode, BadgesTimeLimitStates, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GPRoundStatus, GamePickMarketType, GamePickResolutionType, GamePickScoreType, GamePickSportType, GameRoundOrderType, GetJackpotEligibleGamesResponseTransform, GetJackpotWinnersResponseTransform, GetLevelMapResponseTransform, InboxCategories, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, InboxReadStatus, JackPotTemparature, JackpotContributionType, JackpotType, JoinClanErrorCode, LeaderBoardPeriodType, LiquidEntityData, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, MissionCategory, MissionUtils, OCache, OpenLinksType, PointChangeSourceType, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, RaffleDrawInstanceState, RaffleDrawTypeExecution, RaffleTicketCapVisualization, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWExposeUserSpinId, SAWExposeUserSpinIdName, SAWExposeUserSpinIdNamed, SAWGPMarketType, SAWGameDifficultyType, SAWGameDifficultyTypeName, SAWGameLayout, SAWGameLayoutName, SAWGameLayoutNamed, SAWGameType, SAWGameTypeName, SAWGameTypeNamed, SAWHistoryTransform, SAWPrizeType, SAWSpinErrorCode, SAWTemplatesTransform, SAWUtils, SAWWheelLayout, SAWWinSoundFiles, SAWWinSoundType, SawGameDifficultyTypeNamed, ScheduledMissionType, SmarticoAPI, StoreCategoryTransform, StoreItemPurchaseType, StoreItemPurchasedTransform, StoreItemTransform, StoreItemType, StoreItemTypeName, StoreItemTypeNamed, TournamentInstanceStatus, TournamentInstanceStatusName, TournamentItemsTransform, TournamentRegistrationError, TournamentRegistrationStatus, TournamentRegistrationStatusName, TournamentRegistrationStatusNamed, TournamentRegistrationType, TournamentRegistrationTypeGetName, TournamentType, TournamentUtils, TranslationArea, UICustomSectionTransform, UserAchievementTransform, UserBalanceType, WSAPI, avatarCustomizedTransform, avatarDefinitionTransform, avatarPromptTransform, clanTournamentPlayersTransform, drawRunHistoryTransform, drawRunTransform, drawTransform, enrichUserAchievementsWithBadgeState, getLeaderBoardTransform, marketsInfo, prizeTransform, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, raffleClaimPrizeResponseTransform, raffleTransform, ticketsTransform, tournamentInfoItemTransform, winnersTransform };
11564
11520
  //# sourceMappingURL=index.modern.mjs.map