@smartico/public-api 0.0.252 → 0.0.253
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 -0
- package/dist/Jackpots/GetJackpotWinnersRequest.d.ts +10 -0
- package/dist/Jackpots/GetJackpotWinnersResponse.d.ts +20 -0
- package/dist/Jackpots/index.d.ts +2 -0
- package/dist/Raffle/GetDrawRunResponse.d.ts +2 -0
- package/dist/Raffle/GetRaffleDrawRunsHistoryResponse.d.ts +2 -0
- package/dist/Raffle/GetRafflesResponse.d.ts +10 -0
- package/dist/Raffle/RaffleClaimPrizeResponse.d.ts +4 -0
- package/dist/Raffle/RaffleDraw.d.ts +2 -2
- package/dist/SmarticoAPI.d.ts +17 -5
- package/dist/WSAPI/WSAPI.d.ts +94 -8
- package/dist/WSAPI/WSAPITypes.d.ts +272 -0
- package/dist/index.js +559 -199
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +322 -14
- package/dist/index.modern.mjs.map +1 -1
- package/docs/README.md +140 -0
- package/docs/classes/WSAPI.md +102 -12
- package/docs/enums/RaffleDrawInstanceState.md +25 -0
- package/docs/enums/RaffleDrawTypeExecution.md +27 -0
- package/docs/interfaces/GetJackpotWinnersRequest.md +91 -0
- package/docs/interfaces/GetJackpotWinnersResponse.md +73 -0
- package/docs/interfaces/JackpotWinnerHistory.md +25 -0
- package/docs/interfaces/RaffleClaimPrizeResponse.md +3 -3
- package/docs/interfaces/RaffleDraw.md +2 -2
- package/docs/interfaces/TRaffle.md +101 -0
- package/docs/interfaces/TRaffleDraw.md +181 -0
- package/docs/interfaces/TRaffleDrawRun.md +125 -0
- package/docs/interfaces/TRafflePrize.md +159 -0
- package/docs/interfaces/TRafflePrizeWinner.md +50 -0
- package/docs/interfaces/TRaffleTicket.md +13 -0
- package/docs/interfaces/TransformedRaffleClaimPrizeResponse.md +17 -0
- package/package.json +1 -1
- package/src/Base/ClassId.ts +2 -1
- package/src/Jackpots/GetJackpotWinnersRequest.ts +12 -0
- package/src/Jackpots/GetJackpotWinnersResponse.ts +33 -0
- package/src/Jackpots/index.ts +2 -0
- package/src/Raffle/GetDrawRunResponse.ts +30 -0
- package/src/Raffle/GetRaffleDrawRunsHistoryResponse.ts +23 -0
- package/src/Raffle/GetRafflesResponse.ts +97 -0
- package/src/Raffle/RaffleClaimPrizeResponse.ts +16 -1
- package/src/Raffle/RaffleDraw.ts +2 -2
- package/src/SmarticoAPI.ts +45 -24
- package/src/WSAPI/WSAPI.ts +144 -9
- package/src/WSAPI/WSAPITypes.ts +307 -0
package/docs/README.md
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
- [MiniGamePrizeTypeName](enums/MiniGamePrizeTypeName.md)
|
|
11
11
|
- [SAWSpinErrorCode](enums/SAWSpinErrorCode.md)
|
|
12
12
|
- [AchievementAvailabilityStatus](enums/AchievementAvailabilityStatus.md)
|
|
13
|
+
- [RaffleDrawInstanceState](enums/RaffleDrawInstanceState.md)
|
|
14
|
+
- [RaffleDrawTypeExecution](enums/RaffleDrawTypeExecution.md)
|
|
13
15
|
- [BuyStoreItemErrorCode](enums/BuyStoreItemErrorCode.md)
|
|
14
16
|
- [TournamentRegistrationError](enums/TournamentRegistrationError.md)
|
|
15
17
|
- [TournamentRegistrationStatusName](enums/TournamentRegistrationStatusName.md)
|
|
@@ -17,6 +19,9 @@
|
|
|
17
19
|
## Interfaces
|
|
18
20
|
|
|
19
21
|
- [AchRelatedGame](interfaces/AchRelatedGame.md)
|
|
22
|
+
- [GetJackpotWinnersRequest](interfaces/GetJackpotWinnersRequest.md)
|
|
23
|
+
- [GetJackpotWinnersResponse](interfaces/GetJackpotWinnersResponse.md)
|
|
24
|
+
- [JackpotWinnerHistory](interfaces/JackpotWinnerHistory.md)
|
|
20
25
|
- [GetJackpotsPotsRequest](interfaces/GetJackpotsPotsRequest.md)
|
|
21
26
|
- [GetJackpotsPotsResponse](interfaces/GetJackpotsPotsResponse.md)
|
|
22
27
|
- [GetJackpotsRequest](interfaces/GetJackpotsRequest.md)
|
|
@@ -76,6 +81,13 @@
|
|
|
76
81
|
- [TBonus](interfaces/TBonus.md)
|
|
77
82
|
- [TClaimBonusResult](interfaces/TClaimBonusResult.md)
|
|
78
83
|
- [TSawHistory](interfaces/TSawHistory.md)
|
|
84
|
+
- [TRaffle](interfaces/TRaffle.md)
|
|
85
|
+
- [TRaffleTicket](interfaces/TRaffleTicket.md)
|
|
86
|
+
- [TRafflePrize](interfaces/TRafflePrize.md)
|
|
87
|
+
- [TRafflePrizeWinner](interfaces/TRafflePrizeWinner.md)
|
|
88
|
+
- [TRaffleDraw](interfaces/TRaffleDraw.md)
|
|
89
|
+
- [TRaffleDrawRun](interfaces/TRaffleDrawRun.md)
|
|
90
|
+
- [TransformedRaffleClaimPrizeResponse](interfaces/TransformedRaffleClaimPrizeResponse.md)
|
|
79
91
|
|
|
80
92
|
## General API
|
|
81
93
|
|
|
@@ -86,3 +98,131 @@
|
|
|
86
98
|
### TournamentRegistrationTypeName
|
|
87
99
|
|
|
88
100
|
Ƭ **TournamentRegistrationTypeName**: ``"AUTO"`` \| ``"OPT_IN"`` \| ``"BUY_IN_POINTS"`` \| ``"MANUAL_APPROVAL"`` \| ``"REQUIRES_QUALIFICATION"`` \| ``"UNKNOWN"``
|
|
101
|
+
|
|
102
|
+
## Functions
|
|
103
|
+
|
|
104
|
+
### drawRunTransform
|
|
105
|
+
|
|
106
|
+
▸ **drawRunTransform**(`res`): [`TRaffleDraw`](interfaces/TRaffleDraw.md)
|
|
107
|
+
|
|
108
|
+
#### Parameters
|
|
109
|
+
|
|
110
|
+
| Name | Type |
|
|
111
|
+
| :------ | :------ |
|
|
112
|
+
| `res` | [`GetDrawRunResponse`](interfaces/GetDrawRunResponse.md) |
|
|
113
|
+
|
|
114
|
+
#### Returns
|
|
115
|
+
|
|
116
|
+
[`TRaffleDraw`](interfaces/TRaffleDraw.md)
|
|
117
|
+
|
|
118
|
+
___
|
|
119
|
+
|
|
120
|
+
### drawRunHistoryTransform
|
|
121
|
+
|
|
122
|
+
▸ **drawRunHistoryTransform**(`res`): [`TRaffleDrawRun`](interfaces/TRaffleDrawRun.md)[]
|
|
123
|
+
|
|
124
|
+
#### Parameters
|
|
125
|
+
|
|
126
|
+
| Name | Type |
|
|
127
|
+
| :------ | :------ |
|
|
128
|
+
| `res` | [`GetRaffleDrawRunsHistoryResponse`](interfaces/GetRaffleDrawRunsHistoryResponse.md) |
|
|
129
|
+
|
|
130
|
+
#### Returns
|
|
131
|
+
|
|
132
|
+
[`TRaffleDrawRun`](interfaces/TRaffleDrawRun.md)[]
|
|
133
|
+
|
|
134
|
+
___
|
|
135
|
+
|
|
136
|
+
### ticketsTransform
|
|
137
|
+
|
|
138
|
+
▸ **ticketsTransform**(`items`): [`TRaffleTicket`](interfaces/TRaffleTicket.md)[]
|
|
139
|
+
|
|
140
|
+
#### Parameters
|
|
141
|
+
|
|
142
|
+
| Name | Type |
|
|
143
|
+
| :------ | :------ |
|
|
144
|
+
| `items` | [`RaffleTicket`](interfaces/RaffleTicket.md)[] |
|
|
145
|
+
|
|
146
|
+
#### Returns
|
|
147
|
+
|
|
148
|
+
[`TRaffleTicket`](interfaces/TRaffleTicket.md)[]
|
|
149
|
+
|
|
150
|
+
___
|
|
151
|
+
|
|
152
|
+
### winnersTransform
|
|
153
|
+
|
|
154
|
+
▸ **winnersTransform**(`items`): [`TRafflePrizeWinner`](interfaces/TRafflePrizeWinner.md)[]
|
|
155
|
+
|
|
156
|
+
#### Parameters
|
|
157
|
+
|
|
158
|
+
| Name | Type |
|
|
159
|
+
| :------ | :------ |
|
|
160
|
+
| `items` | [`RafflePrizeWinner`](interfaces/RafflePrizeWinner.md)[] |
|
|
161
|
+
|
|
162
|
+
#### Returns
|
|
163
|
+
|
|
164
|
+
[`TRafflePrizeWinner`](interfaces/TRafflePrizeWinner.md)[]
|
|
165
|
+
|
|
166
|
+
___
|
|
167
|
+
|
|
168
|
+
### prizeTransform
|
|
169
|
+
|
|
170
|
+
▸ **prizeTransform**(`items`): [`TRafflePrize`](interfaces/TRafflePrize.md)[]
|
|
171
|
+
|
|
172
|
+
#### Parameters
|
|
173
|
+
|
|
174
|
+
| Name | Type |
|
|
175
|
+
| :------ | :------ |
|
|
176
|
+
| `items` | [`RafflePrize`](interfaces/RafflePrize.md)[] |
|
|
177
|
+
|
|
178
|
+
#### Returns
|
|
179
|
+
|
|
180
|
+
[`TRafflePrize`](interfaces/TRafflePrize.md)[]
|
|
181
|
+
|
|
182
|
+
___
|
|
183
|
+
|
|
184
|
+
### drawTransform
|
|
185
|
+
|
|
186
|
+
▸ **drawTransform**(`items`): [`TRaffleDraw`](interfaces/TRaffleDraw.md)[]
|
|
187
|
+
|
|
188
|
+
#### Parameters
|
|
189
|
+
|
|
190
|
+
| Name | Type |
|
|
191
|
+
| :------ | :------ |
|
|
192
|
+
| `items` | [`RaffleDraw`](interfaces/RaffleDraw.md)[] |
|
|
193
|
+
|
|
194
|
+
#### Returns
|
|
195
|
+
|
|
196
|
+
[`TRaffleDraw`](interfaces/TRaffleDraw.md)[]
|
|
197
|
+
|
|
198
|
+
___
|
|
199
|
+
|
|
200
|
+
### raffleTransform
|
|
201
|
+
|
|
202
|
+
▸ **raffleTransform**(`items`): [`TRaffle`](interfaces/TRaffle.md)[]
|
|
203
|
+
|
|
204
|
+
#### Parameters
|
|
205
|
+
|
|
206
|
+
| Name | Type |
|
|
207
|
+
| :------ | :------ |
|
|
208
|
+
| `items` | [`Raffle`](interfaces/Raffle.md)[] |
|
|
209
|
+
|
|
210
|
+
#### Returns
|
|
211
|
+
|
|
212
|
+
[`TRaffle`](interfaces/TRaffle.md)[]
|
|
213
|
+
|
|
214
|
+
___
|
|
215
|
+
|
|
216
|
+
### raffleClaimPrizeResponseTransform
|
|
217
|
+
|
|
218
|
+
▸ **raffleClaimPrizeResponseTransform**(`info`): [`TransformedRaffleClaimPrizeResponse`](interfaces/TransformedRaffleClaimPrizeResponse.md)
|
|
219
|
+
|
|
220
|
+
#### Parameters
|
|
221
|
+
|
|
222
|
+
| Name | Type |
|
|
223
|
+
| :------ | :------ |
|
|
224
|
+
| `info` | [`RaffleClaimPrizeResponse`](interfaces/RaffleClaimPrizeResponse.md) |
|
|
225
|
+
|
|
226
|
+
#### Returns
|
|
227
|
+
|
|
228
|
+
[`TransformedRaffleClaimPrizeResponse`](interfaces/TransformedRaffleClaimPrizeResponse.md)
|
package/docs/classes/WSAPI.md
CHANGED
|
@@ -957,6 +957,38 @@ _smartico.api.jackpotOptOut({ jp_template_id: 123 }).then((result) => {
|
|
|
957
957
|
|
|
958
958
|
___
|
|
959
959
|
|
|
960
|
+
### getJackpotWinners
|
|
961
|
+
|
|
962
|
+
▸ **getJackpotWinners**(`«destructured»`): `Promise`\<[`JackpotWinnerHistory`](../interfaces/JackpotWinnerHistory.md)[]\>
|
|
963
|
+
|
|
964
|
+
Returns the winners of the jackpot with the specified jp_template_id.
|
|
965
|
+
|
|
966
|
+
**Example**:
|
|
967
|
+
```
|
|
968
|
+
_smartico.api.getJackpotWinners({
|
|
969
|
+
jp_template_id: 123,
|
|
970
|
+
}).then((result) => {
|
|
971
|
+
console.log(result);
|
|
972
|
+
});
|
|
973
|
+
```
|
|
974
|
+
|
|
975
|
+
**Visitor mode: not supported**
|
|
976
|
+
|
|
977
|
+
#### Parameters
|
|
978
|
+
|
|
979
|
+
| Name | Type |
|
|
980
|
+
| :------ | :------ |
|
|
981
|
+
| `«destructured»` | `Object` |
|
|
982
|
+
| › `limit?` | `number` |
|
|
983
|
+
| › `offset?` | `number` |
|
|
984
|
+
| › `jp_template_id?` | `number` |
|
|
985
|
+
|
|
986
|
+
#### Returns
|
|
987
|
+
|
|
988
|
+
`Promise`\<[`JackpotWinnerHistory`](../interfaces/JackpotWinnerHistory.md)[]\>
|
|
989
|
+
|
|
990
|
+
___
|
|
991
|
+
|
|
960
992
|
### getRelatedItemsForGame
|
|
961
993
|
|
|
962
994
|
▸ **getRelatedItemsForGame**(`related_game_id`): `Promise`\<`GetRelatedAchTourResponse`\>
|
|
@@ -992,56 +1024,114 @@ ___
|
|
|
992
1024
|
|
|
993
1025
|
### getRaffles
|
|
994
1026
|
|
|
995
|
-
▸ **getRaffles**(): `Promise`\<[`
|
|
1027
|
+
▸ **getRaffles**(`«destructured»?`): `Promise`\<[`TRaffle`](../interfaces/TRaffle.md)[]\>
|
|
1028
|
+
|
|
1029
|
+
Returns the list of Raffles available for user
|
|
1030
|
+
The returned list of Raffles is cached for 30 seconds. But you can pass the onUpdate callback as a parameter. Note that each time you call getRaffles with a new onUpdate callback, the old one will be overwritten by the new one.
|
|
1031
|
+
The onUpdate callback will be called on claiming prize. Updated Raffles will be passed to onUpdate callback.
|
|
1032
|
+
|
|
1033
|
+
**Example**:
|
|
1034
|
+
```
|
|
1035
|
+
_smartico.api.getRaffles().then((result) => {
|
|
1036
|
+
console.log(result);
|
|
1037
|
+
});
|
|
1038
|
+
```
|
|
1039
|
+
|
|
1040
|
+
**Visitor mode: not supported**
|
|
1041
|
+
|
|
1042
|
+
#### Parameters
|
|
1043
|
+
|
|
1044
|
+
| Name | Type |
|
|
1045
|
+
| :------ | :------ |
|
|
1046
|
+
| `«destructured»` | `Object` |
|
|
1047
|
+
| › `onUpdate?` | (`data`: [`TRaffle`](../interfaces/TRaffle.md)[]) => `void` |
|
|
996
1048
|
|
|
997
1049
|
#### Returns
|
|
998
1050
|
|
|
999
|
-
`Promise`\<[`
|
|
1051
|
+
`Promise`\<[`TRaffle`](../interfaces/TRaffle.md)[]\>
|
|
1000
1052
|
|
|
1001
1053
|
___
|
|
1002
1054
|
|
|
1003
|
-
###
|
|
1055
|
+
### getRaffleDrawRun
|
|
1056
|
+
|
|
1057
|
+
▸ **getRaffleDrawRun**(`props`): `Promise`\<[`TRaffleDraw`](../interfaces/TRaffleDraw.md)\>
|
|
1004
1058
|
|
|
1005
|
-
|
|
1059
|
+
Returns draw run for provided raffle_id and run_id
|
|
1060
|
+
|
|
1061
|
+
**Example**:
|
|
1062
|
+
```
|
|
1063
|
+
_smartico.api.getRaffleDrawRun({raffle_id:156, run_id: 145}).then((result) => {
|
|
1064
|
+
console.log(result);
|
|
1065
|
+
});
|
|
1066
|
+
```
|
|
1067
|
+
|
|
1068
|
+
**Visitor mode: not supported**
|
|
1006
1069
|
|
|
1007
1070
|
#### Parameters
|
|
1008
1071
|
|
|
1009
1072
|
| Name | Type |
|
|
1010
1073
|
| :------ | :------ |
|
|
1011
|
-
| `
|
|
1074
|
+
| `props` | `Object` |
|
|
1075
|
+
| `props.raffle_id` | `number` |
|
|
1076
|
+
| `props.run_id` | `number` |
|
|
1012
1077
|
|
|
1013
1078
|
#### Returns
|
|
1014
1079
|
|
|
1015
|
-
`Promise`\<[`
|
|
1080
|
+
`Promise`\<[`TRaffleDraw`](../interfaces/TRaffleDraw.md)\>
|
|
1016
1081
|
|
|
1017
1082
|
___
|
|
1018
1083
|
|
|
1019
1084
|
### getRaffleDrawRunsHistory
|
|
1020
1085
|
|
|
1021
|
-
▸ **getRaffleDrawRunsHistory**(`
|
|
1086
|
+
▸ **getRaffleDrawRunsHistory**(`props`): `Promise`\<[`TRaffleDrawRun`](../interfaces/TRaffleDrawRun.md)[]\>
|
|
1087
|
+
|
|
1088
|
+
Returns history of draw runs for the provided raffle_id and draw_id, if the draw_id is not provided will return history of all the draws for the provided raffle_id
|
|
1089
|
+
|
|
1090
|
+
**Example**:
|
|
1091
|
+
```
|
|
1092
|
+
_smartico.api.getRaffleDrawRunHistory({raffle_id:156, draw_id: 432}).then((result) => {
|
|
1093
|
+
console.log(result);
|
|
1094
|
+
});
|
|
1095
|
+
```
|
|
1096
|
+
|
|
1097
|
+
**Visitor mode: not supported**
|
|
1022
1098
|
|
|
1023
1099
|
#### Parameters
|
|
1024
1100
|
|
|
1025
1101
|
| Name | Type |
|
|
1026
1102
|
| :------ | :------ |
|
|
1027
|
-
| `
|
|
1103
|
+
| `props` | `Object` |
|
|
1104
|
+
| `props.raffle_id` | `number` |
|
|
1105
|
+
| `props.draw_id?` | `number` |
|
|
1028
1106
|
|
|
1029
1107
|
#### Returns
|
|
1030
1108
|
|
|
1031
|
-
`Promise`\<[`
|
|
1109
|
+
`Promise`\<[`TRaffleDrawRun`](../interfaces/TRaffleDrawRun.md)[]\>
|
|
1032
1110
|
|
|
1033
1111
|
___
|
|
1034
1112
|
|
|
1035
1113
|
### claimRafflePrize
|
|
1036
1114
|
|
|
1037
|
-
▸ **claimRafflePrize**(`
|
|
1115
|
+
▸ **claimRafflePrize**(`props`): `Promise`\<[`TransformedRaffleClaimPrizeResponse`](../interfaces/TransformedRaffleClaimPrizeResponse.md)\>
|
|
1116
|
+
|
|
1117
|
+
Returns error code, and error Message after calling the function, error message 0 - means that the request was successful
|
|
1118
|
+
|
|
1119
|
+
**Example**:
|
|
1120
|
+
```
|
|
1121
|
+
_smartico.api.claimRafflePrize({won_id:251}).then((result) => {
|
|
1122
|
+
console.log(result);
|
|
1123
|
+
});
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
**Visitor mode: not supported**
|
|
1038
1127
|
|
|
1039
1128
|
#### Parameters
|
|
1040
1129
|
|
|
1041
1130
|
| Name | Type |
|
|
1042
1131
|
| :------ | :------ |
|
|
1043
|
-
| `
|
|
1132
|
+
| `props` | `Object` |
|
|
1133
|
+
| `props.won_id` | `number` |
|
|
1044
1134
|
|
|
1045
1135
|
#### Returns
|
|
1046
1136
|
|
|
1047
|
-
`Promise`\<[`
|
|
1137
|
+
`Promise`\<[`TransformedRaffleClaimPrizeResponse`](../interfaces/TransformedRaffleClaimPrizeResponse.md)\>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Enumeration: RaffleDrawInstanceState
|
|
2
|
+
|
|
3
|
+
## Enumeration Members
|
|
4
|
+
|
|
5
|
+
### Open
|
|
6
|
+
|
|
7
|
+
• **Open** = ``1``
|
|
8
|
+
|
|
9
|
+
Draw is open for the tickets collection
|
|
10
|
+
|
|
11
|
+
___
|
|
12
|
+
|
|
13
|
+
### WinnerSelection
|
|
14
|
+
|
|
15
|
+
• **WinnerSelection** = ``2``
|
|
16
|
+
|
|
17
|
+
Winner selection is in progress
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### Executed
|
|
22
|
+
|
|
23
|
+
• **Executed** = ``3``
|
|
24
|
+
|
|
25
|
+
Draw is executed and the winners are selected
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Enumeration: RaffleDrawTypeExecution
|
|
2
|
+
|
|
3
|
+
## Enumeration Members
|
|
4
|
+
|
|
5
|
+
### ExecDate
|
|
6
|
+
|
|
7
|
+
• **ExecDate** = ``0``
|
|
8
|
+
|
|
9
|
+
Draw is executed only once
|
|
10
|
+
|
|
11
|
+
___
|
|
12
|
+
|
|
13
|
+
### Recurring
|
|
14
|
+
|
|
15
|
+
• **Recurring** = ``1``
|
|
16
|
+
|
|
17
|
+
Draw is executed on a recurring basis
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### Grand
|
|
22
|
+
|
|
23
|
+
• **Grand** = ``2``
|
|
24
|
+
|
|
25
|
+
Draw is executed once and is marked as grand.
|
|
26
|
+
This means it is a special or significant draw,
|
|
27
|
+
often with larger prizes or more importance.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Interface: GetJackpotWinnersRequest
|
|
2
|
+
|
|
3
|
+
## Hierarchy
|
|
4
|
+
|
|
5
|
+
- `ProtocolRequest`
|
|
6
|
+
|
|
7
|
+
↳ **`GetJackpotWinnersRequest`**
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### cid
|
|
12
|
+
|
|
13
|
+
• **cid**: `number`
|
|
14
|
+
|
|
15
|
+
#### Inherited from
|
|
16
|
+
|
|
17
|
+
ProtocolRequest.cid
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### ts
|
|
22
|
+
|
|
23
|
+
• `Optional` **ts**: `number`
|
|
24
|
+
|
|
25
|
+
#### Inherited from
|
|
26
|
+
|
|
27
|
+
ProtocolRequest.ts
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### uuid
|
|
32
|
+
|
|
33
|
+
• `Optional` **uuid**: `string`
|
|
34
|
+
|
|
35
|
+
#### Inherited from
|
|
36
|
+
|
|
37
|
+
ProtocolRequest.uuid
|
|
38
|
+
|
|
39
|
+
___
|
|
40
|
+
|
|
41
|
+
### api\_key
|
|
42
|
+
|
|
43
|
+
• **api\_key**: `string`
|
|
44
|
+
|
|
45
|
+
#### Inherited from
|
|
46
|
+
|
|
47
|
+
ProtocolRequest.api\_key
|
|
48
|
+
|
|
49
|
+
___
|
|
50
|
+
|
|
51
|
+
### brand\_key
|
|
52
|
+
|
|
53
|
+
• **brand\_key**: `string`
|
|
54
|
+
|
|
55
|
+
#### Inherited from
|
|
56
|
+
|
|
57
|
+
ProtocolRequest.brand\_key
|
|
58
|
+
|
|
59
|
+
___
|
|
60
|
+
|
|
61
|
+
### ext\_user\_id
|
|
62
|
+
|
|
63
|
+
• **ext\_user\_id**: `string`
|
|
64
|
+
|
|
65
|
+
#### Inherited from
|
|
66
|
+
|
|
67
|
+
ProtocolRequest.ext\_user\_id
|
|
68
|
+
|
|
69
|
+
___
|
|
70
|
+
|
|
71
|
+
### jp\_template\_id
|
|
72
|
+
|
|
73
|
+
• **jp\_template\_id**: `number`
|
|
74
|
+
|
|
75
|
+
The ID of the jackpot template
|
|
76
|
+
|
|
77
|
+
___
|
|
78
|
+
|
|
79
|
+
### limit
|
|
80
|
+
|
|
81
|
+
• **limit**: `number`
|
|
82
|
+
|
|
83
|
+
The number of winners to return
|
|
84
|
+
|
|
85
|
+
___
|
|
86
|
+
|
|
87
|
+
### offset
|
|
88
|
+
|
|
89
|
+
• **offset**: `number`
|
|
90
|
+
|
|
91
|
+
The offset of the winners to return
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Interface: GetJackpotWinnersResponse
|
|
2
|
+
|
|
3
|
+
## Hierarchy
|
|
4
|
+
|
|
5
|
+
- `ProtocolResponse`
|
|
6
|
+
|
|
7
|
+
↳ **`GetJackpotWinnersResponse`**
|
|
8
|
+
|
|
9
|
+
## Properties
|
|
10
|
+
|
|
11
|
+
### cid
|
|
12
|
+
|
|
13
|
+
• **cid**: `number`
|
|
14
|
+
|
|
15
|
+
#### Inherited from
|
|
16
|
+
|
|
17
|
+
ProtocolResponse.cid
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### ts
|
|
22
|
+
|
|
23
|
+
• `Optional` **ts**: `number`
|
|
24
|
+
|
|
25
|
+
#### Inherited from
|
|
26
|
+
|
|
27
|
+
ProtocolResponse.ts
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### uuid
|
|
32
|
+
|
|
33
|
+
• `Optional` **uuid**: `string`
|
|
34
|
+
|
|
35
|
+
#### Inherited from
|
|
36
|
+
|
|
37
|
+
ProtocolResponse.uuid
|
|
38
|
+
|
|
39
|
+
___
|
|
40
|
+
|
|
41
|
+
### errCode
|
|
42
|
+
|
|
43
|
+
• `Optional` **errCode**: `number`
|
|
44
|
+
|
|
45
|
+
#### Inherited from
|
|
46
|
+
|
|
47
|
+
ProtocolResponse.errCode
|
|
48
|
+
|
|
49
|
+
___
|
|
50
|
+
|
|
51
|
+
### errMsg
|
|
52
|
+
|
|
53
|
+
• `Optional` **errMsg**: `string`
|
|
54
|
+
|
|
55
|
+
#### Inherited from
|
|
56
|
+
|
|
57
|
+
ProtocolResponse.errMsg
|
|
58
|
+
|
|
59
|
+
___
|
|
60
|
+
|
|
61
|
+
### winners
|
|
62
|
+
|
|
63
|
+
• **winners**: [`JackpotWinnerHistory`](JackpotWinnerHistory.md)[]
|
|
64
|
+
|
|
65
|
+
The list of jackpot winners
|
|
66
|
+
|
|
67
|
+
___
|
|
68
|
+
|
|
69
|
+
### has\_more
|
|
70
|
+
|
|
71
|
+
• **has\_more**: `boolean`
|
|
72
|
+
|
|
73
|
+
Whether there are more winners to fetch
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Interface: JackpotWinnerHistory
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
### jp\_pot\_id
|
|
6
|
+
|
|
7
|
+
• **jp\_pot\_id**: `number`
|
|
8
|
+
|
|
9
|
+
Id of the jackpot pot
|
|
10
|
+
|
|
11
|
+
___
|
|
12
|
+
|
|
13
|
+
### win\_date\_ts
|
|
14
|
+
|
|
15
|
+
• **win\_date\_ts**: `number`
|
|
16
|
+
|
|
17
|
+
Date of winning in milliseconds
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### winner
|
|
22
|
+
|
|
23
|
+
• **winner**: [`JackPotWinner`](JackPotWinner.md)
|
|
24
|
+
|
|
25
|
+
Info about jackpot winner
|
|
@@ -40,9 +40,9 @@ ___
|
|
|
40
40
|
|
|
41
41
|
### errCode
|
|
42
42
|
|
|
43
|
-
•
|
|
43
|
+
• **errCode**: `number`
|
|
44
44
|
|
|
45
|
-
####
|
|
45
|
+
#### Overrides
|
|
46
46
|
|
|
47
47
|
ProtocolResponse.errCode
|
|
48
48
|
|
|
@@ -52,6 +52,6 @@ ___
|
|
|
52
52
|
|
|
53
53
|
• `Optional` **errMsg**: `string`
|
|
54
54
|
|
|
55
|
-
####
|
|
55
|
+
#### Overrides
|
|
56
56
|
|
|
57
57
|
ProtocolResponse.errMsg
|
|
@@ -29,7 +29,7 @@ ___
|
|
|
29
29
|
|
|
30
30
|
### current\_state
|
|
31
31
|
|
|
32
|
-
• **current\_state**: `RaffleDrawInstanceState`
|
|
32
|
+
• **current\_state**: [`RaffleDrawInstanceState`](../enums/RaffleDrawInstanceState.md)
|
|
33
33
|
|
|
34
34
|
State of current instance of Draw
|
|
35
35
|
|
|
@@ -45,7 +45,7 @@ ___
|
|
|
45
45
|
|
|
46
46
|
### execution\_type
|
|
47
47
|
|
|
48
|
-
• **execution\_type**: `RaffleDrawTypeExecution`
|
|
48
|
+
• **execution\_type**: [`RaffleDrawTypeExecution`](../enums/RaffleDrawTypeExecution.md)
|
|
49
49
|
|
|
50
50
|
Type of the draw execution, indicating how and when the draw is executed.
|
|
51
51
|
- ExecDate: Draw is executed only once at a specific date and time.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Interface: TRaffle
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
### id
|
|
6
|
+
|
|
7
|
+
• **id**: `number`
|
|
8
|
+
|
|
9
|
+
ID of the Raffle template
|
|
10
|
+
|
|
11
|
+
___
|
|
12
|
+
|
|
13
|
+
### name
|
|
14
|
+
|
|
15
|
+
• **name**: `string`
|
|
16
|
+
|
|
17
|
+
Name of the raffle
|
|
18
|
+
|
|
19
|
+
___
|
|
20
|
+
|
|
21
|
+
### description
|
|
22
|
+
|
|
23
|
+
• **description**: `string`
|
|
24
|
+
|
|
25
|
+
Description of the raffle
|
|
26
|
+
|
|
27
|
+
___
|
|
28
|
+
|
|
29
|
+
### custom\_section\_id
|
|
30
|
+
|
|
31
|
+
• **custom\_section\_id**: `number`
|
|
32
|
+
|
|
33
|
+
ID of the custom section that is linked to the raffle in the Gamification widget
|
|
34
|
+
|
|
35
|
+
___
|
|
36
|
+
|
|
37
|
+
### image\_url
|
|
38
|
+
|
|
39
|
+
• **image\_url**: `string`
|
|
40
|
+
|
|
41
|
+
URL of the image that represents the raffle
|
|
42
|
+
|
|
43
|
+
___
|
|
44
|
+
|
|
45
|
+
### image\_url\_mobile
|
|
46
|
+
|
|
47
|
+
• **image\_url\_mobile**: `string`
|
|
48
|
+
|
|
49
|
+
URL of the mobile image that represents the raffle
|
|
50
|
+
|
|
51
|
+
___
|
|
52
|
+
|
|
53
|
+
### custom\_data
|
|
54
|
+
|
|
55
|
+
• **custom\_data**: `string`
|
|
56
|
+
|
|
57
|
+
Custom data as string or JSON string that can be used in API to build custom UI
|
|
58
|
+
You can request from Smartico to define fields for your specific case that will be managed from Smartico BackOffice
|
|
59
|
+
Read more here - https://help.smartico.ai/welcome/products/general-concepts/custom-fields-attributes
|
|
60
|
+
|
|
61
|
+
___
|
|
62
|
+
|
|
63
|
+
### start\_date
|
|
64
|
+
|
|
65
|
+
• **start\_date**: `number`
|
|
66
|
+
|
|
67
|
+
Date of start
|
|
68
|
+
|
|
69
|
+
___
|
|
70
|
+
|
|
71
|
+
### end\_date
|
|
72
|
+
|
|
73
|
+
• **end\_date**: `number`
|
|
74
|
+
|
|
75
|
+
Date of end
|
|
76
|
+
|
|
77
|
+
___
|
|
78
|
+
|
|
79
|
+
### max\_tickets\_count
|
|
80
|
+
|
|
81
|
+
• **max\_tickets\_count**: `number`
|
|
82
|
+
|
|
83
|
+
Maximum numer of tickets that can be given to all users for the whole period of raffle
|
|
84
|
+
|
|
85
|
+
___
|
|
86
|
+
|
|
87
|
+
### current\_tickets\_count
|
|
88
|
+
|
|
89
|
+
• **current\_tickets\_count**: `number`
|
|
90
|
+
|
|
91
|
+
Number of tickets that are already given to all users for this raffle
|
|
92
|
+
|
|
93
|
+
___
|
|
94
|
+
|
|
95
|
+
### draws
|
|
96
|
+
|
|
97
|
+
• **draws**: [`TRaffleDraw`](TRaffleDraw.md)[]
|
|
98
|
+
|
|
99
|
+
List of draws that are available for this raffle.
|
|
100
|
+
For example, if the raffle is containg one hourly draw, one daily draw and one draw on fixed date like 01/01/2022,
|
|
101
|
+
Then the list will always return 3 draws, no matter if the draws are already executed or they are in the future.
|