@smartico/public-api 0.0.269 → 0.0.270
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/Jackpots/JackPotWinner.d.ts +2 -0
- package/dist/Jackpots/JackpotDetails.d.ts +2 -0
- package/dist/Level/LevelPublicMeta.d.ts +1 -1
- package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
- package/dist/Raffle/GetDrawResponse.d.ts +5 -0
- package/dist/SmarticoAPI.d.ts +2 -2
- package/dist/SmarticoPublicAPI.d.ts +23 -0
- package/dist/Store/BuyShopItemErrorCode.d.ts +10 -0
- package/dist/Store/BuyShopItemRequest.d.ts +4 -0
- package/dist/Store/BuyShopItemResponse.d.ts +4 -0
- package/dist/Store/GetCategoriesShopResponse.d.ts +5 -0
- package/dist/Store/GetShopItemsResponse.d.ts +5 -0
- package/dist/Store/ShopCategory.d.ts +5 -0
- package/dist/Store/ShopCategoryPublicMeta.d.ts +4 -0
- package/dist/Store/ShopItem.d.ts +9 -0
- package/dist/Store/ShopItemPublicMeta.d.ts +10 -0
- package/dist/Store/ShopItemType.d.ts +4 -0
- package/dist/Store/StorItemPruchased.d.ts +6 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +6 -6
- package/dist/index.modern.mjs.map +1 -1
- package/dist/service/index.d.ts +5 -0
- package/dist/service/types/ErrorCodes.d.ts +13 -0
- package/dist/service/types/GRequest.d.ts +16 -0
- package/dist/service/types/GResponse.d.ts +10 -0
- package/dist/service/types/Game/GameAttemptType.d.ts +6 -0
- package/dist/service/types/Game/GameCanPlayType.d.ts +10 -0
- package/dist/service/types/Game/GameExternalStatus.d.ts +6 -0
- package/dist/service/types/Game/GameInfo.d.ts +9 -0
- package/dist/service/types/Game/GamePick.d.ts +90 -0
- package/dist/service/types/Game/GameUtil.d.ts +7 -0
- package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +7 -0
- package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +7 -0
- package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +5 -0
- package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +6 -0
- package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +5 -0
- package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +34 -0
- package/dist/service/types/SmarticoProto/PublicProperties.d.ts +11 -0
- package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +12 -0
- package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +15 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +10 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +3 -0
- package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +5 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +11 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +8 -0
- package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +13 -0
- package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +21 -0
- package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +31 -0
- package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +12 -0
- package/dist/service/types/SmarticoProto/TranslationArea.d.ts +9 -0
- package/dist/service/types/User/UserInfo.d.ts +10 -0
- package/dist/util/Util.d.ts +51 -0
- package/docs/interfaces/JackPotWinner.md +8 -0
- package/docs/interfaces/JackpotDetails.md +8 -0
- package/package.json +1 -1
- package/src/CustomSections/UICustomSection.ts +1 -1
- package/src/Jackpots/JackPotWinner.ts +2 -0
- package/src/Jackpots/JackpotDetails.ts +2 -1
- package/src/Level/LevelPublicMeta.ts +1 -1
- package/src/SmarticoAPI.ts +4 -4
- package/src/WSAPI/WSAPI.ts +1 -1
|
@@ -9,5 +9,7 @@ interface JackPotWinner {
|
|
|
9
9
|
winning_amount_wallet_currency: number;
|
|
10
10
|
/** Position of the winner. Relevant for jackpots where there could be multiple winners */
|
|
11
11
|
winning_position: number;
|
|
12
|
+
/** Avatar of the winner */
|
|
13
|
+
avatar_id: string;
|
|
12
14
|
}
|
|
13
15
|
export { JackPotWinner };
|
|
@@ -30,5 +30,7 @@ interface JackpotDetails {
|
|
|
30
30
|
ach_related_game_allow_all: boolean;
|
|
31
31
|
/** The number of users who have opted in to participate in the jackpot */
|
|
32
32
|
registration_count: number;
|
|
33
|
+
/** Show winners in widget and over API */
|
|
34
|
+
expose_winners_over_api: boolean;
|
|
33
35
|
}
|
|
34
36
|
export { JackpotDetails };
|
|
@@ -19,5 +19,5 @@ export interface LevelPublicMeta {
|
|
|
19
19
|
* You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
|
|
20
20
|
* Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
|
|
21
21
|
*/
|
|
22
|
-
custom_data
|
|
22
|
+
custom_data?: string;
|
|
23
23
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare enum MarketsValueType {
|
|
2
|
+
HomeTeam = "1",
|
|
3
|
+
AwayTeam = "2",
|
|
4
|
+
Draw = "x",
|
|
5
|
+
HomeTeamHomeTeam = "1/1",
|
|
6
|
+
HomeTeamDraw = "1/x",
|
|
7
|
+
HomeTeamAwayTeam = "1/2",
|
|
8
|
+
DrawHomeTeam = "x/1",
|
|
9
|
+
DrawDraw = "x/x",
|
|
10
|
+
DrawAwayTeam = "x/2",
|
|
11
|
+
AwayTeamHomeTeam = "2/1",
|
|
12
|
+
AwayTeamDraw = "2/x",
|
|
13
|
+
AwayTeamAwayTeam = "2/2",
|
|
14
|
+
Yes = "yes",
|
|
15
|
+
No = "no",
|
|
16
|
+
Odd = "odd",
|
|
17
|
+
Even = "even",
|
|
18
|
+
HomeOdd = "1/odd",
|
|
19
|
+
HomeEven = "1/even",
|
|
20
|
+
AwayOdd = "2/odd",
|
|
21
|
+
AwayEven = "2/even"
|
|
22
|
+
}
|
package/dist/SmarticoAPI.d.ts
CHANGED
|
@@ -129,8 +129,8 @@ declare class SmarticoAPI {
|
|
|
129
129
|
leaderboardsGetT(user_ext_id: string, period_type_id?: LeaderBoardPeriodType, prevPeriod?: boolean): Promise<LeaderBoardDetailsT>;
|
|
130
130
|
levelsGet(user_ext_id: string, force_language?: string): Promise<GetLevelMapResponse>;
|
|
131
131
|
levelsGetT(user_ext_id: string): Promise<TLevel[]>;
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
customSectionsGet(user_ext_id: string, force_language?: string): Promise<GetCustomSectionsResponse>;
|
|
133
|
+
customSectionsGetT(user_ext_id: string): Promise<TUICustomSection[]>;
|
|
134
134
|
getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
|
|
135
135
|
getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean, category_id?: InboxCategories): Promise<GetInboxMessagesResponse>;
|
|
136
136
|
getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean, categoryId?: InboxCategories): Promise<TInboxMessage[]>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ClassId } from "./Base/ClassId";
|
|
2
|
+
import { SAWGetTemplatesResponse } from './MiniGames/SAWGetTemplatesResponse';
|
|
3
|
+
import { SAWTemplate } from './MiniGames/SAWTemplate';
|
|
4
|
+
import { ILogger } from './ILogger';
|
|
5
|
+
interface IOptions {
|
|
6
|
+
logger?: ILogger;
|
|
7
|
+
logCIDs?: ClassId[];
|
|
8
|
+
logHTTPTiming?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare class SmarticoPublicApi {
|
|
11
|
+
private label_api_key;
|
|
12
|
+
private brand_api_key;
|
|
13
|
+
private publicUrl;
|
|
14
|
+
private logger;
|
|
15
|
+
private logCIDs;
|
|
16
|
+
private logHTTPTiming;
|
|
17
|
+
constructor(label_api_key: string, brand_api_key: string, options?: IOptions);
|
|
18
|
+
private send;
|
|
19
|
+
private buildMessage;
|
|
20
|
+
miniGamesGetTemplates(user_ext_id: string): Promise<SAWGetTemplatesResponse>;
|
|
21
|
+
miniGamesFormatTemplatesForWidget(templates: SAWTemplate[], pointsBalance: number): any[];
|
|
22
|
+
}
|
|
23
|
+
export { SmarticoPublicApi };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum BuyShopItemErrorCode {
|
|
2
|
+
FAILED_TO_BUY_SHOP_ITEM = 121,
|
|
3
|
+
SHOP_NO_BALANCE = 11000,
|
|
4
|
+
SHOP_WRONG_LABEL = 11001,
|
|
5
|
+
SHOP_FAILED_TO_BUY_BONUS = 11002,
|
|
6
|
+
SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003,
|
|
7
|
+
SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE = 11004,
|
|
8
|
+
SHOP_FAILED_TO_BUY_MATCHING_BONUS = 11005,
|
|
9
|
+
SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShopItemPublicMeta } from "./ShopItemPublicMeta";
|
|
2
|
+
import { ShopItemType } from "./ShopItemType";
|
|
3
|
+
export interface ShopItem {
|
|
4
|
+
id: number;
|
|
5
|
+
itemTypeId: ShopItemType;
|
|
6
|
+
itemPublicMeta: ShopItemPublicMeta;
|
|
7
|
+
categoryIds?: number[];
|
|
8
|
+
canBuy?: boolean;
|
|
9
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -2310,7 +2310,7 @@ var WSAPI = /*#__PURE__*/function () {
|
|
|
2310
2310
|
try {
|
|
2311
2311
|
var _this15 = this;
|
|
2312
2312
|
return Promise.resolve(OCache.use(onUpdateContextKey.CustomSections, exports.ECacheContext.WSAPI, function () {
|
|
2313
|
-
return _this15.api.
|
|
2313
|
+
return _this15.api.customSectionsGetT(null);
|
|
2314
2314
|
}, CACHE_DATA_SEC));
|
|
2315
2315
|
} catch (e) {
|
|
2316
2316
|
return Promise.reject(e);
|
|
@@ -3267,7 +3267,7 @@ var AchOverviewMissionsFilter;
|
|
|
3267
3267
|
|
|
3268
3268
|
var UICustomSectionTransform = function UICustomSectionTransform(response) {
|
|
3269
3269
|
var items = [];
|
|
3270
|
-
Object.keys(response.customSections).forEach(function (key) {
|
|
3270
|
+
Object.keys(response.customSections || []).forEach(function (key) {
|
|
3271
3271
|
var r = response.customSections[key];
|
|
3272
3272
|
var id = parseInt(key);
|
|
3273
3273
|
if (r.section_type_id !== undefined && r.section_type_id >= 1) {
|
|
@@ -4313,19 +4313,19 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
4313
4313
|
return Promise.reject(e);
|
|
4314
4314
|
}
|
|
4315
4315
|
};
|
|
4316
|
-
_proto.
|
|
4316
|
+
_proto.customSectionsGet = function customSectionsGet(user_ext_id, force_language) {
|
|
4317
4317
|
try {
|
|
4318
4318
|
var _this54 = this;
|
|
4319
4319
|
var message = _this54.buildMessage(user_ext_id, exports.ClassId.GET_CUSTOM_SECTIONS_REQUEST);
|
|
4320
|
-
return Promise.resolve(_this54.send(message, exports.ClassId.GET_CUSTOM_SECTIONS_RESPONSE));
|
|
4320
|
+
return Promise.resolve(_this54.send(message, exports.ClassId.GET_CUSTOM_SECTIONS_RESPONSE, force_language));
|
|
4321
4321
|
} catch (e) {
|
|
4322
4322
|
return Promise.reject(e);
|
|
4323
4323
|
}
|
|
4324
4324
|
};
|
|
4325
|
-
_proto.
|
|
4325
|
+
_proto.customSectionsGetT = function customSectionsGetT(user_ext_id) {
|
|
4326
4326
|
try {
|
|
4327
4327
|
var _this55 = this;
|
|
4328
|
-
return Promise.resolve(_this55.
|
|
4328
|
+
return Promise.resolve(_this55.customSectionsGet(user_ext_id)).then(UICustomSectionTransform);
|
|
4329
4329
|
} catch (e) {
|
|
4330
4330
|
return Promise.reject(e);
|
|
4331
4331
|
}
|