@smartico/public-api 0.0.283 → 0.0.284

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.
Files changed (77) hide show
  1. package/dist/Jackpots/JackpotPublicMeta.d.ts +1 -1
  2. package/dist/MiniGames/SAWPrizeUI.d.ts +1 -0
  3. package/dist/Quiz/MarketsAnswersType.d.ts +22 -0
  4. package/dist/Raffle/GetDrawResponse.d.ts +5 -0
  5. package/dist/Raffle/Raffle.d.ts +1 -1
  6. package/dist/Raffle/RaffleDraw.d.ts +16 -11
  7. package/dist/Raffle/RafflePrize.d.ts +15 -14
  8. package/dist/Raffle/RaffleTicket.d.ts +6 -0
  9. package/dist/SmarticoPublicAPI.d.ts +23 -0
  10. package/dist/Store/BuyShopItemErrorCode.d.ts +10 -0
  11. package/dist/Store/BuyShopItemRequest.d.ts +4 -0
  12. package/dist/Store/BuyShopItemResponse.d.ts +4 -0
  13. package/dist/Store/GetCategoriesShopResponse.d.ts +5 -0
  14. package/dist/Store/GetShopItemsResponse.d.ts +5 -0
  15. package/dist/Store/ShopCategory.d.ts +5 -0
  16. package/dist/Store/ShopCategoryPublicMeta.d.ts +4 -0
  17. package/dist/Store/ShopItem.d.ts +9 -0
  18. package/dist/Store/ShopItemPublicMeta.d.ts +10 -0
  19. package/dist/Store/ShopItemType.d.ts +4 -0
  20. package/dist/Store/StorItemPruchased.d.ts +6 -0
  21. package/dist/WSAPI/WSAPITypes.d.ts +11 -0
  22. package/dist/index.js +2 -0
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.modern.mjs +2 -0
  25. package/dist/index.modern.mjs.map +1 -1
  26. package/dist/service/index.d.ts +5 -0
  27. package/dist/service/types/ErrorCodes.d.ts +13 -0
  28. package/dist/service/types/GRequest.d.ts +16 -0
  29. package/dist/service/types/GResponse.d.ts +10 -0
  30. package/dist/service/types/Game/GameAttemptType.d.ts +6 -0
  31. package/dist/service/types/Game/GameCanPlayType.d.ts +10 -0
  32. package/dist/service/types/Game/GameExternalStatus.d.ts +6 -0
  33. package/dist/service/types/Game/GameInfo.d.ts +9 -0
  34. package/dist/service/types/Game/GamePick.d.ts +90 -0
  35. package/dist/service/types/Game/GameUtil.d.ts +7 -0
  36. package/dist/service/types/SmarticoProto/GetTranslationsRequest.d.ts +7 -0
  37. package/dist/service/types/SmarticoProto/GetTranslationsResponse.d.ts +7 -0
  38. package/dist/service/types/SmarticoProto/ProtocolMessage.d.ts +5 -0
  39. package/dist/service/types/SmarticoProto/ProtocolRequest.d.ts +6 -0
  40. package/dist/service/types/SmarticoProto/ProtocolResponse.d.ts +5 -0
  41. package/dist/service/types/SmarticoProto/PublicLabelInfo.d.ts +34 -0
  42. package/dist/service/types/SmarticoProto/PublicProperties.d.ts +11 -0
  43. package/dist/service/types/SmarticoProto/ResponseIdentify.d.ts +12 -0
  44. package/dist/service/types/SmarticoProto/SAW/SAWAcknowledgeType.d.ts +5 -0
  45. package/dist/service/types/SmarticoProto/SAW/SAWBuyInType.d.ts +5 -0
  46. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinRequest.d.ts +5 -0
  47. package/dist/service/types/SmarticoProto/SAW/SAWDoSpinResponse.d.ts +15 -0
  48. package/dist/service/types/SmarticoProto/SAW/SAWGameType.d.ts +10 -0
  49. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesRequest.d.ts +3 -0
  50. package/dist/service/types/SmarticoProto/SAW/SAWGetTemplatesResponse.d.ts +5 -0
  51. package/dist/service/types/SmarticoProto/SAW/SAWPrize.d.ts +11 -0
  52. package/dist/service/types/SmarticoProto/SAW/SAWPrizeType.d.ts +8 -0
  53. package/dist/service/types/SmarticoProto/SAW/SAWPrizeUI.d.ts +13 -0
  54. package/dist/service/types/SmarticoProto/SAW/SAWTemplate.d.ts +21 -0
  55. package/dist/service/types/SmarticoProto/SAW/SAWTemplateUI.d.ts +31 -0
  56. package/dist/service/types/SmarticoProto/SAW/SAWWinSoundType.d.ts +12 -0
  57. package/dist/service/types/SmarticoProto/TranslationArea.d.ts +9 -0
  58. package/dist/service/types/User/UserInfo.d.ts +10 -0
  59. package/dist/util/Util.d.ts +51 -0
  60. package/docs/interfaces/JackpotPublicMeta.md +1 -1
  61. package/docs/interfaces/RaffleDraw.md +13 -10
  62. package/docs/interfaces/RafflePrize.md +18 -16
  63. package/docs/interfaces/RafflePublicMeta.md +1 -1
  64. package/docs/interfaces/RaffleTicket.md +4 -0
  65. package/docs/interfaces/SAWPrizeUI.md +6 -0
  66. package/docs/interfaces/TMiniGameTemplate.md +18 -0
  67. package/docs/interfaces/TRaffleTicket.md +4 -0
  68. package/package.json +1 -1
  69. package/src/Jackpots/JackpotPublicMeta.ts +1 -1
  70. package/src/MiniGames/SAWGetTemplatesResponse.ts +2 -0
  71. package/src/MiniGames/SAWPrizeUI.ts +1 -0
  72. package/src/Raffle/Raffle.ts +1 -1
  73. package/src/Raffle/RaffleClaimPrizeResponse.ts +1 -4
  74. package/src/Raffle/RaffleDraw.ts +17 -15
  75. package/src/Raffle/RafflePrize.ts +18 -17
  76. package/src/Raffle/RaffleTicket.ts +6 -2
  77. package/src/WSAPI/WSAPITypes.ts +11 -3
