@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.
@@ -330,16 +330,13 @@ non-clan tournament typically returns an empty `players` array.
330
330
  polling cadence.
331
331
 
332
332
  **Returned shape**
333
- `TClanTournamentPlayers` carries the requested clan's identity
334
- (`clan_id`, `clan_public_meta.name`, `clan_public_meta.image_url`)
333
+ `TClanTournamentPlayers` carries the `tournament_instance_id`
335
334
  alongside the `players[]` array — each entry has `position`,
336
335
  `scores`, `public_username`, `clean_ext_user_id`, `avatar_id`,
337
336
  `avatar_real_id`, the resolved `avatar_url`, `user_id`, and the
338
- `is_me` flag identifying the current user's row. The `clan_id` and
339
- `clan_public_meta` on the response echo the input clan — the
340
- default Smartico UI ignores them and renders the header from the
341
- caller-side `ClanLeaderboardEntry` object, but they're available
342
- for consumers that don't already have that context.
337
+ `is_me` flag identifying the current user's row. The response does
338
+ NOT echo the clan's identity — render the clan header from the
339
+ caller-side `ClanLeaderboardEntry` object you passed in.
343
340
 
344
341
  **Username display**: prefer `clean_ext_user_id` when set, falling
345
342
  back to `public_username`. The default Smartico UI uses
@@ -56,23 +56,9 @@
56
56
 
57
57
  ***
58
58
 
59
- ### clan\_id
59
+ ### tournament\_instance\_id
60
60
 
61
- > **clan\_id**: `number`
62
-
63
- ***
64
-
65
- ### clan\_public\_meta
66
-
67
- > **clan\_public\_meta**: `object`
68
-
69
- #### name
70
-
71
- > **name**: `string`
72
-
73
- #### image\_url
74
-
75
- > **image\_url**: `string`
61
+ > **tournament\_instance\_id**: `number`
76
62
 
77
63
  ***
78
64
 
@@ -571,8 +571,12 @@ controlling obstacle frequency and game speed.
571
571
  > `optional` **custom\_game\_url?**: `string`
572
572
 
573
573
  URL of the operator-hosted custom mini-game, loaded inside an iframe by
