@smartico/public-api 0.0.386 → 0.0.388
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/README.md +2 -2
- package/dist/Avatars/AvatarCustomizeErrorCode.d.ts +7 -1
- package/dist/Avatars/AvatarCustomizeResponse.d.ts +16 -0
- package/dist/Avatars/index.d.ts +1 -0
- package/dist/CustomSections/AchCustomSection.d.ts +2 -1
- package/dist/Missions/UserAchievementTask.d.ts +4 -0
- package/dist/SmarticoAPI.d.ts +15 -2
- package/dist/WSAPI/WSAPIAvatars.d.ts +103 -0
- package/dist/WSAPI/WSAPILeaderBoard.d.ts +76 -10
- package/dist/WSAPI/WSAPITypes.d.ts +22 -5
- package/dist/index.js +441 -149
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +280 -29
- package/dist/index.modern.mjs.map +1 -1
- package/docs/SmarticoObject.md +15 -0
- package/docs/api/README.md +2 -0
- package/docs/api/classes/WSAPIAvatars.md +135 -0
- package/docs/api/classes/WSAPIClans.md +3 -5
- package/docs/api/classes/WSAPILeaderBoard.md +86 -10
- package/docs/api/documents/SmarticoObject.md +15 -0
- package/docs/api/enumerations/AvatarCustomizeErrorCode.md +21 -0
- package/docs/api/enumerations/JoinClanErrorCode.md +16 -17
- package/docs/api/interfaces/AvatarCustomizeResponse.md +31 -0
- package/docs/api/interfaces/LeaderBoardDetailsT.md +19 -0
- package/docs/api/interfaces/LeaderBoardUserT.md +14 -2
- package/docs/api/interfaces/TAvatarPrompt.md +2 -2
- package/docs/api/interfaces/TMissionOrBadgeTask.md +16 -0
- package/docs/api/interfaces/UserAchievementTask.md +16 -0
- package/docs/native/PROTOCOL.md +37 -7
- package/docs/ui/avatars/UIGuide_avatarsCustomize.md +69 -0
- package/docs/ui/leaderboard/UIGuide_getLeaderBoard.md +15 -0
- package/package.json +1 -1
- package/src/Avatars/AvatarCustomizeErrorCode.ts +7 -5
- package/src/Avatars/AvatarCustomizeResponse.ts +17 -0
- package/src/Avatars/index.ts +1 -0
- package/src/CustomSections/AchCustomSection.ts +1 -0
- package/src/Leaderboard/LeaderBoards.ts +9 -12
- package/src/Missions/UserAchievement.ts +2 -0
- package/src/Missions/UserAchievementTask.ts +4 -0
- package/src/SmarticoAPI.ts +84 -3
- package/src/WSAPI/WSAPIAvatars.ts +121 -0
- package/src/WSAPI/WSAPILeaderBoard.ts +91 -14
- package/src/WSAPI/WSAPITypes.ts +22 -5
- package/tsconfig.json +3 -1
package/dist/index.js
CHANGED
|
@@ -1639,6 +1639,8 @@ var UserAchievementTransform = function UserAchievementTransform(items) {
|
|
|
1639
1639
|
id: t.task_id,
|
|
1640
1640
|
name: (_t$task_public_meta = t.task_public_meta) == null ? void 0 : _t$task_public_meta.name,
|
|
1641
1641
|
points_reward: t.points_reward,
|
|
1642
|
+
gems_reward: t.gems_reward,
|
|
1643
|
+
diamonds_reward: t.diamonds_reward,
|
|
1642
1644
|
is_completed: t.isCompleted,
|
|
1643
1645
|
progress: t.userProgress,
|
|
1644
1646
|
execution_count_expected: t.executionCount,
|
|
@@ -2095,35 +2097,35 @@ var pointsRewardTransform = function pointsRewardTransform(reward_points) {
|
|
|
2095
2097
|
};
|
|
2096
2098
|
var getLeaderBoardPlayerTransformed = function getLeaderBoardPlayerTransformed(user, isMe) {
|
|
2097
2099
|
if (user) {
|
|
2098
|
-
|
|
2100
|
+
return {
|
|
2099
2101
|
public_username: (user == null ? void 0 : user.public_username) || user.user_alt_name,
|
|
2100
2102
|
avatar_url: user.avatar_url,
|
|
2103
|
+
level_id: user.level_id,
|
|
2101
2104
|
position: user.position_in_board,
|
|
2102
2105
|
points: user.points_accumulated,
|
|
2103
|
-
|
|
2106
|
+
// The `me` entry is the current user by definition, so force `true`
|
|
2107
|
+
// there; list rows carry the server-provided flag.
|
|
2108
|
+
is_me: isMe ? true : user.is_me
|
|
2104
2109
|
};
|
|
2105
|
-
if (isMe) {
|
|
2106
|
-
delete x.is_me;
|
|
2107
|
-
}
|
|
2108
|
-
return x;
|
|
2109
2110
|
}
|
|
2110
2111
|
return null;
|
|
2111
2112
|
};
|
|
2112
2113
|
var getLeaderBoardTransform = function getLeaderBoardTransform(board) {
|
|
2113
2114
|
if (board) {
|
|
2114
|
-
|
|
2115
|
+
return {
|
|
2115
2116
|
board_id: board.board_id,
|
|
2116
2117
|
name: board.board_public_meta.name,
|
|
2117
2118
|
description: board.board_public_meta.description,
|
|
2118
2119
|
rules: board.board_public_meta.rules,
|
|
2119
2120
|
period_type_id: board.period_type_id,
|
|
2121
|
+
version_id: board.versiod_id,
|
|
2122
|
+
create_date: board.create_date,
|
|
2120
2123
|
rewards: pointsRewardTransform(board.reward_points),
|
|
2121
|
-
users: board.positions.map(function (p) {
|
|
2124
|
+
users: (board.positions || []).map(function (p) {
|
|
2122
2125
|
return getLeaderBoardPlayerTransformed(p);
|
|
2123
2126
|
}),
|
|
2124
2127
|
me: getLeaderBoardPlayerTransformed(board.userPosition, true)
|
|
2125
2128
|
};
|
|
2126
|
-
return x;
|
|
2127
2129
|
}
|
|
2128
2130
|
return null;
|
|
2129
2131
|
};
|
|
@@ -8054,6 +8056,124 @@ var WSAPIAvatars = /*#__PURE__*/function (_WSAPIMiniGames) {
|
|
|
8054
8056
|
} catch (e) {
|
|
8055
8057
|
return Promise.reject(e);
|
|
8056
8058
|
}
|
|
8059
|
+
}
|
|
8060
|
+
/**
|
|
8061
|
+
* Generates an AI-customized variant of a base avatar by applying an
|
|
8062
|
+
* operator-defined style prompt, returning the CDN URL of the result.
|
|
8063
|
+
* This is a paid, generate-only step: it does NOT change the user's
|
|
8064
|
+
* active avatar — pass the returned `cdn_url` to {@link setAvatar} to
|
|
8065
|
+
* activate it.
|
|
8066
|
+
*
|
|
8067
|
+
* @remarks
|
|
8068
|
+
* **Preconditions**
|
|
8069
|
+
* - Authenticated session required; not available in visitor mode (throws).
|
|
8070
|
+
* - All five fields are mandatory — the SDK throws synchronously
|
|
8071
|
+
* (`Error("<field> is required")`) if any is missing or zero.
|
|
8072
|
+
* - `prompt_id` must be one of the prompts from {@link getAvatarPrompts};
|
|
8073
|
+
* `avatar_url` / `avatar_real_id` identify the base avatar to style.
|
|
8074
|
+
*
|
|
8075
|
+
* **Cost**
|
|
8076
|
+
* Each generation costs the currency the operator configured on the
|
|
8077
|
+
* chosen prompt (points, gems, or diamonds — some prompts are free; read
|
|
8078
|
+
* `cost_currency_type_id` / `cost_value` from the {@link getAvatarPrompts}
|
|
8079
|
+
* entry to gate the UI before calling). The cost is charged only on
|
|
8080
|
+
* success; if the user can't afford it the call fails with `errCode -1`
|
|
8081
|
+
* and nothing is generated or charged.
|
|
8082
|
+
*
|
|
8083
|
+
* **Latency**
|
|
8084
|
+
* Generation runs server-side AI image synthesis and is synchronous from
|
|
8085
|
+
* the caller's side — expect several seconds (roughly 5–20 s) before the
|
|
8086
|
+
* promise resolves. There is no SDK cache and no push/subscription; show
|
|
8087
|
+
* a loading state for the full duration and disable the trigger to
|
|
8088
|
+
* prevent duplicate submissions.
|
|
8089
|
+
*
|
|
8090
|
+
* **Result & error codes**
|
|
8091
|
+
* On success the result has `cdn_url` set; on failure it has `errCode` /
|
|
8092
|
+
* `errMessage` set and no `cdn_url`. Branch on `errCode` — the generic
|
|
8093
|
+
* message is fixed text, not cause-specific:
|
|
8094
|
+
* - `12001` (`AvatarCustomizeErrorCode.AVATAR_USER_LIMIT`) — the user hit
|
|
8095
|
+
* their monthly per-user generation cap. Nothing is generated or charged.
|
|
8096
|
+
* - `12002` (`AvatarCustomizeErrorCode.AVATAR_LABEL_LIMIT`) — the brand's
|
|
8097
|
+
* shared monthly pool is exhausted. Nothing is generated or charged;
|
|
8098
|
+
* surface a "try again later" message.
|
|
8099
|
+
* - `-1` — generic failure: insufficient balance, an unavailable prompt,
|
|
8100
|
+
* or a generation error. Nothing is charged. Allow the user to retry.
|
|
8101
|
+
*
|
|
8102
|
+
* Both monthly caps are operator-configured and reset at the start of
|
|
8103
|
+
* each calendar month.
|
|
8104
|
+
*
|
|
8105
|
+
* **Side effects (on success)**
|
|
8106
|
+
* The generated variant is persisted to the user's customization history
|
|
8107
|
+
* and counts toward the monthly caps **whether or not** it is later
|
|
8108
|
+
* activated — generation is not reversible. The SDK clears the
|
|
8109
|
+
* {@link getAvatarsCustomized} cache so the next call surfaces the new
|
|
8110
|
+
* variant. The user's active avatar is unchanged until you call
|
|
8111
|
+
* {@link setAvatar} with the returned `cdn_url`.
|
|
8112
|
+
*
|
|
8113
|
+
* **Idempotency**: not idempotent — each successful call generates (and
|
|
8114
|
+
* charges for) a new variant. Guard the call site against double-clicks.
|
|
8115
|
+
*
|
|
8116
|
+
* **UI guidance**: see [UI Guide — `avatarsCustomize`](../../docs/ui/avatars/UIGuide_avatarsCustomize.md).
|
|
8117
|
+
*
|
|
8118
|
+
* **Visitor mode**: not supported (throws).
|
|
8119
|
+
*
|
|
8120
|
+
* @param props.label_id Numeric Smartico label (brand) ID the user belongs to.
|
|
8121
|
+
* @param props.user_id Numeric Smartico user ID.
|
|
8122
|
+
* @param props.prompt_id Style-prompt ID (`prompt_id`) from {@link getAvatarPrompts}.
|
|
8123
|
+
* @param props.avatar_url CDN URL of the base avatar to customize.
|
|
8124
|
+
* @param props.avatar_real_id `avatar_real_id` of the base avatar.
|
|
8125
|
+
* @returns {@link AvatarCustomizeResponse} — `cdn_url` set on success;
|
|
8126
|
+
* `errCode` / `errMessage` set on failure.
|
|
8127
|
+
*
|
|
8128
|
+
* @example
|
|
8129
|
+
* ```ts
|
|
8130
|
+
* // label_id / user_id identify the Smartico user being customized.
|
|
8131
|
+
* const prompts = await window._smartico.api.getAvatarPrompts();
|
|
8132
|
+
* const prompt = prompts[0];
|
|
8133
|
+
*
|
|
8134
|
+
* console.log('[smartico] generating avatar — show a spinner for ~5-20s and disable the Generate button');
|
|
8135
|
+
* const result = await window._smartico.api.avatarsCustomize({
|
|
8136
|
+
* label_id,
|
|
8137
|
+
* user_id,
|
|
8138
|
+
* prompt_id: prompt.prompt_id,
|
|
8139
|
+
* avatar_url: baseAvatar.avatar_url,
|
|
8140
|
+
* avatar_real_id: baseAvatar.avatar_real_id,
|
|
8141
|
+
* });
|
|
8142
|
+
*
|
|
8143
|
+
* if (result.cdn_url) {
|
|
8144
|
+
* console.log('[smartico] generation succeeded — preview this URL, then call setAvatar to apply it:', result.cdn_url);
|
|
8145
|
+
* // await window._smartico.api.setAvatar({ avatar_url: result.cdn_url, avatar_real_id: baseAvatar.avatar_real_id });
|
|
8146
|
+
* } else if (result.errCode === 12001) {
|
|
8147
|
+
* console.error('[smartico] user monthly limit reached — show "you have used all your custom avatars this month"');
|
|
8148
|
+
* } else if (result.errCode === 12002) {
|
|
8149
|
+
* console.error('[smartico] brand monthly pool exhausted — show "custom avatars are unavailable right now, try later"');
|
|
8150
|
+
* } else {
|
|
8151
|
+
* console.error('[smartico] generation failed (e.g. not enough balance) — let the user retry:', result.errMessage);
|
|
8152
|
+
* }
|
|
8153
|
+
* ```
|
|
8154
|
+
*/
|
|
8155
|
+
;
|
|
8156
|
+
_proto.avatarsCustomize = function avatarsCustomize(props) {
|
|
8157
|
+
try {
|
|
8158
|
+
var _this5 = this;
|
|
8159
|
+
var required = ['label_id', 'user_id', 'prompt_id', 'avatar_url', 'avatar_real_id'];
|
|
8160
|
+
for (var _i = 0, _required = required; _i < _required.length; _i++) {
|
|
8161
|
+
var field = _required[_i];
|
|
8162
|
+
if (!props[field]) {
|
|
8163
|
+
throw new Error(field + " is required");
|
|
8164
|
+
}
|
|
8165
|
+
}
|
|
8166
|
+
return Promise.resolve(_this5.api.avatarsCustomize(props)).then(function (r) {
|
|
8167
|
+
// On success a new variant is persisted server-side — drop the cached
|
|
8168
|
+
// list so the next getAvatarsCustomized() surfaces it.
|
|
8169
|
+
if (r.cdn_url) {
|
|
8170
|
+
OCache.clear(exports.ECacheContext.WSAPI, onUpdateContextKey.AvatarsCustomized);
|
|
8171
|
+
}
|
|
8172
|
+
return r;
|
|
8173
|
+
});
|
|
8174
|
+
} catch (e) {
|
|
8175
|
+
return Promise.reject(e);
|
|
8176
|
+
}
|
|
8057
8177
|
};
|
|
8058
8178
|
return WSAPIAvatars;
|
|
8059
8179
|
}(WSAPIMiniGames);
|
|
@@ -8784,7 +8904,9 @@ var WSAPILeaderBoard = /*#__PURE__*/function (_WSAPIGamePick) {
|
|
|
8784
8904
|
*
|
|
8785
8905
|
* The leaderboard for each period type is configured separately by
|
|
8786
8906
|
* the operator. A label may have any combination of DAILY, WEEKLY,
|
|
8787
|
-
* and MONTHLY boards configured (or none).
|
|
8907
|
+
* and MONTHLY boards configured (or none). To discover which boards
|
|
8908
|
+
* exist before loading any standings, call {@link getLeaderBoards}
|
|
8909
|
+
* (metadata only) and drive the tab selector from its `period_type_id`s.
|
|
8788
8910
|
*
|
|
8789
8911
|
* @remarks
|
|
8790
8912
|
* **Return value note** — the runtime may return `undefined` if no
|
|
@@ -8796,10 +8918,13 @@ var WSAPILeaderBoard = /*#__PURE__*/function (_WSAPIGamePick) {
|
|
|
8796
8918
|
* Pass a `periodType` from {@link LeaderBoardPeriodType}
|
|
8797
8919
|
* (`DAILY = 1`, `WEEKLY = 2`, `MONTHLY = 3`). Pass
|
|
8798
8920
|
* `getPreviousPeriod: true` to fetch the most-recently-ended
|
|
8799
|
-
* period's snapshot (yesterday's
|
|
8800
|
-
*
|
|
8801
|
-
*
|
|
8802
|
-
*
|
|
8921
|
+
* period's snapshot (yesterday's / last week's / last month's
|
|
8922
|
+
* results) instead of the current live period. To reach older
|
|
8923
|
+
* snapshots, pass a number instead of a boolean: `1` = previous
|
|
8924
|
+
* period, `2` = the one before that, and so on (`0` / `false` =
|
|
8925
|
+
* current). Use the snapshot's `create_date` / `version_id` to label
|
|
8926
|
+
* which historical run a previous-period board is. How far back
|
|
8927
|
+
* snapshots are retained is operator-configured.
|
|
8803
8928
|
*
|
|
8804
8929
|
* **Top-20 cap**
|
|
8805
8930
|
* The server hard-caps `users[]` at 20 entries, ordered by
|
|
@@ -8853,10 +8978,11 @@ var WSAPILeaderBoard = /*#__PURE__*/function (_WSAPIGamePick) {
|
|
|
8853
8978
|
* Selects which pre-configured board to
|
|
8854
8979
|
* fetch; the board itself is bound to one
|
|
8855
8980
|
* period by the operator.
|
|
8856
|
-
* @param getPreviousPeriod
|
|
8857
|
-
*
|
|
8858
|
-
*
|
|
8859
|
-
* `
|
|
8981
|
+
* @param getPreviousPeriod Which period to fetch. `false` (default)
|
|
8982
|
+
* = current in-progress period; `true` =
|
|
8983
|
+
* the most recent finalized snapshot; a
|
|
8984
|
+
* number `n` = the n-th previous snapshot
|
|
8985
|
+
* (`1` = previous, `2` = the one before, …).
|
|
8860
8986
|
* @returns Promise resolving to `LeaderBoardDetailsT`.
|
|
8861
8987
|
* **At runtime, may resolve to `undefined`**
|
|
8862
8988
|
* when no board is configured for the
|
|
@@ -8902,11 +9028,84 @@ var WSAPILeaderBoard = /*#__PURE__*/function (_WSAPIGamePick) {
|
|
|
8902
9028
|
_proto.getLeaderBoard = function getLeaderBoard(periodType, getPreviousPeriod) {
|
|
8903
9029
|
try {
|
|
8904
9030
|
var _this = this;
|
|
8905
|
-
//
|
|
8906
|
-
//
|
|
8907
|
-
var
|
|
9031
|
+
// Resolve the snapshot offset: false/omitted → 0 (current), true → 1
|
|
9032
|
+
// (previous), or an explicit number for older snapshots.
|
|
9033
|
+
var offset = typeof getPreviousPeriod === 'number' ? getPreviousPeriod : getPreviousPeriod ? 1 : 0;
|
|
9034
|
+
// Cache per (periodType, offset) so switching tabs or period within the
|
|
9035
|
+
// TTL doesn't return a colliding board.
|
|
9036
|
+
var cacheKey = onUpdateContextKey.LeaderBoards + ":" + periodType + ":" + offset;
|
|
8908
9037
|
return Promise.resolve(OCache.use(cacheKey, exports.ECacheContext.WSAPI, function () {
|
|
8909
|
-
return _this.api.leaderboardsGetT(_this.userExtId, periodType,
|
|
9038
|
+
return _this.api.leaderboardsGetT(_this.userExtId, periodType, offset);
|
|
9039
|
+
}, CACHE_DATA_SEC));
|
|
9040
|
+
} catch (e) {
|
|
9041
|
+
return Promise.reject(e);
|
|
9042
|
+
}
|
|
9043
|
+
}
|
|
9044
|
+
/**
|
|
9045
|
+
* Returns the list of leaderboards the operator has configured for this
|
|
9046
|
+
* label — **metadata only, without participants**. Use it to discover
|
|
9047
|
+
* which boards exist (and their period types) so you can render the
|
|
9048
|
+
* board/tab selector, then load a specific board's standings on demand
|
|
9049
|
+
* with {@link getLeaderBoard}.
|
|
9050
|
+
*
|
|
9051
|
+
* This is the lightweight discovery counterpart to {@link getLeaderBoard}:
|
|
9052
|
+
* it issues one round-trip that returns every board's identity, name,
|
|
9053
|
+
* description, rules, `period_type_id`, and prize table, but **not** the
|
|
9054
|
+
* ranked players. Fetching the full standings for one board (the top-20
|
|
9055
|
+
* `users[]` and the caller's own `me` entry) is what {@link getLeaderBoard}
|
|
9056
|
+
* does per period.
|
|
9057
|
+
*
|
|
9058
|
+
* @remarks
|
|
9059
|
+
* **Returned shape**
|
|
9060
|
+
* An array of `LeaderBoardDetailsT`, one per configured board, ordered by
|
|
9061
|
+
* `period_type_id` ascending (DAILY, WEEKLY, MONTHLY, …). On every entry
|
|
9062
|
+
* `users` is an empty array and `me` is `undefined` — this call never
|
|
9063
|
+
* carries participant data. Read `period_type_id` from each entry and pass
|
|
9064
|
+
* it to {@link getLeaderBoard} to load that board's standings.
|
|
9065
|
+
*
|
|
9066
|
+
* **Empty result**
|
|
9067
|
+
* Resolves to an empty array when the label has no leaderboards configured
|
|
9068
|
+
* — treat that as "hide the leaderboard surface".
|
|
9069
|
+
*
|
|
9070
|
+
* **Cache TTL**
|
|
9071
|
+
* Cached for 30 seconds under a dedicated key (independent of
|
|
9072
|
+
* {@link getLeaderBoard}'s per-period cache). Repeated calls within the
|
|
9073
|
+
* window return the cached list without a round-trip.
|
|
9074
|
+
*
|
|
9075
|
+
* **Refresh model**: one-shot fetch — no subscription, no push. Board
|
|
9076
|
+
* configuration changes surface on the next cache miss.
|
|
9077
|
+
*
|
|
9078
|
+
* **Idempotency / Side effects**: safe. Read-only.
|
|
9079
|
+
*
|
|
9080
|
+
* **Visitor mode**: supported. Returns the brand's public board list.
|
|
9081
|
+
*
|
|
9082
|
+
* @returns Promise resolving to the array of configured boards
|
|
9083
|
+
* (metadata only). Empty array when none are configured.
|
|
9084
|
+
*
|
|
9085
|
+
* @example
|
|
9086
|
+
* ```ts
|
|
9087
|
+
* const boards = await window._smartico.api.getLeaderBoards();
|
|
9088
|
+
*
|
|
9089
|
+
* if (boards.length === 0) {
|
|
9090
|
+
* console.log('[smartico] no leaderboards configured — hide the leaderboard surface');
|
|
9091
|
+
* return;
|
|
9092
|
+
* }
|
|
9093
|
+
*
|
|
9094
|
+
* // Render one tab per board from the lightweight list (no players yet).
|
|
9095
|
+
* console.log('[smartico] render leaderboard tabs:', boards.map(b => b.name));
|
|
9096
|
+
*
|
|
9097
|
+
* // When the user opens a tab, load that board's standings on demand.
|
|
9098
|
+
* const first = boards[0];
|
|
9099
|
+
* const full = await window._smartico.api.getLeaderBoard(first.period_type_id);
|
|
9100
|
+
* console.log('[smartico] loaded standings for', first.name, '—', full?.users.length ?? 0, 'players');
|
|
9101
|
+
* ```
|
|
9102
|
+
*/
|
|
9103
|
+
;
|
|
9104
|
+
_proto.getLeaderBoards = function getLeaderBoards() {
|
|
9105
|
+
try {
|
|
9106
|
+
var _this2 = this;
|
|
9107
|
+
return Promise.resolve(OCache.use(onUpdateContextKey.LeaderBoards + ":list", exports.ECacheContext.WSAPI, function () {
|
|
9108
|
+
return _this2.api.leaderboardsGetListT(_this2.userExtId);
|
|
8910
9109
|
}, CACHE_DATA_SEC));
|
|
8911
9110
|
} catch (e) {
|
|
8912
9111
|
return Promise.reject(e);
|
|
@@ -9801,6 +10000,7 @@ exports.LiquidEntityData = void 0;
|
|
|
9801
10000
|
LiquidEntityData[LiquidEntityData["Tournament"] = 10] = "Tournament";
|
|
9802
10001
|
LiquidEntityData[LiquidEntityData["Raffles"] = 11] = "Raffles";
|
|
9803
10002
|
LiquidEntityData[LiquidEntityData["SingleRaffle"] = 12] = "SingleRaffle";
|
|
10003
|
+
LiquidEntityData[LiquidEntityData["Clans"] = 13] = "Clans";
|
|
9804
10004
|
})(exports.LiquidEntityData || (exports.LiquidEntityData = {}));
|
|
9805
10005
|
|
|
9806
10006
|
var UICustomSectionTransform = function UICustomSectionTransform(response) {
|
|
@@ -10021,7 +10221,7 @@ var AVATAR_DOMAIN = 'https://img{ENV_ID}.smr.vc';
|
|
|
10021
10221
|
var DEFAULT_LANG_EN = 'EN';
|
|
10022
10222
|
var SmarticoAPI = /*#__PURE__*/function () {
|
|
10023
10223
|
function SmarticoAPI(label_api_key, brand_api_key, messageSender, options) {
|
|
10024
|
-
var _options$tracker;
|
|
10224
|
+
var _options$tracker, _options$tracker2;
|
|
10025
10225
|
if (options === void 0) {
|
|
10026
10226
|
options = {};
|
|
10027
10227
|
}
|
|
@@ -10035,6 +10235,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
10035
10235
|
this.gamesApiUrl = void 0;
|
|
10036
10236
|
this.baseRgApiParams = void 0;
|
|
10037
10237
|
this.avatarDomain = void 0;
|
|
10238
|
+
this.avatarOriginDomain = void 0;
|
|
10038
10239
|
this.envId = void 0;
|
|
10039
10240
|
this.logger = void 0;
|
|
10040
10241
|
this.logCIDs = void 0;
|
|
@@ -10062,6 +10263,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
10062
10263
|
};
|
|
10063
10264
|
}
|
|
10064
10265
|
this.avatarDomain = SmarticoAPI.getAvatarUrl(label_api_key || ((_options$tracker = options.tracker) == null ? void 0 : _options$tracker.label_api_key));
|
|
10266
|
+
this.avatarOriginDomain = SmarticoAPI.getAvatarOriginUrl(label_api_key || ((_options$tracker2 = options.tracker) == null ? void 0 : _options$tracker2.label_api_key));
|
|
10065
10267
|
this.label_api_key = SmarticoAPI.getCleanLabelApiKey(label_api_key);
|
|
10066
10268
|
}
|
|
10067
10269
|
SmarticoAPI.getEnvDnsSuffix = function getEnvDnsSuffix(label_api_key) {
|
|
@@ -10123,6 +10325,9 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
10123
10325
|
var avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
|
|
10124
10326
|
return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
|
|
10125
10327
|
};
|
|
10328
|
+
SmarticoAPI.getAvatarOriginUrl = function getAvatarOriginUrl(label_api_key) {
|
|
10329
|
+
return AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
|
|
10330
|
+
};
|
|
10126
10331
|
var _proto = SmarticoAPI.prototype;
|
|
10127
10332
|
_proto.send = function send(message, expectCID, force_language) {
|
|
10128
10333
|
try {
|
|
@@ -11060,9 +11265,12 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11060
11265
|
}
|
|
11061
11266
|
try {
|
|
11062
11267
|
var _this54 = this;
|
|
11268
|
+
// boolean keeps back-compat (false → current, true → previous);
|
|
11269
|
+
// a number selects an arbitrary snapshot offset (1 = previous, 2 = the one before, …).
|
|
11270
|
+
var snapshot_offset = typeof prevPeriod === 'number' ? prevPeriod : prevPeriod ? 1 : 0;
|
|
11063
11271
|
var message = _this54.buildMessage(user_ext_id, exports.ClassId.GET_LEADERS_BOARD_REQUEST, {
|
|
11064
11272
|
period_type_id: period_type_id,
|
|
11065
|
-
snapshot_offset:
|
|
11273
|
+
snapshot_offset: snapshot_offset,
|
|
11066
11274
|
include_users: true
|
|
11067
11275
|
});
|
|
11068
11276
|
return Promise.resolve(_this54.send(message, exports.ClassId.GET_LEADERS_BOARD_RESPONSE, force_language)).then(function (response) {
|
|
@@ -11099,28 +11307,55 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11099
11307
|
return Promise.reject(e);
|
|
11100
11308
|
}
|
|
11101
11309
|
};
|
|
11102
|
-
_proto.
|
|
11310
|
+
_proto.leaderboardsGetList = function leaderboardsGetList(user_ext_id, force_language) {
|
|
11103
11311
|
try {
|
|
11104
11312
|
var _this56 = this;
|
|
11105
|
-
var message = _this56.buildMessage(user_ext_id, exports.ClassId.
|
|
11106
|
-
|
|
11313
|
+
var message = _this56.buildMessage(user_ext_id, exports.ClassId.GET_LEADERS_BOARD_REQUEST, {
|
|
11314
|
+
// No period_type_id → the server returns every configured board.
|
|
11315
|
+
// include_users: false → board metadata only (no positions / userPosition).
|
|
11316
|
+
snapshot_offset: 0,
|
|
11317
|
+
include_users: false
|
|
11318
|
+
});
|
|
11319
|
+
return Promise.resolve(_this56.send(message, exports.ClassId.GET_LEADERS_BOARD_RESPONSE, force_language)).then(function (response) {
|
|
11320
|
+
// map is keyed by period_type_id; integer-like keys iterate in ascending order.
|
|
11321
|
+
return Object.values(response.map || {});
|
|
11322
|
+
});
|
|
11107
11323
|
} catch (e) {
|
|
11108
11324
|
return Promise.reject(e);
|
|
11109
11325
|
}
|
|
11110
11326
|
};
|
|
11111
|
-
_proto.
|
|
11327
|
+
_proto.leaderboardsGetListT = function leaderboardsGetListT(user_ext_id) {
|
|
11112
11328
|
try {
|
|
11113
11329
|
var _this57 = this;
|
|
11114
|
-
return Promise.resolve(_this57.
|
|
11330
|
+
return Promise.resolve(_this57.leaderboardsGetList(user_ext_id)).then(function (_this57$leaderboardsG) {
|
|
11331
|
+
return _this57$leaderboardsG.map(getLeaderBoardTransform);
|
|
11332
|
+
});
|
|
11115
11333
|
} catch (e) {
|
|
11116
11334
|
return Promise.reject(e);
|
|
11117
11335
|
}
|
|
11118
11336
|
};
|
|
11119
|
-
_proto.
|
|
11337
|
+
_proto.levelsGet = function levelsGet(user_ext_id, force_language) {
|
|
11120
11338
|
try {
|
|
11121
11339
|
var _this58 = this;
|
|
11122
|
-
|
|
11123
|
-
|
|
11340
|
+
var message = _this58.buildMessage(user_ext_id, exports.ClassId.GET_LEVEL_MAP_REQUEST);
|
|
11341
|
+
return Promise.resolve(_this58.send(message, exports.ClassId.GET_LEVEL_MAP_RESPONSE, force_language));
|
|
11342
|
+
} catch (e) {
|
|
11343
|
+
return Promise.reject(e);
|
|
11344
|
+
}
|
|
11345
|
+
};
|
|
11346
|
+
_proto.levelsGetT = function levelsGetT(user_ext_id) {
|
|
11347
|
+
try {
|
|
11348
|
+
var _this59 = this;
|
|
11349
|
+
return Promise.resolve(_this59.levelsGet(user_ext_id)).then(GetLevelMapResponseTransform);
|
|
11350
|
+
} catch (e) {
|
|
11351
|
+
return Promise.reject(e);
|
|
11352
|
+
}
|
|
11353
|
+
};
|
|
11354
|
+
_proto.getLevelCurrent = function getLevelCurrent(user_ext_id) {
|
|
11355
|
+
try {
|
|
11356
|
+
var _this60 = this;
|
|
11357
|
+
return Promise.resolve(_this60.levelsGetT(user_ext_id)).then(function (levels) {
|
|
11358
|
+
return Promise.resolve(_this60.getUserGamificationInfo(user_ext_id)).then(function (userInfo) {
|
|
11124
11359
|
var _userInfo$points_ever2;
|
|
11125
11360
|
if (!levels || levels.length === 0) return null;
|
|
11126
11361
|
var sortedLevels = [].concat(levels).sort(function (a, b) {
|
|
@@ -11155,25 +11390,25 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11155
11390
|
};
|
|
11156
11391
|
_proto.customSectionsGet = function customSectionsGet(user_ext_id, force_language) {
|
|
11157
11392
|
try {
|
|
11158
|
-
var
|
|
11159
|
-
var message =
|
|
11160
|
-
return Promise.resolve(
|
|
11393
|
+
var _this61 = this;
|
|
11394
|
+
var message = _this61.buildMessage(user_ext_id, exports.ClassId.GET_CUSTOM_SECTIONS_REQUEST);
|
|
11395
|
+
return Promise.resolve(_this61.send(message, exports.ClassId.GET_CUSTOM_SECTIONS_RESPONSE, force_language));
|
|
11161
11396
|
} catch (e) {
|
|
11162
11397
|
return Promise.reject(e);
|
|
11163
11398
|
}
|
|
11164
11399
|
};
|
|
11165
11400
|
_proto.customSectionsGetT = function customSectionsGetT(user_ext_id) {
|
|
11166
11401
|
try {
|
|
11167
|
-
var
|
|
11168
|
-
return Promise.resolve(
|
|
11402
|
+
var _this62 = this;
|
|
11403
|
+
return Promise.resolve(_this62.customSectionsGet(user_ext_id)).then(UICustomSectionTransform);
|
|
11169
11404
|
} catch (e) {
|
|
11170
11405
|
return Promise.reject(e);
|
|
11171
11406
|
}
|
|
11172
11407
|
};
|
|
11173
11408
|
_proto.getTranslationsT = function getTranslationsT(user_ext_id, lang_code, areas, cacheSec) {
|
|
11174
11409
|
try {
|
|
11175
|
-
var
|
|
11176
|
-
return Promise.resolve(
|
|
11410
|
+
var _this63 = this;
|
|
11411
|
+
return Promise.resolve(_this63.coreGetTranslations(user_ext_id, lang_code, areas, 30));
|
|
11177
11412
|
} catch (e) {
|
|
11178
11413
|
return Promise.reject(e);
|
|
11179
11414
|
}
|
|
@@ -11186,15 +11421,15 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11186
11421
|
offset = 0;
|
|
11187
11422
|
}
|
|
11188
11423
|
try {
|
|
11189
|
-
var
|
|
11190
|
-
var message =
|
|
11424
|
+
var _this64 = this;
|
|
11425
|
+
var message = _this64.buildMessage(user_ext_id, exports.ClassId.GET_INBOX_MESSAGES_REQUEST, {
|
|
11191
11426
|
limit: limit,
|
|
11192
11427
|
offset: offset,
|
|
11193
11428
|
starred_only: starred_only,
|
|
11194
11429
|
category_id: category_id,
|
|
11195
11430
|
read_status: read_status
|
|
11196
11431
|
});
|
|
11197
|
-
return Promise.resolve(
|
|
11432
|
+
return Promise.resolve(_this64.send(message, exports.ClassId.GET_INBOX_MESSAGES_RESPONSE));
|
|
11198
11433
|
} catch (e) {
|
|
11199
11434
|
return Promise.reject(e);
|
|
11200
11435
|
}
|
|
@@ -11210,11 +11445,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11210
11445
|
favoriteOnly = false;
|
|
11211
11446
|
}
|
|
11212
11447
|
try {
|
|
11213
|
-
var
|
|
11448
|
+
var _this65 = this;
|
|
11214
11449
|
var limit = to - from > 20 ? 20 : to - from;
|
|
11215
11450
|
var offset = from;
|
|
11216
|
-
return Promise.resolve(
|
|
11217
|
-
return InboxMessagesTransform(
|
|
11451
|
+
return Promise.resolve(_this65.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId, read_status)).then(function (_this65$getInboxMessa) {
|
|
11452
|
+
return InboxMessagesTransform(_this65$getInboxMessa.log);
|
|
11218
11453
|
});
|
|
11219
11454
|
} catch (e) {
|
|
11220
11455
|
return Promise.reject(e);
|
|
@@ -11222,21 +11457,21 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11222
11457
|
};
|
|
11223
11458
|
_proto.getInboxUnreadCountT = function getInboxUnreadCountT(user_ext_id) {
|
|
11224
11459
|
try {
|
|
11225
|
-
var
|
|
11460
|
+
var _this66 = this;
|
|
11226
11461
|
var limit = 1;
|
|
11227
11462
|
var offset = 0;
|
|
11228
|
-
return Promise.resolve(
|
|
11229
|
-
return
|
|
11463
|
+
return Promise.resolve(_this66.getInboxMessages(user_ext_id, limit, offset, false, null)).then(function (_this66$getInboxMessa) {
|
|
11464
|
+
return _this66$getInboxMessa.unread_count;
|
|
11230
11465
|
});
|
|
11231
11466
|
} catch (e) {
|
|
11232
11467
|
return Promise.reject(e);
|
|
11233
11468
|
}
|
|
11234
11469
|
};
|
|
11235
11470
|
_proto.getInboxMessageBody = function getInboxMessageBody(messageGuid) {
|
|
11236
|
-
var
|
|
11471
|
+
var _this67 = this;
|
|
11237
11472
|
var getMessageBody = function getMessageBody(messageGuid) {
|
|
11238
11473
|
try {
|
|
11239
|
-
var inboxCdnUrl =
|
|
11474
|
+
var inboxCdnUrl = _this67.tracker.getLabelSetting(exports.PublicLabelSettings.INBOX_PUBLIC_CDN);
|
|
11240
11475
|
return Promise.resolve(_catch(function () {
|
|
11241
11476
|
var url = "" + inboxCdnUrl + messageGuid + ".json";
|
|
11242
11477
|
return Promise.resolve(fetch(url, {
|
|
@@ -11252,7 +11487,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11252
11487
|
});
|
|
11253
11488
|
});
|
|
11254
11489
|
}, function (error) {
|
|
11255
|
-
|
|
11490
|
+
_this67.logger.error('Error fetching inbox message body:', error);
|
|
11256
11491
|
return null;
|
|
11257
11492
|
}));
|
|
11258
11493
|
} catch (e) {
|
|
@@ -11263,64 +11498,64 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11263
11498
|
};
|
|
11264
11499
|
_proto.getInboxMessageBodyT = function getInboxMessageBodyT(messageGuid) {
|
|
11265
11500
|
try {
|
|
11266
|
-
var
|
|
11267
|
-
return Promise.resolve(
|
|
11501
|
+
var _this68 = this;
|
|
11502
|
+
return Promise.resolve(_this68.getInboxMessageBody(messageGuid)).then(InboxMessageBodyTransform);
|
|
11268
11503
|
} catch (e) {
|
|
11269
11504
|
return Promise.reject(e);
|
|
11270
11505
|
}
|
|
11271
11506
|
};
|
|
11272
11507
|
_proto.markInboxMessageRead = function markInboxMessageRead(user_ext_id, messageGuid) {
|
|
11273
11508
|
try {
|
|
11274
|
-
var
|
|
11275
|
-
var message =
|
|
11509
|
+
var _this69 = this;
|
|
11510
|
+
var message = _this69.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_READ_REQUEST, {
|
|
11276
11511
|
engagement_uid: messageGuid
|
|
11277
11512
|
});
|
|
11278
|
-
return Promise.resolve(
|
|
11513
|
+
return Promise.resolve(_this69.send(message, exports.ClassId.MARK_INBOX_READ_RESPONSE));
|
|
11279
11514
|
} catch (e) {
|
|
11280
11515
|
return Promise.reject(e);
|
|
11281
11516
|
}
|
|
11282
11517
|
};
|
|
11283
11518
|
_proto.markAllInboxMessageRead = function markAllInboxMessageRead(user_ext_id) {
|
|
11284
11519
|
try {
|
|
11285
|
-
var
|
|
11286
|
-
var message =
|
|
11520
|
+
var _this70 = this;
|
|
11521
|
+
var message = _this70.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_READ_REQUEST, {
|
|
11287
11522
|
all_read: true
|
|
11288
11523
|
});
|
|
11289
|
-
return Promise.resolve(
|
|
11524
|
+
return Promise.resolve(_this70.send(message, exports.ClassId.MARK_INBOX_READ_RESPONSE));
|
|
11290
11525
|
} catch (e) {
|
|
11291
11526
|
return Promise.reject(e);
|
|
11292
11527
|
}
|
|
11293
11528
|
};
|
|
11294
11529
|
_proto.markUnmarkInboxMessageAsFavorite = function markUnmarkInboxMessageAsFavorite(user_ext_id, messageGuid, mark) {
|
|
11295
11530
|
try {
|
|
11296
|
-
var
|
|
11297
|
-
var message =
|
|
11531
|
+
var _this71 = this;
|
|
11532
|
+
var message = _this71.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_STARRED_REQUEST, {
|
|
11298
11533
|
engagement_uid: messageGuid,
|
|
11299
11534
|
is_starred: mark
|
|
11300
11535
|
});
|
|
11301
|
-
return Promise.resolve(
|
|
11536
|
+
return Promise.resolve(_this71.send(message, exports.ClassId.MARK_INBOX_STARRED_RESPONSE));
|
|
11302
11537
|
} catch (e) {
|
|
11303
11538
|
return Promise.reject(e);
|
|
11304
11539
|
}
|
|
11305
11540
|
};
|
|
11306
11541
|
_proto.deleteInboxMessage = function deleteInboxMessage(user_ext_id, messageGuid) {
|
|
11307
11542
|
try {
|
|
11308
|
-
var
|
|
11309
|
-
var message =
|
|
11543
|
+
var _this72 = this;
|
|
11544
|
+
var message = _this72.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_DELETED_REQUEST, {
|
|
11310
11545
|
engagement_uid: messageGuid
|
|
11311
11546
|
});
|
|
11312
|
-
return Promise.resolve(
|
|
11547
|
+
return Promise.resolve(_this72.send(message, exports.ClassId.MARK_INBOX_DELETED_RESPONSE));
|
|
11313
11548
|
} catch (e) {
|
|
11314
11549
|
return Promise.reject(e);
|
|
11315
11550
|
}
|
|
11316
11551
|
};
|
|
11317
11552
|
_proto.deleteAllInboxMessages = function deleteAllInboxMessages(user_ext_id) {
|
|
11318
11553
|
try {
|
|
11319
|
-
var
|
|
11320
|
-
var message =
|
|
11554
|
+
var _this73 = this;
|
|
11555
|
+
var message = _this73.buildMessage(user_ext_id, exports.ClassId.MARK_INBOX_DELETED_REQUEST, {
|
|
11321
11556
|
all_deleted: true
|
|
11322
11557
|
});
|
|
11323
|
-
return Promise.resolve(
|
|
11558
|
+
return Promise.resolve(_this73.send(message, exports.ClassId.MARK_INBOX_DELETED_RESPONSE));
|
|
11324
11559
|
} catch (e) {
|
|
11325
11560
|
return Promise.reject(e);
|
|
11326
11561
|
}
|
|
@@ -11340,11 +11575,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11340
11575
|
_ref3$usePost = _ref3.usePost,
|
|
11341
11576
|
usePost = _ref3$usePost === void 0 ? false : _ref3$usePost;
|
|
11342
11577
|
try {
|
|
11343
|
-
var
|
|
11344
|
-
if (!
|
|
11578
|
+
var _this74 = this;
|
|
11579
|
+
if (!_this74.tracker) {
|
|
11345
11580
|
throw new Error("MatchX and Quiz APIs are not available in the visitor mode");
|
|
11346
11581
|
}
|
|
11347
|
-
var baseParams =
|
|
11582
|
+
var baseParams = _this74.buildGamesApiParams();
|
|
11348
11583
|
var queryString = Object.entries(baseParams).map(function (_ref4) {
|
|
11349
11584
|
var k = _ref4[0],
|
|
11350
11585
|
v = _ref4[1];
|
|
@@ -11381,7 +11616,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11381
11616
|
});
|
|
11382
11617
|
});
|
|
11383
11618
|
}, function (e) {
|
|
11384
|
-
|
|
11619
|
+
_this74.logger.error("Failed to call games API: " + method, {
|
|
11385
11620
|
url: url,
|
|
11386
11621
|
error: e.message
|
|
11387
11622
|
});
|
|
@@ -11391,13 +11626,46 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11391
11626
|
return Promise.reject(e);
|
|
11392
11627
|
}
|
|
11393
11628
|
};
|
|
11629
|
+
_proto.sendAvatarApi = function sendAvatarApi(_ref6) {
|
|
11630
|
+
var method = _ref6.method,
|
|
11631
|
+
body = _ref6.body;
|
|
11632
|
+
try {
|
|
11633
|
+
var _this75 = this;
|
|
11634
|
+
if (!_this75.tracker) {
|
|
11635
|
+
throw new Error("Avatar APIs are not available in the visitor mode");
|
|
11636
|
+
}
|
|
11637
|
+
var url = _this75.avatarOriginDomain + "/" + method;
|
|
11638
|
+
return Promise.resolve(_catch(function () {
|
|
11639
|
+
return Promise.resolve(fetch(url, {
|
|
11640
|
+
method: 'POST',
|
|
11641
|
+
headers: {
|
|
11642
|
+
'Accept': 'application/json',
|
|
11643
|
+
'Content-Type': 'application/json'
|
|
11644
|
+
},
|
|
11645
|
+
body: JSON.stringify(body)
|
|
11646
|
+
})).then(function (response) {
|
|
11647
|
+
return Promise.resolve(response.json()).then(function (data) {
|
|
11648
|
+
return SmarticoAPI.replaceSmrDomainsWithCloudfront(data);
|
|
11649
|
+
});
|
|
11650
|
+
});
|
|
11651
|
+
}, function (e) {
|
|
11652
|
+
_this75.logger.error("Failed to call avatar API: " + method, {
|
|
11653
|
+
url: url,
|
|
11654
|
+
error: e.message
|
|
11655
|
+
});
|
|
11656
|
+
throw new Error("Failed to call avatar API: " + method + ". " + e.message);
|
|
11657
|
+
}));
|
|
11658
|
+
} catch (e) {
|
|
11659
|
+
return Promise.reject(e);
|
|
11660
|
+
}
|
|
11661
|
+
};
|
|
11394
11662
|
_proto.gpGetActiveRounds = function gpGetActiveRounds(saw_template_id) {
|
|
11395
11663
|
try {
|
|
11396
|
-
var
|
|
11664
|
+
var _this76 = this;
|
|
11397
11665
|
var params = {
|
|
11398
11666
|
ext_game_id: saw_template_id
|
|
11399
11667
|
};
|
|
11400
|
-
return Promise.resolve(
|
|
11668
|
+
return Promise.resolve(_this76.sendGamesApi({
|
|
11401
11669
|
method: 'active-rounds',
|
|
11402
11670
|
params: params
|
|
11403
11671
|
}));
|
|
@@ -11407,12 +11675,12 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11407
11675
|
};
|
|
11408
11676
|
_proto.gpGetActiveRound = function gpGetActiveRound(saw_template_id, round_id) {
|
|
11409
11677
|
try {
|
|
11410
|
-
var
|
|
11678
|
+
var _this77 = this;
|
|
11411
11679
|
var params = {
|
|
11412
11680
|
ext_game_id: saw_template_id,
|
|
11413
11681
|
round_id: round_id
|
|
11414
11682
|
};
|
|
11415
|
-
return Promise.resolve(
|
|
11683
|
+
return Promise.resolve(_this77.sendGamesApi({
|
|
11416
11684
|
method: 'active-round',
|
|
11417
11685
|
params: params
|
|
11418
11686
|
}));
|
|
@@ -11422,11 +11690,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11422
11690
|
};
|
|
11423
11691
|
_proto.gpGetGamesHistory = function gpGetGamesHistory(saw_template_id) {
|
|
11424
11692
|
try {
|
|
11425
|
-
var
|
|
11693
|
+
var _this78 = this;
|
|
11426
11694
|
var params = {
|
|
11427
11695
|
ext_game_id: saw_template_id
|
|
11428
11696
|
};
|
|
11429
|
-
return Promise.resolve(
|
|
11697
|
+
return Promise.resolve(_this78.sendGamesApi({
|
|
11430
11698
|
method: 'games-history',
|
|
11431
11699
|
params: params
|
|
11432
11700
|
}));
|
|
@@ -11436,12 +11704,12 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11436
11704
|
};
|
|
11437
11705
|
_proto.gpGetGameBoard = function gpGetGameBoard(saw_template_id, round_id) {
|
|
11438
11706
|
try {
|
|
11439
|
-
var
|
|
11707
|
+
var _this79 = this;
|
|
11440
11708
|
var params = {
|
|
11441
11709
|
ext_game_id: saw_template_id,
|
|
11442
11710
|
round_id: round_id
|
|
11443
11711
|
};
|
|
11444
|
-
return Promise.resolve(
|
|
11712
|
+
return Promise.resolve(_this79.sendGamesApi({
|
|
11445
11713
|
method: 'game-board',
|
|
11446
11714
|
params: params
|
|
11447
11715
|
}));
|
|
@@ -11451,13 +11719,13 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11451
11719
|
};
|
|
11452
11720
|
_proto.gpSubmitSelection = function gpSubmitSelection(saw_template_id, round, isQuiz) {
|
|
11453
11721
|
try {
|
|
11454
|
-
var
|
|
11722
|
+
var _this80 = this;
|
|
11455
11723
|
var method = isQuiz ? 'submit-selection-quiz' : 'submit-selection';
|
|
11456
11724
|
var params = {
|
|
11457
11725
|
ext_game_id: saw_template_id,
|
|
11458
11726
|
round: round
|
|
11459
11727
|
};
|
|
11460
|
-
return Promise.resolve(
|
|
11728
|
+
return Promise.resolve(_this80.sendGamesApi({
|
|
11461
11729
|
method: method,
|
|
11462
11730
|
params: params,
|
|
11463
11731
|
usePost: true
|
|
@@ -11468,11 +11736,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11468
11736
|
};
|
|
11469
11737
|
_proto.gpGetUserInfo = function gpGetUserInfo(saw_template_id) {
|
|
11470
11738
|
try {
|
|
11471
|
-
var
|
|
11739
|
+
var _this81 = this;
|
|
11472
11740
|
var params = {
|
|
11473
11741
|
ext_game_id: saw_template_id
|
|
11474
11742
|
};
|
|
11475
|
-
return Promise.resolve(
|
|
11743
|
+
return Promise.resolve(_this81.sendGamesApi({
|
|
11476
11744
|
method: 'user-info',
|
|
11477
11745
|
params: params
|
|
11478
11746
|
}));
|
|
@@ -11482,11 +11750,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11482
11750
|
};
|
|
11483
11751
|
_proto.gpGetGameInfo = function gpGetGameInfo(saw_template_id) {
|
|
11484
11752
|
try {
|
|
11485
|
-
var
|
|
11753
|
+
var _this82 = this;
|
|
11486
11754
|
var params = {
|
|
11487
11755
|
ext_game_id: saw_template_id
|
|
11488
11756
|
};
|
|
11489
|
-
return Promise.resolve(
|
|
11757
|
+
return Promise.resolve(_this82.sendGamesApi({
|
|
11490
11758
|
method: 'game-info',
|
|
11491
11759
|
params: params
|
|
11492
11760
|
}));
|
|
@@ -11496,11 +11764,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11496
11764
|
};
|
|
11497
11765
|
_proto.gpGetTranslations = function gpGetTranslations(saw_template_id) {
|
|
11498
11766
|
try {
|
|
11499
|
-
var
|
|
11767
|
+
var _this83 = this;
|
|
11500
11768
|
var params = {
|
|
11501
11769
|
ext_game_id: saw_template_id
|
|
11502
11770
|
};
|
|
11503
|
-
return Promise.resolve(
|
|
11771
|
+
return Promise.resolve(_this83.sendGamesApi({
|
|
11504
11772
|
method: 'translations',
|
|
11505
11773
|
params: params
|
|
11506
11774
|
}));
|
|
@@ -11510,13 +11778,13 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11510
11778
|
};
|
|
11511
11779
|
_proto.gpGetRoundInfoForUser = function gpGetRoundInfoForUser(saw_template_id, round_id, int_user_id) {
|
|
11512
11780
|
try {
|
|
11513
|
-
var
|
|
11781
|
+
var _this84 = this;
|
|
11514
11782
|
var params = {
|
|
11515
11783
|
ext_game_id: saw_template_id,
|
|
11516
11784
|
round_id: round_id,
|
|
11517
11785
|
int_user_id: int_user_id
|
|
11518
11786
|
};
|
|
11519
|
-
return Promise.resolve(
|
|
11787
|
+
return Promise.resolve(_this84.sendGamesApi({
|
|
11520
11788
|
method: 'game-round-info-for-user',
|
|
11521
11789
|
params: params
|
|
11522
11790
|
}));
|
|
@@ -11526,49 +11794,69 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11526
11794
|
};
|
|
11527
11795
|
_proto.avatarsGetList = function avatarsGetList(user_ext_id) {
|
|
11528
11796
|
try {
|
|
11529
|
-
var
|
|
11530
|
-
var message =
|
|
11531
|
-
return Promise.resolve(
|
|
11797
|
+
var _this85 = this;
|
|
11798
|
+
var message = _this85.buildMessage(user_ext_id, exports.ClassId.GET_AVATARS_LIST_REQUEST);
|
|
11799
|
+
return Promise.resolve(_this85.send(message, exports.ClassId.GET_AVATARS_LIST_RESPONSE));
|
|
11532
11800
|
} catch (e) {
|
|
11533
11801
|
return Promise.reject(e);
|
|
11534
11802
|
}
|
|
11535
11803
|
};
|
|
11536
11804
|
_proto.avatarsGetCustomized = function avatarsGetCustomized(user_ext_id) {
|
|
11537
11805
|
try {
|
|
11538
|
-
var
|
|
11539
|
-
var message =
|
|
11540
|
-
return Promise.resolve(
|
|
11806
|
+
var _this86 = this;
|
|
11807
|
+
var message = _this86.buildMessage(user_ext_id, exports.ClassId.GET_AVATARS_CUSTOMIZED_REQUEST);
|
|
11808
|
+
return Promise.resolve(_this86.send(message, exports.ClassId.GET_AVATARS_CUSTOMIZED_RESPONSE));
|
|
11541
11809
|
} catch (e) {
|
|
11542
11810
|
return Promise.reject(e);
|
|
11543
11811
|
}
|
|
11544
11812
|
};
|
|
11545
11813
|
_proto.avatarsGetPrompts = function avatarsGetPrompts(user_ext_id) {
|
|
11546
11814
|
try {
|
|
11547
|
-
var
|
|
11548
|
-
var message =
|
|
11549
|
-
return Promise.resolve(
|
|
11815
|
+
var _this87 = this;
|
|
11816
|
+
var message = _this87.buildMessage(user_ext_id, exports.ClassId.GET_AVATAR_PROMPTS_REQUEST);
|
|
11817
|
+
return Promise.resolve(_this87.send(message, exports.ClassId.GET_AVATAR_PROMPTS_RESPONSE));
|
|
11550
11818
|
} catch (e) {
|
|
11551
11819
|
return Promise.reject(e);
|
|
11552
11820
|
}
|
|
11553
11821
|
};
|
|
11554
11822
|
_proto.avatarSetAvatar = function avatarSetAvatar(user_ext_id, avatar_id, avatar_real_id) {
|
|
11555
11823
|
try {
|
|
11556
|
-
var
|
|
11557
|
-
var message =
|
|
11824
|
+
var _this88 = this;
|
|
11825
|
+
var message = _this88.buildMessage(user_ext_id, exports.ClassId.CLIENT_SET_AVATAR_REQUEST, {
|
|
11558
11826
|
avatar_id: avatar_id,
|
|
11559
11827
|
avatar_real_id: avatar_real_id
|
|
11560
11828
|
});
|
|
11561
|
-
return Promise.resolve(
|
|
11829
|
+
return Promise.resolve(_this88.send(message, exports.ClassId.CLIENT_SET_AVATAR_RESPONSE));
|
|
11830
|
+
} catch (e) {
|
|
11831
|
+
return Promise.reject(e);
|
|
11832
|
+
}
|
|
11833
|
+
};
|
|
11834
|
+
_proto.avatarsCustomize = function avatarsCustomize(params) {
|
|
11835
|
+
try {
|
|
11836
|
+
var _this89$tracker, _this89$tracker2;
|
|
11837
|
+
var _this89 = this;
|
|
11838
|
+
return Promise.resolve(_this89.sendAvatarApi({
|
|
11839
|
+
method: 'avatar-customize',
|
|
11840
|
+
body: {
|
|
11841
|
+
label_id: params.label_id,
|
|
11842
|
+
user_id: params.user_id,
|
|
11843
|
+
user_ext_id: (_this89$tracker = _this89.tracker) == null ? void 0 : _this89$tracker.getExtUserId(),
|
|
11844
|
+
brand_key: _this89.brand_api_key || ((_this89$tracker2 = _this89.tracker) == null || (_this89$tracker2 = _this89$tracker2.params) == null ? void 0 : _this89$tracker2.brand_key),
|
|
11845
|
+
prompt_id: params.prompt_id,
|
|
11846
|
+
avatar_url: params.avatar_url,
|
|
11847
|
+
avatar_real_id: params.avatar_real_id
|
|
11848
|
+
}
|
|
11849
|
+
}));
|
|
11562
11850
|
} catch (e) {
|
|
11563
11851
|
return Promise.reject(e);
|
|
11564
11852
|
}
|
|
11565
11853
|
};
|
|
11566
11854
|
_proto.avatarsGetListT = function avatarsGetListT(user_ext_id) {
|
|
11567
11855
|
try {
|
|
11568
|
-
var
|
|
11569
|
-
return Promise.resolve(
|
|
11570
|
-
var
|
|
11571
|
-
return avatarDefinitionTransform((
|
|
11856
|
+
var _this90 = this;
|
|
11857
|
+
return Promise.resolve(_this90.avatarsGetList(user_ext_id)).then(function (_this90$avatarsGetLis) {
|
|
11858
|
+
var _this90$avatarsGetLis2;
|
|
11859
|
+
return avatarDefinitionTransform((_this90$avatarsGetLis2 = _this90$avatarsGetLis.avatars) != null ? _this90$avatarsGetLis2 : [], _this90.avatarDomain);
|
|
11572
11860
|
});
|
|
11573
11861
|
} catch (e) {
|
|
11574
11862
|
return Promise.reject(e);
|
|
@@ -11576,10 +11864,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11576
11864
|
};
|
|
11577
11865
|
_proto.avatarsGetCustomizedT = function avatarsGetCustomizedT(user_ext_id) {
|
|
11578
11866
|
try {
|
|
11579
|
-
var
|
|
11580
|
-
return Promise.resolve(
|
|
11581
|
-
var
|
|
11582
|
-
return avatarCustomizedTransform((
|
|
11867
|
+
var _this91 = this;
|
|
11868
|
+
return Promise.resolve(_this91.avatarsGetCustomized(user_ext_id)).then(function (_this91$avatarsGetCus) {
|
|
11869
|
+
var _this91$avatarsGetCus2;
|
|
11870
|
+
return avatarCustomizedTransform((_this91$avatarsGetCus2 = _this91$avatarsGetCus.avatars) != null ? _this91$avatarsGetCus2 : [], _this91.avatarDomain);
|
|
11583
11871
|
});
|
|
11584
11872
|
} catch (e) {
|
|
11585
11873
|
return Promise.reject(e);
|
|
@@ -11587,10 +11875,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11587
11875
|
};
|
|
11588
11876
|
_proto.avatarsGetPromptsT = function avatarsGetPromptsT(user_ext_id) {
|
|
11589
11877
|
try {
|
|
11590
|
-
var
|
|
11591
|
-
return Promise.resolve(
|
|
11592
|
-
var
|
|
11593
|
-
return avatarPromptTransform((
|
|
11878
|
+
var _this92 = this;
|
|
11879
|
+
return Promise.resolve(_this92.avatarsGetPrompts(user_ext_id)).then(function (_this92$avatarsGetPro) {
|
|
11880
|
+
var _this92$avatarsGetPro2;
|
|
11881
|
+
return avatarPromptTransform((_this92$avatarsGetPro2 = _this92$avatarsGetPro.prompts) != null ? _this92$avatarsGetPro2 : [], _this92.avatarDomain);
|
|
11594
11882
|
});
|
|
11595
11883
|
} catch (e) {
|
|
11596
11884
|
return Promise.reject(e);
|
|
@@ -11601,20 +11889,20 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11601
11889
|
};
|
|
11602
11890
|
_proto.getRelatedItemsForGame = function getRelatedItemsForGame(user_ext_id, related_game_id) {
|
|
11603
11891
|
try {
|
|
11604
|
-
var
|
|
11605
|
-
var message =
|
|
11892
|
+
var _this93 = this;
|
|
11893
|
+
var message = _this93.buildMessage(user_ext_id, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_REQUEST, {
|
|
11606
11894
|
related_game_id: related_game_id
|
|
11607
11895
|
});
|
|
11608
|
-
return Promise.resolve(
|
|
11896
|
+
return Promise.resolve(_this93.send(message, exports.ClassId.GET_RELATED_ACH_N_TOURNAMENTS_RESPONSE));
|
|
11609
11897
|
} catch (e) {
|
|
11610
11898
|
return Promise.reject(e);
|
|
11611
11899
|
}
|
|
11612
11900
|
};
|
|
11613
11901
|
_proto.getRafflesT = function getRafflesT(user_ext_id) {
|
|
11614
11902
|
try {
|
|
11615
|
-
var
|
|
11616
|
-
return Promise.resolve(
|
|
11617
|
-
return raffleTransform(
|
|
11903
|
+
var _this94 = this;
|
|
11904
|
+
return Promise.resolve(_this94.getRaffles(user_ext_id)).then(function (_this94$getRaffles) {
|
|
11905
|
+
return raffleTransform(_this94$getRaffles.items);
|
|
11618
11906
|
});
|
|
11619
11907
|
} catch (e) {
|
|
11620
11908
|
return Promise.reject(e);
|
|
@@ -11622,18 +11910,18 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11622
11910
|
};
|
|
11623
11911
|
_proto.getRaffles = function getRaffles(user_ext_id) {
|
|
11624
11912
|
try {
|
|
11625
|
-
var
|
|
11626
|
-
var message =
|
|
11627
|
-
return Promise.resolve(
|
|
11913
|
+
var _this95 = this;
|
|
11914
|
+
var message = _this95.buildMessage(user_ext_id, exports.ClassId.RAF_GET_RAFFLES_REQUEST);
|
|
11915
|
+
return Promise.resolve(_this95.send(message, exports.ClassId.RAF_GET_RAFFLES_RESPONSE));
|
|
11628
11916
|
} catch (e) {
|
|
11629
11917
|
return Promise.reject(e);
|
|
11630
11918
|
}
|
|
11631
11919
|
};
|
|
11632
11920
|
_proto.getRaffleDrawRun = function getRaffleDrawRun(user_ext_id, payload) {
|
|
11633
11921
|
try {
|
|
11634
|
-
var
|
|
11635
|
-
var message =
|
|
11636
|
-
return Promise.resolve(
|
|
11922
|
+
var _this96 = this;
|
|
11923
|
+
var message = _this96.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_RUN_REQUEST, payload);
|
|
11924
|
+
return Promise.resolve(_this96.send(message, exports.ClassId.RAF_GET_DRAW_RUN_RESPONSE));
|
|
11637
11925
|
} catch (e) {
|
|
11638
11926
|
return Promise.reject(e);
|
|
11639
11927
|
}
|
|
@@ -11646,10 +11934,10 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11646
11934
|
winners_to = 20;
|
|
11647
11935
|
}
|
|
11648
11936
|
try {
|
|
11649
|
-
var
|
|
11937
|
+
var _this97 = this;
|
|
11650
11938
|
var winners_limit = winners_to - winners_from > 50 ? 50 : winners_to - winners_from;
|
|
11651
11939
|
var winners_offset = winners_from;
|
|
11652
|
-
return Promise.resolve(
|
|
11940
|
+
return Promise.resolve(_this97.getRaffleDrawRun(user_ext_id, {
|
|
11653
11941
|
raffle_id: raffle_id,
|
|
11654
11942
|
run_id: run_id,
|
|
11655
11943
|
winners_limit: winners_limit,
|
|
@@ -11661,50 +11949,50 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11661
11949
|
};
|
|
11662
11950
|
_proto.getRaffleDrawRunsHistory = function getRaffleDrawRunsHistory(user_ext_id, props) {
|
|
11663
11951
|
try {
|
|
11664
|
-
var
|
|
11665
|
-
var message =
|
|
11666
|
-
return Promise.resolve(
|
|
11952
|
+
var _this98 = this;
|
|
11953
|
+
var message = _this98.buildMessage(user_ext_id, exports.ClassId.RAF_GET_DRAW_HISTORY_REQUEST, props);
|
|
11954
|
+
return Promise.resolve(_this98.send(message, exports.ClassId.RAF_GET_DRAW_HISTORY_RESPONSE));
|
|
11667
11955
|
} catch (e) {
|
|
11668
11956
|
return Promise.reject(e);
|
|
11669
11957
|
}
|
|
11670
11958
|
};
|
|
11671
11959
|
_proto.claimRafflePrize = function claimRafflePrize(user_ext_id, props) {
|
|
11672
11960
|
try {
|
|
11673
|
-
var
|
|
11674
|
-
var message =
|
|
11675
|
-
return Promise.resolve(
|
|
11961
|
+
var _this99 = this;
|
|
11962
|
+
var message = _this99.buildMessage(user_ext_id, exports.ClassId.RAF_CLAIM_PRIZE_REQUEST, props);
|
|
11963
|
+
return Promise.resolve(_this99.send(message, exports.ClassId.RAF_CLAIM_PRIZE_RESPONSE));
|
|
11676
11964
|
} catch (e) {
|
|
11677
11965
|
return Promise.reject(e);
|
|
11678
11966
|
}
|
|
11679
11967
|
};
|
|
11680
11968
|
_proto.raffleOptin = function raffleOptin(user_ext_id, props) {
|
|
11681
11969
|
try {
|
|
11682
|
-
var
|
|
11683
|
-
var message =
|
|
11684
|
-
return Promise.resolve(
|
|
11970
|
+
var _this100 = this;
|
|
11971
|
+
var message = _this100.buildMessage(user_ext_id, exports.ClassId.RAF_OPTIN_REQUEST, props);
|
|
11972
|
+
return Promise.resolve(_this100.send(message, exports.ClassId.RAF_OPTIN_RESPONSE));
|
|
11685
11973
|
} catch (e) {
|
|
11686
11974
|
return Promise.reject(e);
|
|
11687
11975
|
}
|
|
11688
11976
|
};
|
|
11689
11977
|
_proto.getRaffleWonPrizes = function getRaffleWonPrizes(user_ext_id, props) {
|
|
11690
11978
|
try {
|
|
11691
|
-
var
|
|
11692
|
-
var message =
|
|
11693
|
-
return Promise.resolve(
|
|
11979
|
+
var _this101 = this;
|
|
11980
|
+
var message = _this101.buildMessage(user_ext_id, exports.ClassId.RAF_GET_WON_PRIZES_REQUEST, props);
|
|
11981
|
+
return Promise.resolve(_this101.send(message, exports.ClassId.RAF_GET_WON_PRIZES_RESPONSE));
|
|
11694
11982
|
} catch (e) {
|
|
11695
11983
|
return Promise.reject(e);
|
|
11696
11984
|
}
|
|
11697
11985
|
};
|
|
11698
11986
|
_proto.getActivityLog = function getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset) {
|
|
11699
11987
|
try {
|
|
11700
|
-
var
|
|
11701
|
-
var message =
|
|
11988
|
+
var _this102 = this;
|
|
11989
|
+
var message = _this102.buildMessage(user_ext_id, exports.ClassId.GET_POINT_HISTORY_REQUEST, {
|
|
11702
11990
|
startTimeSeconds: Math.floor(startTimeSeconds),
|
|
11703
11991
|
endTimeSeconds: Math.floor(endTimeSeconds),
|
|
11704
11992
|
limit: limit,
|
|
11705
11993
|
offset: offset
|
|
11706
11994
|
});
|
|
11707
|
-
return Promise.resolve(
|
|
11995
|
+
return Promise.resolve(_this102.send(message, exports.ClassId.GET_POINT_HISTORY_RESPONSE));
|
|
11708
11996
|
} catch (e) {
|
|
11709
11997
|
return Promise.reject(e);
|
|
11710
11998
|
}
|
|
@@ -11717,11 +12005,11 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
11717
12005
|
to = 50;
|
|
11718
12006
|
}
|
|
11719
12007
|
try {
|
|
11720
|
-
var
|
|
12008
|
+
var _this103 = this;
|
|
11721
12009
|
var limit = to - from > 50 ? 50 : to - from;
|
|
11722
12010
|
var offset = from;
|
|
11723
|
-
return Promise.resolve(
|
|
11724
|
-
return ActivityLogTransform(
|
|
12011
|
+
return Promise.resolve(_this103.getActivityLog(user_ext_id, startTimeSeconds, endTimeSeconds, limit, offset)).then(function (_this103$getActivityL) {
|
|
12012
|
+
return ActivityLogTransform(_this103$getActivityL.logHistory);
|
|
11725
12013
|
});
|
|
11726
12014
|
} catch (e) {
|
|
11727
12015
|
return Promise.reject(e);
|
|
@@ -12323,13 +12611,18 @@ exports.JackpotType = void 0;
|
|
|
12323
12611
|
JackpotType[JackpotType["Personal"] = 2] = "Personal";
|
|
12324
12612
|
})(exports.JackpotType || (exports.JackpotType = {}));
|
|
12325
12613
|
|
|
12326
|
-
|
|
12614
|
+
/**
|
|
12615
|
+
* Limit error codes returned in `errCode` by the `avatarsCustomize` method.
|
|
12616
|
+
* See the `avatarsCustomize` TSDoc for the full table (including the generic
|
|
12617
|
+
* `-1` failure, which has no named member here).
|
|
12618
|
+
*/
|
|
12327
12619
|
exports.AvatarCustomizeErrorCode = void 0;
|
|
12328
12620
|
(function (AvatarCustomizeErrorCode) {
|
|
12621
|
+
/** The user has reached the operator-configured per-user monthly cap on custom-avatar generations. */
|
|
12329
12622
|
AvatarCustomizeErrorCode[AvatarCustomizeErrorCode["AVATAR_USER_LIMIT"] = 12001] = "AVATAR_USER_LIMIT";
|
|
12623
|
+
/** The brand's operator-configured shared monthly pool of custom-avatar generations is exhausted. */
|
|
12330
12624
|
AvatarCustomizeErrorCode[AvatarCustomizeErrorCode["AVATAR_LABEL_LIMIT"] = 12002] = "AVATAR_LABEL_LIMIT";
|
|
12331
12625
|
})(exports.AvatarCustomizeErrorCode || (exports.AvatarCustomizeErrorCode = {}));
|
|
12332
|
-
var AvatarCustomizeErrorMessage = (_AvatarCustomizeError = {}, _AvatarCustomizeError[exports.AvatarCustomizeErrorCode.AVATAR_USER_LIMIT] = 'You have exceeded number of custom avatars creation, please try later', _AvatarCustomizeError[exports.AvatarCustomizeErrorCode.AVATAR_LABEL_LIMIT] = 'The custom avatars are not available, please try again later', _AvatarCustomizeError);
|
|
12333
12626
|
|
|
12334
12627
|
/**
|
|
12335
12628
|
* Error codes returned in `errCode` by the `joinClan` method (also carried
|
|
@@ -12368,7 +12661,6 @@ exports.JoinClanErrorCode = void 0;
|
|
|
12368
12661
|
exports.AchCategoryTransform = AchCategoryTransform;
|
|
12369
12662
|
exports.ActivityLogTransform = ActivityLogTransform;
|
|
12370
12663
|
exports.AllRoundsGameBoardID = AllRoundsGameBoardID;
|
|
12371
|
-
exports.AvatarCustomizeErrorMessage = AvatarCustomizeErrorMessage;
|
|
12372
12664
|
exports.BonusItemsTransform = BonusItemsTransform;
|
|
12373
12665
|
exports.CookieStore = CookieStore;
|
|
12374
12666
|
exports.CoreUtils = CoreUtils;
|