@smartico/public-api 0.0.405 → 0.0.408
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/Tournaments/GetClanTournamentPlayersResponse.d.ts +2 -10
- package/dist/WSAPI/WSAPITournaments.d.ts +4 -7
- package/dist/WSAPI/WSAPITypes.d.ts +12 -8
- package/dist/index.js +5 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +5 -12
- package/dist/index.modern.mjs.map +1 -1
- package/docs/api/classes/WSAPITournaments.md +4 -7
- 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/api/interfaces/TClanTournamentPlayersResult.md +2 -16
- package/docs/capabilities/getClanTournamentPlayers.md +16 -11
- package/package.json +1 -1
- package/src/Tournaments/GetClanTournamentPlayersResponse.ts +3 -9
- package/src/WSAPI/WSAPITournaments.ts +4 -7
- package/src/WSAPI/WSAPITypes.ts +12 -5
|
@@ -13,11 +13,7 @@ export interface ClanTournamentPlayerRaw {
|
|
|
13
13
|
avatar_url?: string;
|
|
14
14
|
}
|
|
15
15
|
export interface GetClanTournamentPlayersResponse extends ProtocolResponse {
|
|
16
|
-
|
|
17
|
-
clan_public_meta: {
|
|
18
|
-
name: string;
|
|
19
|
-
image_url: string;
|
|
20
|
-
};
|
|
16
|
+
tournament_instance_id: number;
|
|
21
17
|
players: ClanTournamentPlayerRaw[];
|
|
22
18
|
}
|
|
23
19
|
export interface TClanTournamentPlayer {
|
|
@@ -32,11 +28,7 @@ export interface TClanTournamentPlayer {
|
|
|
32
28
|
is_me: boolean;
|
|
33
29
|
}
|
|
34
30
|
export interface TClanTournamentPlayersResult {
|
|
35
|
-
|
|
36
|
-
clan_public_meta: {
|
|
37
|
-
name: string;
|
|
38
|
-
image_url: string;
|
|
39
|
-
};
|
|
31
|
+
tournament_instance_id: number;
|
|
40
32
|
players: TClanTournamentPlayer[];
|
|
41
33
|
}
|
|
42
34
|
export declare const clanTournamentPlayersTransform: (response: GetClanTournamentPlayersResponse) => TClanTournamentPlayersResult;
|
|
@@ -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
|
|
@@ -551,24 +551,28 @@ export interface TTournamentDetailed extends TTournament {
|
|
|
551
551
|
* TClanTournamentPlayers describes the players of a specific clan in a clan-based tournament.
|
|
552
552
|
*/
|
|
553
553
|
export interface TClanTournamentPlayers {
|
|
554
|
-
/**
|
|
555
|
-
|
|
556
|
-
/** Clan display metadata */
|
|
557
|
-
clan_public_meta: {
|
|
558
|
-
name: string;
|
|
559
|
-
image_url: string;
|
|
560
|
-
};
|
|
554
|
+
/** Tournament instance ID */
|
|
555
|
+
tournament_instance_id: number;
|
|
561
556
|
/** Top players of this clan ranked by score DESC */
|
|
562
557
|
players: {
|
|
558
|
+
/** Smartico User ID */
|
|
563
559
|
user_id: number;
|
|
560
|
+
/** External User ID */
|
|
561
|
+
clean_ext_user_id: string;
|
|
562
|
+
/** Public username */
|
|
564
563
|
public_username: string;
|
|
564
|
+
/** Avatar ID */
|
|
565
565
|
avatar_id: string;
|
|
566
|
+
/** Avatar real ID */
|
|
566
567
|
avatar_real_id: number;
|
|
568
|
+
/** Avatar URL */
|
|
567
569
|
avatar_url?: string;
|
|
570
|
+
/** Position in the leaderboard */
|
|
568
571
|
position: number;
|
|
572
|
+
/** Score of the player */
|
|
569
573
|
scores: number;
|
|
574
|
+
/** Indicator if record is the current user */
|
|
570
575
|
is_me: boolean;
|
|
571
|
-
clean_ext_user_id: string;
|
|
572
576
|
}[];
|
|
573
577
|
}
|
|
574
578
|
/**
|
package/dist/index.js
CHANGED
|
@@ -1762,11 +1762,7 @@ exports.AchievementClaimPeriodTypeId = void 0;
|
|
|
1762
1762
|
|
|
1763
1763
|
var clanTournamentPlayersTransform = function clanTournamentPlayersTransform(response) {
|
|
1764
1764
|
return {
|
|
1765
|
-
|
|
1766
|
-
clan_public_meta: {
|
|
1767
|
-
name: response.clan_public_meta.name,
|
|
1768
|
-
image_url: response.clan_public_meta.image_url
|
|
1769
|
-
},
|
|
1765
|
+
tournament_instance_id: response.tournament_instance_id,
|
|
1770
1766
|
players: (response.players || []).map(function (p) {
|
|
1771
1767
|
return {
|
|
1772
1768
|
user_id: p.userId,
|
|
@@ -5270,16 +5266,13 @@ var WSAPITournaments = /*#__PURE__*/function (_WSAPIStore) {
|
|
|
5270
5266
|
* polling cadence.
|
|
5271
5267
|
*
|
|
5272
5268
|
* **Returned shape**
|
|
5273
|
-
* `TClanTournamentPlayers` carries the
|
|
5274
|
-
* (`clan_id`, `clan_public_meta.name`, `clan_public_meta.image_url`)
|
|
5269
|
+
* `TClanTournamentPlayers` carries the `tournament_instance_id`
|
|
5275
5270
|
* alongside the `players[]` array — each entry has `position`,
|
|
5276
5271
|
* `scores`, `public_username`, `clean_ext_user_id`, `avatar_id`,
|
|
5277
5272
|
* `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.
|
|
5273
|
+
* `is_me` flag identifying the current user's row. The response does
|
|
5274
|
+
* NOT echo the clan's identity — render the clan header from the
|
|
5275
|
+
* caller-side `ClanLeaderboardEntry` object you passed in.
|
|
5283
5276
|
*
|
|
5284
5277
|
* **Username display**: prefer `clean_ext_user_id` when set, falling
|
|
5285
5278
|
* back to `public_username`. The default Smartico UI uses
|