@kalamba/sdk 0.1.2 → 0.2.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
@@ -55,6 +55,11 @@ declare abstract class CasinoPlugin {
55
55
  protected send<M extends DomainMessage<'casino'>>(message: M, ...[payload]: DomainMessagePayload<'casino', M> extends never ? [] : [payload: DomainMessagePayload<'casino', M>]): void;
56
56
  }
57
57
 
58
+ declare type ContractPlayPayload = {
59
+ [key: string]: any;
60
+ bet: Bet | null;
61
+ };
62
+
58
63
  declare type DeepPartial<T> = T extends object ? {
59
64
  [P in keyof T]?: DeepPartial<T[P]>;
60
65
  } : T;
@@ -81,6 +86,12 @@ declare type Error_2 = {
81
86
  type: 'CLOSE' | 'RELOAD' | 'CONTINUE';
82
87
  };
83
88
 
89
+ declare type ExtraPlayPayload = {
90
+ [key: string]: any;
91
+ } & {
92
+ bet?: never;
93
+ };
94
+
84
95
  declare type ForwardToPluginsMessage<P extends PluginDomain> = keyof ForwardToPluginsMessageMap<'sdk'>[P] | keyof ForwardToPluginsMessageMap<'rgs'>[P] | keyof ForwardToPluginsMessageMap<'casino'>[P] | keyof ForwardToPluginsMessageMap<'telemetry'>[P];
85
96
 
86
97
  declare interface ForwardToPluginsMessageMap<SourceDomain extends DomainPrefix> {
@@ -132,6 +143,7 @@ declare type OpenGameError = {
132
143
 
133
144
  declare type OpenGameRequest = {
134
145
  gameName: string;
146
+ /** version of game client */
135
147
  version: string;
136
148
  };
137
149
 
@@ -146,11 +158,9 @@ declare type PlayError = {
146
158
  };
147
159
 
148
160
  declare type PlayRequest = {
149
- bet: Bet;
150
- } | {
151
- userInput: unknown;
152
- } | {
153
- opaqueGameAttributes: unknown;
161
+ contract: ContractPlayPayload;
162
+ extra: ExtraPlayPayload;
163
+ actionType: string;
154
164
  };
155
165
 
156
166
  declare type PlayResponse = {
@@ -303,12 +313,12 @@ declare type SdkOnlyMessagePayloadMap = {
303
313
  openGame: OpenGameRequest;
304
314
  play: PlayRequest;
305
315
  playCycleEnd: PlayResponse;
306
- playCycleStart: PlayRequest;
316
+ playCycleStart: ContractPlayPayload;
307
317
  playEnd: PlayResponse;
308
318
  playReady: {
309
319
  ready: boolean;
310
320
  };
311
- playStart: PlayRequest;
321
+ playStart: ContractPlayPayload;
312
322
  translations: Record<string, Record<string, string>>;
313
323
  settings: Settings;
314
324
  'telemetry.click': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kalamba/sdk",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "license": "BSD-3-Clause",
5
5
  "type": "module",
6
6
  "files": [