@smartico/public-api 0.0.281 → 0.0.283
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.
- package/dist/Missions/AchievementTaskPublicMeta.d.ts +1 -0
- package/dist/SmarticoAPI.d.ts +2 -1
- package/dist/WSAPI/WSAPI.d.ts +14 -1
- package/dist/WSAPI/WSAPITypes.d.ts +9 -0
- package/dist/index.js +231 -176
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +39 -1
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +1 -0
- package/docs/classes/WSAPI.md +21 -0
- package/docs/interfaces/TLevel.md +6 -0
- package/docs/interfaces/TLevelCurrent.md +139 -0
- package/package.json +1 -1
- package/src/Missions/AchievementTaskPublicMeta.ts +1 -0
- package/src/Missions/UserAchievement.ts +1 -0
- package/src/SmarticoAPI.ts +30 -0
- package/src/WSAPI/WSAPI.ts +18 -0
- package/src/WSAPI/WSAPITypes.ts +11 -0
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -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>;
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -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
|
*/
|