@smartico/public-api 0.0.217 → 0.0.219

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 (72) hide show
  1. package/dist/Inbox/GetInboxMessagesRequest.d.ts +2 -0
  2. package/dist/Inbox/InboxCategories.d.ts +5 -0
  3. package/dist/Inbox/InboxMessage.d.ts +2 -0
  4. package/dist/Inbox/index.d.ts +1 -0
  5. package/dist/MiniGames/SAWTemplateUI.d.ts +1 -0
  6. package/dist/SmarticoAPI.d.ts +3 -2
  7. package/dist/WSAPI/WSAPI.d.ts +3 -1
  8. package/dist/WSAPI/WSAPITypes.d.ts +3 -0
  9. package/dist/index.js +16 -6
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.modern.mjs +17 -7
  12. package/dist/index.modern.mjs.map +1 -1
  13. package/docs/classes/WSAPI.md +1 -0
  14. package/docs/interfaces/TInboxMessage.md +8 -0
  15. package/package.json +1 -1
  16. package/src/Inbox/GetInboxMessagesRequest.ts +2 -0
  17. package/src/Inbox/GetInboxMessagesResponse.ts +1 -0
  18. package/src/Inbox/InboxCategories.ts +5 -0
  19. package/src/Inbox/InboxMessage.ts +3 -0
  20. package/src/Inbox/index.ts +1 -0
  21. package/src/MiniGames/SAWTemplateUI.ts +1 -0
  22. package/src/SmarticoAPI.ts +5 -1
  23. package/src/WSAPI/WSAPI.ts +4 -3
  24. package/src/WSAPI/WSAPITypes.ts +3 -0
  25. package/dist/Quiz/MarketsAnswersType.d.ts +0 -22
  26. package/dist/Raffle/GetDrawResponse.d.ts +0 -5
  27. package/dist/SmarticoPublicAPI.d.ts +0 -23
  28. package/dist/Store/BuyShopItemErrorCode.d.ts +0 -10
  29. package/dist/Store/BuyShopItemRequest.d.ts +0 -4
  30. package/dist/Store/BuyShopItemResponse.d.ts +0 -4
  31. package/dist/Store/GetCategoriesShopResponse.d.ts +0 -5
  32. package/dist/Store/GetShopItemsResponse.d.ts +0 -5
  33. package/dist/Store/ShopCategory.d.ts +0 -5
  34. package/dist/Store/ShopCategoryPublicMeta.d.ts +0 -4
  35. package/dist/Store/ShopItem.d.ts +0 -9
  36. package/dist/Store/ShopItemPublicMeta.d.ts +0 -10
  37. package/dist/Store/ShopItemType.d.ts +0 -4
  38. package/dist/Store/StorItemPruchased.d.ts +0 -6
  39. package/dist/service/index.d.ts +0 -5
  40. package/dist/service/types/ErrorCodes.d.ts +0 -13
  41. package/dist/service/types/GRequest.d.ts +0 -16
  42. package/dist/service/types/GResponse.d.ts +0 -10
  43. package/dist/service/types/Game/GameAttemptType.d.ts +0 -6
  44. package/dist/service/types/Game/GameCanPlayType.d.ts +0 -10
  45. package/dist/service/types/Game/GameExternalStatus.d.ts +0 -6
  46. package/dist/service/types/Game/GameInfo.d.ts +0 -9
  47. package/dist/service/types/Game/GamePick.d.ts +0 -90
  48. package/dist/service/types/Game/GameUtil.d.ts +0 -7
  49. package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +0 -7
  50. package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +0 -7
  51. package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +0 -5
  52. package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +0 -6
  53. package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +0 -5
  54. package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +0 -34
  55. package/dist/service/types/SmarticoProto/PublicProperties.d.ts +0 -11
  56. package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +0 -12
  57. package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +0 -5
  58. package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +0 -5
  59. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +0 -5
  60. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +0 -15
  61. package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +0 -10
  62. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +0 -3
  63. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +0 -5
  64. package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +0 -11
  65. package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +0 -8
  66. package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +0 -13
  67. package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +0 -21
  68. package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +0 -31
  69. package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +0 -12
  70. package/dist/service/types/SmarticoProto/TranslationArea.d.ts +0 -9
  71. package/dist/service/types/User/UserInfo.d.ts +0 -10
  72. package/dist/util/Util.d.ts +0 -51
@@ -1,6 +1,8 @@
1
+ import { InboxCategories } from './InboxCategories';
1
2
  import { ProtocolMessage } from '../Base/ProtocolMessage';
2
3
  export interface GetInboxMessagesRequest extends ProtocolMessage {
3
4
  limit?: number;
4
5
  offset?: number;
5
6
  starred_only?: boolean;
7
+ category_id?: InboxCategories;
6
8
  }
@@ -0,0 +1,5 @@
1
+ export declare enum InboxCategories {
2
+ General = 0,
3
+ Platform = 1,
4
+ Personal = 2
5
+ }
@@ -1,4 +1,5 @@
1
1
  import { TInboxMessageBody } from '../WSAPI/WSAPITypes';
