@smartico/public-api 0.0.185 → 0.0.187
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/Inbox/InboxMessage.d.ts +2 -0
- package/dist/MiniGames/SAWWinningHistoryResponse.d.ts +2 -0
- package/dist/Missions/UserAchievement.d.ts +1 -0
- package/dist/Store/StoreItemPublicMeta.d.ts +1 -0
- package/dist/WSAPI/WSAPI.d.ts +1 -1
- package/dist/WSAPI/WSAPITypes.d.ts +8 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +6 -2
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/TMissionOrBadge.md +8 -0
- package/docs/interfaces/TSawHistory.md +16 -0
- package/package.json +1 -1
- package/src/Inbox/InboxMessage.ts +18 -0
- package/src/MiniGames/SAWWinningHistoryResponse.ts +5 -1
- package/src/Missions/UserAchievement.ts +2 -0
- package/src/Store/StoreItem.ts +2 -0
- package/src/Store/StoreItemPublicMeta.ts +1 -0
- package/src/WSAPI/WSAPI.ts +1 -1
- package/src/WSAPI/WSAPITypes.ts +10 -0
|
@@ -11,5 +11,7 @@ export interface SAWPrizesHistory {
|
|
|
11
11
|
prize_amount: number;
|
|
12
12
|
client_request_id: string;
|
|
13
13
|
is_claimed: boolean;
|
|
14
|
+
create_date_ts: number;
|
|
15
|
+
acknowledge_date_ts: number;
|
|
14
16
|
}
|
|
15
17
|
export declare const SAWHistoryTransform: (items: SAWPrizesHistory[]) => TSawHistory[];
|
|
@@ -27,6 +27,7 @@ export interface UserAchievement {
|
|
|
27
27
|
scheduledMissionType?: ScheduledMissionType;
|
|
28
28
|
related_games?: AchRelatedGame[];
|
|
29
29
|
active_from_ts?: number;
|
|
30
|
+
active_till_ts?: number;
|
|
30
31
|
ach_categories?: number[];
|
|
31
32
|
ach_completed_id?: number;
|
|
32
33
|
requires_prize_claim?: boolean;
|
package/dist/WSAPI/WSAPI.d.ts
CHANGED
|
@@ -285,7 +285,7 @@ export declare class WSAPI {
|
|
|
285
285
|
* **Visitor mode: not supported**
|
|
286
286
|
*/
|
|
287
287
|
playMiniGame(template_id: number, { onUpdate }?: {
|
|
288
|
-
onUpdate?: (data:
|
|
288
|
+
onUpdate?: (data: TMiniGameTemplate[]) => void;
|
|
289
289
|
}): Promise<TMiniGamePlayResult>;
|
|
290
290
|
/**
|
|
291
291
|
* Plays the specified by template_id mini-game on behalf of user spin_count times and returns array of the prizes
|
|
@@ -359,6 +359,8 @@ export interface TStoreItem {
|
|
|
359
359
|
category_ids: number[];
|
|
360
360
|
/** Number of items in the pool avaliable for the purchase.*/
|
|
361
361
|
pool?: number;
|
|
362
|
+
/** The custom data of the store item defined by operator. Can be a JSON object, string or number */
|
|
363
|
+
custom_data: any;
|
|
362
364
|
/** The T&C text for the store item */
|
|
363
365
|
hint_text?: string;
|
|
364
366
|
/** Purchase time to show in purchase history screen */
|
|
@@ -415,6 +417,8 @@ export interface TMissionOrBadge {
|
|
|
415
417
|
time_limit_ms: number;
|
|
416
418
|
/** Holds time from which mission will become available, for the missions that are targeted to be available from specific date/time */
|
|
417
419
|
active_from_ts: number;
|
|
420
|
+
/** Holds time till mission will become unavailable, for the missions that are targeted to be available from specific date/time */
|
|
421
|
+
active_till_ts: number;
|
|
418
422
|
/** The date when the mission was started, relevant for the time limited missions */
|
|
419
423
|
dt_start: number;
|
|
420
424
|
/** The progress of the mission in percents calculated as the aggregated relative percentage of all tasks */
|
|
@@ -686,5 +690,9 @@ export interface TSawHistory {
|
|
|
686
690
|
client_request_id: string;
|
|
687
691
|
/** Flag indicating to show whether prize in the mini-game claimed or not */
|
|
688
692
|
is_claimed: boolean;
|
|
693
|
+
/** Win prize date in milliseconds */
|
|
694
|
+
create_date_ts: number;
|
|
695
|
+
/** Claimed prize date in milliseconds */
|
|
696
|
+
acknowledge_date_ts: number;
|
|
689
697
|
}
|
|
690
698
|
export {};
|
package/dist/index.js
CHANGED
|
@@ -468,7 +468,9 @@ var SAWHistoryTransform = function SAWHistoryTransform(items) {
|
|
|
468
468
|
saw_prize_id: r.saw_prize_id,
|
|
469
469
|
prize_amount: r.prize_amount,
|
|
470
470
|
client_request_id: r.client_request_id,
|
|
471
|
-
is_claimed: r.is_claimed
|
|
471
|
+
is_claimed: r.is_claimed,
|
|
472
|
+
create_date_ts: r.create_date_ts,
|
|
473
|
+
acknowledge_date_ts: r.acknowledge_date_ts
|
|
472
474
|
};
|
|
473
475
|
return x;
|
|
474
476
|
});
|
|
@@ -805,7 +807,8 @@ var StoreItemTransform = function StoreItemTransform(items) {
|
|
|
805
807
|
type: StoreItemTypeNamed(r.itemTypeId),
|
|
806
808
|
can_buy: r.canBuy,
|
|
807
809
|
category_ids: (_r$categoryIds = r.categoryIds) != null ? _r$categoryIds : [],
|
|
808
|
-
pool: r.shopPool
|
|
810
|
+
pool: r.shopPool,
|
|
811
|
+
custom_data: IntUtils.JsonOrText(r.itemPublicMeta.custom_data)
|
|
809
812
|
};
|
|
810
813
|
return x;
|
|
811
814
|
});
|
|
@@ -888,6 +891,7 @@ var UserAchievementTransform = function UserAchievementTransform(items) {
|
|
|
888
891
|
is_opted_in: r.isOptedIn,
|
|
889
892
|
time_limit_ms: r.time_limit_ms,
|
|
890
893
|
active_from_ts: r.active_from_ts,
|
|
894
|
+
active_till_ts: r.active_from_ts,
|
|
891
895
|
dt_start: r.start_date_ts,
|
|
892
896
|
reward: r.ach_public_meta.reward,
|
|
893
897
|
progress: r.progress,
|