@smartico/public-api 0.0.49 → 0.0.51

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.
@@ -0,0 +1,102 @@
1
+ # Interface: TStoreItem
2
+
3
+ TStoreItem interface describes the information of the store item defined in the system
4
+
5
+ ## Properties
6
+
7
+ ### id
8
+
9
+ • **id**: `number`
10
+
11
+ ID of the store item
12
+
13
+ ___
14
+
15
+ ### name
16
+
17
+ • **name**: `string`
18
+
19
+ Name of the store item, translated to the user language
20
+
21
+ ___
22
+
23
+ ### description
24
+
25
+ • **description**: `string`
26
+
27
+ Description of the store item, translated to the user language
28
+
29
+ ___
30
+
31
+ ### image
32
+
33
+ • **image**: `string`
34
+
35
+ URL of the image of the store item
36
+
37
+ ___
38
+
39
+ ### type
40
+
41
+ • **type**: ``"manual"`` \| ``"bonus"``
42
+
43
+ Type of the store item. Can be 'bonus' or 'manual'. Manual, means it's tangible item, e.g. iPhone
44
+
45
+ ___
46
+
47
+ ### price
48
+
49
+ • **price**: `number`
50
+
51
+ The price of the store item in the gamification points
52
+
53
+ ___
54
+
55
+ ### ribbon
56
+
57
+ • **ribbon**: `string`
58
+
59
+ The ribbon of the store item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon
60
+
61
+ ___
62
+
63
+ ### limit\_message
64
+
65
+ • **limit\_message**: `string`
66
+
67
+ The message that should be shown to the user if he is not eligible to buy it. this message can be used to explain the reason why user cannot buy the item, e.g. 'You should be VIP to buy this item' and can be used in case can_buy property is false.
68
+ The message is translated to the user language.
69
+ **Note**: when user is trying to buy the item, the response from server can return custom error messages that can be shown to the user as well
70
+
71
+ ___
72
+
73
+ ### priority
74
+
75
+ • **priority**: `number`
76
+
77
+ The priority of the store item. Can be used to sort the items in the store
78
+
79
+ ___
80
+
81
+ ### related\_item\_ids
82
+
83
+ • **related\_item\_ids**: `number`[]
84
+
85
+ The list of IDs of the related items. Can be used to show the related items in the store
86
+
87
+ ___
88
+
89
+ ### can\_buy
90
+
91
+ • **can\_buy**: `boolean`
92
+
93
+ The indicator if the user can buy the item
94
+ This indicator is taking into account the segment conditions for the store item, the price of item towards users balance,
95
+
96
+ ___
97
+
98
+ ### category\_ids
99
+
100
+ • **category\_ids**: `number`[]
101
+
102
+ The list of IDs of the categories where the store item is assigned, information about categories can be retrievend with getStoreCategories method
@@ -0,0 +1,234 @@
1
+ # Interface: TTournament
2
+
3
+ TTournament interface describes the general information of the tournament item
4
+
5
+ ## Hierarchy
6
+
7
+ - **`TTournament`**
8
+
9
+ ↳ [`TTournamentDetailed`](TTournamentDetailed.md)
10
+
11
+ ## Properties
12
+
13
+ ### instance\_id
14
+
15
+ • **instance\_id**: `number`
16
+
17
+ ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run
18
+
19
+ ___
20
+
21
+ ### tournament\_id
22
+
23
+ • **tournament\_id**: `number`
24
+
25
+ ID of tournament template
26
+
27
+ ___
28
+
29
+ ### name
30
+
31
+ • **name**: `string`
32
+
33
+ Name of the tournament, translated to the user language
34
+
35
+ ___
36
+
37
+ ### description
38
+
39
+ • **description**: `string`
40
+
41
+ Description of the tournament, translated to the user language
42
+
43
+ ___
44
+
45
+ ### image1
46
+
47
+ • **image1**: `string`
48
+
49
+ ___
50
+
51
+ ### image2
52
+
53
+ • **image2**: `string`
54
+
55
+ ___
56
+
57
+ ### prize\_pool\_short
58
+
59
+ • **prize\_pool\_short**: `string`
60
+
61
+ ___
62
+
63
+ ### custom\_price\_text
64
+
65
+ • **custom\_price\_text**: `string`
66
+
67
+ ___
68
+
69
+ ### segment\_dont\_match\_message
70
+
71
+ • **segment\_dont\_match\_message**: `string`
72
+
73
+ The message that should be shown to the user when the user cannot register in tournament with error code TOURNAMENT_USER_DONT_MATCH_CONDITIONS
74
+
75
+ ___
76
+
77
+ ### custom\_section\_id
78
+
79
+ • **custom\_section\_id**: `number`
80
+
81
+ The ID of the custom section where the tournament is assigned
82
+ The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
83
+
84
+ ___
85
+
86
+ ### custom\_data
87
+
88
+ • **custom\_data**: `any`
89
+
90
+ The custom data of the tournament defined by operator. Can be a JSON object, string or number
91
+
92
+ ___
93
+
94
+ ### is\_featured
95
+
96
+ • **is\_featured**: `boolean`
97
+
98
+ The indicator if the tournament is 'Featured'
99
+
100
+ ___
101
+
102
+ ### ribbon
103
+
104
+ • **ribbon**: `string`
105
+
106
+ The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon
107
+
108
+ ___
109
+
110
+ ### start\_time
111
+
112
+ • **start\_time**: `number`
113
+
114
+ The time when tournament is going to start, epoch with milliseconds
115
+
116
+ ___
117
+
118
+ ### end\_time
119
+
120
+ • **end\_time**: `number`
121
+
122
+ The time when tournament is going to finish, epoch with milliseconds
123
+
124
+ ___
125
+
126
+ ### registration\_type
127
+
128
+ • **registration\_type**: [`TournamentRegistrationTypeName`](../README.md#tournamentregistrationtypename)
129
+
130
+ Type of registration in the tournament
131
+
132
+ ___
133
+
134
+ ### registration\_count
135
+
136
+ • **registration\_count**: `number`
137
+
138
+ Number of users registered in the tournament
139
+
140
+ ___
141
+
142
+ ### is\_user\_registered
143
+
144
+ • **is\_user\_registered**: `boolean`
145
+
146
+ flag indicating if current user is registered in the tournament
147
+
148
+ ___
149
+
150
+ ### players\_min\_count
151
+
152
+ • **players\_min\_count**: `number`
153
+
154
+ Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start
155
+
156
+ ___
157
+
158
+ ### players\_max\_count
159
+
160
+ • **players\_max\_count**: `number`
161
+
162
+ Maximum number of participant for this tournament. When reached, new users won't be able to register
163
+
164
+ ___
165
+
166
+ ### registration\_status
167
+
168
+ • **registration\_status**: `TournamentRegistrationStatusName`
169
+
170
+ Status of registration in the tournament for current user
171
+
172
+ ___
173
+
174
+ ### duration\_ms
175
+
176
+ • **duration\_ms**: `number`
177
+
178
+ Tournament duration in millisecnnds
179
+
180
+ ___
181
+
182
+ ### registration\_cost\_points
183
+
184
+ • **registration\_cost\_points**: `number`
185
+
186
+ Cost of registration in the tournament in gamification points
187
+
188
+ ___
189
+
190
+ ### is\_active
191
+
192
+ • **is\_active**: `boolean`
193
+
194
+ Indicator if tournament instance is active, means in one of the statues - PUBLISHED, REGISTED, STARTED
195
+
196
+ ___
197
+
198
+ ### is\_can\_register
199
+
200
+ • **is\_can\_register**: `boolean`
201
+
202
+ Indicator if user can register in this tournament instance, e.g tournament is active, max users is not reached, user is not registered yet
203
+
204
+ ___
205
+
206
+ ### is\_cancelled
207
+
208
+ • **is\_cancelled**: `boolean`
209
+
210
+ Indicator if tournament instance is cancelled (status CANCELLED)
211
+
212
+ ___
213
+
214
+ ### is\_finished
215
+
216
+ • **is\_finished**: `boolean`
217
+
218
+ Indicator if tournament instance is finished (status FINISHED, CANCELLED OR FINIALIZING)
219
+
220
+ ___
221
+
222
+ ### is\_in\_progress
223
+
224
+ • **is\_in\_progress**: `boolean`
225
+
226
+ Indicator if tournament instance is running (status STARTED)
227
+
228
+ ___
229
+
230
+ ### is\_upcoming
231
+
232
+ • **is\_upcoming**: `boolean`
233
+
234
+ Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER)
@@ -0,0 +1,375 @@
1
+ # Interface: TTournamentDetailed
2
+
3
+ TTournamentDetailed interface describes the information of the tournament item and includes list of participants, their scores and position in the tournament leaderboard
4
+
5
+ ## Hierarchy
6
+
7
+ - [`TTournament`](TTournament.md)
8
+
9
+ ↳ **`TTournamentDetailed`**
10
+
11
+ ## Properties
12
+
13
+ ### instance\_id
14
+
15
+ • **instance\_id**: `number`
16
+
17
+ ID of tournament instance. Generated every time when tournament based on specific template is scheduled for run
18
+
19
+ #### Inherited from
20
+
21
+ [TTournament](TTournament.md).[instance_id](TTournament.md#instance_id)
22
+
23
+ ___
24
+
25
+ ### tournament\_id
26
+
27
+ • **tournament\_id**: `number`
28
+
29
+ ID of tournament template
30
+
31
+ #### Inherited from
32
+
33
+ [TTournament](TTournament.md).[tournament_id](TTournament.md#tournament_id)
34
+
35
+ ___
36
+
37
+ ### name
38
+
39
+ • **name**: `string`
40
+
41
+ Name of the tournament, translated to the user language
42
+
43
+ #### Inherited from
44
+
45
+ [TTournament](TTournament.md).[name](TTournament.md#name)
46
+
47
+ ___
48
+
49
+ ### description
50
+
51
+ • **description**: `string`
52
+
53
+ Description of the tournament, translated to the user language
54
+
55
+ #### Inherited from
56
+
57
+ [TTournament](TTournament.md).[description](TTournament.md#description)
58
+
59
+ ___
60
+
61
+ ### image1
62
+
63
+ • **image1**: `string`
64
+
65
+ #### Inherited from
66
+
67
+ [TTournament](TTournament.md).[image1](TTournament.md#image1)
68
+
69
+ ___
70
+
71
+ ### image2
72
+
73
+ • **image2**: `string`
74
+
75
+ #### Inherited from
76
+
77
+ [TTournament](TTournament.md).[image2](TTournament.md#image2)
78
+
79
+ ___
80
+
81
+ ### prize\_pool\_short
82
+
83
+ • **prize\_pool\_short**: `string`
84
+
85
+ #### Inherited from
86
+
87
+ [TTournament](TTournament.md).[prize_pool_short](TTournament.md#prize_pool_short)
88
+
89
+ ___
90
+
91
+ ### custom\_price\_text
92
+
93
+ • **custom\_price\_text**: `string`
94
+
95
+ #### Inherited from
96
+
97
+ [TTournament](TTournament.md).[custom_price_text](TTournament.md#custom_price_text)
98
+
99
+ ___
100
+
101
+ ### segment\_dont\_match\_message
102
+
103
+ • **segment\_dont\_match\_message**: `string`
104
+
105
+ The message that should be shown to the user when the user cannot register in tournament with error code TOURNAMENT_USER_DONT_MATCH_CONDITIONS
106
+
107
+ #### Inherited from
108
+
109
+ [TTournament](TTournament.md).[segment_dont_match_message](TTournament.md#segment_dont_match_message)
110
+
111
+ ___
112
+
113
+ ### custom\_section\_id
114
+
115
+ • **custom\_section\_id**: `number`
116
+
117
+ The ID of the custom section where the tournament is assigned
118
+ The list of custom sections can be retrieved using _smartico.api.getCustomSections() method (TODO-API)
119
+
120
+ #### Inherited from
121
+
122
+ [TTournament](TTournament.md).[custom_section_id](TTournament.md#custom_section_id)
123
+
124
+ ___
125
+
126
+ ### custom\_data
127
+
128
+ • **custom\_data**: `any`
129
+
130
+ The custom data of the tournament defined by operator. Can be a JSON object, string or number
131
+
132
+ #### Inherited from
133
+
134
+ [TTournament](TTournament.md).[custom_data](TTournament.md#custom_data)
135
+
136
+ ___
137
+
138
+ ### is\_featured
139
+
140
+ • **is\_featured**: `boolean`
141
+
142
+ The indicator if the tournament is 'Featured'
143
+
144
+ #### Inherited from
145
+
146
+ [TTournament](TTournament.md).[is_featured](TTournament.md#is_featured)
147
+
148
+ ___
149
+
150
+ ### ribbon
151
+
152
+ • **ribbon**: `string`
153
+
154
+ The ribbon of the tournament item. Can be 'sale', 'hot', 'new', 'vip' or URL to the image in case of custom ribbon
155
+
156
+ #### Inherited from
157
+
158
+ [TTournament](TTournament.md).[ribbon](TTournament.md#ribbon)
159
+
160
+ ___
161
+
162
+ ### start\_time
163
+
164
+ • **start\_time**: `number`
165
+
166
+ The time when tournament is going to start, epoch with milliseconds
167
+
168
+ #### Inherited from
169
+
170
+ [TTournament](TTournament.md).[start_time](TTournament.md#start_time)
171
+
172
+ ___
173
+
174
+ ### end\_time
175
+
176
+ • **end\_time**: `number`
177
+
178
+ The time when tournament is going to finish, epoch with milliseconds
179
+
180
+ #### Inherited from
181
+
182
+ [TTournament](TTournament.md).[end_time](TTournament.md#end_time)
183
+
184
+ ___
185
+
186
+ ### registration\_type
187
+
188
+ • **registration\_type**: [`TournamentRegistrationTypeName`](../README.md#tournamentregistrationtypename)
189
+
190
+ Type of registration in the tournament
191
+
192
+ #### Inherited from
193
+
194
+ [TTournament](TTournament.md).[registration_type](TTournament.md#registration_type)
195
+
196
+ ___
197
+
198
+ ### registration\_count
199
+
200
+ • **registration\_count**: `number`
201
+
202
+ Number of users registered in the tournament
203
+
204
+ #### Inherited from
205
+
206
+ [TTournament](TTournament.md).[registration_count](TTournament.md#registration_count)
207
+
208
+ ___
209
+
210
+ ### is\_user\_registered
211
+
212
+ • **is\_user\_registered**: `boolean`
213
+
214
+ flag indicating if current user is registered in the tournament
215
+
216
+ #### Inherited from
217
+
218
+ [TTournament](TTournament.md).[is_user_registered](TTournament.md#is_user_registered)
219
+
220
+ ___
221
+
222
+ ### players\_min\_count
223
+
224
+ • **players\_min\_count**: `number`
225
+
226
+ Minimum number of participant for this tournament. If tournament doesnt have enough registrations, it will not start
227
+
228
+ #### Inherited from
229
+
230
+ [TTournament](TTournament.md).[players_min_count](TTournament.md#players_min_count)
231
+
232
+ ___
233
+
234
+ ### players\_max\_count
235
+
236
+ • **players\_max\_count**: `number`
237
+
238
+ Maximum number of participant for this tournament. When reached, new users won't be able to register
239
+
240
+ #### Inherited from
241
+
242
+ [TTournament](TTournament.md).[players_max_count](TTournament.md#players_max_count)
243
+
244
+ ___
245
+
246
+ ### registration\_status
247
+
248
+ • **registration\_status**: `TournamentRegistrationStatusName`
249
+
250
+ Status of registration in the tournament for current user
251
+
252
+ #### Inherited from
253
+
254
+ [TTournament](TTournament.md).[registration_status](TTournament.md#registration_status)
255
+
256
+ ___
257
+
258
+ ### duration\_ms
259
+
260
+ • **duration\_ms**: `number`
261
+
262
+ Tournament duration in millisecnnds
263
+
264
+ #### Inherited from
265
+
266
+ [TTournament](TTournament.md).[duration_ms](TTournament.md#duration_ms)
267
+
268
+ ___
269
+
270
+ ### registration\_cost\_points
271
+
272
+ • **registration\_cost\_points**: `number`
273
+
274
+ Cost of registration in the tournament in gamification points
275
+
276
+ #### Inherited from
277
+
278
+ [TTournament](TTournament.md).[registration_cost_points](TTournament.md#registration_cost_points)
279
+
280
+ ___
281
+
282
+ ### is\_active
283
+
284
+ • **is\_active**: `boolean`
285
+
286
+ Indicator if tournament instance is active, means in one of the statues - PUBLISHED, REGISTED, STARTED
287
+
288
+ #### Inherited from
289
+
290
+ [TTournament](TTournament.md).[is_active](TTournament.md#is_active)
291
+
292
+ ___
293
+
294
+ ### is\_can\_register
295
+
296
+ • **is\_can\_register**: `boolean`
297
+
298
+ Indicator if user can register in this tournament instance, e.g tournament is active, max users is not reached, user is not registered yet
299
+
300
+ #### Inherited from
301
+
302
+ [TTournament](TTournament.md).[is_can_register](TTournament.md#is_can_register)
303
+
304
+ ___
305
+
306
+ ### is\_cancelled
307
+
308
+ • **is\_cancelled**: `boolean`
309
+
310
+ Indicator if tournament instance is cancelled (status CANCELLED)
311
+
312
+ #### Inherited from
313
+
314
+ [TTournament](TTournament.md).[is_cancelled](TTournament.md#is_cancelled)
315
+
316
+ ___
317
+
318
+ ### is\_finished
319
+
320
+ • **is\_finished**: `boolean`
321
+
322
+ Indicator if tournament instance is finished (status FINISHED, CANCELLED OR FINIALIZING)
323
+
324
+ #### Inherited from
325
+
326
+ [TTournament](TTournament.md).[is_finished](TTournament.md#is_finished)
327
+
328
+ ___
329
+
330
+ ### is\_in\_progress
331
+
332
+ • **is\_in\_progress**: `boolean`
333
+
334
+ Indicator if tournament instance is running (status STARTED)
335
+
336
+ #### Inherited from
337
+
338
+ [TTournament](TTournament.md).[is_in_progress](TTournament.md#is_in_progress)
339
+
340
+ ___
341
+
342
+ ### is\_upcoming
343
+
344
+ • **is\_upcoming**: `boolean`
345
+
346
+ Indicator if tournament instance is upcoming (status PUBLISHED or REGISTER)
347
+
348
+ #### Inherited from
349
+
350
+ [TTournament](TTournament.md).[is_upcoming](TTournament.md#is_upcoming)
351
+
352
+ ___
353
+
354
+ ### players
355
+
356
+ • `Optional` **players**: { `public_username`: `string` ; `avatar_url`: `string` ; `position`: `number` ; `scores`: `number` ; `is_me`: `boolean` }[]
357
+
358
+ The list of the tournament participants
359
+
360
+ ___
361
+
362
+ ### me
363
+
364
+ • `Optional` **me**: `Object`
365
+
366
+ The information about current user in the tournament if he is registered in the tournamnet
367
+
368
+ #### Type declaration
369
+
370
+ | Name | Type | Description |
371
+ | :------ | :------ | :------ |
372
+ | `public_username` | `string` | The username of the current user |
373
+ | `avatar_url` | `string` | The URL to the avatar of the current user |
374
+ | `position` | `number` | The position of the current user in the tournament |
375
+ | `scores` | `number` | The scores of the current user in the tournament |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,6 +25,8 @@ export interface SAWTemplateUI {
25
25
  promo_image?: string;
26
26
  promo_text?: string;
27
27
  matchx_banner?: string;
28
+ matchx_seasonal_ranking?: boolean;
29
+ matchx_general_board_users_count: number;
28
30
  ask_for_username?: SAWAskForUsername;
29
31
  show_prize_board?: boolean;
30
32