574
- the widget for `SAWGameType.CustomMinigame`. The operator is trusted, so
575
- the iframe is rendered without a sandbox.
574
+ the widget for `SAWGameType.CustomMinigame`. The operator is trusted
575
+ (the URL resolves to the operator's own published Web Studio game), but
576
+ the iframe is still rendered with a restrictive sandbox as defence in
577
+ depth: `sandbox="allow-scripts allow-forms allow-same-origin allow-popups
578
+ allow-pointer-lock"`. Top-level navigation is intentionally not allowed,
579
+ so the game cannot redirect the host page.
576
580
  Back-Office label: _"Game URL"_.
577
581
 
578
582
  ***
@@ -4,27 +4,11 @@ TClanTournamentPlayers describes the players of a specific clan in a clan-based
4
4
 
5
5
  ## Properties
6
6
 
7
- ### clan\_id
7
+ ### tournament\_instance\_id
8
8
 
9
- > **clan\_id**: `number`
9
+ > **tournament\_instance\_id**: `number`
10
10
 
11
- Clan ID
12
-
13
- ***
14
-
15
- ### clan\_public\_meta
16
-
17
- > **clan\_public\_meta**: `object`
18
-
19
- Clan display metadata
20
-
21
- #### name
22
-
23
- > **name**: `string`
24
-
25
- #### image\_url
26
-
27
- > **image\_url**: `string`
11
+ Tournament instance ID
28
12
 
29
13
  ***
30
14
 
@@ -38,34 +22,52 @@ Top players of this clan ranked by score DESC
38
22
 
39
23
  > **user\_id**: `number`
40
24
 
25
+ Smartico User ID
26
+
27
+ #### clean\_ext\_user\_id
28
+
29
+ > **clean\_ext\_user\_id**: `string`
30
+
31
+ External User ID
32
+
41
33
  #### public\_username
42
34
 
43
35
  > **public\_username**: `string`
44
36
 
37
+ Public username
38
+
45
39
  #### avatar\_id
46
40
 
47
41
  > **avatar\_id**: `string`
48
42
 
43
+ Avatar ID
44
+
49
45
  #### avatar\_real\_id
50
46
 
51
47
  > **avatar\_real\_id**: `number`
52
48
 
49
+ Avatar real ID
50
+
53
51
  #### avatar\_url?
54
52
 
55
53
  > `optional` **avatar\_url?**: `string`
56
54
 
55
+ Avatar URL
56
+
57
57
  #### position
58
58
 
59
59
  > **position**: `number`
60
60
 
61
+ Position in the leaderboard
62
+
61
63
  #### scores
62
64
 
63
65
  > **scores**: `number`
64
66
 
67
+ Score of the player
68
+
65
69
  #### is\_me
66
70
 
67
71
  > **is\_me**: `boolean`
68
72
 
69
- #### clean\_ext\_user\_id
70
-
71
- > **clean\_ext\_user\_id**: `string`
73
+ Indicator if record is the current user
@@ -2,23 +2,9 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- ### clan\_id
5
+ ### tournament\_instance\_id
6
6
 
7
- > **clan\_id**: `number`
8
-
9
- ***
10
-
11
- ### clan\_public\_meta
12
-
13
- > **clan\_public\_meta**: `object`
14
-
15
- #### name
16
-
17
- > **name**: `string`
18
-
19
- #### image\_url
20
-
21
- > **image\_url**: `string`
7
+ > **tournament\_instance\_id**: `number`
22
8
 
23
9
  ***
24
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  > Returns the ranked players of a specific clan within a clan-based tournament instance.
4
4
  > Import: `import { TClanTournamentPlayers } from '@smartico/public-api'`
5
- > Search terms: getClanTournamentPlayers, tournaments, TClanTournamentPlayers
5
+ > Search terms: getClanTournamentPlayers, tournaments, TClanTournamentPlayers, Smartico, User, External, Public, Avatar, Position, Score, Indicator
6
6
 
7
7
  ## Signature
8
8
  ```ts
@@ -15,18 +15,26 @@ _smartico.api.getClanTournamentPlayers(tournamentInstanceId: number, clanId: num
15
15
 
16
16
  ## Returns — `Promise<TClanTournamentPlayers>`
17
17
  `TClanTournamentPlayers`:
18
- - `clan_id` (number) — Clan ID
19
- - `clan_public_meta` ({ name: string; image_url: string }) — Clan display metadata
18
+ - `tournament_instance_id` (number) — Tournament instance ID
20
19
  - `players` ({
20
+ /** Smartico User ID */
21
21
  user_id: number;
22
+ /** External User ID */
23
+ clean_ext_user_id: string;
24
+ /** Public username */
22
25
  public_username: string;
26
+ /** Avatar ID */
23
27
  avatar_id: string;
28
+ /** Avatar real ID */
24
29
  avatar_real_id: number;
30
+ /** Avatar URL */
25
31
  avatar_url?: string;
32
+ /** Position in the leaderboard */
26
33
  position: number;
34
+ /** Score of the player */
27
35
  scores: number;
36
+ /** Indicator if record is the current user */
28
37
  is_me: boolean;
29
- clean_ext_user_id: string;
30
38
  }[]) — Top players of this clan ranked by score DESC
31
39
 
32
40
  ## Behavioral contract
@@ -51,16 +59,13 @@ non-clan tournament typically returns an empty `players` array.
51
59
  polling cadence.
52
60
 
53
61
  **Returned shape**
54
- `TClanTournamentPlayers` carries the requested clan's identity
55
- (`clan_id`, `clan_public_meta.name`, `clan_public_meta.image_url`)
62
+ `TClanTournamentPlayers` carries the `tournament_instance_id`
56
63
  alongside the `players[]` array — each entry has `position`,
57
64
  `scores`, `public_username`, `clean_ext_user_id`, `avatar_id`,
58
65
  `avatar_real_id`, the resolved `avatar_url`, `user_id`, and the
59
- `is_me` flag identifying the current user's row. The `clan_id` and
60
- `clan_public_meta` on the response echo the input clan — the
61
- default Smartico UI ignores them and renders the header from the
62
- caller-side `ClanLeaderboardEntry` object, but they're available
63
- for consumers that don't already have that context.
66
+ `is_me` flag identifying the current user's row. The response does
67
+ NOT echo the clan's identity — render the clan header from the
68
+ caller-side `ClanLeaderboardEntry` object you passed in.
64
69
 
65
70
  **Username display**: prefer `clean_ext_user_id` when set, falling
66
71
  back to `public_username`. The default Smartico UI uses
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.405",
3
+ "version": "0.0.408",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,8 +15,7 @@ export interface ClanTournamentPlayerRaw {
15
15
  }
16
16
 
17
17
  export interface GetClanTournamentPlayersResponse extends ProtocolResponse {
18
- clan_id: number;
19
- clan_public_meta: { name: string; image_url: string };
18
+ tournament_instance_id: number;
20
19
  players: ClanTournamentPlayerRaw[];
21
20
  }
22
21
 
@@ -33,18 +32,13 @@ export interface TClanTournamentPlayer {
33
32
  }
34
33
 
35
34
  export interface TClanTournamentPlayersResult {
36
- clan_id: number;
37
- clan_public_meta: { name: string; image_url: string };
35
+ tournament_instance_id: number;
38
36
  players: TClanTournamentPlayer[];
39
37
  }
40
38
 
41
39
  export const clanTournamentPlayersTransform = (response: GetClanTournamentPlayersResponse): TClanTournamentPlayersResult => {
42
40
  return {
43
- clan_id: response.clan_id,
44
- clan_public_meta: {
45
- name: response.clan_public_meta.name,
46
- image_url: response.clan_public_meta.image_url,
47
- },
41
+ tournament_instance_id: response.tournament_instance_id,
48
42
  players: (response.players || []).map((p) => ({
49
43
  user_id: p.userId,
50
44
  clean_ext_user_id: p.cleanExtUserId,
@@ -288,16 +288,13 @@ export class WSAPITournaments extends WSAPIStore {
288
288
  * polling cadence.
289
289
  *
290
290
  * **Returned shape**
291
- * `TClanTournamentPlayers` carries the requested clan's identity
292
- * (`clan_id`, `clan_public_meta.name`, `clan_public_meta.image_url`)
291
+ * `TClanTournamentPlayers` carries the `tournament_instance_id`
293
292
  * alongside the `players[]` array — each entry has `position`,
294
293
  * `scores`, `public_username`, `clean_ext_user_id`, `avatar_id`,
295
294
  * `avatar_real_id`, the resolved `avatar_url`, `user_id`, and the
296
- * `is_me` flag identifying the current user's row. The `clan_id` and
297
- * `clan_public_meta` on the response echo the input clan — the
298
- * default Smartico UI ignores them and renders the header from the
299
- * caller-side `ClanLeaderboardEntry` object, but they're available
300
- * for consumers that don't already have that context.
295
+ * `is_me` flag identifying the current user's row. The response does
296
+ * NOT echo the clan's identity — render the clan header from the
297
+ * caller-side `ClanLeaderboardEntry` object you passed in.
301
298
  *
302
299
  * **Username display**: prefer `clean_ext_user_id` when set, falling
303
300
  * back to `public_username`. The default Smartico UI uses
@@ -574,21 +574,28 @@ export interface TTournamentDetailed extends TTournament {
574
574
  * TClanTournamentPlayers describes the players of a specific clan in a clan-based tournament.
575
575
  */
576
576
  export interface TClanTournamentPlayers {
577
- /** Clan ID */
578
- clan_id: number;
579
- /** Clan display metadata */
580
- clan_public_meta: { name: string; image_url: string };
577
+ /** Tournament instance ID */
578
+ tournament_instance_id: number;
581
579
  /** Top players of this clan ranked by score DESC */
582
580
  players: {
581
+ /** Smartico User ID */
583
582
  user_id: number;
583
+ /** External User ID */
584
+ clean_ext_user_id: string;
585
+ /** Public username */
584
586
  public_username: string;
587
+ /** Avatar ID */
585
588
  avatar_id: string;
589
+ /** Avatar real ID */
586
590
  avatar_real_id: number;
591
+ /** Avatar URL */
587
592
  avatar_url?: string;
593
+ /** Position in the leaderboard */
588
594
  position: number;
595
+ /** Score of the player */
589
596
  scores: number;
597
+ /** Indicator if record is the current user */
590
598
  is_me: boolean;
591
- clean_ext_user_id: string;
592
599
  }[];
593
600
  }
594
601