@masterunoco/casinowebengine-api 0.1.0
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/README.md +227 -0
- package/dist/index.cjs +902 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +1379 -0
- package/dist/index.d.ts +1379 -0
- package/dist/index.js +892 -0
- package/dist/index.js.map +1 -0
- package/package.json +29 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,1379 @@
|
|
|
1
|
+
import { PaletteMode } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
type AuthPolicy = 'required' | 'optional' | 'none';
|
|
4
|
+
interface ClientOptions {
|
|
5
|
+
baseUrl: string;
|
|
6
|
+
auth?: {
|
|
7
|
+
getToken: () => string | null;
|
|
8
|
+
};
|
|
9
|
+
defaultHeaders?: Record<string, string>;
|
|
10
|
+
fetchFn?: typeof fetch;
|
|
11
|
+
timeoutMs?: number;
|
|
12
|
+
}
|
|
13
|
+
declare class HttpClient {
|
|
14
|
+
private opts;
|
|
15
|
+
constructor(opts: ClientOptions);
|
|
16
|
+
setAuthProvider(auth?: {
|
|
17
|
+
getToken: () => string | null;
|
|
18
|
+
}): void;
|
|
19
|
+
request<T>(path: string, init?: RequestInit, authPolicy?: AuthPolicy): Promise<T>;
|
|
20
|
+
get<T>(path: string, authPolicy?: AuthPolicy): Promise<T>;
|
|
21
|
+
post<T>(path: string, body?: unknown, authPolicy?: AuthPolicy): Promise<T>;
|
|
22
|
+
patch<T>(path: string, body?: unknown, authPolicy?: AuthPolicy): Promise<T>;
|
|
23
|
+
delete<T>(path: string, authPolicy?: AuthPolicy): Promise<T>;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface FreeIpApiGeo {
|
|
27
|
+
ipVersion?: number;
|
|
28
|
+
ipAddress?: string;
|
|
29
|
+
latitude: number;
|
|
30
|
+
longitude: number;
|
|
31
|
+
countryName: string;
|
|
32
|
+
countryCode: string;
|
|
33
|
+
capital: string;
|
|
34
|
+
phoneCodes: number[];
|
|
35
|
+
timeZones: string[];
|
|
36
|
+
zipCode: string;
|
|
37
|
+
cityName: string;
|
|
38
|
+
regionName: string;
|
|
39
|
+
continent: string;
|
|
40
|
+
continentCode: string;
|
|
41
|
+
currencies: string[];
|
|
42
|
+
languages: string[];
|
|
43
|
+
asn: string;
|
|
44
|
+
asnOrganization: string;
|
|
45
|
+
isProxy: boolean;
|
|
46
|
+
}
|
|
47
|
+
interface FailObj {
|
|
48
|
+
ip: string;
|
|
49
|
+
countryCode: string;
|
|
50
|
+
status: string;
|
|
51
|
+
message: string;
|
|
52
|
+
query: string;
|
|
53
|
+
}
|
|
54
|
+
type GeoLocation = FreeIpApiGeo | FailObj;
|
|
55
|
+
|
|
56
|
+
/** Geo info as returned in `user.geo` (values may be "undefined" strings from the IP service) */
|
|
57
|
+
interface GeoInfo {
|
|
58
|
+
ip: string | null | 'undefined';
|
|
59
|
+
countryCode: string | null | 'undefined';
|
|
60
|
+
status: string;
|
|
61
|
+
message?: string | null;
|
|
62
|
+
query?: string | null;
|
|
63
|
+
}
|
|
64
|
+
interface Wallet {
|
|
65
|
+
createdAt: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
id: number;
|
|
68
|
+
name: string;
|
|
69
|
+
type: number;
|
|
70
|
+
balance: number;
|
|
71
|
+
playerId: number;
|
|
72
|
+
}
|
|
73
|
+
interface User {
|
|
74
|
+
createdAt: string;
|
|
75
|
+
updatedAt: string;
|
|
76
|
+
id: number;
|
|
77
|
+
username: string;
|
|
78
|
+
name: string;
|
|
79
|
+
lastname: string;
|
|
80
|
+
phone: string | null;
|
|
81
|
+
email: string;
|
|
82
|
+
currencyId: string;
|
|
83
|
+
status: string;
|
|
84
|
+
referralMax: number;
|
|
85
|
+
geo?: GeoLocation;
|
|
86
|
+
googleId: string | null;
|
|
87
|
+
country?: string | null;
|
|
88
|
+
city?: string | null;
|
|
89
|
+
zipCode?: string | null;
|
|
90
|
+
address?: string | null;
|
|
91
|
+
dob?: string | null;
|
|
92
|
+
isOnline: boolean;
|
|
93
|
+
avatar: number | null;
|
|
94
|
+
parentId: number | null;
|
|
95
|
+
class: number | null;
|
|
96
|
+
wallets: Wallet[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Response of POST /auth/login
|
|
100
|
+
* Matches your sample: includes `token`, `socketToken`, and `user`.
|
|
101
|
+
*/
|
|
102
|
+
interface AuthResponse {
|
|
103
|
+
token: string;
|
|
104
|
+
socketToken: string;
|
|
105
|
+
user: User;
|
|
106
|
+
}
|
|
107
|
+
interface pinCodeResponse {
|
|
108
|
+
message: string;
|
|
109
|
+
token: string;
|
|
110
|
+
}
|
|
111
|
+
interface pinCodeCheckResponse {
|
|
112
|
+
message: string;
|
|
113
|
+
}
|
|
114
|
+
/** ISO date string, e.g., "2025-08-26T10:52:58.000Z" or "2000-09-11" */
|
|
115
|
+
type ISODateString = string;
|
|
116
|
+
/** Same regex as backend: letters, numbers, underscore, hyphen */
|
|
117
|
+
declare const USERNAME_REGEX: RegExp;
|
|
118
|
+
/**
|
|
119
|
+
* createPlayerValidator
|
|
120
|
+
* Backend: geo is a string, class defaults to 1 on server.
|
|
121
|
+
*/
|
|
122
|
+
interface CreatePlayerInput {
|
|
123
|
+
username: string;
|
|
124
|
+
name: string;
|
|
125
|
+
lastname: string;
|
|
126
|
+
email: string;
|
|
127
|
+
password: string;
|
|
128
|
+
currencyId: string;
|
|
129
|
+
geo?: GeoLocation;
|
|
130
|
+
class?: number;
|
|
131
|
+
country?: string;
|
|
132
|
+
phone?: string;
|
|
133
|
+
zipCode?: string;
|
|
134
|
+
address?: string;
|
|
135
|
+
dob?: ISODateString;
|
|
136
|
+
recaptchaToken: string;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* createPlayerV2Validator
|
|
140
|
+
* Note: promo fields can be null; geo is object; country/address/city required.
|
|
141
|
+
* "refferer" is intentionally spelled to match backend.
|
|
142
|
+
*/
|
|
143
|
+
interface CreatePlayerV2Input {
|
|
144
|
+
promotionId?: number | null;
|
|
145
|
+
promoCode?: string | null;
|
|
146
|
+
email: string;
|
|
147
|
+
username: string;
|
|
148
|
+
password: string;
|
|
149
|
+
name: string;
|
|
150
|
+
lastname: string;
|
|
151
|
+
gender: string;
|
|
152
|
+
currencyId: string;
|
|
153
|
+
dob: ISODateString;
|
|
154
|
+
phone?: string;
|
|
155
|
+
country: string;
|
|
156
|
+
refferer?: number | null;
|
|
157
|
+
address: string;
|
|
158
|
+
city: string;
|
|
159
|
+
zipCode?: string;
|
|
160
|
+
geo?: GeoLocation;
|
|
161
|
+
class?: number;
|
|
162
|
+
recaptchaToken: string;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* createPlayerV2Step2Validator
|
|
166
|
+
* Minimal step: email + username + password
|
|
167
|
+
*/
|
|
168
|
+
interface CreatePlayerV2Step2Input {
|
|
169
|
+
email: string;
|
|
170
|
+
username: string;
|
|
171
|
+
password: string;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Signup response
|
|
175
|
+
*/
|
|
176
|
+
interface SignupResponse {
|
|
177
|
+
message: string;
|
|
178
|
+
player: User;
|
|
179
|
+
}
|
|
180
|
+
interface RegisterResponse extends SignupResponse, AuthResponse {
|
|
181
|
+
}
|
|
182
|
+
interface SignupV2ValidateResponse {
|
|
183
|
+
message: string;
|
|
184
|
+
}
|
|
185
|
+
interface GoogleProfile {
|
|
186
|
+
id: string;
|
|
187
|
+
email: string;
|
|
188
|
+
verified_email: boolean;
|
|
189
|
+
name: string;
|
|
190
|
+
given_name: string;
|
|
191
|
+
family_name: string;
|
|
192
|
+
picture: string;
|
|
193
|
+
}
|
|
194
|
+
interface GoogleLoginRequest {
|
|
195
|
+
token: string;
|
|
196
|
+
profile: GoogleProfile;
|
|
197
|
+
geo?: object;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
declare class JwtAuth {
|
|
201
|
+
private client;
|
|
202
|
+
private token;
|
|
203
|
+
private user;
|
|
204
|
+
constructor(client: HttpClient);
|
|
205
|
+
setToken(token: string | null): void;
|
|
206
|
+
setUser(user: AuthResponse['user'], token: string): void;
|
|
207
|
+
login(username: string, password: string, recaptchaToken: string): Promise<AuthResponse>;
|
|
208
|
+
GoogleLogin(data: GoogleLoginRequest): Promise<AuthResponse>;
|
|
209
|
+
forgetPassword(email: string): Promise<void>;
|
|
210
|
+
register(data: CreatePlayerInput, param?: string | undefined): Promise<RegisterResponse | SignupResponse>;
|
|
211
|
+
registerV2(data: CreatePlayerV2Input, param?: string | undefined): Promise<RegisterResponse | SignupResponse>;
|
|
212
|
+
registerV2Validate(data: CreatePlayerV2Step2Input): Promise<SignupV2ValidateResponse>;
|
|
213
|
+
clear(): void;
|
|
214
|
+
logout(): Promise<void>;
|
|
215
|
+
pinCode(pin: string): Promise<pinCodeResponse>;
|
|
216
|
+
pinCheck(token: string): Promise<pinCodeCheckResponse>;
|
|
217
|
+
getToken(): string | null;
|
|
218
|
+
getUser(): AuthResponse['user'] | null;
|
|
219
|
+
isAuthenticated(): boolean;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Common shape we expect from the API when an error happens */
|
|
223
|
+
type ErrorPayload = {
|
|
224
|
+
error?: string;
|
|
225
|
+
message?: string;
|
|
226
|
+
code?: string | number;
|
|
227
|
+
details?: unknown;
|
|
228
|
+
[k: string]: unknown;
|
|
229
|
+
};
|
|
230
|
+
declare class ApiError extends Error {
|
|
231
|
+
/** HTTP status (e.g., 400/401/429/500) or 0 if network failure */
|
|
232
|
+
readonly status: number;
|
|
233
|
+
/** Requested method+url to aid debugging */
|
|
234
|
+
readonly url: string;
|
|
235
|
+
readonly method: string;
|
|
236
|
+
/** Raw payload (JSON if available; else text) */
|
|
237
|
+
readonly payload?: ErrorPayload | string | null | undefined;
|
|
238
|
+
/** Useful server-provided correlator (if any) */
|
|
239
|
+
readonly requestId?: string | null;
|
|
240
|
+
constructor(params: {
|
|
241
|
+
status: number;
|
|
242
|
+
url: string;
|
|
243
|
+
method: string;
|
|
244
|
+
message: string;
|
|
245
|
+
payload?: ErrorPayload | string | null;
|
|
246
|
+
requestId?: string | null;
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
/** TS type guard */
|
|
250
|
+
declare function isApiError(err: unknown): err is ApiError;
|
|
251
|
+
|
|
252
|
+
interface GenerateReferralCode {
|
|
253
|
+
message: string;
|
|
254
|
+
codeName: string;
|
|
255
|
+
playerReferralCode: string;
|
|
256
|
+
}
|
|
257
|
+
interface ReferralCode {
|
|
258
|
+
referralCode: string;
|
|
259
|
+
description: string;
|
|
260
|
+
}
|
|
261
|
+
interface GetReferralCode {
|
|
262
|
+
referralCodes: ReferralCode[];
|
|
263
|
+
}
|
|
264
|
+
interface ReferralStatus {
|
|
265
|
+
total: Total;
|
|
266
|
+
referralCodes: ReferralCodes[];
|
|
267
|
+
}
|
|
268
|
+
interface Total {
|
|
269
|
+
totalReferrals: number;
|
|
270
|
+
totalReferralRewards: number;
|
|
271
|
+
totalRewards: number;
|
|
272
|
+
commissionRewards: number;
|
|
273
|
+
}
|
|
274
|
+
interface ReferralCodes {
|
|
275
|
+
description: string;
|
|
276
|
+
referralCode: string;
|
|
277
|
+
totalReferrals: number;
|
|
278
|
+
totalRewards: number;
|
|
279
|
+
visitCount: number;
|
|
280
|
+
totalRewardAmount: number;
|
|
281
|
+
}
|
|
282
|
+
interface ReferralFriends {
|
|
283
|
+
totalCount: number;
|
|
284
|
+
totalPages: number;
|
|
285
|
+
results: ReferralFriendsResult[];
|
|
286
|
+
}
|
|
287
|
+
interface ReferralFriendsResult {
|
|
288
|
+
referredPlayerUsername: string;
|
|
289
|
+
referredPlayerFullname: string;
|
|
290
|
+
referredPlayerBalance: number;
|
|
291
|
+
referringPlayer: string;
|
|
292
|
+
createdAt: string;
|
|
293
|
+
}
|
|
294
|
+
interface BannerImage {
|
|
295
|
+
id: number;
|
|
296
|
+
language: string;
|
|
297
|
+
key: string;
|
|
298
|
+
value: string;
|
|
299
|
+
createdAt: string;
|
|
300
|
+
updatedAt: string;
|
|
301
|
+
}
|
|
302
|
+
interface Rewards {
|
|
303
|
+
referralReward?: number;
|
|
304
|
+
commissionReward?: number;
|
|
305
|
+
}
|
|
306
|
+
interface AvailablePrizes {
|
|
307
|
+
TotalAvailableCommision: number;
|
|
308
|
+
TotalAvailableReferralReward: number;
|
|
309
|
+
TotalRecivedReferralReward: number;
|
|
310
|
+
TotalRecivedCommision: number;
|
|
311
|
+
TotalPendingRewards: number;
|
|
312
|
+
}
|
|
313
|
+
type GetPrizesRequestType = 'referral' | 'commission';
|
|
314
|
+
interface GetPrizesRequest {
|
|
315
|
+
page?: number;
|
|
316
|
+
limit?: number;
|
|
317
|
+
type: GetPrizesRequestType;
|
|
318
|
+
}
|
|
319
|
+
interface GetPrizes {
|
|
320
|
+
totalCount: number;
|
|
321
|
+
totalPages: number;
|
|
322
|
+
results: GetPrizesResult[];
|
|
323
|
+
}
|
|
324
|
+
interface GetPrizesResult {
|
|
325
|
+
referralUsername: string;
|
|
326
|
+
rewardId: number;
|
|
327
|
+
rewardStatus: string;
|
|
328
|
+
rewardDate: string;
|
|
329
|
+
rewardTriggerAction: string;
|
|
330
|
+
prizeId: number;
|
|
331
|
+
prizeName: string;
|
|
332
|
+
prizeType: string;
|
|
333
|
+
prizeAmount: number;
|
|
334
|
+
prizeUnitType: string;
|
|
335
|
+
referralId: number;
|
|
336
|
+
}
|
|
337
|
+
interface ConvertRequest {
|
|
338
|
+
walletId: string;
|
|
339
|
+
amount: number;
|
|
340
|
+
walletType: number;
|
|
341
|
+
}
|
|
342
|
+
interface Summery {
|
|
343
|
+
totalRewards: number;
|
|
344
|
+
lastRewards: GetPrizesResult[];
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
declare class AffiliateAPI {
|
|
348
|
+
private http;
|
|
349
|
+
constructor(http: HttpClient);
|
|
350
|
+
generateReferralCode(description: string): Promise<GenerateReferralCode>;
|
|
351
|
+
getReferralCode(): Promise<GetReferralCode>;
|
|
352
|
+
getReferralCount(): Promise<number>;
|
|
353
|
+
getReferralStatus(): Promise<ReferralStatus>;
|
|
354
|
+
getReferralFriends(page: number, limit: number): Promise<ReferralFriends>;
|
|
355
|
+
getBannerImage(lang: string, key: string): Promise<BannerImage>;
|
|
356
|
+
getRewards(): Promise<Rewards>;
|
|
357
|
+
getAvailablePrizes(): Promise<AvailablePrizes>;
|
|
358
|
+
getPrizes(params: GetPrizesRequest): Promise<GetPrizes>;
|
|
359
|
+
convert(data: ConvertRequest): Promise<{
|
|
360
|
+
message: string;
|
|
361
|
+
}>;
|
|
362
|
+
getSummary(): Promise<Summery>;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
interface ContentPage {
|
|
366
|
+
id: number;
|
|
367
|
+
slug: string;
|
|
368
|
+
title: string;
|
|
369
|
+
body: string;
|
|
370
|
+
createdAt: string;
|
|
371
|
+
updatedAt: string;
|
|
372
|
+
}
|
|
373
|
+
declare class ContentAPI {
|
|
374
|
+
private http;
|
|
375
|
+
constructor(http: HttpClient);
|
|
376
|
+
list(): Promise<ContentPage[]>;
|
|
377
|
+
get(slug: string): Promise<ContentPage>;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
interface ChargeData {
|
|
381
|
+
amount: number;
|
|
382
|
+
email?: string;
|
|
383
|
+
mobile?: string;
|
|
384
|
+
cardNumber?: string;
|
|
385
|
+
cardName?: string;
|
|
386
|
+
expiryMonth?: string;
|
|
387
|
+
expiryYear?: string;
|
|
388
|
+
CVV?: string;
|
|
389
|
+
returnUrl?: string;
|
|
390
|
+
promotionId?: number;
|
|
391
|
+
paymentMethodId: number;
|
|
392
|
+
}
|
|
393
|
+
interface ContentSchemeSchema {
|
|
394
|
+
title: string;
|
|
395
|
+
thumbnail: string;
|
|
396
|
+
buttonLink: string;
|
|
397
|
+
buttonText: string;
|
|
398
|
+
longDescription: string;
|
|
399
|
+
shortDescription: string;
|
|
400
|
+
}
|
|
401
|
+
interface ContentDataSchema {
|
|
402
|
+
title: string;
|
|
403
|
+
thumbnail: string;
|
|
404
|
+
buttonLink: string;
|
|
405
|
+
buttonText: string;
|
|
406
|
+
longDescription: string;
|
|
407
|
+
shortDescription: string;
|
|
408
|
+
}
|
|
409
|
+
interface PrizeSchema {
|
|
410
|
+
createdAt: string;
|
|
411
|
+
updatedAt: string;
|
|
412
|
+
id: number;
|
|
413
|
+
name: string;
|
|
414
|
+
status: string;
|
|
415
|
+
type: string;
|
|
416
|
+
unitType: string;
|
|
417
|
+
amount: number;
|
|
418
|
+
priority: string;
|
|
419
|
+
currencyId: number;
|
|
420
|
+
}
|
|
421
|
+
interface PromotionSchema {
|
|
422
|
+
createdAt: string;
|
|
423
|
+
updatedAt: string;
|
|
424
|
+
id: number;
|
|
425
|
+
name: string;
|
|
426
|
+
status: string;
|
|
427
|
+
contentScheme: ContentSchemeSchema;
|
|
428
|
+
contentData: ContentDataSchema;
|
|
429
|
+
maxUse: number;
|
|
430
|
+
maxCashout: number;
|
|
431
|
+
minDeposit: number;
|
|
432
|
+
triggerAction: string;
|
|
433
|
+
currency: number;
|
|
434
|
+
gameType: string;
|
|
435
|
+
startDate: string;
|
|
436
|
+
endDate: string;
|
|
437
|
+
prizeId: PrizeSchema;
|
|
438
|
+
}
|
|
439
|
+
interface RegionSchema {
|
|
440
|
+
id: number;
|
|
441
|
+
name: string;
|
|
442
|
+
isoCode: string;
|
|
443
|
+
countryCode: string;
|
|
444
|
+
createdAt: string;
|
|
445
|
+
updatedAt: string;
|
|
446
|
+
}
|
|
447
|
+
interface PaymentMethodSchema {
|
|
448
|
+
createdAt: string;
|
|
449
|
+
updatedAt: string;
|
|
450
|
+
id: number;
|
|
451
|
+
externalId: string;
|
|
452
|
+
name: string;
|
|
453
|
+
minAmount: number;
|
|
454
|
+
maxAmount: number;
|
|
455
|
+
gatewaysId: number;
|
|
456
|
+
currencyId: number;
|
|
457
|
+
data: string;
|
|
458
|
+
logo: string | null;
|
|
459
|
+
promotions: PromotionSchema[];
|
|
460
|
+
regions: RegionSchema[];
|
|
461
|
+
}
|
|
462
|
+
interface DepositItem {
|
|
463
|
+
createdAt: string;
|
|
464
|
+
updatedAt: string;
|
|
465
|
+
id: number;
|
|
466
|
+
externalId: string;
|
|
467
|
+
method: string;
|
|
468
|
+
provider: string;
|
|
469
|
+
token: string;
|
|
470
|
+
amount: number;
|
|
471
|
+
state: string;
|
|
472
|
+
playerId: number;
|
|
473
|
+
promotionId: number | null;
|
|
474
|
+
paymentMethodId: number | null;
|
|
475
|
+
gatewayId: number | null;
|
|
476
|
+
currencyId: number;
|
|
477
|
+
symbol: string;
|
|
478
|
+
currencyCode: string;
|
|
479
|
+
}
|
|
480
|
+
interface GetDeposits {
|
|
481
|
+
totalCount: number;
|
|
482
|
+
totalPages: number;
|
|
483
|
+
payments: DepositItem[];
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
declare class DepositAPI {
|
|
487
|
+
private http;
|
|
488
|
+
constructor(http: HttpClient);
|
|
489
|
+
charge(data: ChargeData): Promise<string>;
|
|
490
|
+
getPaymentMethods(): Promise<PaymentMethodSchema[]>;
|
|
491
|
+
getDeposits(status?: string, page?: number, limit?: number): Promise<GetDeposits>;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/** Represents a single game in /games/search results */
|
|
495
|
+
interface GameSearchResponse {
|
|
496
|
+
id: number;
|
|
497
|
+
externalId: string;
|
|
498
|
+
name: string;
|
|
499
|
+
vendor: string;
|
|
500
|
+
provider: string;
|
|
501
|
+
demoLink: string;
|
|
502
|
+
tag: string;
|
|
503
|
+
category: string;
|
|
504
|
+
parentId: number;
|
|
505
|
+
hasBonus: number;
|
|
506
|
+
hasFreeSpins: number;
|
|
507
|
+
hasJackPot: number;
|
|
508
|
+
releaseDate: string;
|
|
509
|
+
thumbnail: string;
|
|
510
|
+
status: 'Active' | 'Inactive' | string;
|
|
511
|
+
minBet: number;
|
|
512
|
+
maxBet: number;
|
|
513
|
+
order: number;
|
|
514
|
+
rtp: number;
|
|
515
|
+
recentWin: number | null;
|
|
516
|
+
wagerContribution: number;
|
|
517
|
+
createdAt: string;
|
|
518
|
+
updatedAt: string;
|
|
519
|
+
isInRegion: number;
|
|
520
|
+
}
|
|
521
|
+
/** Generic paginated response for /games/search */
|
|
522
|
+
interface GamesSearchResponse {
|
|
523
|
+
totalCount: number;
|
|
524
|
+
totalPages: number;
|
|
525
|
+
results: GameSearchResponse[];
|
|
526
|
+
}
|
|
527
|
+
interface SearchRequest {
|
|
528
|
+
provider?: string;
|
|
529
|
+
name?: string;
|
|
530
|
+
sort?: string;
|
|
531
|
+
category?: string;
|
|
532
|
+
subCategory?: string;
|
|
533
|
+
tags?: string;
|
|
534
|
+
page?: number;
|
|
535
|
+
limit?: number;
|
|
536
|
+
id?: number;
|
|
537
|
+
region?: string;
|
|
538
|
+
}
|
|
539
|
+
interface GameCategoriesResponse {
|
|
540
|
+
[category: string]: string[];
|
|
541
|
+
}
|
|
542
|
+
interface SetFavoriteGame {
|
|
543
|
+
id: number;
|
|
544
|
+
playerId: number;
|
|
545
|
+
gameId: number;
|
|
546
|
+
isFavorite: boolean;
|
|
547
|
+
createdAt: string;
|
|
548
|
+
updatedAt: string;
|
|
549
|
+
}
|
|
550
|
+
interface SetFavoriteGamesResponse {
|
|
551
|
+
message: string;
|
|
552
|
+
favoriteGames: SetFavoriteGame[];
|
|
553
|
+
}
|
|
554
|
+
interface FavoriteGameResponse {
|
|
555
|
+
id: number;
|
|
556
|
+
externalId: string;
|
|
557
|
+
name: string;
|
|
558
|
+
vendor: string;
|
|
559
|
+
provider: string;
|
|
560
|
+
demoLink: string;
|
|
561
|
+
tag: string;
|
|
562
|
+
category: string;
|
|
563
|
+
parentId: number;
|
|
564
|
+
hasBonus: number;
|
|
565
|
+
hasFreeSpins: number;
|
|
566
|
+
hasJackPot: number;
|
|
567
|
+
releaseDate: string;
|
|
568
|
+
thumbnail: string;
|
|
569
|
+
status: 'Active' | 'Inactive' | string;
|
|
570
|
+
minBet: number;
|
|
571
|
+
maxBet: number;
|
|
572
|
+
order: number;
|
|
573
|
+
rtp: number;
|
|
574
|
+
recentWin: number | null;
|
|
575
|
+
createdAt: string;
|
|
576
|
+
updatedAt: string;
|
|
577
|
+
}
|
|
578
|
+
interface FavoriteGamesResponse {
|
|
579
|
+
playerFavorites: FavoriteGameResponse[];
|
|
580
|
+
}
|
|
581
|
+
interface recentBigWinsResponse {
|
|
582
|
+
bigWins: BigWin[];
|
|
583
|
+
}
|
|
584
|
+
interface BigWin {
|
|
585
|
+
wagerId: number;
|
|
586
|
+
gameExternalId: string;
|
|
587
|
+
gameName: string;
|
|
588
|
+
gameId: number;
|
|
589
|
+
vendor: string;
|
|
590
|
+
provider: string;
|
|
591
|
+
tag: string;
|
|
592
|
+
parentId: number;
|
|
593
|
+
hasBonus: number;
|
|
594
|
+
hasFreeSpins: number;
|
|
595
|
+
hasJackPot: number;
|
|
596
|
+
thumbnail: string;
|
|
597
|
+
minBet: number;
|
|
598
|
+
maxBet: number;
|
|
599
|
+
order: number;
|
|
600
|
+
createdAt: string;
|
|
601
|
+
updatedAt: string;
|
|
602
|
+
amount: number;
|
|
603
|
+
currency: string;
|
|
604
|
+
player: string;
|
|
605
|
+
category: string;
|
|
606
|
+
}
|
|
607
|
+
interface GlobalFavorites {
|
|
608
|
+
globalFavorites: GlobalFavorite[];
|
|
609
|
+
}
|
|
610
|
+
interface GlobalFavorite {
|
|
611
|
+
id: number;
|
|
612
|
+
externalId: string;
|
|
613
|
+
name: string;
|
|
614
|
+
vendor: string;
|
|
615
|
+
provider: string;
|
|
616
|
+
demoLink: string;
|
|
617
|
+
tag: string;
|
|
618
|
+
category: string;
|
|
619
|
+
parentId: number;
|
|
620
|
+
hasBonus: number;
|
|
621
|
+
hasFreeSpins: number;
|
|
622
|
+
hasJackPot: number;
|
|
623
|
+
releaseDate: string;
|
|
624
|
+
thumbnail: string;
|
|
625
|
+
status: string;
|
|
626
|
+
minBet: number;
|
|
627
|
+
maxBet: number;
|
|
628
|
+
order: number;
|
|
629
|
+
rtp?: number;
|
|
630
|
+
recentWin: any;
|
|
631
|
+
wagerContribution: number;
|
|
632
|
+
createdAt: string;
|
|
633
|
+
updatedAt: string;
|
|
634
|
+
likes_count: number;
|
|
635
|
+
}
|
|
636
|
+
interface Providers {
|
|
637
|
+
providers: string[];
|
|
638
|
+
}
|
|
639
|
+
interface Lobby {
|
|
640
|
+
[key: string]: LobbyGame[];
|
|
641
|
+
}
|
|
642
|
+
interface LobbyGame {
|
|
643
|
+
id: number;
|
|
644
|
+
name: string;
|
|
645
|
+
provider: string;
|
|
646
|
+
thumbnail: string;
|
|
647
|
+
isInRegion: number;
|
|
648
|
+
minBet: number;
|
|
649
|
+
maxBet: number;
|
|
650
|
+
rtp: number;
|
|
651
|
+
}
|
|
652
|
+
interface TopRated {
|
|
653
|
+
id: number;
|
|
654
|
+
externalId: string;
|
|
655
|
+
name: string;
|
|
656
|
+
vendor: string;
|
|
657
|
+
provider: string;
|
|
658
|
+
tag: string;
|
|
659
|
+
category?: string;
|
|
660
|
+
parentId: number;
|
|
661
|
+
hasBonus: number;
|
|
662
|
+
hasFreeSpins: number;
|
|
663
|
+
hasJackPot: number;
|
|
664
|
+
thumbnail: string;
|
|
665
|
+
minBet: number;
|
|
666
|
+
maxBet: number;
|
|
667
|
+
order: number;
|
|
668
|
+
createdAt: string;
|
|
669
|
+
updatedAt: string;
|
|
670
|
+
favorites: number;
|
|
671
|
+
isInRegion: number;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
interface GameLinkResponse {
|
|
675
|
+
message: string;
|
|
676
|
+
gameLink: string;
|
|
677
|
+
isFavorite?: boolean;
|
|
678
|
+
}
|
|
679
|
+
declare class GamesAPI {
|
|
680
|
+
private http;
|
|
681
|
+
constructor(http: HttpClient);
|
|
682
|
+
/** Public: search games */
|
|
683
|
+
search(request: SearchRequest): Promise<GamesSearchResponse>;
|
|
684
|
+
getCategories(): Promise<GameCategoriesResponse>;
|
|
685
|
+
/** Requires auth: player link */
|
|
686
|
+
getLink(gameId: string): Promise<GameLinkResponse>;
|
|
687
|
+
/** Public: demo link */
|
|
688
|
+
getDemoLink(gameId: number): Promise<GameLinkResponse>;
|
|
689
|
+
setFavorite(gameId: number, isFavorite: boolean): Promise<SetFavoriteGamesResponse>;
|
|
690
|
+
getFavorite(): Promise<FavoriteGamesResponse[]>;
|
|
691
|
+
getRecentBigWins(category: string): Promise<recentBigWinsResponse[]>;
|
|
692
|
+
getRecent(page?: number, limit?: number): Promise<GamesSearchResponse>;
|
|
693
|
+
getGlobalFavorites(): Promise<GlobalFavorites>;
|
|
694
|
+
getTopRated(): Promise<{
|
|
695
|
+
topRated: TopRated[];
|
|
696
|
+
}>;
|
|
697
|
+
getProviders(): Promise<Providers>;
|
|
698
|
+
getLobby(): Promise<Lobby[]>;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
declare class GeolocationAPI {
|
|
702
|
+
private http;
|
|
703
|
+
constructor(http: HttpClient);
|
|
704
|
+
private failObj;
|
|
705
|
+
getGeolocationFromAPI(): Promise<FreeIpApiGeo | undefined>;
|
|
706
|
+
getGeolocation(): Promise<FreeIpApiGeo | FailObj>;
|
|
707
|
+
getCountryCode(): Promise<string | false>;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
interface LuckyWheelStatistics {
|
|
711
|
+
totalWinnings: number;
|
|
712
|
+
}
|
|
713
|
+
interface LuckyWheelWinners {
|
|
714
|
+
playerName: string;
|
|
715
|
+
playerAvatar: string;
|
|
716
|
+
createdAt: string;
|
|
717
|
+
prize: number;
|
|
718
|
+
currencyId: string;
|
|
719
|
+
}
|
|
720
|
+
interface LuckyWheelStatus {
|
|
721
|
+
isAvailable: boolean;
|
|
722
|
+
message: string;
|
|
723
|
+
prizes: LuckyWheelPrize[];
|
|
724
|
+
}
|
|
725
|
+
interface LuckyWheelPrize {
|
|
726
|
+
id: number;
|
|
727
|
+
luckyWheelId: number;
|
|
728
|
+
prize: number;
|
|
729
|
+
name: string;
|
|
730
|
+
percentage: number;
|
|
731
|
+
currencyId: number;
|
|
732
|
+
createdAt: string;
|
|
733
|
+
updatedAt: string;
|
|
734
|
+
currencyCode: string;
|
|
735
|
+
currencyName: string;
|
|
736
|
+
symbol: string;
|
|
737
|
+
usdValue: number;
|
|
738
|
+
}
|
|
739
|
+
interface LuckyWheelPrize {
|
|
740
|
+
prizeId: number;
|
|
741
|
+
luckyWheelId: number;
|
|
742
|
+
name: string;
|
|
743
|
+
percentage: number;
|
|
744
|
+
amount: number;
|
|
745
|
+
createdAt: string;
|
|
746
|
+
updatedAt: string;
|
|
747
|
+
}
|
|
748
|
+
interface LuckyWheelSpinPlayNA {
|
|
749
|
+
message: string;
|
|
750
|
+
isAvailable: boolean;
|
|
751
|
+
timeLeft: TimeLeft;
|
|
752
|
+
}
|
|
753
|
+
interface LuckyWheelSpinPlay {
|
|
754
|
+
prizeId: number;
|
|
755
|
+
luckyWheelId: number;
|
|
756
|
+
name: string;
|
|
757
|
+
percentage: number;
|
|
758
|
+
createdAt: string;
|
|
759
|
+
updatedAt: string;
|
|
760
|
+
}
|
|
761
|
+
interface TimeLeft {
|
|
762
|
+
hours: number;
|
|
763
|
+
minutes: number;
|
|
764
|
+
seconds: number;
|
|
765
|
+
}
|
|
766
|
+
interface LuckyWheelCollect {
|
|
767
|
+
message: string;
|
|
768
|
+
prize?: LuckyWheelPrize;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
declare class LuckyWheelAPI {
|
|
772
|
+
private http;
|
|
773
|
+
constructor(http: HttpClient);
|
|
774
|
+
getStatistics(): Promise<LuckyWheelStatistics>;
|
|
775
|
+
getWinners(): Promise<LuckyWheelWinners[]>;
|
|
776
|
+
getPrizes(): Promise<LuckyWheelPrize[]>;
|
|
777
|
+
getStatus(): Promise<LuckyWheelStatus>;
|
|
778
|
+
play(data: {
|
|
779
|
+
luckyWheelId: number;
|
|
780
|
+
}): Promise<LuckyWheelSpinPlay | LuckyWheelSpinPlayNA>;
|
|
781
|
+
collect(data: {
|
|
782
|
+
collectHash: string;
|
|
783
|
+
}): Promise<LuckyWheelCollect>;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
interface uploadResponse {
|
|
787
|
+
originalName: string;
|
|
788
|
+
fileName: string;
|
|
789
|
+
mimeType: string;
|
|
790
|
+
size: number;
|
|
791
|
+
url: string;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
declare class MediaAPI {
|
|
795
|
+
private http;
|
|
796
|
+
constructor(http: HttpClient);
|
|
797
|
+
upload(file: File): Promise<uploadResponse>;
|
|
798
|
+
getFileUrl(filePath: string): Promise<string>;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
interface GetBalanceHistoryQuery {
|
|
802
|
+
startDate?: string;
|
|
803
|
+
endDate?: string;
|
|
804
|
+
limit?: number;
|
|
805
|
+
page?: number;
|
|
806
|
+
}
|
|
807
|
+
interface EmailVerifyProps {
|
|
808
|
+
playerId?: number;
|
|
809
|
+
email?: string;
|
|
810
|
+
}
|
|
811
|
+
interface PhoneVerifyProps {
|
|
812
|
+
playerId?: number;
|
|
813
|
+
phoneNumber?: string;
|
|
814
|
+
}
|
|
815
|
+
interface ChangePasswordData {
|
|
816
|
+
currentPassword: string;
|
|
817
|
+
newPassword: string;
|
|
818
|
+
secoundNewPassword: string;
|
|
819
|
+
}
|
|
820
|
+
interface BalanceHistory {
|
|
821
|
+
id: number;
|
|
822
|
+
userId: number;
|
|
823
|
+
playerId: number;
|
|
824
|
+
walletId: number;
|
|
825
|
+
type: string;
|
|
826
|
+
source: string;
|
|
827
|
+
amount: number;
|
|
828
|
+
balanceBefore: number;
|
|
829
|
+
balanceAfter: number;
|
|
830
|
+
description: string;
|
|
831
|
+
createdAt: string;
|
|
832
|
+
updatedAt: string;
|
|
833
|
+
}
|
|
834
|
+
interface BalanceHistory {
|
|
835
|
+
totalCount: number;
|
|
836
|
+
totalPages: number;
|
|
837
|
+
result: BalanceHistoryEntry[];
|
|
838
|
+
}
|
|
839
|
+
interface BalanceHistoryEntry {
|
|
840
|
+
id: number;
|
|
841
|
+
userId: number;
|
|
842
|
+
playerId: number;
|
|
843
|
+
walletId: number;
|
|
844
|
+
type: string;
|
|
845
|
+
source: string;
|
|
846
|
+
amount: number;
|
|
847
|
+
balanceBefore: number;
|
|
848
|
+
balanceAfter: number;
|
|
849
|
+
description: string;
|
|
850
|
+
createdAt: string;
|
|
851
|
+
updatedAt: string;
|
|
852
|
+
}
|
|
853
|
+
interface GameHistory {
|
|
854
|
+
"id": number;
|
|
855
|
+
"playerId": number;
|
|
856
|
+
"gameId": string;
|
|
857
|
+
"gameExternalId": string;
|
|
858
|
+
"type": string;
|
|
859
|
+
"requestIp": string;
|
|
860
|
+
"roundId": string;
|
|
861
|
+
"sessionId": number;
|
|
862
|
+
"gameName": string;
|
|
863
|
+
"betAmount": number;
|
|
864
|
+
"winAmount": number;
|
|
865
|
+
"currency": string;
|
|
866
|
+
"createdAt": string;
|
|
867
|
+
"updatedAt": string;
|
|
868
|
+
}
|
|
869
|
+
interface GameHistory {
|
|
870
|
+
totalCount: number;
|
|
871
|
+
totalPages: number;
|
|
872
|
+
result: GameHistoryEntry[];
|
|
873
|
+
}
|
|
874
|
+
interface GameHistoryEntry {
|
|
875
|
+
id: number;
|
|
876
|
+
playerId: number;
|
|
877
|
+
gameId: string;
|
|
878
|
+
gameExternalId: string;
|
|
879
|
+
type: string;
|
|
880
|
+
requestIp: string;
|
|
881
|
+
roundId: string;
|
|
882
|
+
sessionId: number;
|
|
883
|
+
gameName: string;
|
|
884
|
+
betAmount: number;
|
|
885
|
+
winAmount: number;
|
|
886
|
+
currency: string;
|
|
887
|
+
walletId: any;
|
|
888
|
+
isBonus: number;
|
|
889
|
+
createdAt: string;
|
|
890
|
+
updatedAt: string;
|
|
891
|
+
}
|
|
892
|
+
interface VerificationStatus {
|
|
893
|
+
playerId: number;
|
|
894
|
+
type: string;
|
|
895
|
+
isVerify: number;
|
|
896
|
+
}
|
|
897
|
+
interface Avatar$1 {
|
|
898
|
+
createdAt: string;
|
|
899
|
+
updatedAt: string;
|
|
900
|
+
id: number;
|
|
901
|
+
name: string;
|
|
902
|
+
path: string;
|
|
903
|
+
}
|
|
904
|
+
interface KycDocument {
|
|
905
|
+
createdAt: string;
|
|
906
|
+
updatedAt: string;
|
|
907
|
+
id: number;
|
|
908
|
+
type: string;
|
|
909
|
+
document: string;
|
|
910
|
+
status: string;
|
|
911
|
+
comment: string;
|
|
912
|
+
exparationDate: string;
|
|
913
|
+
playerId: number;
|
|
914
|
+
}
|
|
915
|
+
interface UpdateProfileData {
|
|
916
|
+
name?: string;
|
|
917
|
+
lastname?: string;
|
|
918
|
+
phone?: string;
|
|
919
|
+
email?: string;
|
|
920
|
+
country?: string;
|
|
921
|
+
city?: string;
|
|
922
|
+
zipCode?: string;
|
|
923
|
+
address?: string;
|
|
924
|
+
dob?: string;
|
|
925
|
+
avatar?: number;
|
|
926
|
+
}
|
|
927
|
+
interface ProfileData {
|
|
928
|
+
createdAt: string;
|
|
929
|
+
updatedAt: string;
|
|
930
|
+
id: number;
|
|
931
|
+
username: string;
|
|
932
|
+
name: string;
|
|
933
|
+
lastname: string;
|
|
934
|
+
phone: string;
|
|
935
|
+
email: string;
|
|
936
|
+
currencyId: string;
|
|
937
|
+
status: string;
|
|
938
|
+
referralMax: number;
|
|
939
|
+
geo: any;
|
|
940
|
+
googleId: any;
|
|
941
|
+
country: string;
|
|
942
|
+
city: string;
|
|
943
|
+
zipCode: string;
|
|
944
|
+
address: string;
|
|
945
|
+
dob: string;
|
|
946
|
+
isOnline: boolean;
|
|
947
|
+
avatar: number;
|
|
948
|
+
parentId: number;
|
|
949
|
+
class: number;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
declare class PlayerAPI {
|
|
953
|
+
private http;
|
|
954
|
+
constructor(http: HttpClient);
|
|
955
|
+
changePassword(data: ChangePasswordData): Promise<{
|
|
956
|
+
message: string;
|
|
957
|
+
}>;
|
|
958
|
+
getBalanceHistory(data: GetBalanceHistoryQuery): Promise<BalanceHistory[]>;
|
|
959
|
+
getGameHistory(data: GetBalanceHistoryQuery): Promise<GameHistory[]>;
|
|
960
|
+
verifyEmail(data: EmailVerifyProps): Promise<{
|
|
961
|
+
message: string;
|
|
962
|
+
}>;
|
|
963
|
+
verifyEmailCode(data: {
|
|
964
|
+
verificationCode: string;
|
|
965
|
+
}): Promise<{
|
|
966
|
+
message: string;
|
|
967
|
+
}>;
|
|
968
|
+
verifyPhone(data: PhoneVerifyProps): Promise<{
|
|
969
|
+
message: string;
|
|
970
|
+
}>;
|
|
971
|
+
verifyPhoneCode(data: {
|
|
972
|
+
verificationCode: string;
|
|
973
|
+
}): Promise<{
|
|
974
|
+
message: string;
|
|
975
|
+
}>;
|
|
976
|
+
getVerificationStatus(): Promise<VerificationStatus[]>;
|
|
977
|
+
getAvatars(): Promise<Avatar$1[]>;
|
|
978
|
+
changeAvatar(data: FormData): Promise<{
|
|
979
|
+
message: string;
|
|
980
|
+
avatar: Avatar$1;
|
|
981
|
+
}>;
|
|
982
|
+
getPlayerKycDocuments(): Promise<KycDocument[]>;
|
|
983
|
+
createPlayerKycDocument(data: FormData): Promise<KycDocument>;
|
|
984
|
+
createPlayerTags(data: {
|
|
985
|
+
key: string;
|
|
986
|
+
value: string;
|
|
987
|
+
}[]): Promise<{
|
|
988
|
+
message: string;
|
|
989
|
+
}>;
|
|
990
|
+
updateProfile(data: UpdateProfileData): Promise<ProfileData>;
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
interface Promotion {
|
|
994
|
+
createdAt: string;
|
|
995
|
+
updatedAt: string;
|
|
996
|
+
id: number;
|
|
997
|
+
name: string;
|
|
998
|
+
status: string;
|
|
999
|
+
contentScheme: any;
|
|
1000
|
+
contentData: any;
|
|
1001
|
+
maxUse: number;
|
|
1002
|
+
maxCashout: number;
|
|
1003
|
+
minDeposit: number;
|
|
1004
|
+
wagerRequirement: number;
|
|
1005
|
+
triggerAction: string;
|
|
1006
|
+
currency: number;
|
|
1007
|
+
showInSignUp: boolean;
|
|
1008
|
+
gameType: string;
|
|
1009
|
+
startDate: string;
|
|
1010
|
+
endDate: string;
|
|
1011
|
+
prizeId: number;
|
|
1012
|
+
}
|
|
1013
|
+
interface Progress {
|
|
1014
|
+
active: PromotionProgress[];
|
|
1015
|
+
completed: PromotionProgress[];
|
|
1016
|
+
cancelled: PromotionProgress[];
|
|
1017
|
+
expired: PromotionProgress[];
|
|
1018
|
+
}
|
|
1019
|
+
interface PromotionProgress {
|
|
1020
|
+
promotionName: string;
|
|
1021
|
+
progress: number;
|
|
1022
|
+
prizeType: string;
|
|
1023
|
+
prizeAmount: number;
|
|
1024
|
+
requirement: number;
|
|
1025
|
+
wageredAmount: number;
|
|
1026
|
+
startAmount: number;
|
|
1027
|
+
claimedDate: string;
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
declare class PromotionsAPI {
|
|
1031
|
+
private http;
|
|
1032
|
+
constructor(http: HttpClient);
|
|
1033
|
+
getActive(): Promise<Promotion[]>;
|
|
1034
|
+
getPublic(): Promise<Promotion[]>;
|
|
1035
|
+
getPromotion(id: string): Promise<Promotion>;
|
|
1036
|
+
getProgress(): Promise<Progress>;
|
|
1037
|
+
activateBonus(id: string): Promise<{
|
|
1038
|
+
message: string;
|
|
1039
|
+
error?: string;
|
|
1040
|
+
}>;
|
|
1041
|
+
cancelBonus(id: string): Promise<{
|
|
1042
|
+
message: string;
|
|
1043
|
+
error?: string;
|
|
1044
|
+
}>;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
interface RaffleTicket {
|
|
1048
|
+
createdAt: string;
|
|
1049
|
+
updatedAt: string;
|
|
1050
|
+
id: number;
|
|
1051
|
+
ticketUnique: string;
|
|
1052
|
+
isExpired: boolean;
|
|
1053
|
+
isWon: boolean;
|
|
1054
|
+
playerId: number;
|
|
1055
|
+
raffleSettingsId: number;
|
|
1056
|
+
rafflePrizeId?: number;
|
|
1057
|
+
}
|
|
1058
|
+
interface GetRaffleTicketsResponse {
|
|
1059
|
+
currentRaffleTickets: RaffleTicket[];
|
|
1060
|
+
pastRaffleTickets: RaffleTicket[];
|
|
1061
|
+
}
|
|
1062
|
+
interface RafflePrize {
|
|
1063
|
+
raffleSettingsId: number;
|
|
1064
|
+
raffleName: string;
|
|
1065
|
+
place: number;
|
|
1066
|
+
amount: number;
|
|
1067
|
+
}
|
|
1068
|
+
interface RafflePrizesHistoryResponse {
|
|
1069
|
+
totalCount: number;
|
|
1070
|
+
totalPages: number;
|
|
1071
|
+
raffles: Raffle[];
|
|
1072
|
+
}
|
|
1073
|
+
interface Raffle {
|
|
1074
|
+
raffleId: number;
|
|
1075
|
+
raffleName: string;
|
|
1076
|
+
drawDate: string;
|
|
1077
|
+
ticketPrice: number;
|
|
1078
|
+
timezone: string;
|
|
1079
|
+
raffleState: string;
|
|
1080
|
+
winners: Winner[];
|
|
1081
|
+
}
|
|
1082
|
+
interface Winner {
|
|
1083
|
+
prizePlace: number;
|
|
1084
|
+
prizeAmount: number;
|
|
1085
|
+
playerUsername: string;
|
|
1086
|
+
playerName: string;
|
|
1087
|
+
playerLastName: string;
|
|
1088
|
+
ticketUnique: string;
|
|
1089
|
+
avatarPath: string;
|
|
1090
|
+
}
|
|
1091
|
+
interface ActiveRaffle {
|
|
1092
|
+
createdAt: string;
|
|
1093
|
+
updatedAt: string;
|
|
1094
|
+
id: number;
|
|
1095
|
+
maxTickets: number;
|
|
1096
|
+
maxTicketsPerPlayer: number;
|
|
1097
|
+
drawDate: string;
|
|
1098
|
+
status: string;
|
|
1099
|
+
state: string;
|
|
1100
|
+
timezone: string;
|
|
1101
|
+
ticketPrice: number;
|
|
1102
|
+
name: string;
|
|
1103
|
+
pageContent: string;
|
|
1104
|
+
currency: number;
|
|
1105
|
+
}
|
|
1106
|
+
interface PurchaseTicket {
|
|
1107
|
+
createdAt: string;
|
|
1108
|
+
updatedAt: string;
|
|
1109
|
+
id: number;
|
|
1110
|
+
ticketUnique: string;
|
|
1111
|
+
isExpired: boolean;
|
|
1112
|
+
isWon: boolean;
|
|
1113
|
+
playerId: number;
|
|
1114
|
+
raffleSettingsId: number;
|
|
1115
|
+
rafflePrizeId: any;
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
declare class RaffleAPI {
|
|
1119
|
+
private http;
|
|
1120
|
+
constructor(http: HttpClient);
|
|
1121
|
+
getTickets(): Promise<GetRaffleTicketsResponse[]>;
|
|
1122
|
+
getPrizes(): Promise<RafflePrize[]>;
|
|
1123
|
+
getHistory(): Promise<RafflePrizesHistoryResponse>;
|
|
1124
|
+
getActiveRaffle(): Promise<ActiveRaffle[] | null>;
|
|
1125
|
+
purchaseTickets(data: {
|
|
1126
|
+
raffleId: number;
|
|
1127
|
+
ticketAmount: number;
|
|
1128
|
+
}): Promise<PurchaseTicket>;
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
type Region$1 = {
|
|
1132
|
+
id: number;
|
|
1133
|
+
name: string;
|
|
1134
|
+
isoCode: string;
|
|
1135
|
+
countryCode: string;
|
|
1136
|
+
createdAt: string;
|
|
1137
|
+
updatedAt: string;
|
|
1138
|
+
};
|
|
1139
|
+
interface BlockedCountry {
|
|
1140
|
+
id: number;
|
|
1141
|
+
name: string;
|
|
1142
|
+
countryCode: string;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
declare class RegionAPI {
|
|
1146
|
+
private http;
|
|
1147
|
+
constructor(http: HttpClient);
|
|
1148
|
+
getDepositRegions(): Promise<Region$1[]>;
|
|
1149
|
+
getWithdrawRegions(): Promise<Region$1[]>;
|
|
1150
|
+
getRegions(): Promise<Region$1[]>;
|
|
1151
|
+
getBlockedCountries(): Promise<BlockedCountry[]>;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
type Language = 'en' | 'he' | 'es' | 'de' | 'fr' | 'pt' | 'it' | 'pl' | 'tr' | 'ar' | 'hu' | 'sk' | 'cs' | 'hr' | 'el';
|
|
1155
|
+
type Layout = 'horizontal' | 'vertical';
|
|
1156
|
+
type NavColor = 'blend-in' | 'discreet' | 'evident';
|
|
1157
|
+
type ColorPreset = 'blue' | 'green' | 'indigo' | 'orange' | 'pink' | 'purple' | 'red' | 'yellow';
|
|
1158
|
+
interface Banner {
|
|
1159
|
+
createdAt: Date | string;
|
|
1160
|
+
updatedAt: Date | string;
|
|
1161
|
+
id: number;
|
|
1162
|
+
path: string;
|
|
1163
|
+
link: string;
|
|
1164
|
+
state: string;
|
|
1165
|
+
userId: number;
|
|
1166
|
+
}
|
|
1167
|
+
interface Content {
|
|
1168
|
+
createdAt: Date | string;
|
|
1169
|
+
updatedAt: Date | string;
|
|
1170
|
+
id: number;
|
|
1171
|
+
type: string;
|
|
1172
|
+
title: string;
|
|
1173
|
+
content: string;
|
|
1174
|
+
language: string;
|
|
1175
|
+
languageModal: boolean;
|
|
1176
|
+
}
|
|
1177
|
+
interface SystemSettings {
|
|
1178
|
+
languageModal: boolean;
|
|
1179
|
+
referralRulesModal: boolean;
|
|
1180
|
+
language: Language;
|
|
1181
|
+
banners: Banner[];
|
|
1182
|
+
contents: Content[];
|
|
1183
|
+
}
|
|
1184
|
+
interface ThemeSettings {
|
|
1185
|
+
colorPreset: ColorPreset;
|
|
1186
|
+
layout: Layout;
|
|
1187
|
+
navColor: NavColor;
|
|
1188
|
+
paletteMode: PaletteMode;
|
|
1189
|
+
responsiveFontSizes: boolean;
|
|
1190
|
+
}
|
|
1191
|
+
interface Currency {
|
|
1192
|
+
currencyCode: string;
|
|
1193
|
+
currencyName: string;
|
|
1194
|
+
id: number;
|
|
1195
|
+
}
|
|
1196
|
+
interface Preferences {
|
|
1197
|
+
createdAt?: string;
|
|
1198
|
+
updatedAt?: string;
|
|
1199
|
+
displayMode: string;
|
|
1200
|
+
hideProfileData: boolean;
|
|
1201
|
+
hidePublicUsername: boolean;
|
|
1202
|
+
id: number;
|
|
1203
|
+
language: string;
|
|
1204
|
+
playerId?: number;
|
|
1205
|
+
}
|
|
1206
|
+
interface Avatar {
|
|
1207
|
+
id: number;
|
|
1208
|
+
name: string;
|
|
1209
|
+
path: string;
|
|
1210
|
+
createdAt: Date | string;
|
|
1211
|
+
updatedAt: Date | string;
|
|
1212
|
+
}
|
|
1213
|
+
type Settings = SystemSettings & ThemeSettings;
|
|
1214
|
+
interface WebSetting {
|
|
1215
|
+
createdAt: string;
|
|
1216
|
+
updatedAt: string;
|
|
1217
|
+
id: number;
|
|
1218
|
+
language: string;
|
|
1219
|
+
key: string;
|
|
1220
|
+
value: string;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
declare class SettingsAPI {
|
|
1224
|
+
private http;
|
|
1225
|
+
constructor(http: HttpClient);
|
|
1226
|
+
getSettings(): Promise<Settings>;
|
|
1227
|
+
getBanner(lang: string): Promise<Banner>;
|
|
1228
|
+
getContent(): Promise<Content[]>;
|
|
1229
|
+
getContentItem(type: string, lang: string): Promise<Content>;
|
|
1230
|
+
getAvatar(): Promise<Avatar[]>;
|
|
1231
|
+
getPreferences(): Promise<Preferences>;
|
|
1232
|
+
updatePreferences(data: Partial<Preferences>): Promise<Preferences>;
|
|
1233
|
+
getCurrencies(): Promise<Currency[]>;
|
|
1234
|
+
getWebSetting(lang: string): Promise<WebSetting[]>;
|
|
1235
|
+
getWebSettingProviders(lang: string): Promise<WebSetting[]>;
|
|
1236
|
+
getWebSettingPin(): Promise<WebSetting[]>;
|
|
1237
|
+
getWebSettingReferralRules(lang: string): Promise<WebSetting[]>;
|
|
1238
|
+
getWebSettingReferralFaq(lang: string): Promise<WebSetting[]>;
|
|
1239
|
+
getWebSettingReferralLearnMore(lang: string): Promise<WebSetting[]>;
|
|
1240
|
+
getWebSettingReferralBanners(lang: string): Promise<WebSetting[]>;
|
|
1241
|
+
getWebSettingSlotsCategories(lang: string): Promise<WebSetting[]>;
|
|
1242
|
+
getWebSettingLiveCasinoCategories(lang: string): Promise<WebSetting[]>;
|
|
1243
|
+
getWebsiteAllowedPlayerTags(lang: string): Promise<WebSetting[]>;
|
|
1244
|
+
getSupportEmail(lang: string): Promise<WebSetting[]>;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
interface SportConfig {
|
|
1248
|
+
token: string;
|
|
1249
|
+
brand_id: string;
|
|
1250
|
+
lang: string;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
declare class SportAPI {
|
|
1254
|
+
private http;
|
|
1255
|
+
constructor(http: HttpClient);
|
|
1256
|
+
getConfig(): Promise<SportConfig>;
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
interface RedeemResponse {
|
|
1260
|
+
message?: string;
|
|
1261
|
+
error?: string;
|
|
1262
|
+
}
|
|
1263
|
+
interface CheckResponse extends RedeemResponse {
|
|
1264
|
+
currency?: string;
|
|
1265
|
+
}
|
|
1266
|
+
|
|
1267
|
+
declare class VoucherAPI {
|
|
1268
|
+
private http;
|
|
1269
|
+
constructor(http: HttpClient);
|
|
1270
|
+
redeemVoucher(code: string): Promise<RedeemResponse>;
|
|
1271
|
+
checkVoucher(code: string): Promise<CheckResponse>;
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
type infoType = 'BanksForTransfer' | 'BanksForSwap' | 'CryptoCoinList';
|
|
1275
|
+
interface WithdrawData {
|
|
1276
|
+
amount: number;
|
|
1277
|
+
methodId?: number;
|
|
1278
|
+
paymentMethodId?: number;
|
|
1279
|
+
details?: any;
|
|
1280
|
+
}
|
|
1281
|
+
interface AnindaBank {
|
|
1282
|
+
BankID: string;
|
|
1283
|
+
Name: string;
|
|
1284
|
+
}
|
|
1285
|
+
type Withdraw = {
|
|
1286
|
+
id: number;
|
|
1287
|
+
playerId: number;
|
|
1288
|
+
amount: number;
|
|
1289
|
+
methodId: number;
|
|
1290
|
+
details: any;
|
|
1291
|
+
status: string;
|
|
1292
|
+
comment: string | null;
|
|
1293
|
+
balanceBefore: number;
|
|
1294
|
+
balanceAfter: number;
|
|
1295
|
+
createdAt: string;
|
|
1296
|
+
updatedAt: string;
|
|
1297
|
+
};
|
|
1298
|
+
interface WithdrawMethod {
|
|
1299
|
+
createdAt: string;
|
|
1300
|
+
updatedAt: string;
|
|
1301
|
+
id: number;
|
|
1302
|
+
externalId: string;
|
|
1303
|
+
status: string;
|
|
1304
|
+
intent: string;
|
|
1305
|
+
name: string;
|
|
1306
|
+
minAmount: number;
|
|
1307
|
+
maxAmount: number;
|
|
1308
|
+
dailyMin: number;
|
|
1309
|
+
dailyMax: number;
|
|
1310
|
+
minDeposits: number;
|
|
1311
|
+
maxDeposits: number;
|
|
1312
|
+
feePercentage: number;
|
|
1313
|
+
data: string;
|
|
1314
|
+
logo?: string;
|
|
1315
|
+
position: number;
|
|
1316
|
+
gatewaysId: number;
|
|
1317
|
+
currencyId: number;
|
|
1318
|
+
regions: Region[];
|
|
1319
|
+
}
|
|
1320
|
+
interface Region {
|
|
1321
|
+
createdAt: string;
|
|
1322
|
+
updatedAt: string;
|
|
1323
|
+
id: number;
|
|
1324
|
+
name: string;
|
|
1325
|
+
isoCode: string;
|
|
1326
|
+
countryCode: string;
|
|
1327
|
+
}
|
|
1328
|
+
interface WithdrawRequest {
|
|
1329
|
+
createdAt: string;
|
|
1330
|
+
updatedAt: string;
|
|
1331
|
+
id: number;
|
|
1332
|
+
amount: number;
|
|
1333
|
+
details: any;
|
|
1334
|
+
status: string;
|
|
1335
|
+
playerId: number;
|
|
1336
|
+
methodId: number;
|
|
1337
|
+
}
|
|
1338
|
+
|
|
1339
|
+
declare class WithdrawAPI {
|
|
1340
|
+
private http;
|
|
1341
|
+
constructor(http: HttpClient);
|
|
1342
|
+
getWithdraws(status?: string): Promise<Withdraw[]>;
|
|
1343
|
+
getWithdrawMethods(): Promise<WithdrawMethod[]>;
|
|
1344
|
+
withdraw(data: WithdrawData): Promise<WithdrawRequest>;
|
|
1345
|
+
rejectWithdraw(withdrawId: number): Promise<{
|
|
1346
|
+
message?: string;
|
|
1347
|
+
error?: string;
|
|
1348
|
+
}>;
|
|
1349
|
+
getTrinkparaWithdrawInfo(info: infoType): Promise<any>;
|
|
1350
|
+
getAnindaBankList(methodId: number): Promise<AnindaBank[]>;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
interface SDKConfig {
|
|
1354
|
+
baseUrl: string;
|
|
1355
|
+
timeoutMs?: number;
|
|
1356
|
+
}
|
|
1357
|
+
declare class GameSDK {
|
|
1358
|
+
readonly http: HttpClient;
|
|
1359
|
+
readonly auth: JwtAuth;
|
|
1360
|
+
readonly affiliate: AffiliateAPI;
|
|
1361
|
+
readonly content: ContentAPI;
|
|
1362
|
+
readonly deposit: DepositAPI;
|
|
1363
|
+
readonly games: GamesAPI;
|
|
1364
|
+
readonly geolocation: GeolocationAPI;
|
|
1365
|
+
readonly luckyWheel: LuckyWheelAPI;
|
|
1366
|
+
readonly media: MediaAPI;
|
|
1367
|
+
readonly player: PlayerAPI;
|
|
1368
|
+
readonly promotions: PromotionsAPI;
|
|
1369
|
+
readonly raffle: RaffleAPI;
|
|
1370
|
+
readonly region: RegionAPI;
|
|
1371
|
+
readonly settings: SettingsAPI;
|
|
1372
|
+
readonly sport: SportAPI;
|
|
1373
|
+
readonly voucher: VoucherAPI;
|
|
1374
|
+
readonly withdraw: WithdrawAPI;
|
|
1375
|
+
constructor(cfg: SDKConfig);
|
|
1376
|
+
}
|
|
1377
|
+
declare const createGameSDK: (cfg: SDKConfig) => GameSDK;
|
|
1378
|
+
|
|
1379
|
+
export { ApiError, type AuthResponse, ContentAPI, type ContentPage, type CreatePlayerInput, type CreatePlayerV2Input, type CreatePlayerV2Step2Input, type GameLinkResponse, GameSDK, GamesAPI, type GeoInfo, type GoogleLoginRequest, type GoogleProfile, type ISODateString, JwtAuth, PromotionsAPI, type RegisterResponse, type SDKConfig, type SignupResponse, type SignupV2ValidateResponse, USERNAME_REGEX, type User, type Wallet, createGameSDK, isApiError, type pinCodeCheckResponse, type pinCodeResponse };
|