@smartico/public-api 0.0.329 → 0.0.331
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 -2
- package/dist/MiniGames/SAWGameType.d.ts +3 -1
- package/dist/Raffle/Raffle.d.ts +0 -8
- package/dist/Raffle/RaffleDraw.d.ts +8 -0
- package/dist/WSAPI/WSAPITypes.d.ts +8 -8
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +12 -7
- package/dist/index.modern.mjs.map +1 -1
- package/docs/interfaces/RaffleDraw.md +16 -0
- package/docs/interfaces/TRaffleDraw.md +16 -0
- package/docs/interfaces/TStoreItem.md +1 -1
- package/package.json +1 -1
- package/src/Base/ClassId.ts +2 -2
- package/src/MiniGames/SAWGameType.ts +3 -0
- package/src/Raffle/GetDrawRunResponse.ts +3 -1
- package/src/Raffle/GetRafflesResponse.ts +2 -2
- package/src/Raffle/Raffle.ts +0 -10
- package/src/Raffle/RaffleDraw.ts +8 -0
- package/src/WSAPI/WSAPITypes.ts +8 -8
|
@@ -126,3 +126,19 @@ ___
|
|
|
126
126
|
• **my\_last\_tickets**: [`RaffleTicket`](RaffleTicket.md)[]
|
|
127
127
|
|
|
128
128
|
List of last 5 tickets are collected by current user for this instance of draw.
|
|
129
|
+
|
|
130
|
+
___
|
|
131
|
+
|
|
132
|
+
### user\_opted\_in
|
|
133
|
+
|
|
134
|
+
• **user\_opted\_in**: `boolean`
|
|
135
|
+
|
|
136
|
+
If true, the user has opted-in to the raffle.
|
|
137
|
+
|
|
138
|
+
___
|
|
139
|
+
|
|
140
|
+
### requires\_optin
|
|
141
|
+
|
|
142
|
+
• **requires\_optin**: `boolean`
|
|
143
|
+
|
|
144
|
+
If true, the user needs to opt-in to the raffle before they can participate.
|
|
@@ -179,3 +179,19 @@ ___
|
|
|
179
179
|
### my\_last\_tickets
|
|
180
180
|
|
|
181
181
|
• **my\_last\_tickets**: [`TRaffleTicket`](TRaffleTicket.md)[]
|
|
182
|
+
|
|
183
|
+
___
|
|
184
|
+
|
|
185
|
+
### user\_opted\_in
|
|
186
|
+
|
|
187
|
+
• **user\_opted\_in**: `boolean`
|
|
188
|
+
|
|
189
|
+
If true, the user has opted-in to the raffle.
|
|
190
|
+
|
|
191
|
+
___
|
|
192
|
+
|
|
193
|
+
### requires\_optin
|
|
194
|
+
|
|
195
|
+
• **requires\_optin**: `boolean`
|
|
196
|
+
|
|
197
|
+
If true, the user needs to opt-in to the raffle before they can participate.
|
|
@@ -38,7 +38,7 @@ ___
|
|
|
38
38
|
|
|
39
39
|
### type
|
|
40
40
|
|
|
41
|
-
• **type**: ``"
|
|
41
|
+
• **type**: ``"bonus"`` \| ``"tangible"`` \| ``"minigamespin"`` \| ``"changelevel"`` \| ``"prizedrop"`` \| ``"raffleticket"`` \| ``"unknown"``
|
|
42
42
|
|
|
43
43
|
Type of the store item. Can be 'bonus' or 'tangible' or different others.
|
|
44
44
|
|
package/package.json
CHANGED
package/src/Base/ClassId.ts
CHANGED
|
@@ -164,8 +164,8 @@ export enum ClassId {
|
|
|
164
164
|
RAF_GET_DRAW_HISTORY_RESPONSE = 907,
|
|
165
165
|
RAF_CLAIM_PRIZE_REQUEST = 908,
|
|
166
166
|
RAF_CLAIM_PRIZE_RESPONSE = 909,
|
|
167
|
-
RAF_OPTIN_REQUEST =
|
|
168
|
-
RAF_OPTIN_RESPONSE =
|
|
167
|
+
RAF_OPTIN_REQUEST = 916,
|
|
168
|
+
RAF_OPTIN_RESPONSE = 917,
|
|
169
169
|
/*
|
|
170
170
|
RAF_GET_TICKETS_REQUEST = 902,
|
|
171
171
|
RAF_GET_TICKETS_RESPONSE = 903,
|
|
@@ -10,6 +10,7 @@ export enum SAWGameType {
|
|
|
10
10
|
TreasureHunt = 9,
|
|
11
11
|
Voyager = 10,
|
|
12
12
|
Plinko = 11,
|
|
13
|
+
СoinFlip = 12,
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
export enum SAWGameTypeName {
|
|
@@ -24,6 +25,7 @@ export enum SAWGameTypeName {
|
|
|
24
25
|
TreasureHunt = 'treasure_hunt',
|
|
25
26
|
Voyager = 'voyager',
|
|
26
27
|
Plinko = 'plinko',
|
|
28
|
+
СoinFlip = 'coin_flip',
|
|
27
29
|
Unknown = 'unknown',
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -42,6 +44,7 @@ export const SAWGameTypeNamed = (type: SAWGameType): SAWGameTypeName => {
|
|
|
42
44
|
[SAWGameType.TreasureHunt]: SAWGameTypeName.TreasureHunt,
|
|
43
45
|
[SAWGameType.Voyager]: SAWGameTypeName.Voyager,
|
|
44
46
|
[SAWGameType.Plinko]: SAWGameTypeName.Plinko,
|
|
47
|
+
[SAWGameType.СoinFlip]: SAWGameTypeName.СoinFlip,
|
|
45
48
|
}[type] || SAWGameTypeName.Unknown
|
|
46
49
|
);
|
|
47
50
|
};
|
|
@@ -30,6 +30,8 @@ export const drawRunTransform = (res: GetDrawRunResponse): TRaffleDraw => {
|
|
|
30
30
|
allow_multi_prize_per_ticket: res.draw.allow_multi_prize_per_ticket,
|
|
31
31
|
total_tickets_count: res.draw.total_tickets_count,
|
|
32
32
|
my_tickets_count: res.draw.my_tickets_count,
|
|
33
|
-
my_last_tickets: ticketsTransform(res.draw.my_last_tickets)
|
|
33
|
+
my_last_tickets: ticketsTransform(res.draw.my_last_tickets),
|
|
34
|
+
user_opted_in: Boolean(res.draw.user_opted_in),
|
|
35
|
+
requires_optin: Boolean(res.draw.requires_optin),
|
|
34
36
|
}
|
|
35
37
|
};
|
|
@@ -82,6 +82,8 @@ export const drawTransform = (items: RaffleDraw[]): TRaffleDraw[] => {
|
|
|
82
82
|
total_tickets_count: item.total_tickets_count,
|
|
83
83
|
my_tickets_count: item.my_tickets_count,
|
|
84
84
|
my_last_tickets: ticketsTransform(item.my_last_tickets),
|
|
85
|
+
user_opted_in: Boolean(item.user_opted_in),
|
|
86
|
+
requires_optin: Boolean(item.requires_optin),
|
|
85
87
|
};
|
|
86
88
|
});
|
|
87
89
|
};
|
|
@@ -101,8 +103,6 @@ export const raffleTransform = (items: Raffle[]): TRaffle[] => {
|
|
|
101
103
|
end_date: item.end_date_ts,
|
|
102
104
|
max_tickets_count: item.max_tickets_count,
|
|
103
105
|
current_tickets_count: item.current_tickets_count,
|
|
104
|
-
user_opted_in: item.user_opted_in,
|
|
105
|
-
requires_optin: item.requires_optin,
|
|
106
106
|
draws: drawTransform(item.draws),
|
|
107
107
|
};
|
|
108
108
|
});
|
package/src/Raffle/Raffle.ts
CHANGED
|
@@ -39,16 +39,6 @@ interface Raffle {
|
|
|
39
39
|
*/
|
|
40
40
|
current_tickets_count: number;
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* If true, the user has opted-in to the raffle.
|
|
44
|
-
*/
|
|
45
|
-
user_opted_in: boolean;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* If true, the user needs to opt-in to the raffle before they can participate.
|
|
49
|
-
*/
|
|
50
|
-
requires_optin: boolean;
|
|
51
|
-
|
|
52
42
|
/**
|
|
53
43
|
* List of draws that are available for this raffle.
|
|
54
44
|
* For example, if the raffle is containg one hourly draw, one daily draw and one draw on fixed date like 01/01/2022,
|
package/src/Raffle/RaffleDraw.ts
CHANGED
|
@@ -101,6 +101,14 @@ interface RaffleDraw {
|
|
|
101
101
|
* List of last 5 tickets are collected by current user for this instance of draw.
|
|
102
102
|
*/
|
|
103
103
|
my_last_tickets: RaffleTicket[];
|
|
104
|
+
/**
|
|
105
|
+
* If true, the user has opted-in to the raffle.
|
|
106
|
+
*/
|
|
107
|
+
user_opted_in: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* If true, the user needs to opt-in to the raffle before they can participate.
|
|
110
|
+
*/
|
|
111
|
+
requires_optin: boolean;
|
|
104
112
|
}
|
|
105
113
|
|
|
106
114
|
export { RaffleDraw };
|
package/src/WSAPI/WSAPITypes.ts
CHANGED
|
@@ -1019,14 +1019,6 @@ export interface TRaffle {
|
|
|
1019
1019
|
* Number of tickets that are already given to all users for this raffle
|
|
1020
1020
|
*/
|
|
1021
1021
|
current_tickets_count: number;
|
|
1022
|
-
/**
|
|
1023
|
-
* If true, the user has opted-in to the raffle.
|
|
1024
|
-
*/
|
|
1025
|
-
user_opted_in: boolean;
|
|
1026
|
-
/**
|
|
1027
|
-
* If true, the user needs to opt-in to the raffle before they can participate.
|
|
1028
|
-
*/
|
|
1029
|
-
requires_optin: boolean;
|
|
1030
1022
|
/**
|
|
1031
1023
|
* List of draws that are available for this raffle.
|
|
1032
1024
|
* For example, if the raffle is containg one hourly draw, one daily draw and one draw on fixed date like 01/01/2022,
|
|
@@ -1249,6 +1241,14 @@ export interface TRaffleDraw {
|
|
|
1249
1241
|
* List of last 5 tickets are collected by current user for this instance of draw.
|
|
1250
1242
|
*/
|
|
1251
1243
|
my_last_tickets: TRaffleTicket[];
|
|
1244
|
+
/**
|
|
1245
|
+
* If true, the user has opted-in to the raffle.
|
|
1246
|
+
*/
|
|
1247
|
+
user_opted_in: boolean;
|
|
1248
|
+
/**
|
|
1249
|
+
* If true, the user needs to opt-in to the raffle before they can participate.
|
|
1250
|
+
*/
|
|
1251
|
+
requires_optin: boolean;
|
|
1252
1252
|
}
|
|
1253
1253
|
|
|
1254
1254
|
export interface TRaffleDrawRun {
|