@smartico/public-api 0.0.404 → 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.
@@ -365,8 +365,12 @@ export interface SAWTemplateUI {
365
365
  game_difficulty?: SAWGameDifficultyType;
366
366
  /**
367
367
  * URL of the operator-hosted custom mini-game, loaded inside an iframe by
368
- * the widget for `SAWGameType.CustomMinigame`. The operator is trusted, so
369
- * the iframe is rendered without a sandbox.
368
+ * the widget for `SAWGameType.CustomMinigame`. The operator is trusted
369
+ * (the URL resolves to the operator's own published Web Studio game), but
370
+ * the iframe is still rendered with a restrictive sandbox as defence in
371
+ * depth: `sandbox="allow-scripts allow-forms allow-same-origin allow-popups
372
+ * allow-pointer-lock"`. Top-level navigation is intentionally not allowed,
373
+ * so the game cannot redirect the host page.
370
374
  * Back-Office label: _"Game URL"_.
371
375
  */
372
376
  custom_game_url?: string;
@@ -13,11 +13,7 @@ export interface ClanTournamentPlayerRaw {
13
13
  avatar_url?: string;
14
14
  }
15
15
  export interface GetClanTournamentPlayersResponse extends ProtocolResponse {
16
- clan_id: number;
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
- clan_id: number;
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 requested clan's identity
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 `clan_id` and
273
- * `clan_public_meta` on the response echo the input clan — the
274
- * default Smartico UI ignores them and renders the header from the
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
- /** Clan ID */
555
- clan_id: number;
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
- clan_id: response.clan_id,
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 requested clan's identity
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 `clan_id` and
5279
- * `clan_public_meta` on the response echo the input clan — the
5280
- * default Smartico UI ignores them and renders the header from the
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