@smartico/public-api 0.0.248 → 0.0.250
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/Quiz/MarketsAnswersType.d.ts +22 -0
- package/dist/Raffle/GetDrawResponse.d.ts +5 -0
- package/dist/Raffle/Raffle.d.ts +2 -0
- 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/Store/StoreItem.d.ts +1 -0
- package/dist/Store/StoreItemPublicMeta.d.ts +5 -0
- package/dist/WSAPI/WSAPITypes.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +2 -1
- 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/package.json +1 -1
- package/src/Raffle/Raffle.ts +3 -0
- package/src/Store/StoreItem.ts +2 -0
- package/src/Store/StoreItemPublicMeta.ts +5 -0
- package/src/WSAPI/WSAPITypes.ts +2 -0
|
@@ -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/Raffle/Raffle.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ interface RafflePublicMeta {
|
|
|
8
8
|
custom_section_id: number;
|
|
9
9
|
/** URL of the image that represents the raffle */
|
|
10
10
|
image_url: string;
|
|
11
|
+
/** URL of the mobile image that represents the raffle */
|
|
12
|
+
image_url_mobile: string;
|
|
11
13
|
/**
|
|
12
14
|
* Custom data as string or JSON string that can be used in API to build custom UI
|
|
13
15
|
* You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
|
|
@@ -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
|
+
}
|
|
@@ -12,4 +12,9 @@ export interface StoreItemPublicMeta {
|
|
|
12
12
|
related_items: number[];
|
|
13
13
|
hint_text: string;
|
|
14
14
|
custom_data: string;
|
|
15
|
+
show_timer: boolean;
|
|
16
|
+
cant_buy_message: string;
|
|
17
|
+
discount_prize: number;
|
|
18
|
+
discount_prize_ribbon: string;
|
|
19
|
+
custom_ribbon_image: string;
|
|
15
20
|
}
|
|
@@ -439,6 +439,8 @@ export interface TStoreItem {
|
|
|
439
439
|
purchased_this_month?: boolean;
|
|
440
440
|
/** The type of the purchase */
|
|
441
441
|
purchase_type: 'points' | 'gems' | 'diamonds';
|
|
442
|
+
/** The date when the store item will be available till */
|
|
443
|
+
active_till_date?: number;
|
|
442
444
|
}
|
|
443
445
|
/**
|
|
444
446
|
* TAchCategory describes the badge category item. Each badge item can be assigned to 1 or more categories
|
package/dist/index.js
CHANGED
|
@@ -929,7 +929,8 @@ var StoreItemTransform = function StoreItemTransform(items) {
|
|
|
929
929
|
can_buy: r.canBuy,
|
|
930
930
|
category_ids: (_r$categoryIds = r.categoryIds) != null ? _r$categoryIds : [],
|
|
931
931
|
pool: r.shopPool,
|
|
932
|
-
custom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data)
|
|
932
|
+
custom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data),
|
|
933
|
+
active_till_date: r.activeTillDate
|
|
933
934
|
};
|
|
934
935
|
return x;
|
|
935
936
|
});
|