@smartico/public-api 0.0.236 → 0.0.237
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/Raffle/GetRaffleDrawRunsHistoryRequest.d.ts +1 -1
- package/dist/Raffle/GetRaffleDrawRunsHistoryResponse.d.ts +1 -1
- 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 +1 -0
- package/docs/interfaces/GetRaffleDrawRunsHistoryRequest.md +3 -1
- 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/Raffle/GetRaffleDrawRunsHistoryRequest.ts +1 -1
- package/src/Raffle/GetRaffleDrawRunsHistoryResponse.ts +1 -1
- 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 +1 -0
|
@@ -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,6 +4,7 @@ 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';
|
|
@@ -78,9 +78,9 @@ Unique ID of the previusly executed draw (if there is such)
|
|
|
78
78
|
|
|
79
79
|
___
|
|
80
80
|
|
|
81
|
-
### ticket\_start\
|
|
81
|
+
### ticket\_start\_ts
|
|
82
82
|
|
|
83
|
-
• **ticket\_start\
|
|
83
|
+
• **ticket\_start\_ts**: `number`
|
|
84
84
|
|
|
85
85
|
Date/time starting from which the tickets will participate in the upcoming draw
|
|
86
86
|
This value need to be taken into account with next_execute_ts field value, for example
|
|
@@ -35,9 +35,17 @@ Date/time of the draw execution
|
|
|
35
35
|
|
|
36
36
|
___
|
|
37
37
|
|
|
38
|
-
###
|
|
38
|
+
### actual\_execution\_ts
|
|
39
39
|
|
|
40
|
-
• **
|
|
40
|
+
• **actual\_execution\_ts**: `number`
|
|
41
|
+
|
|
42
|
+
Actual Date/time of the draw execution
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### ticket\_start\_ts
|
|
47
|
+
|
|
48
|
+
• **ticket\_start\_ts**: `number`
|
|
41
49
|
|
|
42
50
|
Date/time starting from which the tickets will participate in the upcoming draw
|
|
43
51
|
This value need to be taken into account with next_execute_ts field value, for example
|
|
@@ -132,9 +132,9 @@ the stock_items_per_draw will be decreasing by 1 each day (assuming there is eno
|
|
|
132
132
|
|
|
133
133
|
___
|
|
134
134
|
|
|
135
|
-
###
|
|
135
|
+
### should\_claim
|
|
136
136
|
|
|
137
|
-
• **
|
|
137
|
+
• **should\_claim**: `boolean`
|
|
138
138
|
|
|
139
139
|
Shows if the prize has been claimed
|
|
140
140
|
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProtocolResponse } from '../Base/ProtocolResponse';
|
|
2
|
-
import { RaffleDrawRun } from './
|
|
2
|
+
import { RaffleDrawRun } from './RaffleDrawRun';
|
|
3
3
|
|
|
4
4
|
export interface GetRaffleDrawRunsHistoryResponse extends ProtocolResponse {
|
|
5
5
|
draw_runs: RaffleDrawRun[];
|
package/src/Raffle/RaffleDraw.ts
CHANGED
|
@@ -1,21 +1,7 @@
|
|
|
1
|
+
import { RaffleDrawPublicMeta } from "./RaffleDrawPublicMeta";
|
|
1
2
|
import { RafflePrize } from "./RafflePrize";
|
|
2
3
|
import { RaffleTicket } from "./RaffleTicket";
|
|
3
4
|
|
|
4
|
-
interface RaffleDrawPublicMeta {
|
|
5
|
-
/** Name of the draw, e.g. 'Daily draw' */
|
|
6
|
-
name: string;
|
|
7
|
-
/** Description of the draw */
|
|
8
|
-
description: string;
|
|
9
|
-
/** URL of the image that represents the draw */
|
|
10
|
-
image_url: string;
|
|
11
|
-
/** URL of the icon that represents the draw */
|
|
12
|
-
icon_url: string;
|
|
13
|
-
/** URL of the background image that will be used in the draw list item */
|
|
14
|
-
background_image_url: string;
|
|
15
|
-
/** Show if the draw is grand and is marked as special */
|
|
16
|
-
is_grand: boolean;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
5
|
enum RaffleDrawInstanceState {
|
|
20
6
|
/** Draw is open for the tickets collection */
|
|
21
7
|
Open = 1,
|
|
@@ -113,48 +99,6 @@ interface RaffleDraw {
|
|
|
113
99
|
* List of last 5 tickets are collected by current user for this instance of draw.
|
|
114
100
|
*/
|
|
115
101
|
my_last_tickets: RaffleTicket[];
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
interface RaffleDrawRun {
|
|
120
|
-
/**
|
|
121
|
-
* 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
|
|
122
|
-
* (internal name: schedule_id)
|
|
123
|
-
*/
|
|
124
|
-
draw_id: number;
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Field indicates the ID of the latest instance/run of draw
|
|
128
|
-
*/
|
|
129
|
-
run_id: number;
|
|
130
|
-
|
|
131
|
-
/** Meta information of the Draw for the presentaiton in UI */
|
|
132
|
-
public_meta: RaffleDrawPublicMeta;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
/** Date/time of the draw execution */
|
|
136
|
-
execution_ts: number;
|
|
137
|
-
|
|
138
|
-
/** Actual Date/time of the draw execution */
|
|
139
|
-
actual_execution_ts: number;
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Date/time starting from which the tickets will participate in the upcoming draw
|
|
143
|
-
* This value need to be taken into account with next_execute_ts field value, for example
|
|
144
|
-
* 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
|
|
145
|
-
* (internally this value is calculated as next_execute_ts - ticket_start_date)
|
|
146
|
-
*/
|
|
147
|
-
ticket_start_ts: number;
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Shows if user has won a prize in a current run
|
|
151
|
-
*/
|
|
152
|
-
is_winner: boolean;
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* Shows if user has unclaimed prize
|
|
156
|
-
*/
|
|
157
|
-
has_unclaimed_prize: boolean;
|
|
158
102
|
}
|
|
159
103
|
|
|
160
|
-
export { RaffleDraw
|
|
104
|
+
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,44 @@
|
|
|
1
|
+
import { RaffleDrawPublicMeta } from "./RaffleDrawPublicMeta";
|
|
2
|
+
|
|
3
|
+
interface RaffleDrawRun {
|
|
4
|
+
/**
|
|
5
|
+
* 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
|
|
6
|
+
* (internal name: schedule_id)
|
|
7
|
+
*/
|
|
8
|
+
draw_id: number;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Field indicates the ID of the latest instance/run of draw
|
|
12
|
+
*/
|
|
13
|
+
run_id: number;
|
|
14
|
+
|
|
15
|
+
/** Meta information of the Draw for the presentaiton in UI */
|
|
16
|
+
public_meta: RaffleDrawPublicMeta;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
/** Date/time of the draw execution */
|
|
20
|
+
execution_ts: number;
|
|
21
|
+
|
|
22
|
+
/** Actual Date/time of the draw execution */
|
|
23
|
+
actual_execution_ts: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Date/time starting from which the tickets will participate in the upcoming draw
|
|
27
|
+
* This value need to be taken into account with next_execute_ts field value, for example
|
|
28
|
+
* 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
|
|
29
|
+
* (internally this value is calculated as next_execute_ts - ticket_start_date)
|
|
30
|
+
*/
|
|
31
|
+
ticket_start_ts: number;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Shows if user has won a prize in a current run
|
|
35
|
+
*/
|
|
36
|
+
is_winner: boolean;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Shows if user has unclaimed prize
|
|
40
|
+
*/
|
|
41
|
+
has_unclaimed_prize: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export { RaffleDrawRun };
|
package/src/Raffle/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ 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';
|