@smartico/public-api 0.0.328 → 0.0.330
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/Raffle/RaffleDraw.d.ts +8 -0
- package/dist/WSAPI/WSAPITypes.d.ts +8 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +21 -9
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +10 -6
- 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/Missions/MissionsUtils.ts +1 -1
- package/src/Raffle/GetDrawRunResponse.ts +3 -1
- package/src/Raffle/GetRafflesResponse.ts +2 -0
- package/src/Raffle/RaffleDraw.ts +8 -0
- package/src/WSAPI/WSAPITypes.ts +8 -0
- package/src/index.ts +1 -0
|
@@ -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,
|
|
@@ -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
|
};
|
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
|
@@ -1241,6 +1241,14 @@ export interface TRaffleDraw {
|
|
|
1241
1241
|
* List of last 5 tickets are collected by current user for this instance of draw.
|
|
1242
1242
|
*/
|
|
1243
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;
|
|
1244
1252
|
}
|
|
1245
1253
|
|
|
1246
1254
|
export interface TRaffleDrawRun {
|