@smartico/public-api 0.0.380 → 0.0.381
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/CLAUDE.md +103 -0
- package/README.md +32 -10
- package/dist/Base/ClassId.d.ts +2 -0
- package/dist/Jackpots/JackpotDetails.d.ts +14 -15
- package/dist/Jackpots/JackpotPot.d.ts +10 -6
- package/dist/Raffle/GetRaffleWonPrizesRequest.d.ts +9 -0
- package/dist/Raffle/GetRaffleWonPrizesResponse.d.ts +52 -0
- package/dist/Raffle/index.d.ts +2 -0
- package/dist/SmarticoAPI.d.ts +6 -1
- package/dist/SmarticoLib/index.d.ts +5 -1
- package/dist/WSAPI/WSAPIAvatars.d.ts +267 -49
- package/dist/WSAPI/WSAPIBonuses.d.ts +224 -10
- package/dist/WSAPI/WSAPIGamePick.d.ts +538 -253
- package/dist/WSAPI/WSAPIGeneral.d.ts +156 -14
- package/dist/WSAPI/WSAPIInbox.d.ts +547 -58
- package/dist/WSAPI/WSAPIJackpots.d.ts +292 -57
- package/dist/WSAPI/WSAPILeaderBoard.d.ts +127 -13
- package/dist/WSAPI/WSAPIMiniGames.d.ts +465 -49
- package/dist/WSAPI/WSAPIRaffles.d.ts +576 -52
- package/dist/WSAPI/WSAPITournaments.d.ts +3 -3
- package/dist/WSAPI/WSAPITypes.d.ts +243 -132
- package/dist/WSAPI/WSAPIUser.d.ts +193 -43
- package/dist/index.js +3409 -615
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +3391 -608
- package/dist/index.modern.mjs.map +1 -1
- package/docs/Callbacks.md +162 -0
- package/docs/SmarticoObject.md +445 -0
- package/docs/Transforms.md +99 -0
- package/docs/api/README.md +26 -0
- package/docs/api/classes/WSAPIAvatars.md +282 -54
- package/docs/api/classes/WSAPIBonuses.md +233 -12
- package/docs/api/classes/WSAPIClans.md +380 -10
- package/docs/api/classes/WSAPIGamePick.md +555 -26
- package/docs/api/classes/WSAPIGeneral.md +165 -16
- package/docs/api/classes/WSAPIInbox.md +588 -64
- package/docs/api/classes/WSAPIJackpots.md +320 -66
- package/docs/api/classes/WSAPILeaderBoard.md +133 -15
- package/docs/api/classes/WSAPIMiniGames.md +501 -64
- package/docs/api/classes/WSAPIMissions.md +58 -79
- package/docs/api/classes/WSAPIRaffles.md +647 -69
- package/docs/api/classes/WSAPIStore.md +83 -108
- package/docs/api/classes/WSAPITournaments.md +495 -28
- package/docs/api/classes/WSAPIUser.md +520 -83
- package/docs/api/documents/Callbacks.md +162 -0
- package/docs/api/documents/SmarticoObject.md +445 -0
- package/docs/api/documents/Transforms.md +99 -0
- package/docs/api/enumerations/BonusStatus-1.md +11 -6
- package/docs/api/enumerations/JoinClanErrorCode.md +81 -0
- package/docs/api/enumerations/TournamentRegistrationError.md +12 -0
- package/docs/api/functions/clanTournamentPlayersTransform.md +13 -0
- package/docs/api/interfaces/AvatarCustomized.md +25 -0
- package/docs/api/interfaces/AvatarDefinition.md +94 -0
- package/docs/api/interfaces/AvatarPrompt.md +45 -0
- package/docs/api/interfaces/BonusMetaMap-1.md +4 -1
- package/docs/api/interfaces/BonusTemplateMetaMap-1.md +9 -4
- package/docs/api/interfaces/Clan.md +4 -0
- package/docs/api/interfaces/ClanInfo.md +109 -0
- package/docs/api/interfaces/ClanMember.md +53 -0
- package/docs/api/interfaces/ClanTournamentPlayerRaw.md +67 -0
- package/docs/api/interfaces/GemsDiamondsLog.md +43 -0
- package/docs/api/interfaces/GetClanInfoResponse.md +61 -0
- package/docs/api/interfaces/GetClanTournamentPlayersResponse.md +81 -0
- package/docs/api/interfaces/GetRaffleWonPrizesRequest.md +59 -0
- package/docs/api/interfaces/GetRaffleWonPrizesResponse.md +95 -0
- package/docs/api/interfaces/InboxMarkMessageAction.md +10 -2
- package/docs/api/interfaces/JackpotDetails.md +14 -15
- package/docs/api/interfaces/JackpotPot.md +9 -6
- package/docs/api/interfaces/LeaderBoardDetailsT.md +14 -8
- package/docs/api/interfaces/LeaderBoardUserT.md +8 -5
- package/docs/api/interfaces/LeaderBoardsRewardsT.md +7 -0
- package/docs/api/interfaces/PointsLog.md +43 -0
- package/docs/api/interfaces/RaffleWonPrize.md +59 -0
- package/docs/api/interfaces/RaffleWonPrizePublicMeta.md +27 -0
- package/docs/api/interfaces/RaffleWonPrizeUser.md +43 -0
- package/docs/api/interfaces/TAchCategory.md +2 -7
- package/docs/api/interfaces/TAvatarCustomized.md +4 -4
- package/docs/api/interfaces/TAvatarDefinition.md +13 -14
- package/docs/api/interfaces/TAvatarPrompt.md +6 -6
- package/docs/api/interfaces/TBonus.md +16 -8
- package/docs/api/interfaces/TBuyStoreItemResult.md +4 -29
- package/docs/api/interfaces/TClaimBonusResult.md +5 -5
- package/docs/api/interfaces/TClan.md +8 -4
- package/docs/api/interfaces/TClanInfo.md +47 -0
- package/docs/api/interfaces/TClanJoinResult.md +11 -1
- package/docs/api/interfaces/TClanTournamentPlayer.md +55 -0
- package/docs/api/interfaces/TClanTournamentPlayersResult.md +27 -0
- package/docs/api/interfaces/TClans.md +3 -1
- package/docs/api/interfaces/TGetTranslations.md +4 -0
- package/docs/api/interfaces/TInboxMessage.md +14 -6
- package/docs/api/interfaces/TInboxMessageBody.md +18 -12
- package/docs/api/interfaces/TLevel.md +17 -20
- package/docs/api/interfaces/TLevelCurrent.md +19 -18
- package/docs/api/interfaces/TMiniGamePlayBatchResult.md +14 -6
- package/docs/api/interfaces/TMiniGamePlayResult.md +9 -4
- package/docs/api/interfaces/TMissionClaimRewardResult.md +1 -9
- package/docs/api/interfaces/TMissionOptInResult.md +1 -5
- package/docs/api/interfaces/TMissionOrBadge.md +4 -7
- package/docs/api/interfaces/TRaffleOptinResponse.md +4 -2
- package/docs/api/interfaces/TSegmentCheckResult.md +10 -0
- package/docs/api/interfaces/TSetAvatarResult.md +3 -3
- package/docs/api/interfaces/TStoreItem.md +3 -13
- package/docs/api/interfaces/TTournament.md +1 -1
- package/docs/api/interfaces/TTournamentDetailed.md +1 -1
- package/docs/api/interfaces/TTournamentRegistrationResult.md +4 -2
- package/docs/api/interfaces/TUICustomSection.md +23 -19
- package/docs/api/interfaces/TUserProfile.md +18 -16
- package/docs/api/interfaces/TransformedRaffleClaimPrizeResponse.md +6 -2
- package/docs/api/interfaces/UserLevelExtraCountersT.md +9 -2
- package/docs/api/type-aliases/ActivityLogEntry.md +3 -0
- package/docs/native/ADDING_METHODS.md +7 -2
- package/docs/native/PROTOCOL.md +337 -0
- package/docs/ui/avatars/UIGuide_getAvatarPrompts.md +100 -0
- package/docs/ui/avatars/UIGuide_getAvatarsCustomized.md +90 -0
- package/docs/ui/avatars/UIGuide_getAvatarsList.md +105 -0
- package/docs/ui/avatars/UIGuide_setAvatar.md +118 -0
- package/docs/ui/bonuses/UIGuide_claimBonus.md +144 -0
- package/docs/ui/bonuses/UIGuide_getBonuses.md +176 -0
- package/docs/ui/gamepick/UIGuide_gamePickGetActiveRound.md +99 -0
- package/docs/ui/gamepick/UIGuide_gamePickGetActiveRounds.md +76 -0
- package/docs/ui/gamepick/UIGuide_gamePickGetBoard.md +81 -0
- package/docs/ui/gamepick/UIGuide_gamePickGetGameInfo.md +78 -0
- package/docs/ui/gamepick/UIGuide_gamePickGetHistory.md +55 -0
- package/docs/ui/gamepick/UIGuide_gamePickGetRoundInfoForUser.md +71 -0
- package/docs/ui/gamepick/UIGuide_gamePickGetUserInfo.md +64 -0
- package/docs/ui/gamepick/UIGuide_gamePickSubmitSelection.md +103 -0
- package/docs/ui/gamepick/UIGuide_gamePickSubmitSelectionQuiz.md +67 -0
- package/docs/ui/general/UIGuide_getCustomSections.md +137 -0
- package/docs/ui/general/UIGuide_getRelatedItemsForGame.md +140 -0
- package/docs/ui/inbox/UIGuide_deleteInboxMessage.md +135 -0
- package/docs/ui/inbox/UIGuide_getInboxMessageBody.md +133 -0
- package/docs/ui/inbox/UIGuide_getInboxMessages.md +186 -0
- package/docs/ui/inbox/UIGuide_markInboxMessageAsRead.md +122 -0
- package/docs/ui/inbox/UIGuide_markUnmarkInboxMessageAsFavorite.md +84 -0
- package/docs/ui/jackpots/UIGuide_getJackpotEligibleGames.md +73 -0
- package/docs/ui/jackpots/UIGuide_getJackpotWinners.md +83 -0
- package/docs/ui/jackpots/UIGuide_jackpotGet.md +138 -0
- package/docs/ui/jackpots/UIGuide_jackpotOptIn.md +85 -0
- package/docs/ui/jackpots/UIGuide_jackpotOptOut.md +65 -0
- package/docs/ui/leaderboard/UIGuide_getLeaderBoard.md +166 -0
- package/docs/ui/minigames/UIGuide_getMiniGames.md +153 -0
- package/docs/ui/minigames/UIGuide_getMiniGamesHistory.md +90 -0
- package/docs/ui/minigames/UIGuide_playMiniGame.md +150 -0
- package/docs/ui/minigames/UIGuide_playMiniGameBatch.md +128 -0
- package/docs/ui/raffles/UIGuide_claimRafflePrize.md +99 -0
- package/docs/ui/raffles/UIGuide_getRaffleDrawRun.md +117 -0
- package/docs/ui/raffles/UIGuide_getRaffleDrawRunsHistory.md +92 -0
- package/docs/ui/raffles/UIGuide_getRaffleWonPrizes.md +120 -0
- package/docs/ui/raffles/UIGuide_getRaffles.md +175 -0
- package/docs/ui/raffles/UIGuide_requestRaffleOptin.md +114 -0
- package/docs/ui/user/UIGuide_getActivityLog.md +130 -0
- package/docs/ui/user/UIGuide_getLevels.md +47 -42
- package/package.json +1 -1
- package/src/Base/ClassId.ts +2 -0
- package/src/Jackpots/JackpotDetails.ts +14 -15
- package/src/Jackpots/JackpotPot.ts +10 -6
- package/src/Raffle/GetRaffleWonPrizesRequest.ts +12 -0
- package/src/Raffle/GetRaffleWonPrizesResponse.ts +56 -0
- package/src/Raffle/index.ts +3 -1
- package/src/SmarticoAPI.ts +14 -1
- package/src/SmarticoLib/index.ts +4 -0
- package/src/WSAPI/WSAPIAvatars.ts +267 -49
- package/src/WSAPI/WSAPIBonuses.ts +224 -10
- package/src/WSAPI/WSAPIGamePick.ts +538 -253
- package/src/WSAPI/WSAPIGeneral.ts +156 -14
- package/src/WSAPI/WSAPIInbox.ts +545 -56
- package/src/WSAPI/WSAPIJackpots.ts +297 -61
- package/src/WSAPI/WSAPILeaderBoard.ts +127 -13
- package/src/WSAPI/WSAPIMiniGames.ts +465 -49
- package/src/WSAPI/WSAPIRaffles.ts +592 -64
- package/src/WSAPI/WSAPITournaments.ts +3 -3
- package/src/WSAPI/WSAPITypes.ts +243 -132
- package/src/WSAPI/WSAPIUser.ts +193 -43
- package/tsconfig.json +9 -1
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
# Interface: LeaderBoardUserT
|
|
2
2
|
|
|
3
|
+
LeaderBoardUserT describes one participant row on a leaderboard.
|
|
4
|
+
|
|
3
5
|
## Properties
|
|
4
6
|
|
|
5
7
|
### public\_username
|
|
6
8
|
|
|
7
9
|
> **public\_username**: `string`
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
Display username (operator-defined alias).
|
|
10
12
|
|
|
11
13
|
***
|
|
12
14
|
|
|
@@ -14,7 +16,7 @@ The username of the participant
|
|
|
14
16
|
|
|
15
17
|
> **avatar\_url**: `string`
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Resolved CDN URL for the participant's avatar.
|
|
18
20
|
|
|
19
21
|
***
|
|
20
22
|
|
|
@@ -22,7 +24,8 @@ The URL to the avatar of the participant
|
|
|
22
24
|
|
|
23
25
|
> **position**: `number`
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
Rank in the leaderboard (DENSE_RANK over all participants).
|
|
28
|
+
`-1` on the `me` entry signals "unranked / outside the window".
|
|
26
29
|
|
|
27
30
|
***
|
|
28
31
|
|
|
@@ -30,7 +33,7 @@ The position of the participant in the leaderboard
|
|
|
30
33
|
|
|
31
34
|
> **points**: `number`
|
|
32
35
|
|
|
33
|
-
|
|
36
|
+
Participant's points for this period.
|
|
34
37
|
|
|
35
38
|
***
|
|
36
39
|
|
|
@@ -38,4 +41,4 @@ The points of the participant in the leaderboard
|
|
|
38
41
|
|
|
39
42
|
> **is\_me**: `boolean`
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
`true` when this row is the current authenticated user.
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
# Interface: LeaderBoardsRewardsT
|
|
2
2
|
|
|
3
|
+
LeaderBoardsRewardsT describes one place's prize on a leaderboard.
|
|
4
|
+
Leaderboard prizes are always gamification points (never gems / diamonds / items).
|
|
5
|
+
|
|
3
6
|
## Properties
|
|
4
7
|
|
|
5
8
|
### place
|
|
6
9
|
|
|
7
10
|
> **place**: `number`
|
|
8
11
|
|
|
12
|
+
Place number (1-based).
|
|
13
|
+
|
|
9
14
|
***
|
|
10
15
|
|
|
11
16
|
### points
|
|
12
17
|
|
|
13
18
|
> **points**: `number`
|
|
19
|
+
|
|
20
|
+
Gamification points awarded to the user occupying this place at period finalization.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Interface: PointsLog
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
### create\_date
|
|
6
|
+
|
|
7
|
+
> **create\_date**: `number`
|
|
8
|
+
|
|
9
|
+
***
|
|
10
|
+
|
|
11
|
+
### user\_ext\_id
|
|
12
|
+
|
|
13
|
+
> **user\_ext\_id**: `string`
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
### crm\_brand\_id
|
|
18
|
+
|
|
19
|
+
> **crm\_brand\_id**: `number`
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### points\_collected
|
|
24
|
+
|
|
25
|
+
> **points\_collected**: `number`
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### user\_points\_ever
|
|
30
|
+
|
|
31
|
+
> **user\_points\_ever**: `number`
|
|
32
|
+
|
|
33
|
+
***
|
|
34
|
+
|
|
35
|
+
### user\_points\_balance
|
|
36
|
+
|
|
37
|
+
> **user\_points\_balance**: `number`
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### source\_type\_id
|
|
42
|
+
|
|
43
|
+
> **source\_type\_id**: [`PointChangeSourceType`](../enumerations/PointChangeSourceType.md)
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Interface: RaffleWonPrize
|
|
2
|
+
|
|
3
|
+
A single prize the user won within the raffle.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### raf\_won\_id
|
|
8
|
+
|
|
9
|
+
> **raf\_won\_id**: `number`
|
|
10
|
+
|
|
11
|
+
Unique ID of the winning row (pass to `claimRafflePrize` when `requires_claim` is `true`).
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### prize\_id
|
|
16
|
+
|
|
17
|
+
> **prize\_id**: `number`
|
|
18
|
+
|
|
19
|
+
ID of the prize definition.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### raffle\_run\_id
|
|
24
|
+
|
|
25
|
+
> **raffle\_run\_id**: `number`
|
|
26
|
+
|
|
27
|
+
Run-instance ID of the draw that awarded this prize.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### draw\_id
|
|
32
|
+
|
|
33
|
+
> **draw\_id**: `number`
|
|
34
|
+
|
|
35
|
+
Schedule ID of the draw that awarded this prize.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### public\_meta
|
|
40
|
+
|
|
41
|
+
> **public\_meta**: [`RaffleWonPrizePublicMeta`](RaffleWonPrizePublicMeta.md)
|
|
42
|
+
|
|
43
|
+
Presentation meta (name / image).
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### requires\_claim
|
|
48
|
+
|
|
49
|
+
> **requires\_claim**: `boolean`
|
|
50
|
+
|
|
51
|
+
Whether this prize requires a claim action from the user.
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### claimed\_date
|
|
56
|
+
|
|
57
|
+
> **claimed\_date**: `number`
|
|
58
|
+
|
|
59
|
+
Epoch ms when the prize was claimed; `null` when not yet claimed.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Interface: RaffleWonPrizePublicMeta
|
|
2
|
+
|
|
3
|
+
Presentation meta for a won prize.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### name
|
|
8
|
+
|
|
9
|
+
> **name**: `string`
|
|
10
|
+
|
|
11
|
+
Name of the prize, e.g. '1 $'.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### hide\_chance\_to\_win
|
|
16
|
+
|
|
17
|
+
> **hide\_chance\_to\_win**: `boolean`
|
|
18
|
+
|
|
19
|
+
Indicates whether the chance to win should be hidden in the UI.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### image\_url
|
|
24
|
+
|
|
25
|
+
> **image\_url**: `string`
|
|
26
|
+
|
|
27
|
+
URL of the image that represents the prize.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Interface: RaffleWonPrizeUser
|
|
2
|
+
|
|
3
|
+
The user the won-prizes list belongs to.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### user\_id
|
|
8
|
+
|
|
9
|
+
> **user\_id**: `number`
|
|
10
|
+
|
|
11
|
+
Internal user ID.
|
|
12
|
+
|
|
13
|
+
***
|
|
14
|
+
|
|
15
|
+
### avatar\_id
|
|
16
|
+
|
|
17
|
+
> **avatar\_id**: `string`
|
|
18
|
+
|
|
19
|
+
Avatar image: a full URL for a system avatar, otherwise an avatar token to resolve against the widget's avatar domain.
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### avatar\_real\_id
|
|
24
|
+
|
|
25
|
+
> **avatar\_real\_id**: `number`
|
|
26
|
+
|
|
27
|
+
Numeric ID of the user's selected avatar definition.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### public\_username?
|
|
32
|
+
|
|
33
|
+
> `optional` **public\_username?**: `string`
|
|
34
|
+
|
|
35
|
+
Public username; server-masked for other users (e.g. `"32:r*****"`).
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### avatar\_url?
|
|
40
|
+
|
|
41
|
+
> `optional` **avatar\_url?**: `string`
|
|
42
|
+
|
|
43
|
+
Always `null` on the wire — use `avatar_id`.
|
|
@@ -25,10 +25,7 @@ Stable numeric ID of the category. Used as the key when joining to
|
|
|
25
25
|
|
|
26
26
|
> **name**: `string`
|
|
27
27
|
|
|
28
|
-
Display name of the category
|
|
29
|
-
user's stored language (or to the language passed to `_smartico.vapi(lang)` in
|
|
30
|
-
visitor mode). Falls back to the EN base name when a translation is missing — never
|
|
31
|
-
null. Consumers should NOT translate this further.
|
|
28
|
+
Display name of the category, pre-translated server-side. Never null.
|
|
32
29
|
|
|
33
30
|
***
|
|
34
31
|
|
|
@@ -36,7 +33,5 @@ null. Consumers should NOT translate this further.
|
|
|
36
33
|
|
|
37
34
|
> **order**: `number`
|
|
38
35
|
|
|
39
|
-
Relative position
|
|
40
|
-
NOT pre-sort by this value — the consumer must sort:
|
|
41
|
-
`categories.sort((a, b) => a.order - b.order)`. Default value is 1 when the
|
|
36
|
+
Relative display position (lower = appears first). Default 1 when the
|
|
42
37
|
operator did not configure an explicit order.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Interface: TAvatarCustomized
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One AI-generated variant of a base avatar. Returned by `getAvatarsCustomized()`.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@ TAvatarCustomized describes an AI-customized version of a base avatar
|
|
|
8
8
|
|
|
9
9
|
> **avatar\_real\_id**: `number`
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
`avatar_real_id` of the base avatar this variant was generated from.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ The avatar_real_id of the base avatar this customization was generated from
|
|
|
16
16
|
|
|
17
17
|
> **url**: `string`
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Absolute CDN URL of the AI-generated image. Can be passed as `avatar_url` to `setAvatar()`.
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
@@ -24,4 +24,4 @@ Full CDN URL of the AI-generated customized avatar image
|
|
|
24
24
|
|
|
25
25
|
> **dt\_created**: `string`
|
|
26
26
|
|
|
27
|
-
ISO date string when the
|
|
27
|
+
ISO date string of when the variant was generated.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Interface: TAvatarDefinition
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One avatar in the user's catalog. Returned by `getAvatarsList()`.
|
|
4
4
|
Fields from the raw `public_meta` object are flattened to the top level.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
@@ -9,7 +9,7 @@ Fields from the raw `public_meta` object are flattened to the top level.
|
|
|
9
9
|
|
|
10
10
|
> **avatar\_real\_id**: `number`
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Stable numeric identifier of the avatar. Primary key passed to `setAvatar()`.
|
|
13
13
|
|
|
14
14
|
***
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@ Unique identifier of the avatar
|
|
|
17
17
|
|
|
18
18
|
> **is\_default**: `boolean`
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
True when this is the system default avatar for the label.
|
|
21
21
|
|
|
22
22
|
***
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ Whether this avatar is the default one
|
|
|
25
25
|
|
|
26
26
|
> **hide\_until\_achieved**: `boolean`
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
When true and `is_given === false`, the avatar should be hidden from the user (surprise unlock).
|
|
29
29
|
|
|
30
30
|
***
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ If true, avatar is hidden until user achieves/unlocks it
|
|
|
33
33
|
|
|
34
34
|
> **priority**: `number`
|
|
35
35
|
|
|
36
|
-
Display
|
|
36
|
+
Display position; lower = earlier in the grid.
|
|
37
37
|
|
|
38
38
|
***
|
|
39
39
|
|
|
@@ -41,7 +41,7 @@ Display priority — lower value means higher position in the grid
|
|
|
41
41
|
|
|
42
42
|
> `optional` **description?**: `string`
|
|
43
43
|
|
|
44
|
-
Optional description
|
|
44
|
+
Optional description shown alongside the avatar in detail views.
|
|
45
45
|
|
|
46
46
|
***
|
|
47
47
|
|
|
@@ -49,7 +49,7 @@ Optional description of the avatar (from public_meta)
|
|
|
49
49
|
|
|
50
50
|
> **url**: `string`
|
|
51
51
|
|
|
52
|
-
Raw image path
|
|
52
|
+
Raw image path as returned by the server (relative or absolute).
|
|
53
53
|
|
|
54
54
|
***
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ Raw image path/URL of the avatar as returned by the server (from public_meta)
|
|
|
57
57
|
|
|
58
58
|
> **avatar\_url**: `string`
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
Absolute CDN URL of the avatar image; built from the configured avatar domain + `url`.
|
|
61
61
|
|
|
62
62
|
***
|
|
63
63
|
|
|
@@ -65,8 +65,7 @@ Full CDN URL of the avatar image, built from avatar_domain + url
|
|
|
65
65
|
|
|
66
66
|
> **avatar\_source\_type\_id**: `number`
|
|
67
67
|
|
|
68
|
-
Source type
|
|
69
|
-
0 = free (always available to all users), other values = earned/purchased
|
|
68
|
+
Source type. `0` = free / always available; non-zero = earned or purchased.
|
|
70
69
|
|
|
71
70
|
***
|
|
72
71
|
|
|
@@ -74,7 +73,7 @@ Source type of the avatar.
|
|
|
74
73
|
|
|
75
74
|
> `optional` **active\_from\_date?**: `string`
|
|
76
75
|
|
|
77
|
-
ISO date string from which the avatar becomes available
|
|
76
|
+
ISO date string from which the avatar becomes available; undefined when no start window.
|
|
78
77
|
|
|
79
78
|
***
|
|
80
79
|
|
|
@@ -82,7 +81,7 @@ ISO date string from which the avatar becomes available
|
|
|
82
81
|
|
|
83
82
|
> `optional` **active\_till\_date?**: `string`
|
|
84
83
|
|
|
85
|
-
ISO date string until which the avatar is available
|
|
84
|
+
ISO date string until which the avatar is available; undefined when no end window.
|
|
86
85
|
|
|
87
86
|
***
|
|
88
87
|
|
|
@@ -90,7 +89,7 @@ ISO date string until which the avatar is available
|
|
|
90
89
|
|
|
91
90
|
> **is\_given**: `boolean`
|
|
92
91
|
|
|
93
|
-
|
|
92
|
+
True when the user owns / has unlocked this avatar.
|
|
94
93
|
|
|
95
94
|
***
|
|
96
95
|
|
|
@@ -98,4 +97,4 @@ Whether the avatar has been granted/given to the current user
|
|
|
98
97
|
|
|
99
98
|
> `optional` **is\_in\_use?**: `boolean`
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
True when this avatar is the user's currently active profile avatar.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Interface: TAvatarPrompt
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One AI style prompt for avatar customization. Returned by `getAvatarPrompts()`.
|
|
4
4
|
Fields from the raw `public_meta` object are flattened to the top level.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
@@ -9,7 +9,7 @@ Fields from the raw `public_meta` object are flattened to the top level.
|
|
|
9
9
|
|
|
10
10
|
> **prompt\_id**: `number`
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Stable numeric identifier of the prompt.
|
|
13
13
|
|
|
14
14
|
***
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@ Unique identifier of the AI customization prompt
|
|
|
17
17
|
|
|
18
18
|
> **name**: `string`
|
|
19
19
|
|
|
20
|
-
Display name of the
|
|
20
|
+
Display name of the style, e.g. "Cartoon", "Watercolor".
|
|
21
21
|
|
|
22
22
|
***
|
|
23
23
|
|
|
@@ -25,7 +25,7 @@ Display name of the prompt style, e.g. "Cartoon", "Watercolor" (from public_meta
|
|
|
25
25
|
|
|
26
26
|
> **icon\_url**: `string`
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
Absolute CDN URL of the prompt's preview icon.
|
|
29
29
|
|
|
30
30
|
***
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ Full CDN URL of the prompt style icon image (from public_meta)
|
|
|
33
33
|
|
|
34
34
|
> **cost\_currency\_type\_id**: `number`
|
|
35
35
|
|
|
36
|
-
Currency
|
|
36
|
+
Currency used to pay for the customization. `0` = points, `1` = gems, `2` = diamonds.
|
|
37
37
|
|
|
38
38
|
***
|
|
39
39
|
|
|
@@ -41,4 +41,4 @@ Currency type used to pay for this customization (0=points, 1=gems, 2=diamonds)
|
|
|
41
41
|
|
|
42
42
|
> **cost\_value**: `number`
|
|
43
43
|
|
|
44
|
-
Cost amount in the
|
|
44
|
+
Cost amount in the currency named by `cost_currency_type_id`.
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Interface: TBonus
|
|
2
2
|
|
|
3
|
+
TBonus describes one bonus awarded to the user.
|
|
4
|
+
Returned by `_smartico.api.getBonuses()`.
|
|
5
|
+
|
|
3
6
|
## Properties
|
|
4
7
|
|
|
5
8
|
### bonus\_id
|
|
6
9
|
|
|
7
10
|
> **bonus\_id**: `number`
|
|
8
11
|
|
|
9
|
-
ID of the bonus
|
|
12
|
+
Stable ID of the bonus.
|
|
10
13
|
|
|
11
14
|
***
|
|
12
15
|
|
|
@@ -14,7 +17,8 @@ ID of the bonus
|
|
|
14
17
|
|
|
15
18
|
> `optional` **is\_redeemable?**: `boolean`
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
`true` when the bonus is in a player-claim-required state.
|
|
21
|
+
Gate the Claim button on this; see `claimBonus` TSDoc.
|
|
18
22
|
|
|
19
23
|
***
|
|
20
24
|
|
|
@@ -22,7 +26,8 @@ Can the bonus be redeemed (if bonus is redeemable the user needs to claim it)
|
|
|
22
26
|
|
|
23
27
|
> `optional` **create\_date?**: `string`
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
Bonus creation timestamp as ISO 8601 UTC string
|
|
30
|
+
("YYYY-MM-DDTHH:MM:SS", no timezone suffix).
|
|
26
31
|
|
|
27
32
|
***
|
|
28
33
|
|
|
@@ -30,7 +35,8 @@ Date of creation
|
|
|
30
35
|
|
|
31
36
|
> `optional` **redeem\_date?**: `string`
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
Bonus redemption timestamp as ISO 8601 UTC string. Absent until
|
|
39
|
+
the bonus reaches `BonusStatus.REDEEMED`.
|
|
34
40
|
|
|
35
41
|
***
|
|
36
42
|
|
|
@@ -38,7 +44,7 @@ Date of redemption
|
|
|
38
44
|
|
|
39
45
|
> `optional` **label\_bonus\_template\_id?**: `number`
|
|
40
46
|
|
|
41
|
-
ID of template used
|
|
47
|
+
ID of the bonus template used to issue this bonus.
|
|
42
48
|
|
|
43
49
|
***
|
|
44
50
|
|
|
@@ -46,7 +52,7 @@ ID of template used
|
|
|
46
52
|
|
|
47
53
|
> `optional` **bonus\_status\_id?**: [`BonusStatus`](../enumerations/BonusStatus-1.md)
|
|
48
54
|
|
|
49
|
-
|
|
55
|
+
Lifecycle status; see [BonusStatus](../enumerations/BonusStatus-1.md).
|
|
50
56
|
|
|
51
57
|
***
|
|
52
58
|
|
|
@@ -54,7 +60,8 @@ ID of the bonus status
|
|
|
54
60
|
|
|
55
61
|
> `optional` **label\_bonus\_template\_meta\_map?**: [`BonusTemplateMetaMap`](BonusTemplateMetaMap-1.md)
|
|
56
62
|
|
|
57
|
-
|
|
63
|
+
Template-level display metadata (operator-configured, identical
|
|
64
|
+
across all bonuses from the same template).
|
|
58
65
|
|
|
59
66
|
***
|
|
60
67
|
|
|
@@ -62,4 +69,5 @@ Additional information about the bonus(edscription, image,name, acknowledge)
|
|
|
62
69
|
|
|
63
70
|
> `optional` **bonus\_meta\_map?**: [`BonusMetaMap`](BonusMetaMap-1.md)
|
|
64
71
|
|
|
65
|
-
|
|
72
|
+
Instance-level display metadata (per-issuance; carries the
|
|
73
|
+
dynamic amount computed at award time).
|
|
@@ -1,35 +1,14 @@
|
|
|
1
1
|
# Interface: TBuyStoreItemResult
|
|
2
2
|
|
|
3
|
+
Result of `_smartico.api.buyStoreItem(store_item_id)`.
|
|
4
|
+
|
|
3
5
|
## Properties
|
|
4
6
|
|
|
5
7
|
### err\_code
|
|
6
8
|
|
|
7
9
|
> **err\_code**: [`BuyStoreItemErrorCode`](../enumerations/BuyStoreItemErrorCode.md)
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
(funds debited, reward delivered server-side); any non-zero value
|
|
11
|
-
signals a failure.
|
|
12
|
-
|
|
13
|
-
The typed values are the named codes in the [BuyStoreItemErrorCode](../enumerations/BuyStoreItemErrorCode.md)
|
|
14
|
-
enum. Always branch on known codes first and fall back to a generic
|
|
15
|
-
error handler for anything else.
|
|
16
|
-
|
|
17
|
-
See the `buyStoreItem` TSDoc for the full error-code table, the
|
|
18
|
-
Buy-button decision matrix, and per-code UI guidance.
|
|
19
|
-
|
|
20
|
-
Example for error handling:
|
|
21
|
-
```ts
|
|
22
|
-
const res = await window._smartico.api.buyStoreItem(item_id);
|
|
23
|
-
if (res.err_code === 0) {
|
|
24
|
-
console.log('[smartico] purchase succeeded — close the detail modal, show a success toast; the SDK auto-refreshes getStoreItems and the purchased-items list');
|
|
25
|
-
} else if (res.err_code === 11000 || res.err_code === 11011 || res.err_code === 11012) {
|
|
26
|
-
console.error('[smartico] insufficient balance — show insufficient-balance UI for the item.purchase_type');
|
|
27
|
-
} else if (res.err_code === 11009) {
|
|
28
|
-
console.error('[smartico] sold out — show a "Sold out" message');
|
|
29
|
-
} else {
|
|
30
|
-
console.error('[smartico] purchase failed — show a generic error with this message:', res.err_message);
|
|
31
|
-
}
|
|
32
|
-
```
|
|
11
|
+
Error code. `0` = success. See `buyStoreItem` TSDoc for the full table.
|
|
33
12
|
|
|
34
13
|
***
|
|
35
14
|
|
|
@@ -37,8 +16,4 @@ if (res.err_code === 0) {
|
|
|
37
16
|
|
|
38
17
|
> **err\_message**: `string`
|
|
39
18
|
|
|
40
|
-
Optional
|
|
41
|
-
only on non-zero `err_code`, and even then can be empty. For codes
|
|
42
|
-
that have operator-defined copy on the item itself (`11006` →
|
|
43
|
-
`limit_message`, `11014` → `purchase_limit_message`), prefer the
|
|
44
|
-
item-level copy and use `err_message` only as a fallback.
|
|
19
|
+
Optional error message; populated on non-zero `err_code`.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Interface: TClaimBonusResult
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Result of `_smartico.api.claimBonus(bonus_id)`.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
7
7
|
### err\_code
|
|
8
8
|
|
|
9
|
-
> **err\_code**:
|
|
9
|
+
> **err\_code**: `number`
|
|
10
10
|
|
|
11
|
-
Error code
|
|
11
|
+
Error code. `0` = success. See `claimBonus` TSDoc for the full table.
|
|
12
12
|
|
|
13
13
|
***
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@ Error code that represents outcome of the game play attempt. Game succeed to be
|
|
|
16
16
|
|
|
17
17
|
> **err\_message**: `string`
|
|
18
18
|
|
|
19
|
-
Optional error message
|
|
19
|
+
Optional error message; populated on non-zero `err_code`.
|
|
20
20
|
|
|
21
21
|
***
|
|
22
22
|
|
|
@@ -24,4 +24,4 @@ Optional error message
|
|
|
24
24
|
|
|
25
25
|
> `optional` **success?**: `boolean`
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Unreliable on the wire — prefer `err_code === 0` as the success check.
|
|
@@ -52,7 +52,8 @@ Max number of members allowed in clan
|
|
|
52
52
|
|
|
53
53
|
> **entry\_fee\_currency\_type\_id**: `number`
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
Currency type for `entry_fee_amount`. `0` = points, `1` = gems,
|
|
56
|
+
`2` = diamonds, `3` = free (no fee).
|
|
56
57
|
|
|
57
58
|
***
|
|
58
59
|
|
|
@@ -60,7 +61,8 @@ ShopPurchaseType: 0=Points, 1=Gems, 2=Diamonds, 3=Free
|
|
|
60
61
|
|
|
61
62
|
> **entry\_fee\_amount**: `number`
|
|
62
63
|
|
|
63
|
-
|
|
64
|
+
Entry fee amount in the currency indicated by `entry_fee_currency_type_id`.
|
|
65
|
+
`0` (or `entry_fee_currency_type_id === 3`) means the clan is free to join.
|
|
64
66
|
|
|
65
67
|
***
|
|
66
68
|
|
|
@@ -68,7 +70,9 @@ Numeric value for entry fee
|
|
|
68
70
|
|
|
69
71
|
> **rating\_position**: `number`
|
|
70
72
|
|
|
71
|
-
|
|
73
|
+
Global rank among all active clans in the label, by `rating_score` DESC.
|
|
74
|
+
`1` = highest-rated. May skip positions when some clans are hidden by
|
|
75
|
+
per-user visibility (e.g. user sees positions 1, 3, 7).
|
|
72
76
|
|
|
73
77
|
***
|
|
74
78
|
|
|
@@ -76,4 +80,4 @@ F1 rank ASC, 1=best
|
|
|
76
80
|
|
|
77
81
|
> **rating\_score**: `number`
|
|
78
82
|
|
|
79
|
-
Clan rating score
|
|
83
|
+
Clan rating score (higher is better).
|