@smartico/public-api 0.0.241 → 0.0.243

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.
Files changed (69) hide show
  1. package/dist/Jackpots/JackpotPublicMeta.d.ts +6 -0
  2. package/dist/Level/LevelPublicMeta.d.ts +5 -1
  3. package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
  4. package/dist/Raffle/GetDrawResponse.d.ts +5 -0
  5. package/dist/Raffle/Raffle.d.ts +6 -0
  6. package/dist/SmarticoLib/index.d.ts +5 -1
  7. package/dist/SmarticoPublicAPI.d.ts +23 -0
  8. package/dist/Store/BuyShopItemErrorCode.d.ts +10 -0
  9. package/dist/Store/BuyShopItemRequest.d.ts +4 -0
  10. package/dist/Store/BuyShopItemResponse.d.ts +4 -0
  11. package/dist/Store/BuyStoreItemErrorCode.d.ts +8 -1
  12. package/dist/Store/GetCategoriesShopResponse.d.ts +5 -0
  13. package/dist/Store/GetShopItemsResponse.d.ts +5 -0
  14. package/dist/Store/ShopCategory.d.ts +5 -0
  15. package/dist/Store/ShopCategoryPublicMeta.d.ts +4 -0
  16. package/dist/Store/ShopItem.d.ts +9 -0
  17. package/dist/Store/ShopItemPublicMeta.d.ts +10 -0
  18. package/dist/Store/ShopItemType.d.ts +4 -0
  19. package/dist/Store/StorItemPruchased.d.ts +6 -0
  20. package/dist/WSAPI/WSAPITypes.d.ts +5 -1
  21. package/dist/index.js +12 -2
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.modern.mjs +12 -2
  24. package/dist/index.modern.mjs.map +1 -1
  25. package/dist/service/index.d.ts +5 -0
  26. package/dist/service/types/ErrorCodes.d.ts +13 -0
  27. package/dist/service/types/GRequest.d.ts +16 -0
  28. package/dist/service/types/GResponse.d.ts +10 -0
  29. package/dist/service/types/Game/GameAttemptType.d.ts +6 -0
  30. package/dist/service/types/Game/GameCanPlayType.d.ts +10 -0
  31. package/dist/service/types/Game/GameExternalStatus.d.ts +6 -0
  32. package/dist/service/types/Game/GameInfo.d.ts +9 -0
  33. package/dist/service/types/Game/GamePick.d.ts +90 -0
  34. package/dist/service/types/Game/GameUtil.d.ts +7 -0
  35. package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +7 -0
  36. package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +7 -0
  37. package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +5 -0
  38. package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +6 -0
  39. package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +5 -0
  40. package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +34 -0
  41. package/dist/service/types/SmarticoProto/PublicProperties.d.ts +11 -0
  42. package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +12 -0
  43. package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +5 -0
  44. package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +5 -0
  45. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +5 -0
  46. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +15 -0
  47. package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +10 -0
  48. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +3 -0
  49. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +5 -0
  50. package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +11 -0
  51. package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +8 -0
  52. package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +13 -0
  53. package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +21 -0
  54. package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +31 -0
  55. package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +12 -0
  56. package/dist/service/types/SmarticoProto/TranslationArea.d.ts +9 -0
  57. package/dist/service/types/User/UserInfo.d.ts +10 -0
  58. package/dist/util/Util.d.ts +51 -0
  59. package/docs/enums/BuyStoreItemErrorCode.md +16 -6
  60. package/docs/interfaces/JackpotPublicMeta.md +8 -0
  61. package/package.json +1 -1
  62. package/src/IntUtils.ts +1 -1
  63. package/src/Jackpots/JackpotPublicMeta.ts +6 -0
  64. package/src/Level/LevelPublicMeta.ts +5 -1
  65. package/src/Raffle/Raffle.ts +6 -0
  66. package/src/SmarticoLib/index.ts +5 -1
  67. package/src/Store/BuyStoreItemErrorCode.ts +9 -2
  68. package/src/WSAPI/WSAPI.ts +5 -0
  69. package/src/WSAPI/WSAPITypes.ts +5 -1
@@ -10,6 +10,12 @@ interface RafflePublicMeta {
10
10
  custom_section_id: number;
11
11
  /** URL of the image that represents the raffle */
12
12
  image_url: string;
13
+ /**
14
+ * Custom data as string or JSON string that can be used in API to build custom UI
15
+ * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
16
+ * Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
17
+ */
18
+ custom_data: string;
13
19
  }
14
20
 
15
21
 
@@ -851,7 +851,11 @@ export interface TLevel {
851
851
  *
852
852
  */
853
853
  required_level_counter_2: number;
854
- /** The custom data of the Level defined by operator in the BackOffice. Can be a JSON object, string or number */
854
+ /**
855
+ * Custom data as string or JSON string that can be used in API to build custom UI
856
+ * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
857
+ * Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
858
+ */
855
859
  custom_data: string;
856
860
  }
857
861
  /**
@@ -1,11 +1,18 @@
1
1
  export enum BuyStoreItemErrorCode {
2
- FAILED_TO_BUY_SHOP_ITEM = 121,
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
- SHOP_FAILED_TO_BUY_SHOP_ITEM_CONDITION = 11003, // when not visible but trying to buy. Shoudnt happen
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
  }
@@ -54,6 +54,7 @@ import { GetRelatedAchTourResponse } from '../Missions/GetRelatedAchTourResponse
54
54
  import { GetRafflesResponse } from '../Raffle/GetRafflesResponse';
55
55
  import { InboxCategories } from '../Inbox/InboxCategories';
56
56
  import { GetDrawRunRequest, GetDrawRunResponse, GetRaffleDrawRunsHistoryRequest, GetRaffleDrawRunsHistoryResponse } from '../Raffle';
57
+ import { IntUtils } from '../IntUtils';
57
58
 
58
59
  /** @hidden */
59
60
  const CACHE_DATA_SEC = 30;
@@ -951,6 +952,10 @@ export class WSAPI {
951
952
  const _jackpots = await this.api.jackpotGet(null, filter);
952
953
  const _pots = _jackpots.items.map((jp) => jp.pot);
953
954
 
955
+ _jackpots.items.forEach((jp) => {
956
+ jp.jp_public_meta.custom_data = IntUtils.JsonOrText(jp.jp_public_meta.custom_data);
957
+ });
958
+
954
959
  OCache.set(onUpdateContextKey.Pots, _pots, ECacheContext.WSAPI, JACKPOT_POT_CACHE_SEC);
955
960
  return _jackpots.items;
956
961
  },
@@ -241,7 +241,11 @@ export interface TLevel {
241
241
  */
242
242
  required_level_counter_2: number;
243
243
 
244
- /** The custom data of the Level defined by operator in the BackOffice. Can be a JSON object, string or number */
244
+ /**
245
+ * Custom data as string or JSON string that can be used in API to build custom UI
246
+ * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
247
+ * Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
248
+ */
245
249
  custom_data: string;
246
250
  }
247
251