@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.
@@ -4,5 +4,5 @@ export interface GetRaffleDrawRunsHistoryRequest extends ProtocolMessage {
4
4
  /**
5
5
  * If draw_id is not passed all draw runs that belong to raffle with passed raffle_id will be returned.
6
6
  */
7
- draw_id: number;
7
+ draw_id?: number;
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import { ProtocolResponse } from '../Base/ProtocolResponse';
2
- import { RaffleDrawRun } from './RaffleDraw';
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
- interface RaffleDrawRun {
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 };
@@ -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';
@@ -46,4 +46,6 @@ ___
46
46
 
47
47
  ### draw\_id
48
48
 
49
- • **draw\_id**: `number`
49
+ `Optional` **draw\_id**: `number`
50
+
51
+ If draw_id is not passed all draw runs that belong to raffle with passed raffle_id will be returned.
@@ -78,9 +78,9 @@ Unique ID of the previusly executed draw (if there is such)
78
78
 
79
79
  ___
80
80
 
81
- ### ticket\_start\_date
81
+ ### ticket\_start\_ts
82
82
 
83
- • **ticket\_start\_date**: `number`
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
- ### ticket\_start\_date
38
+ ### actual\_execution\_ts
39
39
 
40
- • **ticket\_start\_date**: `number`
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
- ### is\_claimed
135
+ ### should\_claim
136
136
 
137
- • **is\_claimed**: `boolean`
137
+ • **should\_claim**: `boolean`
138
138
 
139
139
  Shows if the prize has been claimed
140
140
 
@@ -32,6 +32,6 @@ ___
32
32
 
33
33
  ___
34
34
 
35
- ### won\_ids
35
+ ### won\_id
36
36
 
37
- • **won\_ids**: `number`[]
37
+ • **won\_id**: `number`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.236",
3
+ "version": "0.0.237",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,5 +6,5 @@ export interface GetRaffleDrawRunsHistoryRequest extends ProtocolMessage {
6
6
  /**
7
7
  * If draw_id is not passed all draw runs that belong to raffle with passed raffle_id will be returned.
8
8
  */
9
- draw_id: number;
9
+ draw_id?: number;
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import { ProtocolResponse } from '../Base/ProtocolResponse';
2
- import { RaffleDrawRun } from './RaffleDraw';
2
+ import { RaffleDrawRun } from './RaffleDrawRun';
3
3
 
4
4
  export interface GetRaffleDrawRunsHistoryResponse extends ProtocolResponse {
5
5
  draw_runs: RaffleDrawRun[];
@@ -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, RaffleDrawRun };
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 };
@@ -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';