@smartico/public-api 0.0.369 → 0.0.371
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/SAWTemplateUI.d.ts +9 -0
- package/dist/Missions/AchievementClaimTypeId.d.ts +4 -0
- package/dist/Missions/UserAchievement.d.ts +3 -0
- package/dist/Missions/index.d.ts +1 -0
- package/dist/Tournaments/GetClanTournamentPlayersResponse.d.ts +4 -4
- package/dist/WSAPI/WSAPITypes.d.ts +5 -0
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +14 -6
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/enumerations/TournamentRegistrationError.md +6 -0
- package/docs/api/interfaces/ClanLeaderboardEntry.md +10 -10
- package/docs/api/interfaces/ClanPrizeStructureEntry.md +2 -2
- package/docs/api/interfaces/TClans.md +8 -0
- package/docs/api/interfaces/TMissionOrBadge.md +16 -0
- package/docs/api/interfaces/TTournament.md +8 -0
- package/docs/api/interfaces/TTournamentDetailed.md +12 -8
- package/docs/api/interfaces/UserAchievement.md +12 -0
- package/package.json +1 -1
- package/src/MiniGames/SAWTemplateUI.ts +10 -0
- package/src/Missions/AchievementClaimTypeId.ts +4 -0
- package/src/Missions/UserAchievement.ts +5 -0
- package/src/Missions/index.ts +1 -0
- package/src/Tournaments/GetClanTournamentPlayersResponse.ts +8 -8
- package/src/WSAPI/WSAPITypes.ts +7 -0
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### clanId
|
|
6
6
|
|
|
7
|
-
> **
|
|
7
|
+
> **clanId**: `number`
|
|
8
8
|
|
|
9
9
|
***
|
|
10
10
|
|
|
11
|
-
###
|
|
11
|
+
### publicMeta
|
|
12
12
|
|
|
13
|
-
> **
|
|
13
|
+
> **publicMeta**: [`ClanPublicMeta`](ClanPublicMeta.md)
|
|
14
14
|
|
|
15
15
|
***
|
|
16
16
|
|
|
17
|
-
###
|
|
17
|
+
### rank
|
|
18
18
|
|
|
19
|
-
> **
|
|
19
|
+
> **rank**: `number`
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### totalScore
|
|
24
24
|
|
|
25
|
-
> **
|
|
25
|
+
> **totalScore**: `number`
|
|
26
26
|
|
|
27
27
|
***
|
|
28
28
|
|
|
29
|
-
###
|
|
29
|
+
### memberCount
|
|
30
30
|
|
|
31
|
-
> **
|
|
31
|
+
> **memberCount**: `number`
|
|
@@ -25,3 +25,11 @@ The clan ID the current user belongs to; null if clanless
|
|
|
25
25
|
> **cooldown\_until**: `string`
|
|
26
26
|
|
|
27
27
|
Cooldown-until date string; null if no cooldown
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### join\_date
|
|
32
|
+
|
|
33
|
+
> **join\_date**: `number`
|
|
34
|
+
|
|
35
|
+
Epoch ms when the current user joined their clan; null if clanless
|
|
@@ -353,6 +353,22 @@ Action for the claim reward button
|
|
|
353
353
|
|
|
354
354
|
***
|
|
355
355
|
|
|
356
|
+
### prize\_claim\_expiration\_date?
|
|
357
|
+
|
|
358
|
+
> `optional` **prize\_claim\_expiration\_date?**: `number`
|
|
359
|
+
|
|
360
|
+
The date/timestamp indicating when the mission claim will expire
|
|
361
|
+
|
|
362
|
+
***
|
|
363
|
+
|
|
364
|
+
### prize\_claim\_period\_type\_id?
|
|
365
|
+
|
|
366
|
+
> `optional` **prize\_claim\_period\_type\_id?**: `AchievementClaimPeriodTypeId`
|
|
367
|
+
|
|
368
|
+
The type of the prize claim period (Relative or Exact time and date)
|
|
369
|
+
|
|
370
|
+
***
|
|
371
|
+
|
|
356
372
|
### badgeTimeLimitState?
|
|
357
373
|
|
|
358
374
|
> `optional` **badgeTimeLimitState?**: [`BadgesTimeLimitStates`](../enumerations/BadgesTimeLimitStates.md)
|
|
@@ -392,3 +392,11 @@ When enabled, users who don’t meet the minimum qualifying score will be hidden
|
|
|
392
392
|
> `optional` **total\_scores?**: `number`
|
|
393
393
|
|
|
394
394
|
Total scores across all participants in the tournament
|
|
395
|
+
|
|
396
|
+
***
|
|
397
|
+
|
|
398
|
+
### is\_clan\_based?
|
|
399
|
+
|
|
400
|
+
> `optional` **is\_clan\_based?**: `boolean`
|
|
401
|
+
|
|
402
|
+
True when this tournament groups participants by clan
|
|
@@ -441,6 +441,18 @@ Total scores across all participants in the tournament
|
|
|
441
441
|
|
|
442
442
|
***
|
|
443
443
|
|
|
444
|
+
### is\_clan\_based?
|
|
445
|
+
|
|
446
|
+
> `optional` **is\_clan\_based?**: `boolean`
|
|
447
|
+
|
|
448
|
+
True when this tournament groups participants by clan
|
|
449
|
+
|
|
450
|
+
#### Inherited from
|
|
451
|
+
|
|
452
|
+
[`TTournament`](TTournament.md).[`is_clan_based`](TTournament.md#is_clan_based)
|
|
453
|
+
|
|
454
|
+
***
|
|
455
|
+
|
|
444
456
|
### related\_games?
|
|
445
457
|
|
|
446
458
|
> `optional` **related\_games?**: [`AchRelatedGame`](AchRelatedGame-1.md)[]
|
|
@@ -611,14 +623,6 @@ if the prize is points related, indicates amount of points
|
|
|
611
623
|
|
|
612
624
|
***
|
|
613
625
|
|
|
614
|
-
### is\_clan\_based?
|
|
615
|
-
|
|
616
|
-
> `optional` **is\_clan\_based?**: `boolean`
|
|
617
|
-
|
|
618
|
-
True when this tournament groups participants by clan
|
|
619
|
-
|
|
620
|
-
***
|
|
621
|
-
|
|
622
626
|
### clan\_leaderboard?
|
|
623
627
|
|
|
624
628
|
> `optional` **clan\_leaderboard?**: `object`[]
|
|
@@ -203,3 +203,15 @@
|
|
|
203
203
|
### badgeTimeLimitState?
|
|
204
204
|
|
|
205
205
|
> `optional` **badgeTimeLimitState?**: [`BadgesTimeLimitStates`](../enumerations/BadgesTimeLimitStates.md)
|
|
206
|
+
|
|
207
|
+
***
|
|
208
|
+
|
|
209
|
+
### prize\_claim\_expiration\_date?
|
|
210
|
+
|
|
211
|
+
> `optional` **prize\_claim\_expiration\_date?**: `number`
|
|
212
|
+
|
|
213
|
+
***
|
|
214
|
+
|
|
215
|
+
### prize\_claim\_period\_type\_id?
|
|
216
|
+
|
|
217
|
+
> `optional` **prize\_claim\_period\_type\_id?**: `AchievementClaimPeriodTypeId`
|
package/package.json
CHANGED
|
@@ -431,6 +431,16 @@ export interface SAWTemplateUI {
|
|
|
431
431
|
*/
|
|
432
432
|
steps_to_finish_game?: number;
|
|
433
433
|
|
|
434
|
+
/**
|
|
435
|
+
* Minimum number of path steps / collectible prizes a Voyager session
|
|
436
|
+
* must include before the game can finish. Acts as a floor for the
|
|
437
|
+
* randomly-chosen path length so that sessions cannot terminate after
|
|
438
|
+
* only one or two prizes. When omitted, no minimum is enforced.
|
|
439
|
+
* Must be `>= 1` and `<= steps_to_finish_game`.
|
|
440
|
+
* Back-Office label: _"Min. number of prizes"_.
|
|
441
|
+
*/
|
|
442
|
+
min_steps_to_finish_game?: number;
|
|
443
|
+
|
|
434
444
|
// ─── Voyager specific ────────────────────────────────────────────────────
|
|
435
445
|
|
|
436
446
|
/**
|
|
@@ -9,6 +9,7 @@ import { MissionUtils } from './MissionsUtils';
|
|
|
9
9
|
import { ScheduledMissionType } from './ScheduledMissionType';
|
|
10
10
|
import { UserAchievementTask } from './UserAchievementTask';
|
|
11
11
|
import { BadgesTimeLimitStates } from './BadgesTimeLimitStates';
|
|
12
|
+
import { AchievementClaimPeriodTypeId } from './AchievementClaimTypeId';
|
|
12
13
|
|
|
13
14
|
export interface UserAchievement {
|
|
14
15
|
ach_id?: number;
|
|
@@ -47,6 +48,8 @@ export interface UserAchievement {
|
|
|
47
48
|
completed_this_month?: boolean;
|
|
48
49
|
custom_section_type_id?: number;
|
|
49
50
|
badgeTimeLimitState?: BadgesTimeLimitStates;
|
|
51
|
+
prize_claim_expiration_date?: number;
|
|
52
|
+
prize_claim_period_type_id?: AchievementClaimPeriodTypeId;
|
|
50
53
|
}
|
|
51
54
|
|
|
52
55
|
export const enrichUserAchievementsWithBadgeState = (items: UserAchievement[]): UserAchievement[] => {
|
|
@@ -156,6 +159,8 @@ export const UserAchievementTransform = (items: UserAchievement[]): TMissionOrBa
|
|
|
156
159
|
claim_button_action: r.ach_public_meta.claim_button_action,
|
|
157
160
|
badgeTimeLimitState: r.badgeTimeLimitState,
|
|
158
161
|
hide_locked_mission: r.ach_public_meta.hide_locked_mission,
|
|
162
|
+
prize_claim_expiration_date: r.prize_claim_expiration_date,
|
|
163
|
+
prize_claim_period_type_id: r.prize_claim_period_type_id,
|
|
159
164
|
};
|
|
160
165
|
|
|
161
166
|
if (r.ach_status_id === AchievementStatus.Recurring) {
|
package/src/Missions/index.ts
CHANGED
|
@@ -21,15 +21,15 @@ export interface GetClanTournamentPlayersResponse extends ProtocolResponse {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export interface TClanTournamentPlayer {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
user_id: number;
|
|
25
|
+
clean_ext_user_id: string;
|
|
26
|
+
public_username: string;
|
|
27
27
|
avatar_id: string;
|
|
28
28
|
avatar_real_id: number;
|
|
29
29
|
avatar_url?: string;
|
|
30
30
|
position: number;
|
|
31
31
|
scores: number;
|
|
32
|
-
|
|
32
|
+
is_me: boolean;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
export interface TClanTournamentPlayersResult {
|
|
@@ -46,15 +46,15 @@ export const clanTournamentPlayersTransform = (response: GetClanTournamentPlayer
|
|
|
46
46
|
image_url: response.clan_public_meta.image_url,
|
|
47
47
|
},
|
|
48
48
|
players: (response.players || []).map((p) => ({
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
user_id: p.userId,
|
|
50
|
+
clean_ext_user_id: p.cleanExtUserId,
|
|
51
|
+
public_username: p.userAltName,
|
|
52
52
|
avatar_id: p.avatar_id,
|
|
53
53
|
avatar_real_id: p.avatar_real_id,
|
|
54
54
|
avatar_url: p.avatar_url,
|
|
55
55
|
position: p.position,
|
|
56
56
|
scores: p.scores,
|
|
57
|
-
|
|
57
|
+
is_me: p.isMe,
|
|
58
58
|
})),
|
|
59
59
|
};
|
|
60
60
|
};
|
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { PointChangeSourceType } from '../ActivityLog/PointChangeSourceType';
|
|
|
11
11
|
import { UserBalanceType } from '../ActivityLog/UserBalanceType';
|
|
12
12
|
import { SAWGPMarketType } from '../Quiz/MarketsType';
|
|
13
13
|
import { QuizAnswersValueType } from '../Quiz/MarketsAnswers';
|
|
14
|
+
import { AchievementClaimPeriodTypeId } from '../Missions/AchievementClaimTypeId';
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
/** Preset ribbon keys or a custom image URL. For custom images **250×300 px** */
|
|
@@ -841,6 +842,12 @@ export interface TMissionOrBadge {
|
|
|
841
842
|
/** Action for the claim reward button */
|
|
842
843
|
claim_button_action?: string;
|
|
843
844
|
|
|
845
|
+
/** The date/timestamp indicating when the mission claim will expire */
|
|
846
|
+
prize_claim_expiration_date?: number;
|
|
847
|
+
|
|
848
|
+
/** The type of the prize claim period (Relative or Exact time and date) */
|
|
849
|
+
prize_claim_period_type_id?: AchievementClaimPeriodTypeId;
|
|
850
|
+
|
|
844
851
|
/** Badge time limit state for badges with time restrictions */
|
|
845
852
|
badgeTimeLimitState?: BadgesTimeLimitStates;
|
|
846
853
|
|