@smartico/public-api 0.0.302 → 0.0.304

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.
@@ -18,5 +18,7 @@ export declare enum BuyStoreItemErrorCode {
18
18
  /** User doesn't have enough gems on balance */
19
19
  SHOP_NO_BALANCE_GEMS = 11011,
20
20
  /** User doesn't have enough diamonds on balance */
21
- SHOP_NO_BALANCE_DIAMONDS = 11012
21
+ SHOP_NO_BALANCE_DIAMONDS = 11012,
22
+ /** Failed to buy item because of purchase limitation */
23
+ SHOP_FAILED_PURCHASE_LIMITATION = 11014
22
24
  }
@@ -17,4 +17,5 @@ export interface StoreItemPublicMeta {
17
17
  discount_prize?: number;
18
18
  discount_prize_ribbon?: string;
19
19
  custom_ribbon_image?: string;
20
+ purchase_limit_message?: string;
20
21
  }
@@ -253,7 +253,7 @@ export interface TLevel {
253
253
  export interface TLevelCurrent extends TLevel {
254
254
  /** The ordinal position of the level */
255
255
  ordinal_position: number;
256
- /** The progress of the level */
256
+ /** The progress of the user towards next level in the percents to complete */
257
257
  progress: number;
258
258
  }
259
259
  /**
@@ -460,6 +460,11 @@ export interface TStoreItem {
460
460
  **Note**: when user is trying to buy the item, the response from server can return custom error messages that can be shown to the user as well
461
461
  */
462
462
  limit_message: string;
463
+ /** The message that should be shown to the user if they are not eligible to buy it because of purchase limitation. This message can be used to explain the reason why user cannot buy the item, e.g. 'Item is no more available today. Come back Friday'.
464
+ The message is translated to the user language.
465
+ **Note**: when user is trying to buy the item, the response from server can return custom error messages that can be shown to the user as well
466
+ */
467
+ purchase_limit_message: string;
463
468
  /** The priority of the store item. Can be used to sort the items in the store */
464
469
  priority: number;
465
470
  /** The list of IDs of the related items. Can be used to show the related items in the store */
package/dist/index.js CHANGED
@@ -910,6 +910,8 @@ exports.BuyStoreItemErrorCode = void 0;
910
910
  BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_NO_BALANCE_GEMS"] = 11011] = "SHOP_NO_BALANCE_GEMS";
911
911
  /** User doesn't have enough diamonds on balance */
912
912
  BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_NO_BALANCE_DIAMONDS"] = 11012] = "SHOP_NO_BALANCE_DIAMONDS";
913
+ /** Failed to buy item because of purchase limitation */
914
+ BuyStoreItemErrorCode[BuyStoreItemErrorCode["SHOP_FAILED_PURCHASE_LIMITATION"] = 11014] = "SHOP_FAILED_PURCHASE_LIMITATION";
913
915
  })(exports.BuyStoreItemErrorCode || (exports.BuyStoreItemErrorCode = {}));
914
916
 
915
917
  var StoreCategoryTransform = function StoreCategoryTransform(items) {
@@ -979,6 +981,7 @@ var StoreItemTransform = function StoreItemTransform(items) {
979
981
  description: r.itemPublicMeta.description,
980
982
  ribbon: r.itemPublicMeta.label_tag === 'custom' ? r.itemPublicMeta.custom_label_tag : r.itemPublicMeta.label_tag,
981
983
  limit_message: r.itemPublicMeta.limit_message,
984
+ purchase_limit_message: r.itemPublicMeta.purchase_limit_message,
982
985
  priority: (_r$itemPublicMeta$pri = r.itemPublicMeta.priority) != null ? _r$itemPublicMeta$pri : 0,
983
986
  related_item_ids: r.itemPublicMeta.related_items,
984
987
  hint_text: r.itemPublicMeta.hint_text,
@@ -1023,6 +1026,7 @@ var StoreItemPurchasedTransform = function StoreItemPurchasedTransform(items) {
1023
1026
  description: r.itemPublicMeta.description,
1024
1027
  ribbon: r.itemPublicMeta.label_tag === 'custom' ? r.itemPublicMeta.custom_label_tag : r.itemPublicMeta.label_tag,
1025
1028
  limit_message: r.itemPublicMeta.limit_message,
1029
+ purchase_limit_message: r.itemPublicMeta.purchase_limit_message,
1026
1030
  priority: (_r$itemPublicMeta$pri = r.itemPublicMeta.priority) != null ? _r$itemPublicMeta$pri : 0,
1027
1031
  related_item_ids: r.itemPublicMeta.related_items,
1028
1032
  hint_text: r.itemPublicMeta.hint_text,