@smartico/public-api 0.0.281 → 0.0.282

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.
@@ -1,4 +1,5 @@
1
1
  export interface AchievementTaskPublicMeta {
2
2
  name?: string;
3
3
  display_progress_as_count?: boolean;
4
+ stage_image?: string;
4
5
  }
@@ -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 } from './WSAPI/WSAPITypes';
14
+ import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult, TUICustomSection, TBonus, TRaffle, TLevelCurrent } 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';
@@ -129,6 +129,7 @@ declare class SmarticoAPI {
129
129
  leaderboardsGetT(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetailsT>;
130
130
  levelsGet(user_ext_id: string, force_language?: string): Promise<GetLevelMapResponse>;
131
131
  levelsGetT(user_ext_id: string): Promise<TLevel[]>;
132
+ getLevelCurrent(user_ext_id: string): Promise<TLevelCurrent>;
132
133
  customSectionsGet(user_ext_id: string, force_language?: string): Promise<GetCustomSectionsResponse>;
133
134
  customSectionsGetT(user_ext_id: string): Promise<TUICustomSection[]>;
134
135
  getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
@@ -1,5 +1,5 @@
1
1
  import { SmarticoAPI } from '../SmarticoAPI';
2
- 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 } from './WSAPITypes';
2
+ 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 } from './WSAPITypes';
3
3
  import { LeaderBoardPeriodType } from '../Leaderboard';
4
4
  import { JackpotDetails, JackpotWinnerHistory, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
5
5
  import { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse';
@@ -62,6 +62,19 @@ export declare class WSAPI {
62
62
  * ```
63
63
  */
64
64
  getLevels(): Promise<TLevel[]>;
65
+ /**
66
+ * Returns the current level of the user with extended information including ordinal position and progress.
67
+ *
68
+ * **Example**:
69
+ * ```
70
+ * _smartico.api.getCurrentLevel().then((result) => {
71
+ * console.log(result);
72
+ * });
73
+ * ```
74
+ *
75
+ * **Visitor mode: not supported**
76
+ */
77
+ getCurrentLevel(): Promise<TLevelCurrent>;
65
78
  /** Returns all the missions available the current user.
66
79
  * The returned missions are cached for 30 seconds. But you can pass the onUpdate callback as a parameter.
67
80
  * Note that each time you call getMissions with a new onUpdate callback, the old one will be overwritten by the new one.
@@ -238,6 +238,15 @@ export interface TLevel {
238
238
  */
239
239
  custom_data: string;
240
240
  }
241
+ /**
242
+ * TLevelCurrent describes the information of each level defined in the system along with ordinal position and progress of the current level
243
+ */
244
+ export interface TLevelCurrent extends TLevel {
245
+ /** The ordinal position of the level */
246
+ ordinal_position: number;
247
+ /** The progress of the level */
248
+ progress: number;
249
+ }
241
250
  /**
242
251
  * TTournament describes the general information of the tournament item
243
252
  */