@smartico/public-api 0.0.240 → 0.0.242
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/JackpotPublicMeta.d.ts +2 -0
- 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/BuyStoreItemErrorCode.d.ts +8 -1
- 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/WSAPI/WSAPITypes.d.ts +11 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +8 -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/docs/enums/BuyStoreItemErrorCode.md +16 -6
- package/docs/interfaces/JackpotPublicMeta.md +8 -0
- package/docs/interfaces/TBuyStoreItemResult.md +10 -1
- package/docs/interfaces/TUICustomSection.md +8 -0
- package/package.json +1 -1
- package/src/Jackpots/JackpotPublicMeta.ts +2 -0
- package/src/Raffle/Raffle.ts +2 -0
- package/src/Store/BuyStoreItemErrorCode.ts +9 -2
- package/src/WSAPI/WSAPITypes.ts +11 -1
|
@@ -14,6 +14,8 @@ interface JackpotPublicMeta {
|
|
|
14
14
|
placeholder1: string;
|
|
15
15
|
/** custom value of placeholder2 defined by operator and can be used in the HTML templates */
|
|
16
16
|
placeholder2: string;
|
|
17
|
+
/** custom data as string or JSON string that can be used in UIWidget */
|
|
18
|
+
custom_data: string;
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
export { JackpotPublicMeta };
|
package/src/Raffle/Raffle.ts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
export enum BuyStoreItemErrorCode {
|
|
2
|
-
|
|
2
|
+
/** User don't have enough points on balance */
|
|
3
3
|
SHOP_NO_BALANCE = 11000,
|
|
4
|
+
/** Wrong shop item id */
|
|
4
5
|
SHOP_WRONG_LABEL = 11001,
|
|
6
|
+
/** Failed to buy bonus item, probably something wrong with the bonus configuration. */
|
|
5
7
|
SHOP_FAILED_TO_BUY_BONUS = 11002, // remote product restriction
|
|
6
|
-
|
|
8
|
+
/** Failed to buy store item because segment conditions are set by operator for specific CRM item */
|
|
9
|
+
SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003, // when not visible but trying to buy. shouldn't happen
|
|
10
|
+
/** Segment conditions are set by operator for specific CRM item and user not matching to this conditions */
|
|
7
11
|
SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION_PURSHASE = 11004, // when visible but not matching to purchase segment
|
|
12
|
+
/** Failed to buy matching bonus item */
|
|
8
13
|
SHOP_FAILED_TO_BUY_MATCHING_BONUS = 11005,
|
|
14
|
+
/** Failed to buy item because of limit of max items is reached */
|
|
9
15
|
SHOP_FAILED_MAX_BOUGHT_ITEMS_REACHED = 11006,
|
|
16
|
+
/** Failed to buy item because no more items are available */
|
|
10
17
|
SHOP_FAILED_POOL_EMPTY = 11009,
|
|
11
18
|
}
|
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -670,7 +670,17 @@ export interface TTournamentRegistrationResult {
|
|
|
670
670
|
}
|
|
671
671
|
|
|
672
672
|
export interface TBuyStoreItemResult {
|
|
673
|
-
/** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0
|
|
673
|
+
/** Error code representing the result of the purchase of the shop item. Successful purchase if err_code is 0
|
|
674
|
+
*
|
|
675
|
+
* Example for error handling:
|
|
676
|
+
* ```javascript
|
|
677
|
+
* SmarticoAPI.buyStoreItem(item_id).then(res => {
|
|
678
|
+
* if (res.err_code !== 0) {
|
|
679
|
+
* // YOUR LOGIC HERE, you can use res.err_message, but it's optional and not always present
|
|
680
|
+
* }
|
|
681
|
+
* });
|
|
682
|
+
* ```
|
|
683
|
+
*/
|
|
674
684
|
err_code: BuyStoreItemErrorCode;
|
|
675
685
|
/** Optional error message */
|
|
676
686
|
err_message: string;
|