@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.
@@ -8,6 +8,12 @@
8
8
 
9
9
  ***
10
10
 
11
+ ### TOURNAMENT\_USER\_CANNOT\_JOIN\_WITHOUT\_CLAN
12
+
13
+ > **TOURNAMENT\_USER\_CANNOT\_JOIN\_WITHOUT\_CLAN**: `1010`
14
+
15
+ ***
16
+
11
17
  ### TOURNAMENT\_INSTANCE\_NOT\_FOUND
12
18
 
13
19
  > **TOURNAMENT\_INSTANCE\_NOT\_FOUND**: `30001`
@@ -2,30 +2,30 @@
2
2
 
3
3
  ## Properties
4
4
 
5
- ### clan\_id
5
+ ### clanId
6
6
 
7
- > **clan\_id**: `number`
7
+ > **clanId**: `number`
8
8
 
9
9
  ***
10
10
 
11
- ### public\_meta
11
+ ### publicMeta
12
12
 
13
- > **public\_meta**: [`ClanPublicMeta`](ClanPublicMeta.md)
13
+ > **publicMeta**: [`ClanPublicMeta`](ClanPublicMeta.md)
14
14
 
15
15
  ***
16
16
 
17
- ### position
17
+ ### rank
18
18
 
19
- > **position**: `number`
19
+ > **rank**: `number`
20
20
 
21
21
  ***
22
22
 
23
- ### total\_score
23
+ ### totalScore
24
24
 
25
- > **total\_score**: `number`
25
+ > **totalScore**: `number`
26
26
 
27
27
  ***
28
28
 
29
- ### contributing\_members
29
+ ### memberCount
30
30
 
31
- > **contributing\_members**: `number`
31
+ > **memberCount**: `number`
@@ -40,6 +40,6 @@
40
40
 
41
41
  ***
42
42
 
43
- ### tiers
43
+ ### player\_tiers
44
44
 
45
- > **tiers**: [`ClanPrizeTier`](ClanPrizeTier.md)[]
45
+ > **player\_tiers**: [`ClanPrizeTier`](ClanPrizeTier.md)[]
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.369",
3
+ "version": "0.0.371",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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
  /**
@@ -0,0 +1,4 @@
1
+ export enum AchievementClaimPeriodTypeId {
2
+ RelativePeriod = 0,
3
+ ExactPeriod = 1,
4
+ }
@@ -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) {
@@ -24,3 +24,4 @@ export * from './MissionsUtils';
24
24
  export * from './MissionCategory';
25
25
  export * from './UserAchievementTaskAffectsProgress';
26
26
  export * from './BadgesTimeLimitStates';
27
+ export * from './AchievementClaimTypeId';
@@ -21,15 +21,15 @@ export interface GetClanTournamentPlayersResponse extends ProtocolResponse {
21
21
  }
22
22
 
23
23
  export interface TClanTournamentPlayer {
24
- userId: number;
25
- cleanExtUserId: string;
26
- userAltName: string;
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
- isMe: boolean;
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
- userId: p.userId,
50
- cleanExtUserId: p.cleanExtUserId,
51
- userAltName: p.userAltName,
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
- isMe: p.isMe,
57
+ is_me: p.isMe,
58
58
  })),
59
59
  };
60
60
  };
@@ -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