@smartico/public-api 0.0.237 → 0.0.238

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.
@@ -105,6 +105,8 @@ export declare enum ClassId {
105
105
  RAF_GET_DRAW_RUN_RESPONSE = 905,
106
106
  RAF_GET_DRAW_HISTORY_REQUEST = 906,
107
107
  RAF_GET_DRAW_HISTORY_RESPONSE = 907,
108
+ RAF_CLAIM_PRIZE_REQUEST = 908,
109
+ RAF_CLAIM_PRIZE_RESPONSE = 909,
108
110
  REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,
109
111
  REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,
110
112
  CLIENT_DEBUG_REQUEST = 77777,
@@ -1,5 +1,6 @@
1
1
  import { TUICustomSection } from '../WSAPI/WSAPITypes';
2
2
  import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from './AchCustomSection';
3
+ import { GetCustomSectionsResponse } from './GetCustomSectionsResponse';
3
4
  export interface UICustomSection {
4
5
  body?: string;
5
6
  menu_img?: string;
@@ -12,4 +13,4 @@ export interface UICustomSection {
12
13
  overview_missions_filter?: AchOverviewMissionsFilter;
13
14
  overview_missions_count?: number;
14
15
  }
15
- export declare const UICustomSectionTransform: (items: UICustomSection[]) => TUICustomSection[];
16
+ export declare const UICustomSectionTransform: (response: GetCustomSectionsResponse) => TUICustomSection[];
@@ -0,0 +1,4 @@
1
+ import { ProtocolMessage } from "../Base/ProtocolMessage";
2
+ export interface RaffleClaimPrizeRequest extends ProtocolMessage {
3
+ won_id: number;
4
+ }
@@ -0,0 +1,3 @@
1
+ import { ProtocolResponse } from "../Base/ProtocolResponse";
2
+ export interface RaffleClaimPrizeResponse extends ProtocolResponse {
3
+ }
@@ -10,3 +10,5 @@ export * from './RafflePrizeWinner';
10
10
  export * from './RaffleTicket';
11
11
  export * from './GetRaffleDrawRunsHistoryRequest';
12
12
  export * from './GetRaffleDrawRunsHistoryResponse';
13
+ export * from './RaffleClaimPrizeRequest';
14
+ export * from './RaffleClaimPrizeResponse';
@@ -700,6 +700,8 @@ export interface TSegmentCheckResult {
700
700
  is_matching: boolean;
701
701
  }
702
702
  export interface TUICustomSection {
703
+ /** The ID of the custom section */
704
+ id: number;
703
705
  /** The body of the custom section */
704
706
  body?: string;
705
707
  /** The image of the custom section */
package/dist/index.js CHANGED
@@ -129,6 +129,8 @@ exports.ClassId = void 0;
129
129
  ClassId[ClassId["RAF_GET_DRAW_RUN_RESPONSE"] = 905] = "RAF_GET_DRAW_RUN_RESPONSE";
130
130
  ClassId[ClassId["RAF_GET_DRAW_HISTORY_REQUEST"] = 906] = "RAF_GET_DRAW_HISTORY_REQUEST";
131
131
  ClassId[ClassId["RAF_GET_DRAW_HISTORY_RESPONSE"] = 907] = "RAF_GET_DRAW_HISTORY_RESPONSE";
132
+ ClassId[ClassId["RAF_CLAIM_PRIZE_REQUEST"] = 908] = "RAF_CLAIM_PRIZE_REQUEST";
133
+ ClassId[ClassId["RAF_CLAIM_PRIZE_RESPONSE"] = 909] = "RAF_CLAIM_PRIZE_RESPONSE";
132
134
  /*
133
135
  RAF_GET_TICKETS_REQUEST = 902,
134
136
  RAF_GET_TICKETS_RESPONSE = 903,
@@ -2846,24 +2848,29 @@ var AchOverviewMissionsFilter;
2846
2848
  AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_EXCEPT_COMPLETED_AND_LOCKED"] = 5] = "ALL_EXCEPT_COMPLETED_AND_LOCKED";
2847
2849
  })(AchOverviewMissionsFilter || (AchOverviewMissionsFilter = {}));
2848
2850
 
2849
- var UICustomSectionTransform = function UICustomSectionTransform(items) {
2850
- return items.filter(function (r) {
2851
- return r.section_type_id !== undefined && r.section_type_id >= 1;
2852
- }).map(function (r) {
2853
- var x = {
2854
- body: r.body,
2855
- menu_img: r.menu_img,
2856
- menu_name: r.menu_name,
2857
- section_type_id: r.section_type_id,
2858
- custom_skin_images: r.custom_skin_images,
2859
- generic_custom_css: r.generic_custom_css,
2860
- mission_tabs_options: r.mission_tabs_options,
2861
- overview_missions_count: r.overview_missions_count,
2862
- overview_missions_filter: r.overview_missions_filter,
2863
- theme: r.theme
2864
- };
2865
- return x;
2851
+ var UICustomSectionTransform = function UICustomSectionTransform(response) {
2852
+ var items = [];
2853
+ Object.keys(response.customSections).forEach(function (key) {
2854
+ var r = response.customSections[key];
2855
+ var id = parseInt(key);
2856
+ if (r.section_type_id !== undefined && r.section_type_id >= 1) {
2857
+ var x = {
2858
+ id: id,
2859
+ body: r.body,
2860
+ menu_img: r.menu_img,
2861
+ menu_name: r.menu_name,
2862
+ section_type_id: r.section_type_id,
2863
+ custom_skin_images: r.custom_skin_images,
2864
+ generic_custom_css: r.generic_custom_css,
2865
+ mission_tabs_options: r.mission_tabs_options,
2866
+ overview_missions_count: r.overview_missions_count,
2867
+ overview_missions_filter: r.overview_missions_filter,
2868
+ theme: r.theme
2869
+ };
2870
+ items.push(x);
2871
+ }
2866
2872
  });
2873
+ return items;
2867
2874
  };
2868
2875
 
2869
2876
  var BonusItemsTransform = function BonusItemsTransform(items) {
@@ -3811,9 +3818,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
3811
3818
  _proto.getCustomSectionsT = function getCustomSectionsT(user_ext_id) {
3812
3819
  try {
3813
3820
  var _this51 = this;
3814
- return Promise.resolve(_this51.getCustomSections(user_ext_id)).then(function (_this51$getCustomSect) {
3815
- return UICustomSectionTransform(Object.values(_this51$getCustomSect.customSections));
3816
- });
3821
+ return Promise.resolve(_this51.getCustomSections(user_ext_id)).then(UICustomSectionTransform);
3817
3822
  } catch (e) {
3818
3823
  return Promise.reject(e);
3819
3824
  }