@smartico/public-api 0.0.354 → 0.0.356

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 (55) hide show
  1. package/dist/SmarticoAPI.d.ts +2 -2
  2. package/dist/WSAPI/WSAPI.d.ts +1 -30
  3. package/dist/WSAPI/WSAPITypes.d.ts +515 -32
  4. package/dist/index.d.ts +0 -1
  5. package/dist/index.js +78 -211
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.modern.mjs +13 -139
  8. package/dist/index.modern.mjs.map +1 -1
  9. package/docs/api/README.md +27 -0
  10. package/docs/api/classes/WSAPI.md +27 -47
  11. package/docs/api/enums/GPRoundStatus.md +43 -0
  12. package/docs/api/enums/GamePickMarketType.md +19 -0
  13. package/docs/api/enums/GamePickResolutionType.md +35 -0
  14. package/docs/api/enums/GamePickScoreType.md +19 -0
  15. package/docs/api/enums/GamePickSportType.md +375 -0
  16. package/docs/api/enums/GameRoundOrderType.md +35 -0
  17. package/docs/api/enums/PointChangeSourceType.md +6 -0
  18. package/docs/api/interfaces/AchRelatedGame-1.md +1 -1
  19. package/docs/api/interfaces/BonusTemplateMetaMap.md +1 -1
  20. package/docs/api/interfaces/GamePickBoardUser.md +75 -0
  21. package/docs/api/interfaces/GamePickEvent.md +121 -0
  22. package/docs/api/interfaces/GamePickEventMeta.md +181 -0
  23. package/docs/api/interfaces/GamePickGameInfo.md +27 -0
  24. package/docs/api/interfaces/GamePickRequestParams.md +41 -0
  25. package/docs/api/interfaces/GamePickRound.md +385 -0
  26. package/docs/api/interfaces/GamePickRoundBase.md +235 -0
  27. package/docs/api/interfaces/GamePickRoundBoard.md +361 -0
  28. package/docs/api/interfaces/GamePickRoundPublicMeta.md +103 -0
  29. package/docs/api/interfaces/GamePickRoundRequestParams.md +65 -0
  30. package/docs/api/interfaces/GamePickUserInfo.md +107 -0
  31. package/docs/api/interfaces/GamesApiResponse.md +33 -0
  32. package/docs/api/interfaces/QuizEventMeta.md +41 -0
  33. package/docs/api/interfaces/TInboxMessageBody.md +1 -1
  34. package/docs/api/interfaces/TLevel.md +1 -1
  35. package/docs/api/interfaces/TLevelCurrent.md +1 -1
  36. package/docs/api/interfaces/TMiniGamePrize.md +1 -1
  37. package/docs/api/interfaces/TMiniGameTemplate.md +2 -2
  38. package/docs/api/interfaces/TMissionOrBadge.md +2 -2
  39. package/docs/api/interfaces/TRaffle.md +2 -2
  40. package/docs/api/interfaces/TRaffleDraw.md +14 -2
  41. package/docs/api/interfaces/TRaffleDrawRun.md +20 -0
  42. package/docs/api/interfaces/TRafflePrize.md +1 -1
  43. package/docs/api/interfaces/TStoreItem.md +3 -3
  44. package/docs/api/interfaces/TTournament.md +4 -4
  45. package/docs/api/interfaces/TTournamentDetailed.md +4 -4
  46. package/docs/api/interfaces/TUICustomSection.md +1 -1
  47. package/package.json +6 -6
  48. package/src/SmarticoAPI.ts +15 -7
  49. package/src/WSAPI/WSAPI.ts +1 -37
  50. package/src/WSAPI/WSAPITypes.ts +525 -32
  51. package/src/index.ts +1 -2
  52. package/dist/GamePick/GPTypes.d.ts +0 -268
  53. package/dist/GamePick/index.d.ts +0 -1
  54. package/src/GamePick/GPTypes.ts +0 -277
  55. package/src/GamePick/index.ts +0 -1
@@ -25,11 +25,11 @@ import { InboxCategories } from './Inbox/InboxCategories';
25
25
  import { GetDrawRunResponse, GetRaffleDrawRunsHistoryResponse, RaffleClaimPrizeResponse, RaffleOptinResponse } from './Raffle';
26
26
  import { GetJackpotWinnersResponse, JackpotWinnerHistory } from './Jackpots/GetJackpotWinnersResponse';
