@smartico/public-api 0.0.338 → 0.0.339

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 (30) hide show
  1. package/dist/{PointsHistory/PointsHistoryLog.d.ts → ActivityLog/ActivityLogEntry.d.ts} +1 -1
  2. package/dist/{PointsHistory/GetPointsHistoryRequest.d.ts → ActivityLog/GetActivityLogRequest.d.ts} +1 -1
  3. package/dist/ActivityLog/GetActivityLogResponse.d.ts +7 -0
  4. package/dist/ActivityLog/index.d.ts +5 -0
  5. package/dist/Analytics/AnalyticStoreData.d.ts +1 -1
  6. package/dist/SmarticoAPI.d.ts +4 -4
  7. package/dist/WSAPI/WSAPI.d.ts +9 -9
  8. package/dist/WSAPI/WSAPITypes.d.ts +4 -4
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +20 -20
  11. package/dist/index.js.map +1 -1
  12. package/dist/index.modern.mjs +18 -18
  13. package/dist/index.modern.mjs.map +1 -1
  14. package/package.json +1 -1
  15. package/src/{PointsHistory/PointsHistoryLog.ts → ActivityLog/ActivityLogEntry.ts} +2 -1
  16. package/src/{PointsHistory/GetPointsHistoryRequest.ts → ActivityLog/GetActivityLogRequest.ts} +2 -1
  17. package/src/{PointsHistory/GetPointsHistoryResponse.ts → ActivityLog/GetActivityLogResponse.ts} +9 -8
  18. package/src/{PointsHistory → ActivityLog}/PointChangeSourceType.ts +1 -0
  19. package/src/{PointsHistory → ActivityLog}/UserBalanceType.ts +1 -0
  20. package/src/ActivityLog/index.ts +7 -0
  21. package/src/Analytics/AnalyticStoreData.ts +1 -1
  22. package/src/SmarticoAPI.ts +10 -10
  23. package/src/WSAPI/WSAPI.ts +16 -16
  24. package/src/WSAPI/WSAPITypes.ts +5 -4
  25. package/src/index.ts +1 -1
  26. package/dist/PointsHistory/GetPointsHistoryResponse.d.ts +0 -7
  27. package/dist/PointsHistory/index.d.ts +0 -5
  28. package/src/PointsHistory/index.ts +0 -6
  29. /package/dist/{PointsHistory → ActivityLog}/PointChangeSourceType.d.ts +0 -0
  30. /package/dist/{PointsHistory → ActivityLog}/UserBalanceType.d.ts +0 -0
@@ -2132,7 +2132,7 @@ var onUpdateContextKey;
2132
2132
  onUpdateContextKey["JackpotEligibleGames"] = "jackpotEligibleGames";
2133
2133
  onUpdateContextKey["CurrentLevel"] = "currentLevel";
2134
2134
  onUpdateContextKey["InboxUnreadCount"] = "inboxUnreadCount";
2135
- onUpdateContextKey["PointsHistory"] = "pointsHistory";
2135
+ onUpdateContextKey["ActivityLog"] = "activityLog";
2136
2136
  })(onUpdateContextKey || (onUpdateContextKey = {}));
2137
2137
  /** @group General API */
2138
2138
  class WSAPI {
@@ -2186,7 +2186,7 @@ class WSAPI {
2186
2186
  this.updateInboxUnreadCount(data.props.core_inbox_unread_count);
2187
2187
  }
2188
2188
  if ((data == null || (_data$props3 = data.props) == null ? void 0 : _data$props3.ach_points_balance) !== undefined || (data == null || (_data$props4 = data.props) == null ? void 0 : _data$props4.ach_gems_balance) !== undefined || (data == null || (_data$props5 = data.props) == null ? void 0 : _data$props5.ach_diamonds_balance) !== undefined) {
2189
- this.notifyPointsHistoryUpdate();
2189
+ this.notifyActivityLogUpdate();
2190
2190
  }
2191
2191
  });
2192
2192
  on(ClassId.RAF_OPTIN_RESPONSE, () => this.updateRaffles());
@@ -2911,18 +2911,18 @@ class WSAPI {
2911
2911
  this.api.reportEngagementAction(null, engagement_uid, activityType, action);
2912
2912
  }
