@smartico/public-api 0.0.247 → 0.0.249

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.
@@ -8,6 +8,8 @@ interface RafflePublicMeta {
8
8
  custom_section_id: number;
9
9
  /** URL of the image that represents the raffle */
10
10
  image_url: string;
11
+ /** URL of the mobile image that represents the raffle */
12
+ image_url_mobile: string;
11
13
  /**
12
14
  * Custom data as string or JSON string that can be used in API to build custom UI
13
15
  * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
@@ -9,6 +9,8 @@ export interface RaffleDrawPublicMeta {
9
9
  icon_url: string;
10
10
  /** URL of the background image that will be used in the draw list item */
11
11
  background_image_url: string;
12
+ /** URL of the moible background image that will be used in the draw list item */
13
+ background_image_url_mobile: string;
12
14
  /** Show if the draw is grand and is marked as special */
13
15
  is_grand: boolean;
14
16
  }
@@ -6,5 +6,6 @@ interface RafflePrizeWinner {
6
6
  avatar_url?: string;
7
7
  ticket: RaffleTicket;
8
8
  raf_won_id: number;
9
+ claimed_date: number;
9
10
  }
10
11
  export { RafflePrizeWinner };
package/dist/index.js CHANGED
@@ -3052,14 +3052,9 @@ var SmarticoAPI = /*#__PURE__*/function () {
3052
3052
  return C_SOCKET_PROD.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
3053
3053
  };
3054
3054
  SmarticoAPI.getAvatarUrl = function getAvatarUrl(label_api_key) {
3055
- var envId = SmarticoAPI.getEnvDnsSuffix(label_api_key);
3055
+ SmarticoAPI.getEnvDnsSuffix(label_api_key);
3056
3056
  var avatarUrl = AVATAR_DOMAIN.replace('{ENV_ID}', SmarticoAPI.getEnvDnsSuffix(label_api_key));
3057
- var envs = ['4', '5', '6', '7'];
3058
- if (envs.includes(envId)) {
3059
- return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
3060
- } else {
3061
- return avatarUrl;
3062
- }
3057
+ return SmarticoAPI.replaceSmrDomainsWithCloudfront(avatarUrl);
3063
3058
  };
3064
3059
  var _proto = SmarticoAPI.prototype;
3065
3060
  _proto.send = function send(message, expectCID, force_language) {
@@ -3119,11 +3114,8 @@ var SmarticoAPI = /*#__PURE__*/function () {
3119
3114
  var timeStart = new Date().getTime();
3120
3115
  return Promise.resolve(_this.messageSender(message, _this.publicUrl, expectCID)).then(function (_this$messageSender) {
3121
3116
  result = _this$messageSender;
3117
+ result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
3122
3118
  var timeEnd = new Date().getTime();
3123
- var envs = ['4', '5', '6', '7'];
3124
- if (envs.includes(SmarticoAPI.getEnvDnsSuffix(_this.label_api_key)) && result) {
3125
- result = SmarticoAPI.replaceSmrDomainsWithCloudfront(result);
3126
- }
3127
3119
  if (_this.logHTTPTiming) {
3128
3120
  _this.logger.always('HTTP time, ms:' + (timeEnd - timeStart));
3129
3121
  }