@smartico/public-api 0.0.380 → 0.0.382
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/MiniGames/SAWGameType.d.ts +3 -1
- package/dist/MiniGames/SAWTemplateUI.d.ts +7 -0
- 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 +3412 -616
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +3395 -609
- 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/MiniGames/SAWGameType.ts +3 -0
- package/src/MiniGames/SAWTemplateUI.ts +10 -0
- 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
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Transform functions — raw protocol → friendly types
|
|
2
|
+
|
|
3
|
+
The SDK talks to the Smartico backend over a low-level WebSocket protocol (the
|
|
4
|
+
raw request/response messages documented in the Native Protocol doc, `docs/native/PROTOCOL.md`).
|
|
5
|
+
Those raw messages are shaped for the wire, not for application developers —
|
|
6
|
+
they nest display fields inside `public_meta` / `*PublicMeta` objects, mix
|
|
7
|
+
camelCase and snake_case, carry opaque numeric type ids, JSON-encode some
|
|
8
|
+
values as strings, and include wire-only fields a UI never needs.
|
|
9
|
+
|
|
10
|
+
Rather than hand all that to the consumer, the SDK runs a **transform function**
|
|
11
|
+
over every response, producing a clean, consistently-shaped, friendly object.
|
|
12
|
+
This is why `_smartico.api.*` returns pleasant `T`-prefixed types instead of
|
|
13
|
+
the raw protocol shapes.
|
|
14
|
+
|
|
15
|
+
## The three naming conventions
|
|
16
|
+
|
|
17
|
+
You'll see this pattern repeated across every domain:
|
|
18
|
+
|
|
19
|
+
| Convention | Where | Meaning |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| **`T`-prefixed types** (`TStoreItem`, `TAvatarDefinition`, `TClanInfo`, `TMissionOrBadge`, …) | `WSAPITypes.ts` + domain folders | The **friendly** result type returned to the consumer. The `T` distinguishes it from the raw protocol type of the same name (`StoreItem`, `AvatarDefinition`, …). |
|
|
22
|
+
| **`*Transform` functions** (`StoreItemTransform`, `avatarDefinitionTransform`, `clanTournamentPlayersTransform`, …) | `src/<Domain>/*.ts` | Pure functions that map one raw protocol entity to its friendly `T` type. ~30 of them, one per entity. |
|
|
23
|
+
| **`*T` methods** (`storeGetItemsT`, `avatarsGetListT`, `clansGetListT`, …) | `SmarticoAPI` | The "**T**ransformed" variant of a protocol call: send the raw request, then run the matching transform on the response. The `_smartico.api.*` surface is built on these. |
|
|
24
|
+
|
|
25
|
+
**As a consumer you never call transforms directly** — `_smartico.api.*`
|
|
26
|
+
already returns the transformed `T` types. The transforms are the SDK internals
|
|
27
|
+
that produce them. (They are exported from the package, so you *can* reference
|
|
28
|
+
them, but you rarely need to.)
|
|
29
|
+
|
|
30
|
+
## What a transform actually does
|
|
31
|
+
|
|
32
|
+
Transforms normalize the raw shape in a handful of recurring ways:
|
|
33
|
+
|
|
34
|
+
1. **Flatten nested metadata** — raw entities bury display fields inside a
|
|
35
|
+
`public_meta` / `*PublicMeta` sub-object; the transform lifts them to the
|
|
36
|
+
top level. (`item.itemPublicMeta.name` → `item.name`.)
|
|
37
|
+
2. **Normalize casing** — raw fields are inconsistently camelCase
|
|
38
|
+
(`userId`, `userAltName`, `isMe`, `canBuy`); the friendly types are
|
|
39
|
+
consistent snake_case (`user_id`, `public_username`, `is_me`, `can_buy`).
|
|
40
|
+
3. **Compute convenience fields** — e.g. build an absolute `avatar_url` from a
|
|
41
|
+
relative image path plus the label's avatar domain, so the consumer can use
|
|
42
|
+
it directly in an `<img>`.
|
|
43
|
+
4. **Resolve opaque ids to named values** — numeric type ids become named enum
|
|
44
|
+
values (e.g. a raw `itemTypeId` becomes a friendly `type`).
|
|
45
|
+
5. **Parse string-encoded JSON** — fields the server sends as JSON strings
|
|
46
|
+
(e.g. `custom_data`) are parsed into real objects.
|
|
47
|
+
6. **Drop wire-only / internal fields and junk rows** — the friendly type keeps
|
|
48
|
+
only what a UI needs.
|
|
49
|
+
|
|
50
|
+
## Before / after example
|
|
51
|
+
|
|
52
|
+
Raw `AvatarDefinition` on the wire (`GET_AVATARS_LIST_RESPONSE`):
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"avatar_real_id": 7,
|
|
57
|
+
"priority": 2,
|
|
58
|
+
"public_meta": { "description": "Knight", "url": "avatars/knight.png" },
|
|
59
|
+
"avatar_source_type_id": 0,
|
|
60
|
+
"is_given": true,
|
|
61
|
+
"is_in_use": false
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Friendly `TAvatarDefinition` returned by `_smartico.api.getAvatarsList()`:
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"avatar_real_id": 7,
|
|
70
|
+
"priority": 2,
|
|
71
|
+
"description": "Knight",
|
|
72
|
+
"url": "avatars/knight.png",
|
|
73
|
+
"avatar_url": "https://<avatar-domain>/avatars/knight.png",
|
|
74
|
+
"avatar_source_type_id": 0,
|
|
75
|
+
"is_given": true,
|
|
76
|
+
"is_in_use": false
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The transform flattened `public_meta.description` / `public_meta.url` to the top
|
|
81
|
+
level and added the computed absolute `avatar_url`.
|
|
82
|
+
|
|
83
|
+
Casing normalization is most visible in clan-tournament players — the raw
|
|
84
|
+
`players[]` use `userId` / `userAltName` / `isMe`, which the transform renames
|
|
85
|
+
to `user_id` / `public_username` / `is_me`.
|
|
86
|
+
|
|
87
|
+
## Why this matters for native clients
|
|
88
|
+
|
|
89
|
+
Native clients (Kotlin / Swift) that speak the WebSocket protocol directly —
|
|
90
|
+
see the Native Protocol doc (`docs/native/PROTOCOL.md`) — receive the **raw**
|
|
91
|
+
shapes, not the transformed `T` types. PROTOCOL.md documents those raw shapes precisely
|
|
92
|
+
(nested `public_meta`, camelCase player fields, etc.) and flags where the JS SDK
|
|
93
|
+
adds a computed field (such as `avatar_url`). A native client is responsible for
|
|
94
|
+
doing the equivalent normalization itself if it wants the friendlier shape.
|
|
95
|
+
|
|
96
|
+
In short:
|
|
97
|
+
|
|
98
|
+
- **JS / browser SDK** → call `_smartico.api.*`, get friendly `T` types (transforms applied for you).
|
|
99
|
+
- **Native client** → use the raw protocol from PROTOCOL.md, apply your own mapping.
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# Enumeration: BonusStatus
|
|
2
2
|
|
|
3
|
+
BonusStatus describes the lifecycle stage of a bonus on `TBonus.bonus_status_id`.
|
|
4
|
+
Operator widget configuration typically filters out internal statuses
|
|
5
|
+
(`New`, `COUPON_ISSUE_FAILED`, `EXPIRED`); consumers usually see
|
|
6
|
+
`COUPON_ISSUED`, `REDEEMED`, and `REDEEM_FAILED`.
|
|
7
|
+
|
|
3
8
|
## Enumeration Members
|
|
4
9
|
|
|
5
10
|
### New
|
|
6
11
|
|
|
7
12
|
> **New**: `1`
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
Newly created, not yet processed (internal).
|
|
10
15
|
|
|
11
16
|
***
|
|
12
17
|
|
|
@@ -14,7 +19,7 @@ The bonus is newly created (shouldn't be shown to the client)
|
|
|
14
19
|
|
|
15
20
|
> **COUPON\_ISSUED**: `2`
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
Issued and awaiting player claim.
|
|
18
23
|
|
|
19
24
|
***
|
|
20
25
|
|
|
@@ -22,7 +27,7 @@ The bonus is issued and available for redemption but has not been redeemed yet
|
|
|
22
27
|
|
|
23
28
|
> **REDEEMED**: `3`
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
Successfully redeemed.
|
|
26
31
|
|
|
27
32
|
***
|
|
28
33
|
|
|
@@ -30,7 +35,7 @@ The bonus has been successfully redeemed
|
|
|
30
35
|
|
|
31
36
|
> **REDEEM\_FAILED**: `4`
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
Previous redemption attempt failed; still valid and re-claimable.
|
|
34
39
|
|
|
35
40
|
***
|
|
36
41
|
|
|
@@ -38,7 +43,7 @@ The bonus is still valid, but a previous redemption attempt failed
|
|
|
38
43
|
|
|
39
44
|
> **COUPON\_ISSUE\_FAILED**: `5`
|
|
40
45
|
|
|
41
|
-
|
|
46
|
+
Coupon issuance failed (internal).
|
|
42
47
|
|
|
43
48
|
***
|
|
44
49
|
|
|
@@ -46,4 +51,4 @@ Failed to issue the bonus (shouldn't be shown to the client)
|
|
|
46
51
|
|
|
47
52
|
> **EXPIRED**: `6`
|
|
48
53
|
|
|
49
|
-
|
|
54
|
+
Issued but expired before redemption (internal).
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Enumeration: JoinClanErrorCode
|
|
2
|
+
|
|
3
|
+
## Enumeration Members
|
|
4
|
+
|
|
5
|
+
### JOIN\_CLAN\_OK
|
|
6
|
+
|
|
7
|
+
> **JOIN\_CLAN\_OK**: `0`
|
|
8
|
+
|
|
9
|
+
No error, join completed
|
|
10
|
+
|
|
11
|
+
***
|
|
12
|
+
|
|
13
|
+
### JOIN\_CLAN\_INVALID\_PARAMETERS
|
|
14
|
+
|
|
15
|
+
> **JOIN\_CLAN\_INVALID\_PARAMETERS**: `1000`
|
|
16
|
+
|
|
17
|
+
Invalid parameters
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### JOIN\_CLAN\_NOT\_FOUND
|
|
22
|
+
|
|
23
|
+
> **JOIN\_CLAN\_NOT\_FOUND**: `1001`
|
|
24
|
+
|
|
25
|
+
clan_id doesn't exist for this label
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### JOIN\_CLAN\_FULL
|
|
30
|
+
|
|
31
|
+
> **JOIN\_CLAN\_FULL**: `1002`
|
|
32
|
+
|
|
33
|
+
members_count >= capacity_limit
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### JOIN\_CLAN\_INSUFFICIENT\_FUNDS
|
|
38
|
+
|
|
39
|
+
> **JOIN\_CLAN\_INSUFFICIENT\_FUNDS**: `1003`
|
|
40
|
+
|
|
41
|
+
Not enough Points / Gems / Diamonds for entry fee
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### JOIN\_CLAN\_SEGMENT\_MISMATCH
|
|
46
|
+
|
|
47
|
+
> **JOIN\_CLAN\_SEGMENT\_MISMATCH**: `1004`
|
|
48
|
+
|
|
49
|
+
User doesn't satisfy entry_conditions / entry_segment_id
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### JOIN\_CLAN\_USER\_IS\_NOT\_IN\_CLAN
|
|
54
|
+
|
|
55
|
+
> **JOIN\_CLAN\_USER\_IS\_NOT\_IN\_CLAN**: `1005`
|
|
56
|
+
|
|
57
|
+
User is not in a clan
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
### JOIN\_CLAN\_COOLDOWN\_ACTIVE
|
|
62
|
+
|
|
63
|
+
> **JOIN\_CLAN\_COOLDOWN\_ACTIVE**: `1006`
|
|
64
|
+
|
|
65
|
+
User is within the CLAN_COOLDOWN_DAYS window
|
|
66
|
+
|
|
67
|
+
***
|
|
68
|
+
|
|
69
|
+
### JOIN\_CLAN\_ARCHIVED
|
|
70
|
+
|
|
71
|
+
> **JOIN\_CLAN\_ARCHIVED**: `1007`
|
|
72
|
+
|
|
73
|
+
clan_status_id != 1 (clan is archived)
|
|
74
|
+
|
|
75
|
+
***
|
|
76
|
+
|
|
77
|
+
### JOIN\_CLAN\_JOINED\_AFTER\_TOURNAMENT\_START
|
|
78
|
+
|
|
79
|
+
> **JOIN\_CLAN\_JOINED\_AFTER\_TOURNAMENT\_START**: `1011`
|
|
80
|
+
|
|
81
|
+
Clan joined after tournament start
|
|
@@ -59,3 +59,15 @@
|
|
|
59
59
|
### TOURNAMENT\_MAX\_REGISTRATIONS\_REACHED
|
|
60
60
|
|
|
61
61
|
> **TOURNAMENT\_MAX\_REGISTRATIONS\_REACHED**: `30008`
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### TOURNAMENT\_REGISTRATION\_NOT\_ENOUGH\_GEMS
|
|
66
|
+
|
|
67
|
+
> **TOURNAMENT\_REGISTRATION\_NOT\_ENOUGH\_GEMS**: `30010`
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### TOURNAMENT\_REGISTRATION\_NOT\_ENOUGH\_DIAMONDS
|
|
72
|
+
|
|
73
|
+
> **TOURNAMENT\_REGISTRATION\_NOT\_ENOUGH\_DIAMONDS**: `30011`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Function: clanTournamentPlayersTransform()
|
|
2
|
+
|
|
3
|
+
> **clanTournamentPlayersTransform**(`response`): [`TClanTournamentPlayersResult`](../interfaces/TClanTournamentPlayersResult.md)
|
|
4
|
+
|
|
5
|
+
## Parameters
|
|
6
|
+
|
|
7
|
+
### response
|
|
8
|
+
|
|
9
|
+
[`GetClanTournamentPlayersResponse`](../interfaces/GetClanTournamentPlayersResponse.md)
|
|
10
|
+
|
|
11
|
+
## Returns
|
|
12
|
+
|
|
13
|
+
[`TClanTournamentPlayersResult`](../interfaces/TClanTournamentPlayersResult.md)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Interface: AvatarCustomized
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
### avatar\_real\_id
|
|
6
|
+
|
|
7
|
+
> **avatar\_real\_id**: `number`
|
|
8
|
+
|
|
9
|
+
The avatar real id that this customization belongs to
|
|
10
|
+
|
|
11
|
+
***
|
|
12
|
+
|
|
13
|
+
### url
|
|
14
|
+
|
|
15
|
+
> **url**: `string`
|
|
16
|
+
|
|
17
|
+
CDN URL of the AI-customized avatar image
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### dt\_created
|
|
22
|
+
|
|
23
|
+
> **dt\_created**: `string`
|
|
24
|
+
|
|
25
|
+
ISO date string when the customization was created
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Interface: AvatarDefinition
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
### avatar\_real\_id
|
|
6
|
+
|
|
7
|
+
> **avatar\_real\_id**: `number`
|
|
8
|
+
|
|
9
|
+
Unique identifier of the avatar
|
|
10
|
+
|
|
11
|
+
***
|
|
12
|
+
|
|
13
|
+
### is\_default
|
|
14
|
+
|
|
15
|
+
> **is\_default**: `boolean`
|
|
16
|
+
|
|
17
|
+
Whether this avatar is the default one
|
|
18
|
+
|
|
19
|
+
***
|
|
20
|
+
|
|
21
|
+
### hide\_until\_achieved
|
|
22
|
+
|
|
23
|
+
> **hide\_until\_achieved**: `boolean`
|
|
24
|
+
|
|
25
|
+
If true, avatar is hidden until user achieves/unlocks it
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### priority
|
|
30
|
+
|
|
31
|
+
> **priority**: `number`
|
|
32
|
+
|
|
33
|
+
Display priority — lower value means higher position
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### public\_meta
|
|
38
|
+
|
|
39
|
+
> **public\_meta**: `object`
|
|
40
|
+
|
|
41
|
+
Public metadata containing the avatar image URL and optional description
|
|
42
|
+
|
|
43
|
+
#### description?
|
|
44
|
+
|
|
45
|
+
> `optional` **description?**: `string`
|
|
46
|
+
|
|
47
|
+
Optional description of the avatar
|
|
48
|
+
|
|
49
|
+
#### url
|
|
50
|
+
|
|
51
|
+
> **url**: `string`
|
|
52
|
+
|
|
53
|
+
Image path/URL of the avatar
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### avatar\_source\_type\_id
|
|
58
|
+
|
|
59
|
+
> **avatar\_source\_type\_id**: `number`
|
|
60
|
+
|
|
61
|
+
Source type of the avatar.
|
|
62
|
+
0 = free (always available), other values = earned/purchased
|
|
63
|
+
|
|
64
|
+
***
|
|
65
|
+
|
|
66
|
+
### active\_from\_date?
|
|
67
|
+
|
|
68
|
+
> `optional` **active\_from\_date?**: `string`
|
|
69
|
+
|
|
70
|
+
ISO date string from which the avatar becomes available
|
|
71
|
+
|
|
72
|
+
***
|
|
73
|
+
|
|
74
|
+
### active\_till\_date?
|
|
75
|
+
|
|
76
|
+
> `optional` **active\_till\_date?**: `string`
|
|
77
|
+
|
|
78
|
+
ISO date string until which the avatar is available
|
|
79
|
+
|
|
80
|
+
***
|
|
81
|
+
|
|
82
|
+
### is\_given
|
|
83
|
+
|
|
84
|
+
> **is\_given**: `boolean`
|
|
85
|
+
|
|
86
|
+
Whether the avatar has been granted/given to the current user
|
|
87
|
+
|
|
88
|
+
***
|
|
89
|
+
|
|
90
|
+
### is\_in\_use?
|
|
91
|
+
|
|
92
|
+
> `optional` **is\_in\_use?**: `boolean`
|
|
93
|
+
|
|
94
|
+
Whether this avatar is currently in use by the user
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Interface: AvatarPrompt
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
### prompt\_id
|
|
6
|
+
|
|
7
|
+
> **prompt\_id**: `number`
|
|
8
|
+
|
|
9
|
+
Unique identifier of the AI customization prompt
|
|
10
|
+
|
|
11
|
+
***
|
|
12
|
+
|
|
13
|
+
### public\_meta
|
|
14
|
+
|
|
15
|
+
> **public\_meta**: `object`
|
|
16
|
+
|
|
17
|
+
Public metadata for the prompt
|
|
18
|
+
|
|
19
|
+
#### name
|
|
20
|
+
|
|
21
|
+
> **name**: `string`
|
|
22
|
+
|
|
23
|
+
Display name of the prompt style (e.g. "Cartoon", "Watercolor")
|
|
24
|
+
|
|
25
|
+
#### icon\_url
|
|
26
|
+
|
|
27
|
+
> **icon\_url**: `string`
|
|
28
|
+
|
|
29
|
+
URL of the prompt style icon image
|
|
30
|
+
|
|
31
|
+
***
|
|
32
|
+
|
|
33
|
+
### cost\_currency\_type\_id
|
|
34
|
+
|
|
35
|
+
> **cost\_currency\_type\_id**: `number`
|
|
36
|
+
|
|
37
|
+
Currency type used to pay for this customization (0=points, 1=gems, 2=diamonds)
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### cost\_value
|
|
42
|
+
|
|
43
|
+
> **cost\_value**: `number`
|
|
44
|
+
|
|
45
|
+
Cost amount in the given currency
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# Interface: BonusMetaMap
|
|
2
2
|
|
|
3
|
+
Instance-level bonus display metadata (set per-issuance, may carry
|
|
4
|
+
a dynamically-computed amount).
|
|
5
|
+
|
|
3
6
|
## Properties
|
|
4
7
|
|
|
5
8
|
### uiAmount?
|
|
6
9
|
|
|
7
10
|
> `optional` **uiAmount?**: `string`
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
Display-ready amount string (e.g. "€50", "100 free spins").
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
# Interface: BonusTemplateMetaMap
|
|
2
2
|
|
|
3
|
+
Template-level bonus display metadata (operator-configured at the
|
|
4
|
+
bonus template; identical for every bonus issued from the same template).
|
|
5
|
+
|
|
3
6
|
## Properties
|
|
4
7
|
|
|
5
8
|
### description
|
|
6
9
|
|
|
7
10
|
> **description**: `string`
|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
Operator-set description / display text. May include HTML.
|
|
10
13
|
|
|
11
14
|
***
|
|
12
15
|
|
|
@@ -14,7 +17,8 @@ Description of the bonus template
|
|
|
14
17
|
|
|
15
18
|
> **acknowledge**: `string`
|
|
16
19
|
|
|
17
|
-
|
|
20
|
+
Operator-set additional message shown to the player at claim
|
|
21
|
+
time (e.g. wagering terms). May include deep-links.
|
|
18
22
|
|
|
19
23
|
***
|
|
20
24
|
|
|
@@ -22,7 +26,7 @@ Acknowledge message setup in the bonus template
|
|
|
22
26
|
|
|
23
27
|
> **image\_url**: `string`
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
Bonus icon URL (1:1 aspect ratio recommended).
|
|
26
30
|
|
|
27
31
|
***
|
|
28
32
|
|
|
@@ -30,4 +34,5 @@ Image URL of the bonus template, 1:1 aspect ratio
|
|
|
30
34
|
|
|
31
35
|
> `optional` **redirect\_url?**: `string`
|
|
32
36
|
|
|
33
|
-
|
|
37
|
+
Optional redirect — external HTTP URL (opens in new tab) or
|
|
38
|
+
internal deep-link (handled by the SDK's deep-link router).
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Interface: ClanInfo
|
|
2
|
+
|
|
3
|
+
## Extends
|
|
4
|
+
|
|
5
|
+
- [`Clan`](Clan.md)
|
|
6
|
+
|
|
7
|
+
## Properties
|
|
8
|
+
|
|
9
|
+
### clan\_id
|
|
10
|
+
|
|
11
|
+
> **clan\_id**: `number`
|
|
12
|
+
|
|
13
|
+
#### Inherited from
|
|
14
|
+
|
|
15
|
+
[`Clan`](Clan.md).[`clan_id`](Clan.md#clan_id)
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
19
|
+
### public\_meta
|
|
20
|
+
|
|
21
|
+
> **public\_meta**: [`ClanPublicMeta`](ClanPublicMeta.md)
|
|
22
|
+
|
|
23
|
+
#### Inherited from
|
|
24
|
+
|
|
25
|
+
[`Clan`](Clan.md).[`public_meta`](Clan.md#public_meta)
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### member\_count
|
|
30
|
+
|
|
31
|
+
> **member\_count**: `number`
|
|
32
|
+
|
|
33
|
+
#### Inherited from
|
|
34
|
+
|
|
35
|
+
[`Clan`](Clan.md).[`member_count`](Clan.md#member_count)
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### capacity\_limit
|
|
40
|
+
|
|
41
|
+
> **capacity\_limit**: `number`
|
|
42
|
+
|
|
43
|
+
#### Inherited from
|
|
44
|
+
|
|
45
|
+
[`Clan`](Clan.md).[`capacity_limit`](Clan.md#capacity_limit)
|
|
46
|
+
|
|
47
|
+
***
|
|
48
|
+
|
|
49
|
+
### entry\_fee\_currency\_type\_id
|
|
50
|
+
|
|
51
|
+
> **entry\_fee\_currency\_type\_id**: `number`
|
|
52
|
+
|
|
53
|
+
ShopPurchaseType: 0=Points, 1=Gems, 2=Diamonds, 3=Free
|
|
54
|
+
|
|
55
|
+
#### Inherited from
|
|
56
|
+
|
|
57
|
+
[`Clan`](Clan.md).[`entry_fee_currency_type_id`](Clan.md#entry_fee_currency_type_id)
|
|
58
|
+
|
|
59
|
+
***
|
|
60
|
+
|
|
61
|
+
### entry\_fee\_amount
|
|
62
|
+
|
|
63
|
+
> **entry\_fee\_amount**: `number`
|
|
64
|
+
|
|
65
|
+
#### Inherited from
|
|
66
|
+
|
|
67
|
+
[`Clan`](Clan.md).[`entry_fee_amount`](Clan.md#entry_fee_amount)
|
|
68
|
+
|
|
69
|
+
***
|
|
70
|
+
|
|
71
|
+
### rating\_position
|
|
72
|
+
|
|
73
|
+
> **rating\_position**: `number`
|
|
74
|
+
|
|
75
|
+
F1 rank ASC, 1=best
|
|
76
|
+
|
|
77
|
+
#### Inherited from
|
|
78
|
+
|
|
79
|
+
[`Clan`](Clan.md).[`rating_position`](Clan.md#rating_position)
|
|
80
|
+
|
|
81
|
+
***
|
|
82
|
+
|
|
83
|
+
### rating\_score
|
|
84
|
+
|
|
85
|
+
> **rating\_score**: `number`
|
|
86
|
+
|
|
87
|
+
#### Inherited from
|
|
88
|
+
|
|
89
|
+
[`Clan`](Clan.md).[`rating_score`](Clan.md#rating_score)
|
|
90
|
+
|
|
91
|
+
***
|
|
92
|
+
|
|
93
|
+
### label\_id
|
|
94
|
+
|
|
95
|
+
> **label\_id**: `number`
|
|
96
|
+
|
|
97
|
+
***
|
|
98
|
+
|
|
99
|
+
### members
|
|
100
|
+
|
|
101
|
+
> **members**: [`ClanMember`](ClanMember.md)[]
|
|
102
|
+
|
|
103
|
+
***
|
|
104
|
+
|
|
105
|
+
### cooldown\_until
|
|
106
|
+
|
|
107
|
+
> **cooldown\_until**: `string`
|
|
108
|
+
|
|
109
|
+
Cooldown until date string; null if no cooldown active
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Interface: ClanMember
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
### user\_id
|
|
6
|
+
|
|
7
|
+
> **user\_id**: `number`
|
|
8
|
+
|
|
9
|
+
***
|
|
10
|
+
|
|
11
|
+
### public\_username
|
|
12
|
+
|
|
13
|
+
> **public\_username**: `string`
|
|
14
|
+
|
|
15
|
+
***
|
|
16
|
+
|
|
17
|
+
### avatar\_id
|
|
18
|
+
|
|
19
|
+
> **avatar\_id**: `string`
|
|
20
|
+
|
|
21
|
+
***
|
|
22
|
+
|
|
23
|
+
### avatar\_real\_id
|
|
24
|
+
|
|
25
|
+
> **avatar\_real\_id**: `number`
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### position
|
|
30
|
+
|
|
31
|
+
> **position**: `number`
|
|
32
|
+
|
|
33
|
+
Rank within clan
|
|
34
|
+
|
|
35
|
+
***
|
|
36
|
+
|
|
37
|
+
### contribution\_score
|
|
38
|
+
|
|
39
|
+
> **contribution\_score**: `number`
|
|
40
|
+
|
|
41
|
+
Aggregated tournament contribution
|
|
42
|
+
|
|
43
|
+
***
|
|
44
|
+
|
|
45
|
+
### is\_me?
|
|
46
|
+
|
|
47
|
+
> `optional` **is\_me?**: `boolean`
|
|
48
|
+
|
|
49
|
+
***
|
|
50
|
+
|
|
51
|
+
### clean\_ext\_user\_id?
|
|
52
|
+
|
|
53
|
+
> `optional` **clean\_ext\_user\_id?**: `string`
|