@smartico/public-api 0.0.362 → 0.0.363
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/dist/Avatars/GetAvatarPromptsResponse.d.ts +2 -0
- package/dist/Avatars/GetAvatarsCustomizedResponse.d.ts +2 -0
- package/dist/Avatars/GetAvatarsListResponse.d.ts +2 -0
- package/dist/SmarticoAPI.d.ts +8 -2
- package/dist/WSAPI/WSAPI.d.ts +2 -2
- package/dist/WSAPI/WSAPITypes.d.ts +14 -18
- package/dist/index.js +111 -57
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +56 -26
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/Avatars/GetAvatarPromptsResponse.ts +11 -0
- package/src/Avatars/GetAvatarsCustomizedResponse.ts +9 -0
- package/src/Avatars/GetAvatarsListResponse.ts +18 -0
- package/src/SmarticoAPI.ts +19 -1
- package/src/WSAPI/WSAPI.ts +5 -19
- package/src/WSAPI/WSAPITypes.ts +14 -18
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { TAvatarPrompt } from '../WSAPI/WSAPITypes';
|
|
1
2
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
3
|
import { AvatarPrompt } from './AvatarPrompt';
|
|
3
4
|
export interface GetAvatarPromptsResponse extends ProtocolResponse {
|
|
4
5
|
prompts: AvatarPrompt[];
|
|
5
6
|
}
|
|
7
|
+
export declare const avatarPromptTransform: (items: AvatarPrompt[], avatarDomain: string) => TAvatarPrompt[];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { TAvatarCustomized } from '../WSAPI/WSAPITypes';
|
|
1
2
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
3
|
import { AvatarCustomized } from './AvatarCustomized';
|
|
3
4
|
export interface GetAvatarsCustomizedResponse extends ProtocolResponse {
|
|
4
5
|
avatars: AvatarCustomized[];
|
|
5
6
|
}
|
|
7
|
+
export declare const avatarCustomizedTransform: (items: AvatarCustomized[], avatarDomain: string) => TAvatarCustomized[];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { TAvatarDefinition } from '../WSAPI/WSAPITypes';
|
|
1
2
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
3
|
import { AvatarDefinition } from './AvatarDefinition';
|
|
3
4
|
export interface GetAvatarsListResponse extends ProtocolResponse {
|
|
4
5
|
avatars: AvatarDefinition[];
|
|
5
6
|
}
|
|
7
|
+
export declare const avatarDefinitionTransform: (items: AvatarDefinition[], avatarDomain: string) => TAvatarDefinition[];
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { GetTournamentInfoResponse, GetTournamentsResponse, TournamentRegisterRe
|
|
|
11
11
|
import { LeaderBoardDetails, LeaderBoardPeriodType } from './Leaderboard';
|
|
12
12
|
import { GetLevelMapResponse } from './Level';
|
|
13
13
|
import { WSAPI } from './WSAPI/WSAPI';
|
|
14
|
-
import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult, TUICustomSection, TBonus, TRaffle, TLevelCurrent, TActivityLog, TRaffleDraw } from './WSAPI/WSAPITypes';
|
|
14
|
+
import { TInboxMessage, TInboxMessageBody, TLevel, TMiniGameTemplate, TMissionOrBadge, TStoreCategory, TAchCategory, TStoreItem, TTournament, TTournamentDetailed, LeaderBoardDetailsT, UserLevelExtraCountersT, TSegmentCheckResult, TUICustomSection, TBonus, TRaffle, TLevelCurrent, TActivityLog, TRaffleDraw, TAvatarDefinition, TAvatarCustomized, TAvatarPrompt } from './WSAPI/WSAPITypes';
|
|
15
15
|
import { GetAchievementsUserInfoResponse } from './Core/GetAchievementsUserInfoResponse';
|
|
16
16
|
import { GetJackpotsPotsResponse, GetJackpotsResponse, JackpotsOptinResponse, JackpotsOptoutResponse } from './Jackpots';
|
|
17
17
|
import { GetCustomSectionsResponse } from './CustomSections';
|
|
@@ -23,7 +23,10 @@ import { GetRafflesResponse } from './Raffle/GetRafflesResponse';
|
|
|
23
23
|
import { GetActivityLogResponse } from './ActivityLog';
|
|
24
24
|
import { InboxCategories } from './Inbox/InboxCategories';
|
|
25
25
|
import { GetDrawRunResponse, GetRaffleDrawRunsHistoryResponse, RaffleClaimPrizeResponse, RaffleOptinResponse } from './Raffle';
|
|
26
|
-
import { GetAvatarsListResponse
|
|
26
|
+
import { GetAvatarsListResponse } from './Avatars/GetAvatarsListResponse';
|
|
27
|
+
import { GetAvatarsCustomizedResponse } from './Avatars/GetAvatarsCustomizedResponse';
|
|
28
|
+
import { GetAvatarPromptsResponse } from './Avatars/GetAvatarPromptsResponse';
|
|
29
|
+
import { SetAvatarResponse } from './Avatars';
|
|
27
30
|
import { GetJackpotWinnersResponse, JackpotWinnerHistory } from './Jackpots/GetJackpotWinnersResponse';
|
|
28
31
|
import { GetJackpotEligibleGamesResponse, TGetJackpotEligibleGamesResponse } from './Jackpots/GetJackpotEligibleGamesResponse';
|
|
29
32
|
import { GamesApiResponse, GamePickRound, GamePickRoundBoard, GamePickUserInfo, GamePickGameInfo } from './WSAPI/WSAPITypes';
|
|
@@ -178,6 +181,9 @@ declare class SmarticoAPI {
|
|
|
178
181
|
avatarsGetCustomized(user_ext_id: string): Promise<GetAvatarsCustomizedResponse>;
|
|
179
182
|
avatarsGetPrompts(user_ext_id: string): Promise<GetAvatarPromptsResponse>;
|
|
180
183
|
avatarSetAvatar(user_ext_id: string, avatar_id: string, avatar_real_id: number): Promise<SetAvatarResponse>;
|
|
184
|
+
avatarsGetListT(user_ext_id: string): Promise<TAvatarDefinition[]>;
|
|
185
|
+
avatarsGetCustomizedT(user_ext_id: string): Promise<TAvatarCustomized[]>;
|
|
186
|
+
avatarsGetPromptsT(user_ext_id: string): Promise<TAvatarPrompt[]>;
|
|
181
187
|
getWSCalls(): WSAPI;
|
|
182
188
|
getRelatedItemsForGame(user_ext_id: string, related_game_id: string): Promise<GetRelatedAchTourResponse>;
|
|
183
189
|
getRafflesT(user_ext_id: string): Promise<TRaffle[]>;
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -934,7 +934,7 @@ export declare class WSAPI {
|
|
|
934
934
|
getAvatarPrompts(): Promise<TAvatarPrompt[]>;
|
|
935
935
|
/**
|
|
936
936
|
* Sets the specified avatar as the active avatar for the current user.
|
|
937
|
-
* Pass `avatar_url` (the
|
|
937
|
+
* Pass `avatar_url` (the `TAvatarDefinition.url` path or a CDN URL for AI-customized avatars)
|
|
938
938
|
* and `avatar_real_id` from the avatar catalog.
|
|
939
939
|
* After a successful call, the avatar list cache is cleared so the next `getAvatarsList()` call reflects `is_in_use`.
|
|
940
940
|
*
|
|
@@ -944,7 +944,7 @@ export declare class WSAPI {
|
|
|
944
944
|
* const avatar = avatars.find((a) => !a.hide_until_achieved || a.is_given);
|
|
945
945
|
* if (avatar) {
|
|
946
946
|
* _smartico.api.setAvatar({
|
|
947
|
-
* avatar_url: avatar.
|
|
947
|
+
* avatar_url: avatar.url,
|
|
948
948
|
* avatar_real_id: avatar.avatar_real_id,
|
|
949
949
|
* }).then((result) => {
|
|
950
950
|
* console.log(result);
|
|
@@ -1753,7 +1753,8 @@ export interface GamePickRoundRequestParams extends GamePickRequestParams {
|
|
|
1753
1753
|
round_id: number;
|
|
1754
1754
|
}
|
|
1755
1755
|
/**
|
|
1756
|
-
* TAvatarDefinition describes a single avatar available in the avatar catalog
|
|
1756
|
+
* TAvatarDefinition describes a single avatar available in the avatar catalog.
|
|
1757
|
+
* Fields from the raw `public_meta` object are flattened to the top level.
|
|
1757
1758
|
*/
|
|
1758
1759
|
export interface TAvatarDefinition {
|
|
1759
1760
|
/** Unique identifier of the avatar */
|
|
@@ -1764,13 +1765,12 @@ export interface TAvatarDefinition {
|
|
|
1764
1765
|
hide_until_achieved: boolean;
|
|
1765
1766
|
/** Display priority — lower value means higher position in the grid */
|
|
1766
1767
|
priority: number;
|
|
1767
|
-
/**
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
};
|
|
1768
|
+
/** Optional description of the avatar (from public_meta) */
|
|
1769
|
+
description?: string;
|
|
1770
|
+
/** Raw image path/URL of the avatar as returned by the server (from public_meta) */
|
|
1771
|
+
url: string;
|
|
1772
|
+
/** Full CDN URL of the avatar image, built from avatar_domain + url */
|
|
1773
|
+
avatar_url: string;
|
|
1774
1774
|
/**
|
|
1775
1775
|
* Source type of the avatar.
|
|
1776
1776
|
* 0 = free (always available to all users), other values = earned/purchased
|
|
@@ -1784,8 +1784,6 @@ export interface TAvatarDefinition {
|
|
|
1784
1784
|
is_given: boolean;
|
|
1785
1785
|
/** Whether this avatar is currently in use by the user */
|
|
1786
1786
|
is_in_use?: boolean;
|
|
1787
|
-
/** Full CDN URL of the avatar image, built from avatar_domain + public_meta.url */
|
|
1788
|
-
avatar_url: string;
|
|
1789
1787
|
}
|
|
1790
1788
|
/**
|
|
1791
1789
|
* TAvatarCustomized describes an AI-customized version of a base avatar
|
|
@@ -1799,18 +1797,16 @@ export interface TAvatarCustomized {
|
|
|
1799
1797
|
dt_created: string;
|
|
1800
1798
|
}
|
|
1801
1799
|
/**
|
|
1802
|
-
* TAvatarPrompt describes an AI style prompt available for avatar customization
|
|
1800
|
+
* TAvatarPrompt describes an AI style prompt available for avatar customization.
|
|
1801
|
+
* Fields from the raw `public_meta` object are flattened to the top level.
|
|
1803
1802
|
*/
|
|
1804
1803
|
export interface TAvatarPrompt {
|
|
1805
1804
|
/** Unique identifier of the AI customization prompt */
|
|
1806
1805
|
prompt_id: number;
|
|
1807
|
-
/**
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
/** URL of the prompt style icon image */
|
|
1812
|
-
icon_url: string;
|
|
1813
|
-
};
|
|
1806
|
+
/** Display name of the prompt style, e.g. "Cartoon", "Watercolor" (from public_meta) */
|
|
1807
|
+
name: string;
|
|
1808
|
+
/** Full CDN URL of the prompt style icon image (from public_meta) */
|
|
1809
|
+
icon_url: string;
|
|
1814
1810
|
/** Currency type used to pay for this customization (0=points, 1=gems, 2=diamonds) */
|
|
1815
1811
|
cost_currency_type_id: number;
|
|
1816
1812
|
/** Cost amount in the given currency */
|
package/dist/index.js
CHANGED
|
@@ -3784,18 +3784,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3784
3784
|
try {
|
|
3785
3785
|
var _this45 = this;
|
|
3786
3786
|
return Promise.resolve(OCache.use(onUpdateContextKey.AvatarsList, exports.ECacheContext.WSAPI, function () {
|
|
3787
|
-
|
|
3788
|
-
return Promise.resolve(_this45.api.avatarsGetList(_this45.userExtId)).then(function (response) {
|
|
3789
|
-
return (response.avatars || []).map(function (a) {
|
|
3790
|
-
var _a$public_meta, _a$public_meta2;
|
|
3791
|
-
return _extends({}, a, {
|
|
3792
|
-
avatar_url: _this45.api.avatarDomain && (_a$public_meta = a.public_meta) != null && _a$public_meta.url ? a.public_meta.url.startsWith('http') ? a.public_meta.url : "" + _this45.api.avatarDomain + a.public_meta.url : ((_a$public_meta2 = a.public_meta) == null ? void 0 : _a$public_meta2.url) || ''
|
|
3793
|
-
});
|
|
3794
|
-
});
|
|
3795
|
-
});
|
|
3796
|
-
} catch (e) {
|
|
3797
|
-
return Promise.reject(e);
|
|
3798
|
-
}
|
|
3787
|
+
return _this45.api.avatarsGetListT(_this45.userExtId);
|
|
3799
3788
|
}, CACHE_DATA_SEC));
|
|
3800
3789
|
} catch (e) {
|
|
3801
3790
|
return Promise.reject(e);
|
|
@@ -3820,13 +3809,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3820
3809
|
try {
|
|
3821
3810
|
var _this46 = this;
|
|
3822
3811
|
return Promise.resolve(OCache.use(onUpdateContextKey.AvatarsCustomized, exports.ECacheContext.WSAPI, function () {
|
|
3823
|
-
|
|
3824
|
-
return Promise.resolve(_this46.api.avatarsGetCustomized(_this46.userExtId)).then(function (response) {
|
|
3825
|
-
return response.avatars || [];
|
|
3826
|
-
});
|
|
3827
|
-
} catch (e) {
|
|
3828
|
-
return Promise.reject(e);
|
|
3829
|
-
}
|
|
3812
|
+
return _this46.api.avatarsGetCustomizedT(_this46.userExtId);
|
|
3830
3813
|
}, CACHE_DATA_SEC));
|
|
3831
3814
|
} catch (e) {
|
|
3832
3815
|
return Promise.reject(e);
|
|
@@ -3851,13 +3834,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3851
3834
|
try {
|
|
3852
3835
|
var _this47 = this;
|
|
3853
3836
|
return Promise.resolve(OCache.use(onUpdateContextKey.AvatarPrompts, exports.ECacheContext.WSAPI, function () {
|
|
3854
|
-
|
|
3855
|
-
return Promise.resolve(_this47.api.avatarsGetPrompts(_this47.userExtId)).then(function (response) {
|
|
3856
|
-
return response.prompts || [];
|
|
3857
|
-
});
|
|
3858
|
-
} catch (e) {
|
|
3859
|
-
return Promise.reject(e);
|
|
3860
|
-
}
|
|
3837
|
+
return _this47.api.avatarsGetPromptsT(_this47.userExtId);
|
|
3861
3838
|
}, CACHE_DATA_SEC));
|
|
3862
3839
|
} catch (e) {
|
|
3863
3840
|
return Promise.reject(e);
|
|
@@ -3865,7 +3842,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3865
3842
|
}
|
|
3866
3843
|
/**
|
|
3867
3844
|
* Sets the specified avatar as the active avatar for the current user.
|
|
3868
|
-
* Pass `avatar_url` (the
|
|
3845
|
+
* Pass `avatar_url` (the `TAvatarDefinition.url` path or a CDN URL for AI-customized avatars)
|
|
3869
3846
|
* and `avatar_real_id` from the avatar catalog.
|
|
3870
3847
|
* After a successful call, the avatar list cache is cleared so the next `getAvatarsList()` call reflects `is_in_use`.
|
|
3871
3848
|
*
|
|
@@ -3875,7 +3852,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
3875
3852
|
* const avatar = avatars.find((a) => !a.hide_until_achieved || a.is_given);
|
|
3876
3853
|
* if (avatar) {
|
|
3877
3854
|
* _smartico.api.setAvatar({
|
|
3878
|
-
* avatar_url: avatar.
|
|
3855
|
+
* avatar_url: avatar.url,
|
|
3879
3856
|
* avatar_real_id: avatar.avatar_real_id,
|
|
3880
3857
|
* }).then((result) => {
|
|
3881
3858
|
* console.log(result);
|
|
@@ -4623,6 +4600,47 @@ exports.PointChangeSourceType = void 0;
|
|
|
4623
4600
|
PointChangeSourceType[PointChangeSourceType["Avatars"] = 22] = "Avatars";
|
|
4624
4601
|
})(exports.PointChangeSourceType || (exports.PointChangeSourceType = {}));
|
|
4625
4602
|
|
|
4603
|
+
var avatarDefinitionTransform = function avatarDefinitionTransform(items, avatarDomain) {
|
|
4604
|
+
return items.map(function (item) {
|
|
4605
|
+
return {
|
|
4606
|
+
avatar_real_id: item.avatar_real_id,
|
|
4607
|
+
is_default: item.is_default,
|
|
4608
|
+
hide_until_achieved: item.hide_until_achieved,
|
|
4609
|
+
priority: item.priority,
|
|
4610
|
+
description: item.public_meta.description,
|
|
4611
|
+
url: item.public_meta.url,
|
|
4612
|
+
avatar_url: item.public_meta.url && !item.public_meta.url.startsWith('http') ? "" + avatarDomain + item.public_meta.url : item.public_meta.url,
|
|
4613
|
+
avatar_source_type_id: item.avatar_source_type_id,
|
|
4614
|
+
active_from_date: item.active_from_date,
|
|
4615
|
+
active_till_date: item.active_till_date,
|
|
4616
|
+
is_given: item.is_given,
|
|
4617
|
+
is_in_use: item.is_in_use
|
|
4618
|
+
};
|
|
4619
|
+
});
|
|
4620
|
+
};
|
|
4621
|
+
|
|
4622
|
+
var avatarCustomizedTransform = function avatarCustomizedTransform(items, avatarDomain) {
|
|
4623
|
+
return items.map(function (item) {
|
|
4624
|
+
return {
|
|
4625
|
+
avatar_real_id: item.avatar_real_id,
|
|
4626
|
+
url: item.url && !item.url.startsWith('http') ? "" + avatarDomain + item.url : item.url,
|
|
4627
|
+
dt_created: item.dt_created
|
|
4628
|
+
};
|
|
4629
|
+
});
|
|
4630
|
+
};
|
|
4631
|
+
|
|
4632
|
+
var avatarPromptTransform = function avatarPromptTransform(items, avatarDomain) {
|
|
4633
|
+
return items.map(function (item) {
|
|
4634
|
+
return {
|
|
4635
|
+
prompt_id: item.prompt_id,
|
|
4636
|
+
name: item.public_meta.name,
|
|
4637
|
+
icon_url: item.public_meta.icon_url && !item.public_meta.icon_url.startsWith('http') ? "" + avatarDomain + item.public_meta.icon_url : item.public_meta.icon_url,
|
|
4638
|
+
cost_currency_type_id: item.cost_currency_type_id,
|
|
4639
|
+
cost_value: item.cost_value
|
|
4640
|
+
};
|
|
4641
|
+
});
|
|
4642
|
+
};
|
|
4643
|
+
|
|
4626
4644
|
/**
|
|
4627
4645
|
* @ignore
|
|
4628
4646
|
*/
|
|
@@ -6108,25 +6126,58 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6108
6126
|
return Promise.reject(e);
|
|
6109
6127
|
}
|
|
6110
6128
|
};
|
|
6129
|
+
_proto.avatarsGetListT = function avatarsGetListT(user_ext_id) {
|
|
6130
|
+
try {
|
|
6131
|
+
var _this80 = this;
|
|
6132
|
+
return Promise.resolve(_this80.avatarsGetList(user_ext_id)).then(function (_this80$avatarsGetLis) {
|
|
6133
|
+
var _this80$avatarsGetLis2;
|
|
6134
|
+
return avatarDefinitionTransform((_this80$avatarsGetLis2 = _this80$avatarsGetLis.avatars) != null ? _this80$avatarsGetLis2 : [], _this80.avatarDomain);
|
|
6135
|
+
});
|
|
6136
|
+
} catch (e) {
|
|
6137
|
+
return Promise.reject(e);
|
|
6138
|
+
}
|
|
6139
|
+
};
|
|
6140
|
+
_proto.avatarsGetCustomizedT = function avatarsGetCustomizedT(user_ext_id) {
|
|
6141
|
+
try {
|
|
6142
|
+
var _this81 = this;
|
|
6143
|
+
return Promise.resolve(_this81.avatarsGetCustomized(user_ext_id)).then(function (_this81$avatarsGetCus) {
|
|
6144
|
+
var _this81$avatarsGetCus2;
|
|
6145
|
+
return avatarCustomizedTransform((_this81$avatarsGetCus2 = _this81$avatarsGetCus.avatars) != null ? _this81$avatarsGetCus2 : [], _this81.avatarDomain);
|
|
6146
|
+
});
|
|
6147
|
+
} catch (e) {
|
|
6148
|
+
return Promise.reject(e);
|
|
6149
|
+
}
|
|
6150
|
+
};
|
|
6151
|
+
_proto.avatarsGetPromptsT = function avatarsGetPromptsT(user_ext_id) {
|
|
6152
|
+
try {
|
|
6153
|
+
var _this82 = this;
|
|
6154
|
+
return Promise.resolve(_this82.avatarsGetPrompts(user_ext_id)).then(function (_this82$avatarsGetPro) {
|
|
6155
|
+
var _this82$avatarsGetPro2;
|
|
6156
|
+
return avatarPromptTransform((_this82$avatarsGetPro2 = _this82$avatarsGetPro.prompts) != null ? _this82$avatarsGetPro2 : [], _this82.avatarDomain);
|
|
6157
|
+
});
|
|
6158
|
+
} catch (e) {
|
|
6159
|
+
return Promise.reject(e);
|
|
6160
|
+
}
|
|
6161
|
+
};
|
|
6111
6162
|
_proto.getWSCalls = function getWSCalls() {
|
|
6112
6163
|
return new WSAPI(this);
|
|
6113
6164
|
};
|
|
6114
6165
|
_proto.getRelatedItemsForGame = function getRelatedItemsForGame(user_ext_id, related_game_id) {
|
|
6115
6166
|
try {
|
|
6116
|
-
var
|
|
6117
|
-
var message =
|
|
6167
|
+
var _this83 = this;
|
|
6168
|
+
var message = _this83.buildMessage(user_ext_id, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST, {
|
|
6118
6169
|
related_game_id: related_game_id
|
|
6119
6170
|
});
|
|
6120
|
-
return Promise.resolve(
|
|
6171
|
+
return Promise.resolve(_this83.send(message, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE));
|
|
6121
6172
|
} catch (e) {
|
|
6122
6173
|
return Promise.reject(e);
|
|
6123
6174
|
}
|
|
6124
6175
|
};
|
|
6125
6176
|
_proto.getRafflesT = function getRafflesT(user_ext_id) {
|
|
6126
6177
|
try {
|
|
6127
|
-
var
|
|
6128
|
-
return Promise.resolve(
|
|
6129
|
-
return raffleTransform(
|
|
6178
|
+
var _this84 = this;
|
|
6179
|
+
return Promise.resolve(_this84.getRaffles(user_ext_id)).then(function (_this84$getRaffles) {
|
|
6180
|
+
return raffleTransform(_this84$getRaffles.items);
|
|
6130
6181
|
});
|
|
6131
6182
|
} catch (e) {
|
|
6132
6183
|
return Promise.reject(e);
|
|
@@ -6134,18 +6185,18 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6134
6185
|
};
|
|
6135
6186
|
_proto.getRaffles = function getRaffles(user_ext_id) {
|
|
6136
6187
|
try {
|
|
6137
|
-
var
|
|
6138
|
-
var message =
|
|
6139
|
-
return Promise.resolve(
|
|
6188
|
+
var _this85 = this;
|
|
6189
|
+
var message = _this85.buildMessage(user_ext_id, exports.ClassId.RAF_GET_RAFFLES_REQUEST);
|
|
6190
|
+
return Promise.resolve(_this85.send(message, exports.ClassId.RAF_GET_RAFFLES_RESPONSE));
|
|
6140
6191
|
} catch (e) {
|
|
6141
6192
|
return Promise.reject(e);
|
|
6142
6193
|
}
|
|
6143
6194
|
};
|
|
6144
6195
|
_proto.getRaffleDrawRun = function getRaffleDrawRun(user_ext_id, payload) {
|
|
6145
6196
|
try {
|
|
6146
|
-
var
|
|
6147
|
-
var message =
|
|
6148
|
-
return Promise.resolve(
|
|
6197
|
+
var _this86 = this;
|
|
6198
|
+
var message = _this86.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_RUN_REQUEST, payload);
|
|
6199
|
+
return Promise.resolve(_this86.send(message, exports.ClassId.RAF_GET_DRAW_RUN_RESPONSE));
|
|
6149
6200
|
} catch (e) {
|
|
6150
6201
|
return Promise.reject(e);
|
|
6151
6202
|
}
|
|
@@ -6158,10 +6209,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6158
6209
|
winners_to = 20;
|
|
6159
6210
|
}
|
|
6160
6211
|
try {
|
|
6161
|
-
var
|
|
6212
|
+
var _this87 = this;
|
|
6162
6213
|
var winners_limit = winners_to - winners_from > 50 ? 50 : winners_to - winners_from;
|
|
6163
6214
|
var winners_offset = winners_from;
|
|
6164
|
-
return Promise.resolve(
|
|
6215
|
+
return Promise.resolve(_this87.getRaffleDrawRun(user_ext_id, {
|
|
6165
6216
|
raffle_id: raffle_id,
|
|
6166
6217
|
run_id: run_id,
|
|
6167
6218
|
winners_limit: winners_limit,
|
|
@@ -6173,41 +6224,41 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6173
6224
|
};
|
|
6174
6225
|
_proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(user_ext_id, props) {
|
|
6175
6226
|
try {
|
|
6176
|
-
var
|
|
6177
|
-
var message =
|
|
6178
|
-
return Promise.resolve(
|
|
6227
|
+
var _this88 = this;
|
|
6228
|
+
var message = _this88.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_HISTORY_REQUEST, props);
|
|
6229
|
+
return Promise.resolve(_this88.send(message, exports.ClassId.RAF_GET_DRAW_HISTORY_RESPONSE));
|
|
6179
6230
|
} catch (e) {
|
|
6180
6231
|
return Promise.reject(e);
|
|
6181
6232
|
}
|
|
6182
6233
|
};
|
|
6183
6234
|
_proto.claimRafflePrize = function claimRafflePrize(user_ext_id, props) {
|
|
6184
6235
|
try {
|
|
6185
|
-
var
|
|
6186
|
-
var message =
|
|
6187
|
-
return Promise.resolve(
|
|
6236
|
+
var _this89 = this;
|
|
6237
|
+
var message = _this89.buildMessage(user_ext_id, exports.ClassId.RAF_CLAIM_PRIZE_REQUEST, props);
|
|
6238
|
+
return Promise.resolve(_this89.send(message, exports.ClassId.RAF_CLAIM_PRIZE_RESPONSE));
|
|
6188
6239
|
} catch (e) {
|
|
6189
6240
|
return Promise.reject(e);
|
|
6190
6241
|
}
|
|
6191
6242
|
};
|
|
6192
6243
|
_proto.raffleOptin = function raffleOptin(user_ext_id, props) {
|
|
6193
6244
|
try {
|
|
6194
|
-
var
|
|
6195
|
-
var message =
|
|
6196
|
-
return Promise.resolve(
|
|
6245
|
+
var _this90 = this;
|
|
6246
|
+
var message = _this90.buildMessage(user_ext_id, exports.ClassId.RAF_OPTIN_REQUEST, props);
|
|
6247
|
+
return Promise.resolve(_this90.send(message, exports.ClassId.RAF_OPTIN_RESPONSE));
|
|
6197
6248
|
} catch (e) {
|
|
6198
6249
|
return Promise.reject(e);
|
|
6199
6250
|
}
|
|
6200
6251
|
};
|
|
6201
6252
|
_proto.getActivityLog = function getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset) {
|
|
6202
6253
|
try {
|
|
6203
|
-
var
|
|
6204
|
-
var message =
|
|
6254
|
+
var _this91 = this;
|
|
6255
|
+
var message = _this91.buildMessage(user_ext_id, exports.ClassId.GET_POINT_HISTORY_REQUEST, {
|
|
6205
6256
|
startTimeSeconds: Math.floor(startTimeSeconds),
|
|
6206
6257
|
endTimeSeconds: Math.floor(endTimeSeconds),
|
|
6207
6258
|
limit: limit,
|
|
6208
6259
|
offset: offset
|
|
6209
6260
|
});
|
|
6210
|
-
return Promise.resolve(
|
|
6261
|
+
return Promise.resolve(_this91.send(message, exports.ClassId.GET_POINT_HISTORY_RESPONSE));
|
|
6211
6262
|
} catch (e) {
|
|
6212
6263
|
return Promise.reject(e);
|
|
6213
6264
|
}
|
|
@@ -6220,11 +6271,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
6220
6271
|
to = 50;
|
|
6221
6272
|
}
|
|
6222
6273
|
try {
|
|
6223
|
-
var
|
|
6274
|
+
var _this92 = this;
|
|
6224
6275
|
var limit = to - from > 50 ? 50 : to - from;
|
|
6225
6276
|
var offset = from;
|
|
6226
|
-
return Promise.resolve(
|
|
6227
|
-
return ActivityLogTransform(
|
|
6277
|
+
return Promise.resolve(_this92.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).then(function (_this92$getActivityLo) {
|
|
6278
|
+
return ActivityLogTransform(_this92$getActivityLo.logHistory);
|
|
6228
6279
|
});
|
|
6229
6280
|
} catch (e) {
|
|
6230
6281
|
return Promise.reject(e);
|
|
@@ -6738,6 +6789,9 @@ exports.TournamentUtils = TournamentUtils;
|
|
|
6738
6789
|
exports.UICustomSectionTransform = UICustomSectionTransform;
|
|
6739
6790
|
exports.UserAchievementTransform = UserAchievementTransform;
|
|
6740
6791
|
exports.WSAPI = WSAPI;
|
|
6792
|
+
exports.avatarCustomizedTransform = avatarCustomizedTransform;
|
|
6793
|
+
exports.avatarDefinitionTransform = avatarDefinitionTransform;
|
|
6794
|
+
exports.avatarPromptTransform = avatarPromptTransform;
|
|
6741
6795
|
exports.drawRunHistoryTransform = drawRunHistoryTransform;
|
|
6742
6796
|
exports.drawRunTransform = drawRunTransform;
|
|
6743
6797
|
exports.drawTransform = drawTransform;
|