@smartico/public-api 0.0.151 → 0.0.153
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/Base/ClassId.d.ts +3 -0
- package/dist/MiniGames/SAWAcknowledgeSpinPushRequest.d.ts +5 -0
- package/dist/MiniGames/SAWEventSawPush.d.ts +5 -0
- package/dist/Missions/AchievementTaskPublicMeta.d.ts +1 -0
- package/dist/Missions/GetRelatedAchTourRequest.d.ts +4 -0
- package/dist/Missions/GetRelatedAchTourResponse.d.ts +7 -0
- package/dist/Missions/ReloadAchievementsEvent.d.ts +2 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +6 -2
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/TMissionOrBadgeTask.md +10 -1
- package/package.json +1 -1
- package/src/Base/ClassId.ts +4 -0
- package/src/MiniGames/SAWAcknowledgeSpinPushRequest.ts +7 -0
- package/src/MiniGames/SAWEventSawPush.ts +7 -0
- package/src/Missions/AchievementTaskPublicMeta.ts +1 -0
- package/src/Missions/GetRelatedAchTourRequest.ts +6 -0
- package/src/Missions/GetRelatedAchTourResponse.ts +10 -0
- package/src/Missions/ReloadAchievementsEvent.ts +4 -1
- package/src/Missions/UserAchievement.ts +1 -0
- package/src/SmarticoAPI.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Interface: TMissionOrBadgeTask
|
|
2
2
|
|
|
3
|
-
TMissionOrBadgeTask describes the information of tasks that
|
|
3
|
+
TMissionOrBadgeTask describes the information of tasks that belongs to mission or badge. See also TMissionOrBadge
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
@@ -57,3 +57,12 @@ ___
|
|
|
57
57
|
• `Optional` **execution\_count\_actual**: `number`
|
|
58
58
|
|
|
59
59
|
This is the number of times the user has executed 'activity' of the task. e.g. he bet 5 times out of 100. Here will be 5
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
___
|
|
63
|
+
|
|
64
|
+
### display\_progress\_as\_count
|
|
65
|
+
|
|
66
|
+
• `Optional` **display\_progress\_as\_count**: `boolean`
|
|
67
|
+
|
|
68
|
+
If enabled, mission progress will show as a count (35/100) instead of a %. For missions with multiple tasks, each task will display progress as a count, while the overall progress bar will still show a %.
|
package/package.json
CHANGED
package/src/Base/ClassId.ts
CHANGED
|
@@ -97,6 +97,9 @@ export enum ClassId {
|
|
|
97
97
|
ACH_SHOP_ITEM_HISTORY_REQUEST = 541,
|
|
98
98
|
ACH_SHOP_ITEM_HISTORY_RESPONSE = 542,
|
|
99
99
|
|
|
100
|
+
GET_RELATED_ACH_N_TOURNAMENTS_REQUEST = 543,
|
|
101
|
+
GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE = 544,
|
|
102
|
+
|
|
100
103
|
/*
|
|
101
104
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
102
105
|
you need to include them in the CLASS_ID_IGNORE_FOR_SIMULATION
|
|
@@ -118,6 +121,7 @@ export enum ClassId {
|
|
|
118
121
|
SAW_PRIZE_DROP_WIN_PUSH = 708,
|
|
119
122
|
SAW_PRIZE_DROP_WIN_AKNOWLEDGE_REQUEST = 709,
|
|
120
123
|
SAW_PRIZE_DROP_WIN_AKNOWLEDGE_RESPONSE = 710,
|
|
124
|
+
SAW_AKNOWLEDGE_SPIN_PUSH = 711,
|
|
121
125
|
|
|
122
126
|
/*
|
|
123
127
|
!Important, if adding new messages that are 'acting' on behalf of the client,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ProtocolResponse } from "../Base/ProtocolResponse";
|
|
2
|
+
import { Tournament } from "../Tournaments";
|
|
3
|
+
import { UserAchievement } from "./UserAchievement";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export interface GetAchievementMapResponse extends ProtocolResponse {
|
|
7
|
+
|
|
8
|
+
achievements: UserAchievement[];
|
|
9
|
+
tournaments?: Tournament[];
|
|
10
|
+
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ProtocolResponse } from "../Base/ProtocolResponse";
|
|
2
|
+
import { UserAchievement } from "./UserAchievement";
|
|
2
3
|
|
|
3
4
|
export interface ReloadAchievementsEvent extends ProtocolResponse {
|
|
4
|
-
|
|
5
|
+
// !important, server will push here UserAchievement but public_meta of ach and tasks will be null
|
|
6
|
+
// we should use only fields that are reflecting updated progress and not meta data for mission/task
|
|
7
|
+
achievements: UserAchievement[];
|
|
5
8
|
}
|
|
@@ -86,6 +86,7 @@ export const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBa
|
|
|
86
86
|
progress: t.userProgress,
|
|
87
87
|
execution_count_expected: t.executionCount,
|
|
88
88
|
execution_count_actual: t.userExecutedCount,
|
|
89
|
+
display_progress_as_count: t.task_public_meta.display_progress_as_count,
|
|
89
90
|
})),
|
|
90
91
|
related_games: (r.related_games || []).map(g => ({
|
|
91
92
|
ext_game_id: g.ext_game_id,
|
package/src/SmarticoAPI.ts
CHANGED
|
@@ -136,7 +136,7 @@ class SmarticoAPI {
|
|
|
136
136
|
|
|
137
137
|
} catch (e) {
|
|
138
138
|
this.logger.error(`Failed to make request to smartico channel, L2. ${e.message}`, { url: this.publicUrl, request: message, error: e.message });
|
|
139
|
-
throw(new Error(`Failed to make request to smartico channel, L1. ${e.message}`));
|
|
139
|
+
throw(new Error(`Failed to make request to smartico channel, L2 L1. ${e.message}`));
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
if (this.logCIDs.includes(message.cid)) {
|