@smartico/public-api 0.0.236 → 0.0.238
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/Base/ClassId.d.ts +2 -0
- package/dist/CustomSections/UICustomSection.d.ts +2 -1
- package/dist/Raffle/GetRaffleDrawRunsHistoryRequest.d.ts +1 -1
- package/dist/Raffle/GetRaffleDrawRunsHistoryResponse.d.ts +1 -1
- package/dist/Raffle/RaffleClaimPrizeRequest.d.ts +4 -0
- package/dist/Raffle/RaffleClaimPrizeResponse.d.ts +3 -0
- package/dist/Raffle/RaffleDraw.d.ts +2 -47
- package/dist/Raffle/RaffleDrawPublicMeta.d.ts +14 -0
- package/dist/Raffle/RaffleDrawRun.d.ts +34 -0
- package/dist/Raffle/index.d.ts +3 -0
- package/dist/WSAPI/WSAPITypes.d.ts +2 -0
- package/dist/index.js +25 -20
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +25 -16
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +2 -0
- package/docs/interfaces/GetRaffleDrawRunsHistoryRequest.md +3 -1
- package/docs/interfaces/RaffleClaimPrizeRequest.md +43 -0
- package/docs/interfaces/RaffleClaimPrizeResponse.md +57 -0
- package/docs/interfaces/RaffleDraw.md +2 -2
- package/docs/interfaces/RaffleDrawRun.md +10 -2
- package/docs/interfaces/RafflePrize.md +2 -2
- package/docs/interfaces/RafflePrizeWinner.md +2 -2
- package/package.json +1 -1
- package/src/Base/ClassId.ts +2 -0
- package/src/CustomSections/UICustomSection.ts +16 -6
- package/src/Raffle/GetRaffleDrawRunsHistoryRequest.ts +2 -2
- package/src/Raffle/GetRaffleDrawRunsHistoryResponse.ts +1 -1
- package/src/Raffle/RaffleClaimPrizeRequest.ts +5 -0
- package/src/Raffle/RaffleClaimPrizeResponse.ts +3 -0
- package/src/Raffle/RaffleDraw.ts +2 -58
- package/src/Raffle/RaffleDrawPublicMeta.ts +14 -0
- package/src/Raffle/RaffleDrawRun.ts +44 -0
- package/src/Raffle/index.ts +3 -0
- package/src/SmarticoAPI.ts +1 -1
- package/src/WSAPI/WSAPITypes.ts +2 -0
package/dist/Base/ClassId.d.ts
CHANGED
|
@@ -105,6 +105,8 @@ export declare enum ClassId {
|
|
|
105
105
|
RAF_GET_DRAW_RUN_RESPONSE = 905,
|
|
106
106
|
RAF_GET_DRAW_HISTORY_REQUEST = 906,
|
|
107
107
|
RAF_GET_DRAW_HISTORY_RESPONSE = 907,
|
|
108
|
+
RAF_CLAIM_PRIZE_REQUEST = 908,
|
|
109
|
+
RAF_CLAIM_PRIZE_RESPONSE = 909,
|
|
108
110
|
REGISTER_PUSH_NOTIFICATIONS_TOKEN_REQ = 1003,
|
|
109
111
|
REGISTER_PUSH_NOTIFICATIONS_TOKEN_RESP = 2003,
|
|
110
112
|
CLIENT_DEBUG_REQUEST = 77777,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TUICustomSection } from '../WSAPI/WSAPITypes';
|
|
2
2
|
import { AchCustomLayoutTheme, AchCustomSectionType, AchMissionsTabsOptions, AchOverviewMissionsFilter } from './AchCustomSection';
|
|
3
|
+
import { GetCustomSectionsResponse } from './GetCustomSectionsResponse';
|
|
3
4
|
export interface UICustomSection {
|
|
4
5
|
body?: string;
|
|
5
6
|
menu_img?: string;
|
|
@@ -12,4 +13,4 @@ export interface UICustomSection {
|
|
|
12
13
|
overview_missions_filter?: AchOverviewMissionsFilter;
|
|
13
14
|
overview_missions_count?: number;
|
|
14
15
|
}
|
|
15
|
-
export declare const UICustomSectionTransform: (
|
|
16
|
+
export declare const UICustomSectionTransform: (response: GetCustomSectionsResponse) => TUICustomSection[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
|
-
import { RaffleDrawRun } from './
|
|
2
|
+
import { RaffleDrawRun } from './RaffleDrawRun';
|
|
3
3
|
export interface GetRaffleDrawRunsHistoryResponse extends ProtocolResponse {
|
|
4
4
|
draw_runs: RaffleDrawRun[];
|
|
5
5
|
}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
+
import { RaffleDrawPublicMeta } from "./RaffleDrawPublicMeta";
|
|
1
2
|
import { RafflePrize } from "./RafflePrize";
|
|
2
3
|
import { RaffleTicket } from "./RaffleTicket";
|
|
3
|
-
interface RaffleDrawPublicMeta {
|
|
4
|
-
/** Name of the draw, e.g. 'Daily draw' */
|
|
5
|
-
name: string;
|
|
6
|
-
/** Description of the draw */
|
|
7
|
-
description: string;
|
|
8
|
-
/** URL of the image that represents the draw */
|
|
9
|
-
image_url: string;
|
|
10
|
-
/** URL of the icon that represents the draw */
|
|
11
|
-
icon_url: string;
|
|
12
|
-
/** URL of the background image that will be used in the draw list item */
|
|
13
|
-
background_image_url: string;
|
|
14
|
-
/** Show if the draw is grand and is marked as special */
|
|
15
|
-
is_grand: boolean;
|
|
16
|
-
}
|
|
17
4
|
declare enum RaffleDrawInstanceState {
|
|
18
5
|
/** Draw is open for the tickets collection */
|
|
19
6
|
Open = 1,
|
|
@@ -92,36 +79,4 @@ interface RaffleDraw {
|
|
|
92
79
|
my_tickets_count: number;
|
|
93
80
|
my_last_tickets: RaffleTicket[];
|
|
94
81
|
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Id of the Draw definition, for the repetative draws (e.g. daily), this number will be the same for all draws that are repeating daily
|
|
98
|
-
* (internal name: schedule_id)
|
|
99
|
-
*/
|
|
100
|
-
draw_id: number;
|
|
101
|
-
/**
|
|
102
|
-
* Field indicates the ID of the latest instance/run of draw
|
|
103
|
-
*/
|
|
104
|
-
run_id: number;
|
|
105
|
-
/** Meta information of the Draw for the presentaiton in UI */
|
|
106
|
-
public_meta: RaffleDrawPublicMeta;
|
|
107
|
-
/** Date/time of the draw execution */
|
|
108
|
-
execution_ts: number;
|
|
109
|
-
/** Actual Date/time of the draw execution */
|
|
110
|
-
actual_execution_ts: number;
|
|
111
|
-
/**
|
|
112
|
-
* Date/time starting from which the tickets will participate in the upcoming draw
|
|
113
|
-
* This value need to be taken into account with next_execute_ts field value, for example
|
|
114
|
-
* Next draw is at 10:00, ticket_start_date is 9:00, so all tickets that are collected after 9:00 will participate in the draw at 10:00
|
|
115
|
-
* (internally this value is calculated as next_execute_ts - ticket_start_date)
|
|
116
|
-
*/
|
|
117
|
-
ticket_start_ts: number;
|
|
118
|
-
/**
|
|
119
|
-
* Shows if user has won a prize in a current run
|
|
120
|
-
*/
|
|
121
|
-
is_winner: boolean;
|
|
122
|
-
/**
|
|
123
|
-
* Shows if user has unclaimed prize
|
|
124
|
-
*/
|
|
125
|
-
has_unclaimed_prize: boolean;
|
|
126
|
-
}
|
|
127
|
-
export { RaffleDraw, RaffleDrawRun };
|
|
82
|
+
export { RaffleDraw };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface RaffleDrawPublicMeta {
|
|
2
|
+
/** Name of the draw, e.g. 'Daily draw' */
|
|
3
|
+
name: string;
|
|
4
|
+
/** Description of the draw */
|
|
5
|
+
description: string;
|
|
6
|
+
/** URL of the image that represents the draw */
|
|
7
|
+
image_url: string;
|
|
8
|
+
/** URL of the icon that represents the draw */
|
|
9
|
+
icon_url: string;
|
|
10
|
+
/** URL of the background image that will be used in the draw list item */
|
|
11
|
+
background_image_url: string;
|
|
12
|
+
/** Show if the draw is grand and is marked as special */
|
|
13
|
+
is_grand: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { RaffleDrawPublicMeta } from "./RaffleDrawPublicMeta";
|
|
2
|
+
interface RaffleDrawRun {
|
|
3
|
+
/**
|
|
4
|
+
* Id of the Draw definition, for the repetative draws (e.g. daily), this number will be the same for all draws that are repeating daily
|
|
5
|
+
* (internal name: schedule_id)
|
|
6
|
+
*/
|
|
7
|
+
draw_id: number;
|
|
8
|
+
/**
|
|
9
|
+
* Field indicates the ID of the latest instance/run of draw
|
|
10
|
+
*/
|
|
11
|
+
run_id: number;
|
|
12
|
+
/** Meta information of the Draw for the presentaiton in UI */
|
|
13
|
+
public_meta: RaffleDrawPublicMeta;
|
|
14
|
+
/** Date/time of the draw execution */
|
|
15
|
+
execution_ts: number;
|
|
16
|
+
/** Actual Date/time of the draw execution */
|
|
17
|
+
actual_execution_ts: number;
|
|
18
|
+
/**
|
|
19
|
+
* Date/time starting from which the tickets will participate in the upcoming draw
|
|
20
|
+
* This value need to be taken into account with next_execute_ts field value, for example
|
|
21
|
+
* Next draw is at 10:00, ticket_start_date is 9:00, so all tickets that are collected after 9:00 will participate in the draw at 10:00
|
|
22
|
+
* (internally this value is calculated as next_execute_ts - ticket_start_date)
|
|
23
|
+
*/
|
|
24
|
+
ticket_start_ts: number;
|
|
25
|
+
/**
|
|
26
|
+
* Shows if user has won a prize in a current run
|
|
27
|
+
*/
|
|
28
|
+
is_winner: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Shows if user has unclaimed prize
|
|
31
|
+
*/
|
|
32
|
+
has_unclaimed_prize: boolean;
|
|
33
|
+
}
|
|
34
|
+
export { RaffleDrawRun };
|
package/dist/Raffle/index.d.ts
CHANGED
|
@@ -4,8 +4,11 @@ export * from './GetRafflesRequest';
|
|
|
4
4
|
export * from './GetRafflesResponse';
|
|
5
5
|
export * from './Raffle';
|
|
6
6
|
export * from './RaffleDraw';
|
|
7
|
+
export * from './RaffleDrawRun';
|
|
7
8
|
export * from './RafflePrize';
|
|
8
9
|
export * from './RafflePrizeWinner';
|
|
9
10
|
export * from './RaffleTicket';
|
|
10
11
|
export * from './GetRaffleDrawRunsHistoryRequest';
|
|
11
12
|
export * from './GetRaffleDrawRunsHistoryResponse';
|
|
13
|
+
export * from './RaffleClaimPrizeRequest';
|
|
14
|
+
export * from './RaffleClaimPrizeResponse';
|
|
@@ -700,6 +700,8 @@ export interface TSegmentCheckResult {
|
|
|
700
700
|
is_matching: boolean;
|
|
701
701
|
}
|
|
702
702
|
export interface TUICustomSection {
|
|
703
|
+
/** The ID of the custom section */
|
|
704
|
+
id: number;
|
|
703
705
|
/** The body of the custom section */
|
|
704
706
|
body?: string;
|
|
705
707
|
/** The image of the custom section */
|
package/dist/index.js
CHANGED
|
@@ -129,6 +129,8 @@ exports.ClassId = void 0;
|
|
|
129
129
|
ClassId[ClassId["RAF_GET_DRAW_RUN_RESPONSE"] = 905] = "RAF_GET_DRAW_RUN_RESPONSE";
|
|
130
130
|
ClassId[ClassId["RAF_GET_DRAW_HISTORY_REQUEST"] = 906] = "RAF_GET_DRAW_HISTORY_REQUEST";
|
|
131
131
|
ClassId[ClassId["RAF_GET_DRAW_HISTORY_RESPONSE"] = 907] = "RAF_GET_DRAW_HISTORY_RESPONSE";
|
|
132
|
+
ClassId[ClassId["RAF_CLAIM_PRIZE_REQUEST"] = 908] = "RAF_CLAIM_PRIZE_REQUEST";
|
|
133
|
+
ClassId[ClassId["RAF_CLAIM_PRIZE_RESPONSE"] = 909] = "RAF_CLAIM_PRIZE_RESPONSE";
|
|
132
134
|
/*
|
|
133
135
|
RAF_GET_TICKETS_REQUEST = 902,
|
|
134
136
|
RAF_GET_TICKETS_RESPONSE = 903,
|
|
@@ -2846,24 +2848,29 @@ var AchOverviewMissionsFilter;
|
|
|
2846
2848
|
AchOverviewMissionsFilter[AchOverviewMissionsFilter["ALL_EXCEPT_COMPLETED_AND_LOCKED"] = 5] = "ALL_EXCEPT_COMPLETED_AND_LOCKED";
|
|
2847
2849
|
})(AchOverviewMissionsFilter || (AchOverviewMissionsFilter = {}));
|
|
2848
2850
|
|
|
2849
|
-
var UICustomSectionTransform = function UICustomSectionTransform(
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
var
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2851
|
+
var UICustomSectionTransform = function UICustomSectionTransform(response) {
|
|
2852
|
+
var items = [];
|
|
2853
|
+
Object.keys(response.customSections).forEach(function (key) {
|
|
2854
|
+
var r = response.customSections[key];
|
|
2855
|
+
var id = parseInt(key);
|
|
2856
|
+
if (r.section_type_id !== undefined && r.section_type_id >= 1) {
|
|
2857
|
+
var x = {
|
|
2858
|
+
id: id,
|
|
2859
|
+
body: r.body,
|
|
2860
|
+
menu_img: r.menu_img,
|
|
2861
|
+
menu_name: r.menu_name,
|
|
2862
|
+
section_type_id: r.section_type_id,
|
|
2863
|
+
custom_skin_images: r.custom_skin_images,
|
|
2864
|
+
generic_custom_css: r.generic_custom_css,
|
|
2865
|
+
mission_tabs_options: r.mission_tabs_options,
|
|
2866
|
+
overview_missions_count: r.overview_missions_count,
|
|
2867
|
+
overview_missions_filter: r.overview_missions_filter,
|
|
2868
|
+
theme: r.theme
|
|
2869
|
+
};
|
|
2870
|
+
items.push(x);
|
|
2871
|
+
}
|
|
2866
2872
|
});
|
|
2873
|
+
return items;
|
|
2867
2874
|
};
|
|
2868
2875
|
|
|
2869
2876
|
var BonusItemsTransform = function BonusItemsTransform(items) {
|
|
@@ -3811,9 +3818,7 @@ var SmarticoAPI = /*#__PURE__*/function () {
|
|
|
3811
3818
|
_proto.getCustomSectionsT = function getCustomSectionsT(user_ext_id) {
|
|
3812
3819
|
try {
|
|
3813
3820
|
var _this51 = this;
|
|
3814
|
-
return Promise.resolve(_this51.getCustomSections(user_ext_id)).then(
|
|
3815
|
-
return UICustomSectionTransform(Object.values(_this51$getCustomSect.customSections));
|
|
3816
|
-
});
|
|
3821
|
+
return Promise.resolve(_this51.getCustomSections(user_ext_id)).then(UICustomSectionTransform);
|
|
3817
3822
|
} catch (e) {
|
|
3818
3823
|
return Promise.reject(e);
|
|
3819
3824
|
}
|