@smartico/public-api 0.0.405 → 0.0.409
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/GamePick/GamePickTypes.d.ts +6 -1
- package/dist/Tournaments/GetClanTournamentPlayersResponse.d.ts +3 -25
- package/dist/WSAPI/WSAPITournaments.d.ts +4 -7
- package/dist/WSAPI/WSAPITypes.d.ts +16 -8
- package/dist/index.js +10 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +10 -12
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/README.md +0 -2
- package/docs/api/classes/WSAPITournaments.md +4 -7
- package/docs/api/functions/clanTournamentPlayersTransform.md +2 -2
- package/docs/api/interfaces/GamePickEvent.md +6 -1
- package/docs/api/interfaces/GetClanTournamentPlayersResponse.md +2 -16
- package/docs/api/interfaces/SAWTemplateUI.md +6 -2
- package/docs/api/interfaces/TClanTournamentPlayers.md +24 -22
- package/docs/capabilities/gamePickGetActiveRound.md +1 -1
- package/docs/capabilities/gamePickGetActiveRounds.md +1 -1
- package/docs/capabilities/gamePickGetHistory.md +1 -1
- package/docs/capabilities/gamePickGetRoundInfoForUser.md +1 -1
- package/docs/capabilities/gamePickSubmitSelection.md +1 -1
- package/docs/capabilities/gamePickSubmitSelectionQuiz.md +1 -1
- package/docs/capabilities/getClanTournamentPlayers.md +16 -11
- package/package.json +2 -2
- package/src/GamePick/GamePickTypes.ts +6 -1
- package/src/MiniGames/SAWGetTemplatesResponse.ts +2 -0
- package/src/Tournaments/GetClanTournamentPlayersResponse.ts +7 -26
- package/src/WSAPI/WSAPITournaments.ts +4 -7
- package/src/WSAPI/WSAPITypes.ts +16 -5
- package/docs/api/interfaces/TClanTournamentPlayer.md +0 -55
- package/docs/api/interfaces/TClanTournamentPlayersResult.md +0 -27
|
@@ -229,7 +229,12 @@ export interface GamePickEvent {
|
|
|
229
229
|
resolution_score?: number;
|
|
230
230
|
/** Whether this event is still accepting predictions */
|
|
231
231
|
is_open_for_bets?: boolean;
|
|
232
|
-
/**
|
|
232
|
+
/** Per-outcome numbers keyed by the outcome value (`'1'` / `'x'` / `'2'`, `'yes'` / `'no'`, …).
|
|
233
|
+
* Dual-purpose by event type:
|
|
234
|
+
* - Sports / MatchX: decimal **betting odds** (e.g. `{ "1": 2.45, "x": 3.26, "2": 3.01 }`).
|
|
235
|
+
* - Quiz: when the round's `show_users_preference` is `true`, these are aggregated
|
|
236
|
+
* **user-preference percentages** — what other users predicted, summing to ~100
|
|
237
|
+
* (e.g. `{ "1": 33, "x": 25, "2": 42 }`). Render as the "what others predicted" bar. */
|
|
233
238
|
odds_details?: {
|
|
234
239
|
odd_value: {
|
|
235
240
|
[key: string]: number;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
|
+
import { TClanTournamentPlayers } from '../WSAPI/WSAPITypes';
|
|
2
3
|
export interface ClanTournamentPlayerRaw {
|
|
3
4
|
userId: number;
|
|
4
5
|
cleanExtUserId: string;
|
|
@@ -13,30 +14,7 @@ export interface ClanTournamentPlayerRaw {
|
|
|
13
14
|
avatar_url?: string;
|
|
14
15
|
}
|
|
15
16
|
export interface GetClanTournamentPlayersResponse extends ProtocolResponse {
|
|
16
|
-
|
|
17
|
-
clan_public_meta: {
|
|
18
|
-
name: string;
|
|
19
|
-
image_url: string;
|
|
20
|
-
};
|
|
17
|
+
tournament_instance_id: number;
|
|
21
18
|
players: ClanTournamentPlayerRaw[];
|
|
22
19
|
}
|
|
23
|
-
export
|
|
24
|
-
user_id: number;
|
|
25
|
-
clean_ext_user_id: string;
|
|
26
|
-
public_username: string;
|
|
27
|
-
avatar_id: string;
|
|
28
|
-
avatar_real_id: number;
|
|
29
|
-
avatar_url?: string;
|
|
30
|
-
position: number;
|
|
31
|
-
scores: number;
|
|
32
|
-
is_me: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface TClanTournamentPlayersResult {
|
|
35
|
-
clan_id: number;
|
|
36
|
-
clan_public_meta: {
|
|
37
|
-
name: string;
|
|
38
|
-
image_url: string;
|
|
39
|
-
};
|
|
40
|
-
players: TClanTournamentPlayer[];
|
|
41
|
-
}
|
|
42
|
-
export declare const clanTournamentPlayersTransform: (response: GetClanTournamentPlayersResponse) => TClanTournamentPlayersResult;
|
|
20
|
+
export declare const clanTournamentPlayersTransform: (response: GetClanTournamentPlayersResponse) => TClanTournamentPlayers;
|
|
@@ -264,16 +264,13 @@ export declare class WSAPITournaments extends WSAPIStore {
|
|
|
264
264
|
* polling cadence.
|
|
265
265
|
*
|
|
266
266
|
* **Returned shape**
|
|
267
|
-
* `TClanTournamentPlayers` carries the
|
|
268
|
-
* (`clan_id`, `clan_public_meta.name`, `clan_public_meta.image_url`)
|
|
267
|
+
* `TClanTournamentPlayers` carries the `tournament_instance_id`
|
|
269
268
|
* alongside the `players[]` array — each entry has `position`,
|
|
270
269
|
* `scores`, `public_username`, `clean_ext_user_id`, `avatar_id`,
|
|
271
270
|
* `avatar_real_id`, the resolved `avatar_url`, `user_id`, and the
|
|
272
|
-
* `is_me` flag identifying the current user's row. The
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
* caller-side `ClanLeaderboardEntry` object, but they're available
|
|
276
|
-
* for consumers that don't already have that context.
|
|
271
|
+
* `is_me` flag identifying the current user's row. The response does
|
|
272
|
+
* NOT echo the clan's identity — render the clan header from the
|
|
273
|
+
* caller-side `ClanLeaderboardEntry` object you passed in.
|
|
277
274
|
*
|
|
278
275
|
* **Username display**: prefer `clean_ext_user_id` when set, falling
|
|
279
276
|
* back to `public_username`. The default Smartico UI uses
|
|
@@ -50,6 +50,10 @@ export interface TMiniGamePrize {
|
|
|
50
50
|
acknowledge_dp_additional?: string;
|
|
51
51
|
/** The name of the action button in modal pop-up (additional) */
|
|
52
52
|
acknowledge_action_title_additional?: string;
|
|
53
|
+
/** Deep link that will trigger some action in modal pop-up (second button) */
|
|
54
|
+
second_btn?: string;
|
|
55
|
+
/** The name of the action button in modal pop-up (second button) */
|
|
56
|
+
second_btn_action_title?: string;
|
|
53
57
|
/** Message when the prize pool is empty for that specific prize */
|
|
54
58
|
out_of_stock_message?: string;
|
|
55
59
|
/** Number of items in stock */
|
|
@@ -551,24 +555,28 @@ export interface TTournamentDetailed extends TTournament {
|
|
|
551
555
|
* TClanTournamentPlayers describes the players of a specific clan in a clan-based tournament.
|
|
552
556
|
*/
|
|
553
557
|
export interface TClanTournamentPlayers {
|
|
554
|
-
/**
|
|
555
|
-
|
|
556
|
-
/** Clan display metadata */
|
|
557
|
-
clan_public_meta: {
|
|
558
|
-
name: string;
|
|
559
|
-
image_url: string;
|
|
560
|
-
};
|
|
558
|
+
/** Tournament instance ID */
|
|
559
|
+
tournament_instance_id: number;
|
|
561
560
|
/** Top players of this clan ranked by score DESC */
|
|
562
561
|
players: {
|
|
562
|
+
/** Smartico User ID */
|
|
563
563
|
user_id: number;
|
|
564
|
+
/** External User ID */
|
|
565
|
+
clean_ext_user_id: string;
|
|
566
|
+
/** Public username */
|
|
564
567
|
public_username: string;
|
|
568
|
+
/** Avatar ID */
|
|
565
569
|
avatar_id: string;
|
|
570
|
+
/** Avatar real ID */
|
|
566
571
|
avatar_real_id: number;
|
|
572
|
+
/** Avatar URL */
|
|
567
573
|
avatar_url?: string;
|
|
574
|
+
/** Position in the leaderboard */
|
|
568
575
|
position: number;
|
|
576
|
+
/** Score of the player */
|
|
569
577
|
scores: number;
|
|
578
|
+
/** Indicator if record is the current user */
|
|
570
579
|
is_me: boolean;
|
|
571
|
-
clean_ext_user_id: string;
|
|
572
580
|
}[];
|
|
573
581
|
}
|
|
574
582
|
/**
|
package/dist/index.js
CHANGED
|
@@ -542,6 +542,8 @@ var SAWTemplatesTransform = function SAWTemplatesTransform(items) {
|
|
|
542
542
|
acknowledge_action_title: p.saw_prize_ui_definition.acknowledge_action_title,
|
|
543
543
|
acknowledge_dp_additional: p.saw_prize_ui_definition.acknowledge_dp_additional,
|
|
544
544
|
acknowledge_action_title_additional: p.saw_prize_ui_definition.acknowledge_action_title_additional,
|
|
545
|
+
second_btn: p.saw_prize_ui_definition.second_btn,
|
|
546
|
+
second_btn_action_title: p.saw_prize_ui_definition.second_btn_action_title,
|
|
545
547
|
out_of_stock_message: p.saw_prize_ui_definition.out_of_stock_message,
|
|
546
548
|
pool: p.pool,
|
|
547
549
|
pool_initial: p.pool_initial,
|
|
@@ -1760,13 +1762,12 @@ exports.AchievementClaimPeriodTypeId = void 0;
|
|
|
1760
1762
|
AchievementClaimPeriodTypeId[AchievementClaimPeriodTypeId["ExactPeriod"] = 1] = "ExactPeriod";
|
|
1761
1763
|
})(exports.AchievementClaimPeriodTypeId || (exports.AchievementClaimPeriodTypeId = {}));
|
|
1762
1764
|
|
|
1765
|
+
// Consumer-facing types live in WSAPITypes.ts (`TClanTournamentPlayers`) — the
|
|
1766
|
+
// single source documented + emitted to docs. This transform maps the raw wire
|
|
1767
|
+
// shape onto it; do not re-declare a parallel result/player type here.
|
|
1763
1768
|
var clanTournamentPlayersTransform = function clanTournamentPlayersTransform(response) {
|
|
1764
1769
|
return {
|
|
1765
|
-
|
|
1766
|
-
clan_public_meta: {
|
|
1767
|
-
name: response.clan_public_meta.name,
|
|
1768
|
-
image_url: response.clan_public_meta.image_url
|
|
1769
|
-
},
|
|
1770
|
+
tournament_instance_id: response.tournament_instance_id,
|
|
1770
1771
|
players: (response.players || []).map(function (p) {
|
|
1771
1772
|
return {
|
|
1772
1773
|
user_id: p.userId,
|
|
@@ -5270,16 +5271,13 @@ var WSAPITournaments = /*#__PURE__*/function (_WSAPIStore) {
|
|
|
5270
5271
|
* polling cadence.
|
|
5271
5272
|
*
|
|
5272
5273
|
* **Returned shape**
|
|
5273
|
-
* `TClanTournamentPlayers` carries the
|
|
5274
|
-
* (`clan_id`, `clan_public_meta.name`, `clan_public_meta.image_url`)
|
|
5274
|
+
* `TClanTournamentPlayers` carries the `tournament_instance_id`
|
|
5275
5275
|
* alongside the `players[]` array — each entry has `position`,
|
|
5276
5276
|
* `scores`, `public_username`, `clean_ext_user_id`, `avatar_id`,
|
|
5277
5277
|
* `avatar_real_id`, the resolved `avatar_url`, `user_id`, and the
|
|
5278
|
-
* `is_me` flag identifying the current user's row. The
|
|
5279
|
-
*
|
|
5280
|
-
*
|
|
5281
|
-
* caller-side `ClanLeaderboardEntry` object, but they're available
|
|
5282
|
-
* for consumers that don't already have that context.
|
|
5278
|
+
* `is_me` flag identifying the current user's row. The response does
|
|
5279
|
+
* NOT echo the clan's identity — render the clan header from the
|
|
5280
|
+
* caller-side `ClanLeaderboardEntry` object you passed in.
|
|
5283
5281
|
*
|
|
5284
5282
|
* **Username display**: prefer `clean_ext_user_id` when set, falling
|
|
5285
5283
|
* back to `public_username`. The default Smartico UI uses
|