@kalamba/sdk 0.5.0 → 0.6.1

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/wrapper.d.ts CHANGED
@@ -58,6 +58,7 @@ declare abstract class CasinoPlugin {
58
58
  declare type ContractPlayPayload = {
59
59
  [key: string]: any;
60
60
  bet: Bet | null;
61
+ forcedOutcomes?: unknown;
61
62
  };
62
63
 
63
64
  declare type DeepPartial<T> = T extends object ? {
@@ -131,8 +132,24 @@ declare type MessageMap = DomainAllowedPayloadMap<'sdk'> & DomainAllowedPayloadM
131
132
  declare type MessagePayload<M extends Message> = MessageMap[M];
132
133
 
133
134
  declare type OpenGameError = {
134
- data: any;
135
- type?: string;
135
+ type: 'timeout';
136
+ } | {
137
+ type: 'error';
138
+ data: {
139
+ code: keyof typeof OpenGameErrorCode;
140
+ };
141
+ };
142
+
143
+ declare const OpenGameErrorCode: {
144
+ readonly CONNECTION_ERROR: "CONNECTION_ERROR";
145
+ readonly ALREADY_LOGGED_IN: "ALREADY_LOGGED_IN";
146
+ readonly DENIED: "DENIED";
147
+ readonly NOT_FOUND: "NOT_FOUND";
148
+ readonly BONUS_RESTRICTION: "BONUS_RESTRICTION";
149
+ readonly ERROR: "ERROR";
150
+ readonly GAME_UNAVAILABLE: "GAME_UNAVAILABLE";
151
+ readonly RECONNECT_DATA_MISMATCH: "RECONNECT_DATA_MISMATCH";
152
+ readonly TOO_MANY_OPEN_GAMES: "TOO_MANY_OPEN_GAMES";
136
153
  };
137
154
 
138
155
  declare type OpenGameRequest = {
@@ -184,8 +201,22 @@ declare type OpenGameResponse = {
184
201
  };
185
202
 
186
203
  declare type PlayError = {
187
- data: any;
188
- type?: string;
204
+ type: 'timeout';
205
+ } | {
206
+ type: 'error';
207
+ data: {
208
+ code: keyof typeof PlayErrorCode;
209
+ };
210
+ };
211
+
212
+ declare const PlayErrorCode: {
213
+ readonly ERROR: "ERROR";
214
+ readonly GAMING_LIMITS_REACHED: "GAMING_LIMITS_REACHED";
215
+ readonly INVALID_CURRENCY: "INVALID_CURRENCY";
216
+ readonly INVALID_SESSION: "INVALID_SESSION";
217
+ readonly OUT_OF_MONEY: "OUT_OF_MONEY";
218
+ readonly UNFINISHED_ROUND_IN_PROGRESS: "UNFINISHED_ROUND_IN_PROGRESS";
219
+ readonly WALLET_ERROR: "WALLET_ERROR";
189
220
  };
190
221
 
191
222
  declare type PlayRequest = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalamba/sdk",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "license": "BSD-3-Clause",
5
5
  "type": "module",
6
6
  "files": [