2913
2913
  /**
2914
- * Returns the points history for a user within a specified time range.
2914
+ * Returns the activity log for a user within a specified time range.
2915
2915
  * The response includes both points changes and gems/diamonds changes.
2916
2916
  * Each log entry contains information about the change amount, balance, and source.
2917
2917
  * The returned list is cached for 30 seconds.
2918
- * You can pass the onUpdate callback as a parameter, it will be called every time the points history is updated and will provide the updated list of points history logs for the last 10 minutes.
2918
+ * You can pass the onUpdate callback as a parameter, it will be called every time the activity log is updated and will provide the updated list of activity logs for the last 10 minutes.
2919
2919
  *
2920
2920
  * **Example**:
2921
2921
  * ```
2922
2922
  * const startTime = Math.floor(Date.now() / 1000) - 86400 * 30; // 30 days ago
2923
2923
  * const endTime = Math.floor(Date.now() / 1000); // now
2924
2924
  *
2925
- * _smartico.api.getPointsHistory({
2925
+ * _smartico.api.getActivityLog({
2926
2926
  * startTimeSeconds: startTime,
2927
2927
  * endTimeSeconds: endTime,
2928
2928
  * onUpdate: (data) => console.log('Updated:', data)
@@ -2935,17 +2935,17 @@ class WSAPI {
2935
2935
  *
2936
2936
  * @param params.startTimeSeconds - Start time in seconds (epoch timestamp)
2937
2937
  * @param params.endTimeSeconds - End time in seconds (epoch timestamp)
2938
- * @param params.onUpdate - Optional callback function that will be called when the points history is updated
2938
+ * @param params.onUpdate - Optional callback function that will be called when the activity log is updated
2939
2939
  */
