@smartico/public-api 0.0.249 → 0.0.251
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.
- package/dist/SmarticoLib/index.d.ts +6 -0
- package/dist/Store/StoreItem.d.ts +1 -0
- package/dist/Store/StoreItemPublicMeta.d.ts +5 -0
- package/dist/WSAPI/WSAPITypes.d.ts +2 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +2 -1
- package/dist/index.modern.mjs.map +1 -1
- package/package.json +1 -1
- package/src/SmarticoLib/index.ts +6 -0
- package/src/Store/StoreItem.ts +2 -0
- package/src/Store/StoreItemPublicMeta.ts +5 -0
- package/src/WSAPI/WSAPITypes.ts +2 -0
package/package.json
CHANGED
package/src/SmarticoLib/index.ts
CHANGED
|
@@ -265,6 +265,11 @@ export interface StoreItemPublicMeta {
|
|
|
265
265
|
priority: number;
|
|
266
266
|
related_items: number[];
|
|
267
267
|
hint_text: string;
|
|
268
|
+
show_timer?: boolean;
|
|
269
|
+
cant_buy_message?: string;
|
|
270
|
+
discount_prize?: number;
|
|
271
|
+
discount_prize_ribbon?: string;
|
|
272
|
+
custom_ribbon_image?: string;
|
|
268
273
|
}
|
|
269
274
|
declare enum StoreItemType {
|
|
270
275
|
Bonus = 1,
|
|
@@ -277,6 +282,7 @@ export interface StoreItem {
|
|
|
277
282
|
categoryIds?: number[];
|
|
278
283
|
canBuy?: boolean;
|
|
279
284
|
shopPool: number;
|
|
285
|
+
activeTillDate?: number;
|
|
280
286
|
}
|
|
281
287
|
export interface GetStoreItemsResponse extends ProtocolResponse {
|
|
282
288
|
items: StoreItem[];
|
package/src/Store/StoreItem.ts
CHANGED
|
@@ -11,6 +11,7 @@ export interface StoreItem {
|
|
|
11
11
|
categoryIds?: number[];
|
|
12
12
|
canBuy?: boolean;
|
|
13
13
|
shopPool: number;
|
|
14
|
+
activeTillDate?: number;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
const mapPurchaseType = (purchaseType: StoreItemPurchaseType) => {
|
|
@@ -47,6 +48,7 @@ export const StoreItemTransform = (items: StoreItem[]): TStoreItem[] => {
|
|
|
47
48
|
category_ids: r.categoryIds ?? [],
|
|
48
49
|
pool: r.shopPool,
|
|
49
50
|
custom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data),
|
|
51
|
+
active_till_date: r.activeTillDate
|
|
50
52
|
};
|
|
51
53
|
return x;
|
|
52
54
|
});
|
|
@@ -13,4 +13,9 @@ export interface StoreItemPublicMeta {
|
|
|
13
13
|
related_items: number[];
|
|
14
14
|
hint_text: string;
|
|
15
15
|
custom_data: string;
|
|
16
|
+
show_timer?: boolean;
|
|
17
|
+
cant_buy_message?: string;
|
|
18
|
+
discount_prize?: number;
|
|
19
|
+
discount_prize_ribbon?: string;
|
|
20
|
+
custom_ribbon_image?: string;
|
|
16
21
|
}
|
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -474,6 +474,8 @@ export interface TStoreItem {
|
|
|
474
474
|
purchased_this_month?: boolean;
|
|
475
475
|
/** The type of the purchase */
|
|
476
476
|
purchase_type: 'points' | 'gems' | 'diamonds';
|
|
477
|
+
/** The date when the store item will be available till */
|
|
478
|
+
active_till_date?: number;
|
|
477
479
|
}
|
|
478
480
|
|
|
479
481
|
/**
|