@smartico/public-api 0.0.184 → 0.0.186
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/MiniGames/SAWGameLayout.d.ts +4 -0
- package/dist/MiniGames/SAWPrize.d.ts +1 -0
- package/dist/MiniGames/SAWTemplateUI.d.ts +2 -0
- package/dist/MiniGames/SAWWinningHistoryResponse.d.ts +2 -0
- package/dist/Missions/UserAchievement.d.ts +1 -0
- package/dist/WSAPI/WSAPITypes.d.ts +7 -0
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +7 -3
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/TMiniGamePrize.md +6 -0
- package/docs/interfaces/TMissionOrBadge.md +8 -0
- package/docs/interfaces/TSawHistory.md +16 -0
- package/package.json +1 -1
- package/src/MiniGames/SAWGameLayout.ts +4 -0
- package/src/MiniGames/SAWGetTemplatesResponse.ts +1 -0
- package/src/MiniGames/SAWPrize.ts +1 -0
- package/src/MiniGames/SAWTemplateUI.ts +2 -0
- package/src/MiniGames/SAWWinningHistoryResponse.ts +5 -1
- package/src/Missions/UserAchievement.ts +2 -0
- package/src/SmarticoAPI.ts +1 -1
- package/src/WSAPI/WSAPITypes.ts +9 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SAWAskForUsername } from './SAWAskForUsername';
|
|
2
|
+
import { SAWGameLayout } from './SAWGameLayout';
|
|
2
3
|
export interface SAWTemplateUI {
|
|
3
4
|
skin: string;
|
|
4
5
|
name: string;
|
|
@@ -42,4 +43,5 @@ export interface SAWTemplateUI {
|
|
|
42
43
|
id: string;
|
|
43
44
|
content: string;
|
|
44
45
|
};
|
|
46
|
+
game_layout?: SAWGameLayout;
|
|
45
47
|
}
|
|
@@ -11,5 +11,7 @@ export interface SAWPrizesHistory {
|
|
|
11
11
|
prize_amount: number;
|
|
12
12
|
client_request_id: string;
|
|
13
13
|
is_claimed: boolean;
|
|
14
|
+
create_date_ts: number;
|
|
15
|
+
acknowledge_date_ts: number;
|
|
14
16
|
}
|
|
15
17
|
export declare const SAWHistoryTransform: (items: SAWPrizesHistory[]) => TSawHistory[];
|
|
@@ -27,6 +27,7 @@ export interface UserAchievement {
|
|
|
27
27
|
scheduledMissionType?: ScheduledMissionType;
|
|
28
28
|
related_games?: AchRelatedGame[];
|
|
29
29
|
active_from_ts?: number;
|
|
30
|
+
active_till_ts?: number;
|
|
30
31
|
ach_categories?: number[];
|
|
31
32
|
ach_completed_id?: number;
|
|
32
33
|
requires_prize_claim?: boolean;
|
|
@@ -36,6 +36,7 @@ export interface TMiniGamePrize {
|
|
|
36
36
|
weekdays?: number[];
|
|
37
37
|
active_from_ts?: number;
|
|
38
38
|
active_till_ts?: number;
|
|
39
|
+
relative_period_timezone?: number;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* TMiniGamePlayResult describes the response of call to _smartico.api.playMiniGame(template_id) method
|
|
@@ -414,6 +415,8 @@ export interface TMissionOrBadge {
|
|
|
414
415
|
time_limit_ms: number;
|
|
415
416
|
/** Holds time from which mission will become available, for the missions that are targeted to be available from specific date/time */
|
|
416
417
|
active_from_ts: number;
|
|
418
|
+
/** Holds time till mission will become unavailable, for the missions that are targeted to be available from specific date/time */
|
|
419
|
+
active_till_ts: number;
|
|
417
420
|
/** The date when the mission was started, relevant for the time limited missions */
|
|
418
421
|
dt_start: number;
|
|
419
422
|
/** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
|
|
@@ -685,5 +688,9 @@ export interface TSawHistory {
|
|
|
685
688
|
client_request_id: string;
|
|
686
689
|
/** Flag indicating to show whether prize in the mini-game claimed or not */
|
|
687
690
|
is_claimed: boolean;
|
|
691
|
+
/** Win prize date in milliseconds */
|
|
692
|
+
create_date_ts: number;
|
|
693
|
+
/** Claimed prize date in milliseconds */
|
|
694
|
+
acknowledge_date_ts: number;
|
|
688
695
|
}
|
|
689
696
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -420,7 +420,8 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
|
|
|
420
420
|
wins_count: p.wins_count,
|
|
421
421
|
weekdays: p.weekdays,
|
|
422
422
|
active_from_ts: p.active_from_ts,
|
|
423
|
-
active_till_ts: p.active_till_ts
|
|
423
|
+
active_till_ts: p.active_till_ts,
|
|
424
|
+
relative_period_timezone: p.relative_period_timezone
|
|
424
425
|
};
|
|
425
426
|
return y;
|
|
426
427
|
})
|
|
@@ -467,7 +468,9 @@ var SAWHistoryTransform = function SAWHistoryTransform(items) {
|
|
|
467
468
|
saw_prize_id: r.saw_prize_id,
|
|
468
469
|
prize_amount: r.prize_amount,
|
|
469
470
|
client_request_id: r.client_request_id,
|
|
470
|
-
is_claimed: r.is_claimed
|
|
471
|
+
is_claimed: r.is_claimed,
|
|
472
|
+
create_date_ts: r.create_date_ts,
|
|
473
|
+
acknowledge_date_ts: r.acknowledge_date_ts
|
|
471
474
|
};
|
|
472
475
|
return x;
|
|
473
476
|
});
|
|
@@ -887,6 +890,7 @@ var UserAchievementTransform = function UserAchievementTransform(items) {
|
|
|
887
890
|
is_opted_in: r.isOptedIn,
|
|
888
891
|
time_limit_ms: r.time_limit_ms,
|
|
889
892
|
active_from_ts: r.active_from_ts,
|
|
893
|
+
active_till_ts: r.active_from_ts,
|
|
890
894
|
dt_start: r.start_date_ts,
|
|
891
895
|
reward: r.ach_public_meta.reward,
|
|
892
896
|
progress: r.progress,
|
|
@@ -3303,7 +3307,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
3303
3307
|
if ((_response$userPositio = response.userPosition) != null && _response$userPositio.avatar_id) {
|
|
3304
3308
|
response.userPosition.avatar_url = CoreUtils.avatarUrl(response.userPosition.avatar_id, _this44.avatarDomain);
|
|
3305
3309
|
}
|
|
3306
|
-
if ((_response$tournamentI = response.tournamentInfo.players) != null && _response$tournamentI.length) {
|
|
3310
|
+
if ((_response$tournamentI = response.tournamentInfo) != null && (_response$tournamentI = _response$tournamentI.players) != null && _response$tournamentI.length) {
|
|
3307
3311
|
response.tournamentInfo.players.forEach(function (p) {
|
|
3308
3312
|
p.avatar_url = CoreUtils.avatarUrl(p.avatar_id, _this44.avatarDomain);
|
|
3309
3313
|
});
|