@smartico/public-api 0.0.329 → 0.0.330

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.
@@ -113,8 +113,8 @@ export declare enum ClassId {
113
113
  RAF_GET_DRAW_HISTORY_RESPONSE = 907,
114
114
  RAF_CLAIM_PRIZE_REQUEST = 908,
115
115
  RAF_CLAIM_PRIZE_RESPONSE = 909,
116
- RAF_OPTIN_REQUEST = 910,
117
- RAF_OPTIN_RESPONSE = 911,
116
+ RAF_OPTIN_REQUEST = 916,
117
+ RAF_OPTIN_RESPONSE = 917,
118
118
  REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,
119
119
  REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,
120
120
  CLIENT_DEBUG_REQUEST = 77777,
@@ -34,14 +34,6 @@ interface Raffle {
34
34
  * Number of tickets that are already given to all users for this raffle
35
35
  */
36
36
  current_tickets_count: number;
37
- /**
38
- * If true, the user has opted-in to the raffle.
39
- */
40
- user_opted_in: boolean;
41
- /**
42
- * If true, the user needs to opt-in to the raffle before they can participate.
43
- */
44
- requires_optin: boolean;
45
37
  /**
46
38
  * List of draws that are available for this raffle.
47
39
  * For example, if the raffle is containg one hourly draw, one daily draw and one draw on fixed date like 01/01/2022,
@@ -83,5 +83,13 @@ interface RaffleDraw {
83
83
  * List of last 5 tickets are collected by current user for this instance of draw.
84
84
  */
85
85
  my_last_tickets: RaffleTicket[];
86
+ /**
87
+ * If true, the user has opted-in to the raffle.
88
+ */
89
+ user_opted_in: boolean;
90
+ /**
91
+ * If true, the user needs to opt-in to the raffle before they can participate.
92
+ */
93
+ requires_optin: boolean;
86
94
  }
87
95
  export { RaffleDraw };
@@ -935,14 +935,6 @@ export interface TRaffle {
935
935
  * Number of tickets that are already given to all users for this raffle
936
936
  */
937
937
  current_tickets_count: number;
938
- /**
939
- * If true, the user has opted-in to the raffle.
940
- */
941
- user_opted_in: boolean;
942
- /**
943
- * If true, the user needs to opt-in to the raffle before they can participate.
944
- */
945
- requires_optin: boolean;
946
938
  /**
947
939
  * List of draws that are available for this raffle.
948
940
  * For example, if the raffle is containg one hourly draw, one daily draw and one draw on fixed date like 01/01/2022,
@@ -1138,6 +1130,14 @@ export interface TRaffleDraw {
1138
1130
  */
1139
1131
  my_tickets_count: number;
1140
1132
  my_last_tickets: TRaffleTicket[];
1133
+ /**
1134
+ * If true, the user has opted-in to the raffle.
1135
+ */
1136
+ user_opted_in: boolean;
1137
+ /**
1138
+ * If true, the user needs to opt-in to the raffle before they can participate.
1139
+ */
1140
+ requires_optin: boolean;
1141
1141
  }
1142
1142
  export interface TRaffleDrawRun {
1143
1143
  /**
package/dist/index.js CHANGED
@@ -137,8 +137,8 @@ exports.ClassId = void 0;
137
137
  ClassId[ClassId["RAF_GET_DRAW_HISTORY_RESPONSE"] = 907] = "RAF_GET_DRAW_HISTORY_RESPONSE";
138
138
  ClassId[ClassId["RAF_CLAIM_PRIZE_REQUEST"] = 908] = "RAF_CLAIM_PRIZE_REQUEST";
139
139
  ClassId[ClassId["RAF_CLAIM_PRIZE_RESPONSE"] = 909] = "RAF_CLAIM_PRIZE_RESPONSE";
140
- ClassId[ClassId["RAF_OPTIN_REQUEST"] = 910] = "RAF_OPTIN_REQUEST";
141
- ClassId[ClassId["RAF_OPTIN_RESPONSE"] = 911] = "RAF_OPTIN_RESPONSE";
140
+ ClassId[ClassId["RAF_OPTIN_REQUEST"] = 916] = "RAF_OPTIN_REQUEST";
141
+ ClassId[ClassId["RAF_OPTIN_RESPONSE"] = 917] = "RAF_OPTIN_RESPONSE";
142
142
  /*
143
143
  RAF_GET_TICKETS_REQUEST = 902,
144
144
  RAF_GET_TICKETS_RESPONSE = 903,
@@ -1966,7 +1966,9 @@ var drawTransform = function drawTransform(items) {
1966
1966
  allow_multi_prize_per_ticket: item.allow_multi_prize_per_ticket,
1967
1967
  total_tickets_count: item.total_tickets_count,
1968
1968
  my_tickets_count: item.my_tickets_count,
1969
- my_last_tickets: ticketsTransform(item.my_last_tickets)
1969
+ my_last_tickets: ticketsTransform(item.my_last_tickets),
1970
+ user_opted_in: Boolean(item.user_opted_in),
1971
+ requires_optin: Boolean(item.requires_optin)
1970
1972
  };
1971
1973
  });
1972
1974
  };
@@ -1985,8 +1987,6 @@ var raffleTransform = function raffleTransform(items) {
1985
1987
  end_date: item.end_date_ts,
1986
1988
  max_tickets_count: item.max_tickets_count,
1987
1989
  current_tickets_count: item.current_tickets_count,
1988
- user_opted_in: item.user_opted_in,
1989
- requires_optin: item.requires_optin,
1990
1990
  draws: drawTransform(item.draws)
1991
1991
  };
1992
1992
  });
@@ -2016,7 +2016,9 @@ var drawRunTransform = function drawRunTransform(res) {
2016
2016
  allow_multi_prize_per_ticket: res.draw.allow_multi_prize_per_ticket,
2017
2017
  total_tickets_count: res.draw.total_tickets_count,
2018
2018
  my_tickets_count: res.draw.my_tickets_count,
2019
- my_last_tickets: ticketsTransform(res.draw.my_last_tickets)
2019
+ my_last_tickets: ticketsTransform(res.draw.my_last_tickets),
2020
+ user_opted_in: Boolean(res.draw.user_opted_in),
2021
+ requires_optin: Boolean(res.draw.requires_optin)
2020
2022
  };
2021
2023
  };
2022
2024