@@ -6,8 +6,12 @@
6
6
 
7
7
  • **id**: `number`
8
8
 
9
+ Int presentation of the ticket
10
+
9
11
  ___
10
12
 
11
13
  ### s
12
14
 
13
15
  • **s**: `string`
16
+
17
+ String presentation of the ticket
@@ -32,6 +32,12 @@ ___
32
32
 
33
33
  ___
34
34
 
35
+ ### aknowledge\_message\_lose
36
+
37
+ • `Optional` **aknowledge\_message\_lose**: `string`
38
+
39
+ ___
40
+
35
41
  ### sectors
36
42
 
37
43
  • `Optional` **sectors**: `number`[]
@@ -226,3 +226,21 @@ ___
226
226
  ### show\_prize\_history
227
227
 
228
228
  • `Optional` **show\_prize\_history**: `boolean`
229
+
230
+ When enabled the prize history icon is visible on a certain template
231
+
232
+ ___
233
+
234
+ ### max\_number\_of\_attempts
235
+
236
+ • `Optional` **max\_number\_of\_attempts**: `number`
237
+
238
+ The maximum number of attempts that user can do during period of time
239
+
240
+ ___
241
+
242
+ ### max\_spins\_period\_ms
243
+
244
+ • `Optional` **max\_spins\_period\_ms**: `number`
245
+
246
+ The period of time in milliseconds during which the user can do the maximum number of attempts
@@ -6,8 +6,12 @@
6
6
 
7
7
  • **ticekt\_id**: `number`
8
8
 
9
+ Int presentation of the ticket
10
+
9
11
  ___
10
12
 
11
13
  ### ticket\_id\_string
12
14
 
13
15
  • **ticket\_id\_string**: `string`
16
+
17
+ String presentation of the ticket
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartico/public-api",
3
- "version": "0.0.283",
3
+ "version": "0.0.284",
4
4
  "description": "Smartico public API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,7 +17,7 @@ interface JackpotPublicMeta {
17
17
  /**
18
18
  * Custom data as string or JSON string that can be used in API to build custom UI
19
19
  * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
20
- * Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
20
+ * Read more here - <https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes>
21
21
  */
22
22
  custom_data: string;
23
23
  }
@@ -45,6 +45,8 @@ export const SAWTemplatesTransform = (items: SAWTemplate[]): TMiniGameTemplate[]
45
45
  custom_section_id: r.saw_template_ui_definition.custom_section_id,
46
46
  saw_template_ui_definition: r.saw_template_ui_definition,
47
47
  show_prize_history: r.show_prize_history,
48
+ max_number_of_attempts: r.maxSpinsCount,
49
+ max_spins_period_ms: r.maxSpinsPediodMs,
48
50
 