27
27
  import { GetJackpotEligibleGamesResponse, TGetJackpotEligibleGamesResponse } from './Jackpots/GetJackpotEligibleGamesResponse';
28
- import { GamesApiResponse, GamePickRound, GamePickRoundBoard, GamePickUserInfo, GamePickGameInfo } from './GamePick';
28
+ import { GamesApiResponse, GamePickRound, GamePickRoundBoard, GamePickUserInfo, GamePickGameInfo } from './WSAPI/WSAPITypes';
29
29
  interface Tracker {
30
30
  label_api_key: string;
31
31
  userPublicProps: any;
32
- params: {
32
+ params?: {
33
33
  brand_key?: string;
34
34
  };
35
35
  on: (callBackKey: ClassId, func: (data: any) => void) => void;
@@ -1,7 +1,6 @@
1
1
  import { ActivityTypeLimited } from '../Core';
2
2
  import { SmarticoAPI } from '../SmarticoAPI';
3
- import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT, TBonus, TClaimBonusResult, TMiniGamePlayBatchResult, TSawHistory, TRaffle, TRaffleDraw, TRaffleDrawRun, TransformedRaffleClaimPrizeResponse, TLevelCurrent, TActivityLog, TRaffleOptinResponse } from './WSAPITypes';
4
- import { GamesApiResponse, GamePickRound, GamePickRoundBoard, GamePickUserInfo, GamePickGameInfo, GamePickRequestParams, GamePickRoundRequestParams } from '../GamePick';
3
+ import { InboxMarkMessageAction, LeaderBoardDetailsT, TAchCategory, TBuyStoreItemResult, TGetTranslations, TInboxMessage, TInboxMessageBody, TLevel, TMiniGamePlayResult, TMiniGameTemplate, TMissionClaimRewardResult, TMissionOptInResult, TMissionOrBadge, TSegmentCheckResult, TStoreCategory, TStoreItem, TTournament, TTournamentDetailed, TTournamentRegistrationResult, TUICustomSection, TUserProfile, UserLevelExtraCountersT, TBonus, TClaimBonusResult, TMiniGamePlayBatchResult, TSawHistory, TRaffle, TRaffleDraw, TRaffleDrawRun, TransformedRaffleClaimPrizeResponse, TLevelCurrent, TActivityLog, TRaffleOptinResponse, GamesApiResponse, GamePickRound, GamePickRoundBoard, GamePickUserInfo, GamePickGameInfo, GamePickRequestParams, GamePickRoundRequestParams } from './WSAPITypes';
5
4
  import { LeaderBoardPeriodType } from '../Leaderboard';
6
5
  import { JackpotDetails, JackpotWinnerHistory, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
7
6
  import { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse';
@@ -853,34 +852,6 @@ export declare class WSAPI {
853
852
  * **Visitor mode: not supported**
854
853
  */
855
854
  getGamePickGameInfo(props: GamePickRequestParams): Promise<GamesApiResponse<GamePickGameInfo>>;
856
- /**
857
- * Returns translations for the MatchX/Quiz game UI.
858
- * Translations are returned as a key-value map for the Gamification and RetentionGames areas,
859
- * resolved to the current user's language.
860
- *
861
- * @param props.saw_template_id - The ID of the MatchX or Quiz game template
862
- *
863
- * **Response** `GamesApiResponse<any>`:
864
- * - `errCode` - 0 on success
865
- * - `data`:
866
- * - `translations` - Key-value map of translation strings (e.g. `rgSubmitSelection`, `rgLeaderboardTitle`, `quizConfirmAnswer`, etc.)
867
- * - `hash_code` - Hash for cache invalidation
868
- * - `lang_code` - Resolved language code (e.g. 'EN')
869
- *
870
- * **Example**:
871
- * ```
872
- * _smartico.api.getGamePickTranslations({
873
- * saw_template_id: 1083,
874
- * }).then((result) => {
875
- * const tr = result.data.translations;
876
- * console.log(tr.rgSubmitSelection); // "Submit selection"
877
- * console.log(tr.rgLeaderboardTitle); // "Leaderboard"
878
- * });
879
- * ```
880
- *
881
- * **Visitor mode: not supported**
882
- */
883
- getGamePickTranslations(props: GamePickRequestParams): Promise<GamesApiResponse<any>>;
884
855
  /**
885
856
  * Returns round data with events and picks for a specific user (identified by their internal user ID).
886
857
  * Useful for viewing another user's predictions from the leaderboard.