2
+ import { InboxCategories } from './InboxCategories';
2
3
  import { InboxMessageType } from './InboxMessageType';
3
4
  import { OpenLinksType } from './OpenLinksType';
4
5
  export interface InboxMessageBody {
@@ -24,5 +25,6 @@ export interface InboxMessage {
24
25
  is_read: boolean;
25
26
  is_starred: boolean;
26
27
  is_deleted?: boolean;
28
+ category_id?: InboxCategories;
27
29
  }
28
30
  export declare const InboxMessageBodyTransform: (item: InboxMessageBody) => TInboxMessageBody;
@@ -9,3 +9,4 @@ export * from './MarkInboxMessageStarredResponse';
9
9
  export * from './MarkInboxMessageDeletedRequest';
10
10
  export * from './MarkInboxMessageDeletedResponse';
11
11
  export * from './OpenLinksType';
12
+ export * from './InboxCategories';
@@ -15,6 +15,7 @@ export interface SAWTemplateUI {
15
15
  background_image_mobile?: string;
16
16
  background_sound?: string;
17
17
  spin_animation_duration?: number;
18
+ wheel_pointer_rotation?: number;
18
19
  scratch_logo?: string;
19
20
  scratch_cover?: string;
20
21
  scratch_bg_desktop?: string;
@@ -20,6 +20,7 @@ import { SAWDoSpinBatchResponse } from './MiniGames/SAWDoSpinBatchResponse';
20
20
  import { SAWDoAcknowledgeBatchResponse } from './MiniGames/SAWDoAcknowledgeBatchResponse';
21
21
  import { GetRelatedAchTourResponse } from './Missions/GetRelatedAchTourResponse';
22
22
  import { GetRafflesResponse } from './Raffle/GetRafflesResponse';
23
+ import { InboxCategories } from './Inbox/InboxCategories';
23
24
  interface Tracker {
24
25
  label_api_key: string;
25
26
  userPublicProps: any;
@@ -117,8 +118,8 @@ declare class SmarticoAPI {
117
118
  getCustomSections(user_ext_id: string): Promise<GetCustomSectionsResponse>;
118
119
  getCustomSectionsT(user_ext_id: string): Promise<TUICustomSection[]>;
119
120
  getTranslationsT(user_ext_id: string, lang_code: string, areas: TranslationArea[], cacheSec?: number): Promise<GetTranslationsResponse>;
120
- getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean): Promise<GetInboxMessagesResponse>;
121
- getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean): Promise<TInboxMessage[]>;
121
+ getInboxMessages(user_ext_id: string, limit: number, offset: number, starred_only: boolean, category_id?: InboxCategories): Promise<GetInboxMessagesResponse>;
122
+ getInboxMessagesT(user_ext_id: string, from?: number, to?: number, favoriteOnly?: boolean, categoryId?: InboxCategories): Promise<TInboxMessage[]>;
122
123
  getInboxMessageBody(messageGuid: string): Promise<InboxMessageBody>;
123
124
  getInboxMessageBodyT(messageGuid: string): Promise<TInboxMessageBody>;
124
125
  markInboxMessageRead(user_ext_id: string, messageGuid: string): Promise<MarkInboxMessageReadResponse>;
@@ -4,6 +4,7 @@ import { LeaderBoardPeriodType } from '../Leaderboard';
4
4
  import { JackpotDetails, JackpotsOptinResponse, JackpotsOptoutResponse } from '../Jackpots';
5
5
  import { GetRelatedAchTourResponse } from 'src/Missions/GetRelatedAchTourResponse';
6
6
  import { GetRafflesResponse } from '../Raffle/GetRafflesResponse';
7
+ import { InboxCategories } from '../Inbox/InboxCategories';
7
8
  /** @group General API */
8
9
  export declare class WSAPI {
9
10
  private api;
@@ -412,10 +413,11 @@ export declare class WSAPI {
412
413
  *
413
414
  * @param params
414
415
  */
415
- getInboxMessages({ from, to, onlyFavorite, onUpdate, }?: {
416
+ getInboxMessages({ from, to, onlyFavorite, categoryId, onUpdate, }?: {
416
417
  from?: number;
417
418
  to?: number;
418
419
  onlyFavorite?: boolean;
420
+ categoryId?: InboxCategories;
419
421
  onUpdate?: (data: TInboxMessage[]) => void;
420
422
  }): Promise<TInboxMessage[]>;
421
423
  /**
@@ -6,6 +6,7 @@ import { LeaderBoardPeriodType } from '../Leaderboard';
6
6
  import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from '../CustomSections';
7
7
  import { BonusStatus, BonusTemplateMetaMap, BonusMetaMap } from '../Bonuses';
8
8
  import { PrizeModifiers } from '../MiniGames/PrizeModifiers';
9
+ import { InboxCategories } from '../Inbox/InboxCategories';
9
10
  type TRibbon = 'sale' | 'hot' | 'new' | 'vip' | string;
10
11
  /**
11
12
  * TMiniGamePrize describes the information of prize in the array of prizes in the TMiniGameTemplate
@@ -620,6 +621,8 @@ export interface TInboxMessage {
620
621
  read: boolean;
621
622
  /** Indicator if a message is added to favorites */
622
623
  favorite: boolean;
624
+ /** Category id per inbox message, can be part of System inboxes, Personal inboxes or General inbox messages */
625
+ category_id?: InboxCategories;
623
626
  }
624
627
  export interface TInboxMessageBody {
625
628
  /** Message title */
package/dist/index.js CHANGED
@@ -763,7 +763,8 @@ var InboxMessagesTransform = function InboxMessagesTransform(items) {
763
763
  sent_date: item.createDate,
764
764
  message_guid: item.engagement_uid,
765
765
  read: item.is_read,
766
- favorite: item.is_starred
766
+ favorite: item.is_starred,
767
+ category_id: item.category_id
767
768
  };
768
769
  return x;
769
770
  });
@@ -810,6 +811,13 @@ exports.OpenLinksType = void 0;
810
811
  OpenLinksType[OpenLinksType["CurrentWindow"] = 2] = "CurrentWindow";
811
812
  })(exports.OpenLinksType || (exports.OpenLinksType = {}));
812
813
 
814
+ exports.InboxCategories = void 0;
815
+ (function (InboxCategories) {
816
+ InboxCategories[InboxCategories["General"] = 0] = "General";
817
+ InboxCategories[InboxCategories["Platform"] = 1] = "Platform";
818
+ InboxCategories[InboxCategories["Personal"] = 2] = "Personal";
819
+ })(exports.InboxCategories || (exports.InboxCategories = {}));
820
+
813
821
  exports.BuyStoreItemErrorCode = void 0;
814
822
  (function (BuyStoreItemErrorCode) {
815
823
  BuyStoreItemErrorCode[BuyStoreItemErrorCode["FAILED_TO_BUY_SHOP_ITEM"] = 121] = "FAILED_TO_BUY_SHOP_ITEM";
@@ -2330,13 +2338,14 @@ var WSAPI = /*#__PURE__*/function () {
2330
2338
  from = _ref9.from,
2331
2339
  to = _ref9.to,
2332
2340
  onlyFavorite = _ref9.onlyFavorite,
2341
+ categoryId = _ref9.categoryId,
2333
2342
  onUpdate = _ref9.onUpdate;
2334
2343
  try {
2335
2344
  var _this27 = this;
2336
2345
  if (onUpdate) {
2337
2346
  _this27.onUpdateCallback.set(onUpdateContextKey.InboxMessages, onUpdate);
2338
2347
  }
2339
- return Promise.resolve(_this27.api.getInboxMessagesT(null, from, to, onlyFavorite));
2348
+ return Promise.resolve(_this27.api.getInboxMessagesT(null, from, to, onlyFavorite, categoryId));
2340
2349
  } catch (e) {
2341
2350
  return Promise.reject(e);
2342
2351
  }
@@ -3746,7 +3755,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
3746
3755
  return Promise.reject(e);
3747
3756
  }
3748
3757
  };
3749
- _proto.getInboxMessages = function getInboxMessages(user_ext_id, limit, offset, starred_only) {
3758
+ _proto.getInboxMessages = function getInboxMessages(user_ext_id, limit, offset, starred_only, category_id) {
3750
3759
  if (limit === void 0) {
3751
3760
  limit = 20;
3752
3761
  }
@@ -3758,14 +3767,15 @@ var SmarticoAPI = /*#__PURE__*/function () {
3758
3767
  var message = _this53.buildMessage(user_ext_id, exports.ClassId.GET_INBOX_MESSAGES_REQUEST, {
3759
3768
  limit: limit,
3760
3769
  offset: offset,
3761
- starred_only: starred_only
3770
+ starred_only: starred_only,
3771
+ category_id: category_id
3762
3772
  });
3763
3773
  return Promise.resolve(_this53.send(message, exports.ClassId.GET_INBOX_MESSAGES_RESPONSE));
3764
3774
  } catch (e) {
3765
3775
  return Promise.reject(e);
3766
3776
  }
3767
3777
  };
3768
- _proto.getInboxMessagesT = function getInboxMessagesT(user_ext_id, from, to, favoriteOnly) {
3778
+ _proto.getInboxMessagesT = function getInboxMessagesT(user_ext_id, from, to, favoriteOnly, categoryId) {
3769
3779
  if (from === void 0) {
3770
3780
  from = 0;
3771
3781
  }
@@ -3779,7 +3789,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
3779
3789
  var _this54 = this;
3780
3790
  var limit = to - from > 20 ? 20 : to - from;
3781
3791
  var offset = from;
3782
- return Promise.resolve(_this54.getInboxMessages(user_ext_id, limit, offset, favoriteOnly)).then(function (_this54$getInboxMessa) {
3792
+ return Promise.resolve(_this54.getInboxMessages(user_ext_id, limit, offset, favoriteOnly, categoryId)).then(function (_this54$getInboxMessa) {
3783
3793
  return InboxMessagesTransform(_this54$getInboxMessa.log);
3784
3794
  });
3785
3795
  } catch (e) {