49
51
  prizes: r.prizes.map((p) => {
50
52
  const y: TMiniGamePrize = {
@@ -8,6 +8,7 @@ export interface SAWPrizeUI {
8
8
  name_original?: string; // keeps original name, how it came from the servers. This is needed for the Jackpot value replacemenet
9
9
  hide_prize_popup: boolean; // if true, prize popup on Prize Drop will not be shown
10
10
  aknowledge_message?: string;
11
+ aknowledge_message_lose?: string; // voyager specific
11
12
  sectors?: number[];
12
13
  acknowledge_type?: SAWAcknowledgeType;
13
14
  acknowledge_dp?: string;
@@ -17,7 +17,7 @@ interface RafflePublicMeta {
17
17
  /**
18
18
  * Custom data as string or JSON string that can be used in API to build custom UI
19
19
  * You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
20
- * Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
20
+ * Read more here - <https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes>
21
21
  */
22
22
  custom_data: string;
23
23
  }
@@ -1,7 +1,7 @@
1
1
  import { TransformedRaffleClaimPrizeResponse } from "../WSAPI/WSAPITypes";
2
2
  import { ProtocolResponse } from "../Base/ProtocolResponse";
3
3
 
4
- export interface RaffleClaimPrizeResponse extends ProtocolResponse {
4
+ export interface RaffleClaimPrizeResponse extends ProtocolResponse {
5
5
  errCode: number
6
6
  errMsg?: string
7
7
  }
@@ -13,6 +13,3 @@ export const raffleClaimPrizeResponseTransform = (info: RaffleClaimPrizeResponse
13
13
  errorMessage: info.errMsg
14
14
  }
15
15
  }
16
-
17
-
18
-
@@ -50,6 +50,7 @@ interface RaffleDraw {
50
50
 
51
51
  /**
52
52
  * Type of the draw execution, indicating how and when the draw is executed.
53
+ *
53
54
  * - ExecDate: Draw is executed only once at a specific date and time.
54
55
  * - Recurring: Draw is executed on a recurring basis (e.g., daily, weekly).
55
56
  * - Grand: Draw is executed once and is marked as grand, often with larger prizes or more importance.
@@ -65,21 +66,22 @@ interface RaffleDraw {
65
66
  /** Unique ID of the previusly executed draw (if there is such) */
66
67
  previous_run_id?: number;
67
68
 
68
- /**
69
- * Date/time starting from which the tickets will participate in the upcoming draw
70
- * This value need to be taken into account with next_execute_ts field value, for example
71
- * 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
72
- * (internally this value is calculated as next_execute_ts - ticket_start_date)
69
+ /**
70
+ * Date/time starting from which the tickets will participate in the upcoming draw
71
+ * This value need to be taken into account with next_execute_ts field value, for example
72
+ * 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
73
+ * (internally this value is calculated as next_execute_ts - ticket_start_date)
73
74
  */
74
75
  ticket_start_ts: number;
75
76
 
76
- /** Field is indicating if same ticket can win multiple prizes in the same draw
77
- * For example there are 3 types of prizes in the draw - iPhone, iPad, MacBook
78
- * If this field is true, then one ticket can win all 3 prizes (depending on the chances of course),
79
- * if false, then one ticket can win only one prize.
80
- * The distribution of the prizes is start from top (assuming on top are the most valuable prizes) to bottom (less valuable prizes)
81
- * If specific prize has multiple values, e.g. we have 3 iPhones,
82
- * then the same ticket can win only one prize of a kind, but can win multiple prizes of different kind (if allow_multi_prize_per_ticket is true)
77
+ /**
78
+ * Field is indicating if same ticket can win multiple prizes in the same draw
79
+ * For example there are 3 types of prizes in the draw - iPhone, iPad, MacBook
80
+ * If this field is true, then one ticket can win all 3 prizes (depending on the chances of course),
81
+ * if false, then one ticket can win only one prize.
82
+ * The distribution of the prizes is start from top (assuming on top are the most valuable prizes) to bottom (less valuable prizes)
83
+ * If specific prize has multiple values, e.g. we have 3 iPhones,
84
+ * then the same ticket can win only one prize of a kind, but can win multiple prizes of different kind (if allow_multi_prize_per_ticket is true)
83
85
  */
84
86
  allow_multi_prize_per_ticket: boolean;
85
87
 
@@ -95,9 +97,9 @@ interface RaffleDraw {
95
97
  */
96
98
  my_tickets_count: number;
97
99
 
98
- /*
99
- * List of last 5 tickets are collected by current user for this instance of draw.
100
- */
100
+ /**
101
+ * List of last 5 tickets are collected by current user for this instance of draw.
102
+ */
101
103
  my_last_tickets: RaffleTicket[];
102
104
  }
103
105
 
@@ -34,28 +34,29 @@ interface RafflePrize {
34
34
  /**
35
35
  * The actual number of prizes for the current instance.
36
36
  * This value is taking into account follwing values:
37
- * - min_required_total_tickets,
38
- * - add_one_prize_per_each_x_tickets
39
- * - stock_items_per_draw
40
- * - total_tickets_count (from Draw instance)
41
- * - cap_prizes_per_run
37
+ *
38
+ * - min_required_total_tickets,
39
+ * - add_one_prize_per_each_x_tickets
40
+ * - stock_items_per_draw
41
+ * - total_tickets_count (from Draw instance)
42
+ * - cap_prizes_per_run
42
43
  * For example:
43
- * - prizes_per_run = 1
44
- * - min_required_total_tickets = 1000
45
- * - add_one_prize_per_each_x_tickets = 1000
46
- * - stock_items_per_draw = 5
47
- * - total_tickets_count = 7000
48
- * - cap_prizes_per_run = 6
49
- * prizes_per_run_actual will be 5, because
50
- * 7000 tickets are collected, so 7 iPhones are available, but the cap is 6 and the stock is 5.
44
+ *
45
+ * - prizes_per_run = 1
46
+ * - min_required_total_tickets = 1000
47
+ * - add_one_prize_per_each_x_tickets = 1000
48
+ * - stock_items_per_draw = 5
49
+ * - total_tickets_count = 7000
50
+ * - cap_prizes_per_run = 6
51
+ * prizes_per_run_actual will be 5, because
52
+ * 7000 tickets are collected, so 7 iPhones are available, but the cap is 6 and the stock is 5.
51
53
  */
52
54
  prizes_per_run_actual: number;
53
55
 
54
56
 
55
57
  /**
56
- *
57
- * The chances to win the prize by current player.
58
- * Calculated as the ratio of the number of tickets collected by the current player to the
58
+ * The chances to win the prize by current player.
59
+ * Calculated as the ratio of the number of tickets collected by the current player to the
59
60
  * total number of tickets collected by all players and multiplied by number of actual prizes of this kind.
60
61
  */
61
62
  chances_to_win_perc: number;
@@ -91,7 +92,7 @@ interface RafflePrize {
91
92
 
92
93
  /**
93
94
  * The maximum number of prizes that can be given within one instance/run of draw.
94
- * For example the prize is iPhone and add_one_prize_per_each_x_tickets is set to 1000,
95
+ * For example the prize is iPhone and add_one_prize_per_each_x_tickets is set to 1000,
95
96
  * cap_prizes_per_run is set to 3, and the total number of tickets collected is 7000.
96
97
  * In this case, the prizes_per_run_actual will be limited by 3
97
98
  */
@@ -1,8 +1,12 @@
1
1
 
2
2
  interface RaffleTicket {
3
- /* int presentation of the ticket */
3
+ /**
4
+ * Int presentation of the ticket
5
+ */
4
6
  id: number;
5
- /* String presentation of ticket */
7
+ /**
8
+ * String presentation of the ticket
9
+ */
6
10
  s: string;
7
11
  }
8
12
 
@@ -181,8 +181,12 @@ export interface TMiniGameTemplate {
181
181
 
182
182
  /** The UI definition of the mini-game */
183
183
  saw_template_ui_definition: SAWTemplateUI;
184
- /* When enabled the prize history icon is visible on a certain template */
184
+ /** When enabled the prize history icon is visible on a certain template */
185
185
  show_prize_history?:boolean;
186
+ /** The maximum number of attempts that user can do during period of time */
187
+ max_number_of_attempts?: number;
188
+ /** The period of time in milliseconds during which the user can do the maximum number of attempts */
189
+ max_spins_period_ms?: number;
186
190
  }
187
191
 
188
192
  /**
@@ -963,9 +967,13 @@ export interface TRaffle {
963
967
  }
964
968
 
965
969
  export interface TRaffleTicket {
966
- /* int presentation of the ticket */
970
+ /**
971
+ * Int presentation of the ticket
972
+ */
967
973
  ticekt_id: number;
968
- /* String presentation of ticket */
974
+ /**
975
+ * String presentation of the ticket
976
+ */
969
977
  ticket_id_string: string;
970
978
  }
971
979