@kalamba/sdk 0.9.0 → 0.9.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/index.cjs +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +23 -20
- package/dist/plugins.d.ts +7 -3
- package/dist/wrapper.d.ts +7 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2024, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var b=(r,i,t)=>{if(!i.has(r))throw TypeError("Cannot "+t)};var m=(r,i,t)=>(b(r,i,"read from private field"),t?t.call(r):i.get(r)),e=(r,i,t)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,t)},u=(r,i,t,n)=>(b(r,i,"write to private field"),n?n.call(r,t):i.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./errors-358575c3.cjs");function
|
|
5
|
+
"use strict";var b=(r,i,t)=>{if(!i.has(r))throw TypeError("Cannot "+t)};var m=(r,i,t)=>(b(r,i,"read from private field"),t?t.call(r):i.get(r)),e=(r,i,t)=>{if(i.has(r))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(r):i.set(r,t)},u=(r,i,t,n)=>(b(r,i,"write to private field"),n?n.call(r,t):i.set(r,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const D=require("./errors-358575c3.cjs");function A(r){const i=Object.prototype.toString.call(r);return r instanceof Date||typeof r=="object"&&i==="[object Date]"?new r.constructor(+r):typeof r=="number"||i==="[object Number]"||typeof r=="string"||i==="[object String]"?new Date(r):new Date(NaN)}function U(r){const i=A(r);return i.setHours(23,59,59,999),i}function L(){return U(Date.now())}function P(r){const i=A(r);return i.setHours(0,0,0,0),i}function k(){return P(Date.now())}const G=3e4;var F,S;class ${constructor(i){e(this,F,void 0);e(this,S,G);u(this,F,i)}buildHeaders(){const i={};return m(this,F).token&&(i.Authorization=`Bearer ${m(this,F).token}`),i}async request(i,t){const n=new URL(i,m(this,F).apiUrl??window.location.origin);return n.search=new URLSearchParams({...t}).toString(),await(await fetch(n,{signal:AbortSignal.timeout(m(this,S)),headers:this.buildHeaders()})).json()}async getRounds(i){return this.request("/rounds",i)}async getRound(i,t){return this.request(`/rounds/${i}`,t)}}F=new WeakMap,S=new WeakMap;const N={limit:100,page:0};var s,l;class I{constructor({config:i}){e(this,s,void 0);e(this,l,void 0);u(this,s,i),u(this,l,new $({apiUrl:i.api.gameHistoryUrl}))}async getRound(i,{pagination:t=N}={}){return m(this,l).getRound(i,{gameCode:m(this,s).api.game,operatorCode:m(this,s).api.brand,username:m(this,s).api.user,...t})}async getLastRound(){return m(this,s).api.lastRoundId?this.getRound(m(this,s).api.lastRoundId):null}async getRounds({searchPeriod:i={fromDateTime:k(),toDateTime:L()},pagination:t=N}={}){const n=m(this,s).api.user.replace(/^user_/,"").replace(new RegExp(`_${m(this,s).api.integration}$`),"");return m(this,l).getRounds({gameCode:m(this,s).api.game,operatorCode:m(this,s).api.integration,username:n,fromDataTime:i.fromDateTime.toISOString(),toDateTime:i.toDateTime.toISOString(),...t})}}s=new WeakMap,l=new WeakMap;function _(r,i){return r*i/100}function O(r,i,t){if(!["string","number"].includes(typeof i))return"NaN";const{locales:n}=r;try{return new Intl.NumberFormat(n,{...t,numberingSystem:"latn",style:"decimal"}).format(+i)}catch{return`${i}`}}const w="XTS";var y=(r=>(r.Currency="Currency",r.Number="Number",r))(y||{}),f=(r=>(r.Coins="Coins",r.Money="Money",r))(f||{});const T={ARSB:{displayAs:"ARS",maximumFractionDigits:2,minimumFractionDigits:2},CHIPS:{maximumFractionDigits:0,minimumFractionDigits:0},BNB:{maximumFractionDigits:6,minimumFractionDigits:6},BUSD:{maximumFractionDigits:4,minimumFractionDigits:4},BTC:{maximumFractionDigits:8,minimumFractionDigits:2},mBTC:{maximumFractionDigits:5,minimumFractionDigits:2},uBTC:{maximumFractionDigits:2,minimumFractionDigits:2},BCH:{maximumFractionDigits:8,minimumFractionDigits:2},mBCH:{maximumFractionDigits:2,minimumFractionDigits:2},ETH:{maximumFractionDigits:8,minimumFractionDigits:2},mETH:{maximumFractionDigits:5,minimumFractionDigits:2},uETH:{maximumFractionDigits:2,minimumFractionDigits:2},SOC:{maximumFractionDigits:8,minimumFractionDigits:2},LTC:{maximumFractionDigits:8,minimumFractionDigits:2},mLTC:{maximumFractionDigits:5,minimumFractionDigits:2},uLTC:{maximumFractionDigits:2,minimumFractionDigits:2},DOG:{maximumFractionDigits:4,minimumFractionDigits:2},USDC:{maximumFractionDigits:4,minimumFractionDigits:4},USDT:{maximumFractionDigits:4,minimumFractionDigits:2},TRX:{maximumFractionDigits:2,minimumFractionDigits:2},TUSD:{maximumFractionDigits:2,minimumFractionDigits:2},DAI:{maximumFractionDigits:2,minimumFractionDigits:2},XMR:{maximumFractionDigits:4,minimumFractionDigits:4},CBET:{maximumFractionDigits:0,minimumFractionDigits:0},kCBET:{maximumFractionDigits:2,minimumFractionDigits:2},SHIB:{maximumFractionDigits:0,minimumFractionDigits:0},kSHIB:{maximumFractionDigits:4,minimumFractionDigits:2},NEO:{maximumFractionDigits:4,minimumFractionDigits:4},BSV:{maximumFractionDigits:4,minimumFractionDigits:4},EOS:{maximumFractionDigits:4,minimumFractionDigits:4},DASH:{maximumFractionDigits:4,minimumFractionDigits:4},XLM:{maximumFractionDigits:2,minimumFractionDigits:2},KRW:{maximumFractionDigits:2,minimumFractionDigits:2},kVND:{maximumFractionDigits:4,minimumFractionDigits:2},kIDR:{maximumFractionDigits:4,minimumFractionDigits:2},RSD:{maximumFractionDigits:2,minimumFractionDigits:2},STAKEGC:{displayAs:"GC",maximumFractionDigits:0,minimumFractionDigits:0},STAKESC:{displayAs:"SC",maximumFractionDigits:2,minimumFractionDigits:2},"BK.":{maximumFractionDigits:2,minimumFractionDigits:2},"BT.":{maximumFractionDigits:2,minimumFractionDigits:2},"FC.":{maximumFractionDigits:2,minimumFractionDigits:2},"GC.":{maximumFractionDigits:2,minimumFractionDigits:2},"SC.":{maximumFractionDigits:2,minimumFractionDigits:2},GLD:{displayAs:"GC.",maximumFractionDigits:2,minimumFractionDigits:2},SS1:{displayAs:"SC.",maximumFractionDigits:2,minimumFractionDigits:2},SWEP:{displayAs:"SC.",maximumFractionDigits:2,minimumFractionDigits:2},GCLC:{displayAs:"GC.",maximumFractionDigits:2,minimumFractionDigits:2},SVC:{maximumFractionDigits:2,minimumFractionDigits:2},DOT:{maximumFractionDigits:4,minimumFractionDigits:4},SOL:{maximumFractionDigits:4,minimumFractionDigits:4},XRP:{maximumFractionDigits:4,minimumFractionDigits:4},ADA:{maximumFractionDigits:4,minimumFractionDigits:4},TON:{maximumFractionDigits:4,minimumFractionDigits:4},FTN:{maximumFractionDigits:4,minimumFractionDigits:4}};function M(r){return r in T}function j(r){return M(r)?{...T[r],currency:w}:{currency:r}}function q(r,i,t){const n=i.format(+r);return M(t)?n.replace(w,T[t].displayAs??t):n}function K(r,i,t){const{maximumFractionDigits:n,minimumFractionDigits:o}=t.resolvedOptions();return O(r,i,{maximumFractionDigits:n,minimumFractionDigits:o})}function V(r,i,{as:t}={as:"Currency"}){const{canShowCurrency:n,currency:o}=r;return t==="Number"||!n?`${i}`:`${i} ${o}`}function v(r,i,{as:t,from:n}={as:"Currency",from:"Money"},o){if(!["string","number"].includes(typeof i))return"NaN";const{canShowCurrency:a=!0,coinValueInCents:g,currency:x,locales:E}=r;n==="Coins"&&(i=_(+i,g));try{const H=j(x),R=new Intl.NumberFormat(E,{...H,...o,currencyDisplay:"symbol",numberingSystem:"latn",style:"currency"});return t==="Number"||!a?K(r,i,R):q(i,R,x)}catch{return V(r,i,{as:t})}}var c;class B{constructor({config:i}){e(this,c,void 0);u(this,c,i)}formatNumber(i,t){const n={locales:[m(this,c).ui.language]};return O(n,i,t)}formatCurrency(i,t={as:y.Currency,from:f.Money},n){const o=m(this,c).ui.feature.showCurrency,a=m(this,c).api.coinValueInCents,g=m(this,c).api.currency||w,x=[m(this,c).ui.language];return v({canShowCurrency:o,coinValueInCents:a,currency:g,locales:x},i,t,n)}formatCoins(i,t){return this.formatCurrency(i,{as:y.Number,from:f.Coins},t)}formatCoinsWithCurrency(i,t){return this.formatCurrency(i,{as:y.Currency,from:f.Coins},t)}formatMoney(i,t){return this.formatCurrency(i,{as:y.Number,from:f.Money},t)}formatMoneyWithCurrency(i,t){return this.formatCurrency(i,{as:y.Currency,from:f.Money},t)}}c=new WeakMap;const X=()=>{};var d,h,C,p;class z{constructor({messagePort:i}){e(this,d,void 0);e(this,h,void 0);e(this,C,void 0);e(this,p,void 0);u(this,p,i),this.on("configured",t=>{u(this,d,t),u(this,C,new B({config:t})),u(this,h,new I({config:t}))}),this.on("playResponse",t=>{this.config.api.lastRoundId=t.contract.roundId})}get config(){if(!m(this,d))throw new Error("config is not initialized, you must open game first");return m(this,d)}get history(){if(!m(this,h))throw new Error("config is not initialized, you must open game first");return m(this,h)}get i18n(){if(!m(this,C))throw new Error("i18n is not initialized, you must open game first");return m(this,C)}request(i,...[t]){return new Promise(n=>{this.on(`${i}Response`,o=>n({type:"response",response:o}),{once:!0}),this.on(`${i}Error`,o=>n({type:"error",error:o}),{once:!0}),this.send(i,t)})}on(i,t,n){const o=function a(g){g.data.message===`kalamba:wrapper:${i}`&&(X("on",g.data.message.replace(/^kalamba:/,""),g.data.payload),t(g.data.payload),n!=null&&n.once&&window.removeEventListener("message",a))};window.addEventListener("message",o)}send(i,...[t]){m(this,p).postMessage({message:`kalamba:sdk:${i}`,payload:t},"*")}configure(i){this.send("configure",i)}async openGame(){const i=new Promise(n=>this.on("configured",n,{once:!0})),t=await this.request("openGame");if(t.type==="response")return await i,t.response;throw t.error.type==="timeout"?new D.TimeoutError:new D.RgsError(t.error.data)}async play(i,t,n="SPIN"){const o={contract:i,extra:t,actionType:n},a=await this.request("play",o);if(a.type==="response")return a.response;throw a.error.type==="timeout"?new D.TimeoutError:new D.RgsError(a.error.data)}}d=new WeakMap,h=new WeakMap,C=new WeakMap,p=new WeakMap;exports.RgsError=D.RgsError;exports.RgsErrorCode=D.RgsErrorCode;exports.TimeoutError=D.TimeoutError;exports.History=I;exports.I18n=B;exports.KalambaSdk=z;
|
package/dist/index.d.ts
CHANGED
|
@@ -118,12 +118,12 @@ export declare type FreeRound = {
|
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
export declare type FreeRoundsAction = {
|
|
121
|
-
action: 'ACCEPT' | '
|
|
121
|
+
action: 'ACCEPT' | 'DECLINE' | 'SKIP';
|
|
122
122
|
id: string;
|
|
123
123
|
};
|
|
124
124
|
|
|
125
125
|
export declare type FreeRoundsResponse = {
|
|
126
|
-
action: 'ACCEPT' | '
|
|
126
|
+
action: 'ACCEPT' | 'DECLINE' | 'SKIP';
|
|
127
127
|
id: string;
|
|
128
128
|
};
|
|
129
129
|
|
|
@@ -191,6 +191,10 @@ export declare type MessageMessageEvent<M extends Message> = MessageEvent<{
|
|
|
191
191
|
|
|
192
192
|
export declare type MessagePayload<M extends Message> = MessageMap[M];
|
|
193
193
|
|
|
194
|
+
declare type NestedRecord<K extends string | number | symbol, V> = {
|
|
195
|
+
[k in K]: V | NestedRecord<K, V>;
|
|
196
|
+
};
|
|
197
|
+
|
|
194
198
|
export declare type OpenGameResponse = {
|
|
195
199
|
contract: {
|
|
196
200
|
bet: {
|
|
@@ -502,7 +506,7 @@ export declare type SdkOnlyMessagePayloadMap = {
|
|
|
502
506
|
* }
|
|
503
507
|
* ```
|
|
504
508
|
*/
|
|
505
|
-
translations: Record<string,
|
|
509
|
+
translations: Record<string, NestedRecord<string, string>>;
|
|
506
510
|
settings: Settings;
|
|
507
511
|
'telemetry.click': {
|
|
508
512
|
location: string;
|
package/dist/index.js
CHANGED
|
@@ -28,15 +28,15 @@ function L(n) {
|
|
|
28
28
|
const i = I(n);
|
|
29
29
|
return i.setHours(0, 0, 0, 0), i;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function P() {
|
|
32
32
|
return L(Date.now());
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const k = 3e4;
|
|
35
35
|
var D, x;
|
|
36
|
-
class
|
|
36
|
+
class G {
|
|
37
37
|
constructor(i) {
|
|
38
38
|
e(this, D, void 0);
|
|
39
|
-
e(this, x,
|
|
39
|
+
e(this, x, k);
|
|
40
40
|
u(this, D, i);
|
|
41
41
|
}
|
|
42
42
|
buildHeaders() {
|
|
@@ -64,21 +64,21 @@ const A = {
|
|
|
64
64
|
limit: 100,
|
|
65
65
|
page: 0
|
|
66
66
|
};
|
|
67
|
-
var s,
|
|
68
|
-
class
|
|
67
|
+
var s, f;
|
|
68
|
+
class $ {
|
|
69
69
|
constructor({
|
|
70
70
|
config: i
|
|
71
71
|
}) {
|
|
72
72
|
e(this, s, void 0);
|
|
73
|
-
e(this,
|
|
74
|
-
u(this, s, i), u(this,
|
|
73
|
+
e(this, f, void 0);
|
|
74
|
+
u(this, s, i), u(this, f, new G({
|
|
75
75
|
apiUrl: i.api.gameHistoryUrl
|
|
76
76
|
}));
|
|
77
77
|
}
|
|
78
78
|
async getRound(i, {
|
|
79
79
|
pagination: t = A
|
|
80
80
|
} = {}) {
|
|
81
|
-
return m(this,
|
|
81
|
+
return m(this, f).getRound(i, {
|
|
82
82
|
gameCode: m(this, s).api.game,
|
|
83
83
|
operatorCode: m(this, s).api.brand,
|
|
84
84
|
username: m(this, s).api.user,
|
|
@@ -90,13 +90,13 @@ class G {
|
|
|
90
90
|
}
|
|
91
91
|
async getRounds({
|
|
92
92
|
searchPeriod: i = {
|
|
93
|
-
fromDateTime:
|
|
93
|
+
fromDateTime: P(),
|
|
94
94
|
toDateTime: U()
|
|
95
95
|
},
|
|
96
96
|
pagination: t = A
|
|
97
97
|
} = {}) {
|
|
98
98
|
const r = m(this, s).api.user.replace(/^user_/, "").replace(new RegExp(`_${m(this, s).api.integration}$`), "");
|
|
99
|
-
return m(this,
|
|
99
|
+
return m(this, f).getRounds({
|
|
100
100
|
gameCode: m(this, s).api.game,
|
|
101
101
|
operatorCode: m(this, s).api.integration,
|
|
102
102
|
username: r,
|
|
@@ -106,7 +106,7 @@ class G {
|
|
|
106
106
|
});
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
s = new WeakMap(),
|
|
109
|
+
s = new WeakMap(), f = new WeakMap();
|
|
110
110
|
function _(n, i) {
|
|
111
111
|
return n * i / 100;
|
|
112
112
|
}
|
|
@@ -127,7 +127,7 @@ function O(n, i, t) {
|
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
const S = "XTS";
|
|
130
|
-
var F = /* @__PURE__ */ ((n) => (n.Currency = "Currency", n.Number = "Number", n))(F || {}),
|
|
130
|
+
var F = /* @__PURE__ */ ((n) => (n.Currency = "Currency", n.Number = "Number", n))(F || {}), y = /* @__PURE__ */ ((n) => (n.Coins = "Coins", n.Money = "Money", n))(y || {});
|
|
131
131
|
const w = {
|
|
132
132
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
133
133
|
// ARSB is the internal currency relevant for invoicing purposes, players should see it as ARS
|
|
@@ -210,6 +210,9 @@ const w = {
|
|
|
210
210
|
"SC.": { maximumFractionDigits: 2, minimumFractionDigits: 2 },
|
|
211
211
|
GLD: { displayAs: "GC.", maximumFractionDigits: 2, minimumFractionDigits: 2 },
|
|
212
212
|
SS1: { displayAs: "SC.", maximumFractionDigits: 2, minimumFractionDigits: 2 },
|
|
213
|
+
// Softswiss
|
|
214
|
+
SWEP: { displayAs: "SC.", maximumFractionDigits: 2, minimumFractionDigits: 2 },
|
|
215
|
+
GCLC: { displayAs: "GC.", maximumFractionDigits: 2, minimumFractionDigits: 2 },
|
|
213
216
|
// Silvercash
|
|
214
217
|
SVC: { maximumFractionDigits: 2, minimumFractionDigits: 2 },
|
|
215
218
|
// Polkadot
|
|
@@ -286,7 +289,7 @@ class v {
|
|
|
286
289
|
const r = { locales: [m(this, c).ui.language] };
|
|
287
290
|
return O(r, i, t);
|
|
288
291
|
}
|
|
289
|
-
formatCurrency(i, t = { as: F.Currency, from:
|
|
292
|
+
formatCurrency(i, t = { as: F.Currency, from: y.Money }, r) {
|
|
290
293
|
const o = m(this, c).ui.feature.showCurrency, a = m(this, c).api.coinValueInCents, g = m(this, c).api.currency || S, C = [m(this, c).ui.language];
|
|
291
294
|
return X({
|
|
292
295
|
canShowCurrency: o,
|
|
@@ -296,16 +299,16 @@ class v {
|
|
|
296
299
|
}, i, t, r);
|
|
297
300
|
}
|
|
298
301
|
formatCoins(i, t) {
|
|
299
|
-
return this.formatCurrency(i, { as: F.Number, from:
|
|
302
|
+
return this.formatCurrency(i, { as: F.Number, from: y.Coins }, t);
|
|
300
303
|
}
|
|
301
304
|
formatCoinsWithCurrency(i, t) {
|
|
302
|
-
return this.formatCurrency(i, { as: F.Currency, from:
|
|
305
|
+
return this.formatCurrency(i, { as: F.Currency, from: y.Coins }, t);
|
|
303
306
|
}
|
|
304
307
|
formatMoney(i, t) {
|
|
305
|
-
return this.formatCurrency(i, { as: F.Number, from:
|
|
308
|
+
return this.formatCurrency(i, { as: F.Number, from: y.Money }, t);
|
|
306
309
|
}
|
|
307
310
|
formatMoneyWithCurrency(i, t) {
|
|
308
|
-
return this.formatCurrency(i, { as: F.Currency, from:
|
|
311
|
+
return this.formatCurrency(i, { as: F.Currency, from: y.Money }, t);
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
314
|
c = new WeakMap();
|
|
@@ -319,7 +322,7 @@ class Y {
|
|
|
319
322
|
e(this, p, void 0);
|
|
320
323
|
e(this, d, void 0);
|
|
321
324
|
u(this, d, i), this.on("configured", (t) => {
|
|
322
|
-
u(this, l, t), u(this, p, new v({ config: t })), u(this, h, new
|
|
325
|
+
u(this, l, t), u(this, p, new v({ config: t })), u(this, h, new $({ config: t }));
|
|
323
326
|
}), this.on("playResponse", (t) => {
|
|
324
327
|
this.config.api.lastRoundId = t.contract.roundId;
|
|
325
328
|
});
|
|
@@ -380,7 +383,7 @@ class Y {
|
|
|
380
383
|
}
|
|
381
384
|
l = new WeakMap(), h = new WeakMap(), p = new WeakMap(), d = new WeakMap();
|
|
382
385
|
export {
|
|
383
|
-
|
|
386
|
+
$ as History,
|
|
384
387
|
v as I18n,
|
|
385
388
|
Y as KalambaSdk,
|
|
386
389
|
E as RgsError,
|
package/dist/plugins.d.ts
CHANGED
|
@@ -116,12 +116,12 @@ declare type FreeRound = {
|
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
declare type FreeRoundsAction = {
|
|
119
|
-
action: 'ACCEPT' | '
|
|
119
|
+
action: 'ACCEPT' | 'DECLINE' | 'SKIP';
|
|
120
120
|
id: string;
|
|
121
121
|
};
|
|
122
122
|
|
|
123
123
|
declare type FreeRoundsResponse = {
|
|
124
|
-
action: 'ACCEPT' | '
|
|
124
|
+
action: 'ACCEPT' | 'DECLINE' | 'SKIP';
|
|
125
125
|
id: string;
|
|
126
126
|
};
|
|
127
127
|
|
|
@@ -343,6 +343,10 @@ export declare class LoggingTracker extends Tracker {
|
|
|
343
343
|
track(event: unknown, data: Record<string, unknown>): void;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
declare type NestedRecord<K extends string | number | symbol, V> = {
|
|
347
|
+
[k in K]: V | NestedRecord<K, V>;
|
|
348
|
+
};
|
|
349
|
+
|
|
346
350
|
declare type OmitFirstParam<T extends (...args: any[]) => any> = T extends (arg: any, ...rest: infer R) => infer Result ? (...args: R) => Result : never;
|
|
347
351
|
|
|
348
352
|
declare type OpenGameResponse = {
|
|
@@ -667,7 +671,7 @@ declare type SdkOnlyMessagePayloadMap = {
|
|
|
667
671
|
* }
|
|
668
672
|
* ```
|
|
669
673
|
*/
|
|
670
|
-
translations: Record<string,
|
|
674
|
+
translations: Record<string, NestedRecord<string, string>>;
|
|
671
675
|
settings: Settings;
|
|
672
676
|
'telemetry.click': {
|
|
673
677
|
location: string;
|
package/dist/wrapper.d.ts
CHANGED
|
@@ -111,12 +111,12 @@ declare type FreeRound = {
|
|
|
111
111
|
};
|
|
112
112
|
|
|
113
113
|
declare type FreeRoundsAction = {
|
|
114
|
-
action: 'ACCEPT' | '
|
|
114
|
+
action: 'ACCEPT' | 'DECLINE' | 'SKIP';
|
|
115
115
|
id: string;
|
|
116
116
|
};
|
|
117
117
|
|
|
118
118
|
declare type FreeRoundsResponse = {
|
|
119
|
-
action: 'ACCEPT' | '
|
|
119
|
+
action: 'ACCEPT' | 'DECLINE' | 'SKIP';
|
|
120
120
|
id: string;
|
|
121
121
|
};
|
|
122
122
|
|
|
@@ -157,6 +157,10 @@ declare type MessageMap = DomainAllowedPayloadMap<'sdk'> & DomainAllowedPayloadM
|
|
|
157
157
|
|
|
158
158
|
declare type MessagePayload<M extends Message> = MessageMap[M];
|
|
159
159
|
|
|
160
|
+
declare type NestedRecord<K extends string | number | symbol, V> = {
|
|
161
|
+
[k in K]: V | NestedRecord<K, V>;
|
|
162
|
+
};
|
|
163
|
+
|
|
160
164
|
declare type OpenGameResponse = {
|
|
161
165
|
contract: {
|
|
162
166
|
bet: {
|
|
@@ -460,7 +464,7 @@ declare type SdkOnlyMessagePayloadMap = {
|
|
|
460
464
|
* }
|
|
461
465
|
* ```
|
|
462
466
|
*/
|
|
463
|
-
translations: Record<string,
|
|
467
|
+
translations: Record<string, NestedRecord<string, string>>;
|
|
464
468
|
settings: Settings;
|
|
465
469
|
'telemetry.click': {
|
|
466
470
|
location: string;
|