2940
- async getPointsHistory({
2940
+ async getActivityLog({
2941
2941
  startTimeSeconds,
2942
2942
  endTimeSeconds,
2943
2943
  onUpdate
2944
2944
  }) {
2945
2945
  if (onUpdate) {
2946
- this.onUpdateCallback.set(onUpdateContextKey.PointsHistory, onUpdate);
2946
+ this.onUpdateCallback.set(onUpdateContextKey.ActivityLog, onUpdate);
2947
2947
  }
2948
- return await OCache.use(onUpdateContextKey.PointsHistory, ECacheContext.WSAPI, () => this.api.getPointsHistoryT(null, startTimeSeconds, endTimeSeconds), CACHE_DATA_SEC);
2948
+ return await OCache.use(onUpdateContextKey.ActivityLog, ECacheContext.WSAPI, () => this.api.getActivityLogT(null, startTimeSeconds, endTimeSeconds), CACHE_DATA_SEC);
2949
2949
  }
2950
2950
  async updateOnSpin(data) {
2951
2951
  const templates = await OCache.use(onUpdateContextKey.Saw, ECacheContext.WSAPI, () => this.api.sawGetTemplatesT(null), CACHE_DATA_SEC);
@@ -2988,11 +2988,11 @@ class WSAPI {
2988
2988
  const payload = await this.api.getRafflesT(null);
2989
2989
  this.updateEntity(onUpdateContextKey.Raffles, payload);
2990
2990
  }
2991
- async notifyPointsHistoryUpdate() {
2991
+ async notifyActivityLogUpdate() {
2992
2992
  const startSeconds = Date.now() / 1000 - 600;
2993
2993
  const endSeconds = Date.now() / 1000;
2994
- const payload = await this.api.getPointsHistoryT(null, startSeconds, endSeconds);
2995
- this.updateEntity(onUpdateContextKey.PointsHistory, payload);
2994
+ const payload = await this.api.getActivityLogT(null, startSeconds, endSeconds);
2995
+ this.updateEntity(onUpdateContextKey.ActivityLog, payload);
2996
2996
  }
2997
2997
  async updateEntity(contextKey, payload) {
2998
2998
  OCache.set(contextKey, payload, ECacheContext.WSAPI);
@@ -3426,7 +3426,7 @@ var UserBalanceType;
3426
3426
  UserBalanceType[UserBalanceType["Diamonds"] = 2] = "Diamonds";
3427
3427
  })(UserBalanceType || (UserBalanceType = {}));
3428
3428
 
3429
- const PointsHistoryTransform = items => {
3429
+ const ActivityLogTransform = items => {
3430
3430
  if (!items) {
3431
3431
  return [];
3432
3432
  }
@@ -4261,15 +4261,15 @@ class SmarticoAPI {
4261
4261
  const message = this.buildMessage(user_ext_id, ClassId.RAF_OPTIN_REQUEST, props);
4262
4262
  return await this.send(message, ClassId.RAF_OPTIN_RESPONSE);
4263
4263
  }
4264
- async getPointsHistory(user_ext_id, startTimeSeconds, endTimeSeconds) {
4264
+ async getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds) {
4265
4265
  const message = this.buildMessage(user_ext_id, ClassId.GET_POINT_HISTORY_REQUEST, {
4266
4266
  startTimeSeconds: Math.floor(startTimeSeconds),
4267
4267
  endTimeSeconds: Math.floor(endTimeSeconds)
4268
4268
  });
4269
4269
  return await this.send(message, ClassId.GET_POINT_HISTORY_RESPONSE);
4270
4270
  }
4271
- async getPointsHistoryT(user_ext_id, startTimeSeconds, endTimeSeconds) {
4272
- return PointsHistoryTransform((await this.getPointsHistory(user_ext_id, startTimeSeconds, endTimeSeconds)).logHistory);
4271
+ async getActivityLogT(user_ext_id, startTimeSeconds, endTimeSeconds) {
4272
+ return ActivityLogTransform((await this.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds)).logHistory);
4273
4273
  }
4274
4274
  }
4275
4275
 
@@ -4314,7 +4314,7 @@ var AnalyticsScreenNameId;
4314
4314
  AnalyticsScreenNameId[AnalyticsScreenNameId["LootboxCalendarDays"] = 21] = "LootboxCalendarDays";
4315
4315
  AnalyticsScreenNameId[AnalyticsScreenNameId["TreasureHunt"] = 22] = "TreasureHunt";
4316
4316
  AnalyticsScreenNameId[AnalyticsScreenNameId["LiquidSection"] = 23] = "LiquidSection";
4317
- AnalyticsScreenNameId[AnalyticsScreenNameId["PointsHistory"] = 24] = "PointsHistory";
4317
+ AnalyticsScreenNameId[AnalyticsScreenNameId["ActivityLog"] = 24] = "ActivityLog";
4318
4318
  AnalyticsScreenNameId[AnalyticsScreenNameId["ModalMission"] = 31] = "ModalMission";
4319
4319
  AnalyticsScreenNameId[AnalyticsScreenNameId["ModalLevel"] = 32] = "ModalLevel";
4320
4320
  AnalyticsScreenNameId[AnalyticsScreenNameId["ModalBadge"] = 33] = "ModalBadge";
@@ -4737,5 +4737,5 @@ var JackpotType;
4737
4737
  JackpotType[JackpotType["Personal"] = 2] = "Personal";
4738
4738
  })(JackpotType || (JackpotType = {}));
4739
4739
 
4740
- export { AchCategoryTransform, AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, AchievementAvailabilityStatus, AchievementStatus, AchievementTaskType, AchievementType, ActivityTypeLimited, AnalyticsInboxSubScreenNameId, AnalyticsInterfaceType, AnalyticsScreenNameId, AnalyticsTournamentsLobbySubScreenNameId, AttemptPeriodType, BadgesTimeLimitStates, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetJackpotEligibleGamesResponseTransform, GetJackpotWinnersResponseTransform, GetLevelMapResponseTransform, InboxCategories, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, InboxReadStatus, JackPotTemparature, JackpotContributionType, JackpotType, LeaderBoardPeriodType, LiquidEntityData, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, MissionCategory, MissionUtils, OCache, OpenLinksType, PointChangeSourceType, PointsHistoryTransform, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, RaffleDrawInstanceState, RaffleDrawTypeExecution, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWExposeUserSpinId, SAWGPMarketType, SAWGameDifficultyType, SAWGameDifficultyTypeName, SAWGameLayout, 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, drawRunHistoryTransform, drawRunTransform, drawTransform, enrichUserAchievementsWithBadgeState, getLeaderBoardTransform, marketsInfo, prizeTransform, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, raffleClaimPrizeResponseTransform, raffleTransform, ticketsTransform, tournamentInfoItemTransform, winnersTransform };
4740
+ export { AchCategoryTransform, AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter, AchievementAvailabilityStatus, AchievementStatus, AchievementTaskType, AchievementType, ActivityLogTransform, ActivityTypeLimited, AnalyticsInboxSubScreenNameId, AnalyticsInterfaceType, AnalyticsScreenNameId, AnalyticsTournamentsLobbySubScreenNameId, AttemptPeriodType, BadgesTimeLimitStates, BonusItemsTransform, BonusStatus, BuyStoreItemErrorCode, ClassId, CookieStore, CoreUtils, ECacheContext, GetJackpotEligibleGamesResponseTransform, GetJackpotWinnersResponseTransform, GetLevelMapResponseTransform, InboxCategories, InboxMessageBodyTransform, InboxMessageType, InboxMessagesTransform, InboxReadStatus, JackPotTemparature, JackpotContributionType, JackpotType, LeaderBoardPeriodType, LiquidEntityData, MiniGamePrizeTypeName, MiniGamePrizeTypeNamed, MissionCategory, MissionUtils, OCache, OpenLinksType, PointChangeSourceType, PrizeModifiers, PrizeModifiersKeysNames, PublicLabelSettings, QuizAnswersValueType, QuizMarketPerSport, QuizSportType, RaffleDrawInstanceState, RaffleDrawTypeExecution, SAWAcknowledgeType, SAWAcknowledgeTypeName, SAWAcknowledgeTypeNamed, SAWAskForUsername, SAWBuyInType, SAWBuyInTypeName, SAWBuyInTypeNamed, SAWExposeUserSpinId, SAWGPMarketType, SAWGameDifficultyType, SAWGameDifficultyTypeName, SAWGameLayout, 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, drawRunHistoryTransform, drawRunTransform, drawTransform, enrichUserAchievementsWithBadgeState, getLeaderBoardTransform, marketsInfo, prizeTransform, quizAnswerAwayTeamReplacementText, quizAnswerHomeTeamReplacementText, quizAnswersTrKeys, quizDrawReplacementText, quizEvenReplacementText, quizNoGoalsReplacementText, quizNoReplacementText, quizOddReplacementText, quizOrReplacementText, quizSupportedSports, quizYesReplacementText, raffleClaimPrizeResponseTransform, raffleTransform, ticketsTransform, tournamentInfoItemTransform, winnersTransform };
4741
4741
  //# sourceMappingURL=index.modern.mjs.map