bb-api-platforma 0.1.168

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.
@@ -0,0 +1,1777 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { AxiosInstance } from 'axios';
4
+
5
+ export interface IBetslipItems {
6
+ Add1: number | null;
7
+ Add2: number | null;
8
+ BetVarID: number;
9
+ LinesID: number;
10
+ HandSize: number | null;
11
+ IsLive: boolean;
12
+ Odds: number;
13
+ }
14
+ export interface IAddToBasket {
15
+ eId: number;
16
+ bId: number;
17
+ r: number;
18
+ fs: number | null;
19
+ a1: number | null;
20
+ a2: number | null;
21
+ isLive: boolean;
22
+ }
23
+ export interface IRate {
24
+ Rate: string;
25
+ IsEnabled?: boolean;
26
+ SignChange?: string;
27
+ Id?: string;
28
+ TID?: string;
29
+ NameShort?: string;
30
+ NameLong?: string;
31
+ BN?: string;
32
+ BetId?: number;
33
+ AddToBasket?: IAddToBasket;
34
+ S?: number;
35
+ N?: number;
36
+ TotalSize?: number;
37
+ ForaSize?: number;
38
+ }
39
+ export interface IMainBet {
40
+ Id: string;
41
+ Caption?: string;
42
+ Rates?: IRate[];
43
+ }
44
+ export interface IEventKeys {
45
+ ID: number;
46
+ LinesID: number;
47
+ TurnirID: number;
48
+ SportID: number;
49
+ }
50
+ export interface IEventsHeader {
51
+ ExtraBetTypesCount: number;
52
+ MainBets: IMainBet[];
53
+ HomeTeamName: string;
54
+ AwayTeamName: string;
55
+ SportName: string;
56
+ TourneyName: string;
57
+ Comment: string;
58
+ EventKeys: IEventKeys;
59
+ Date: string;
60
+ CountryId: number;
61
+ PriceNum: number;
62
+ }
63
+ export interface GetPrematchTournament {
64
+ EventsHeaders: IEventsHeader[];
65
+ Id: number;
66
+ Name: string;
67
+ }
68
+ export interface IRates {
69
+ S: string;
70
+ IsT: boolean;
71
+ Caption: string;
72
+ Id: string;
73
+ Rates: IRate[];
74
+ State: number;
75
+ GroupName: string | null;
76
+ Comment: string | null;
77
+ }
78
+ export interface IRospisGroup {
79
+ Name: string;
80
+ IsEnabled: boolean;
81
+ State: number;
82
+ Id: number;
83
+ Rates: IRates[];
84
+ }
85
+ export interface IMinMatch {
86
+ Minutes: number;
87
+ Seconds: number;
88
+ TotalMinutes: number;
89
+ }
90
+ export interface ILiveDescription {
91
+ SportId: number;
92
+ CountryId: number;
93
+ TournamentId: number;
94
+ LinesId: number;
95
+ CommentId: null | string;
96
+ PriceNum: number;
97
+ Comment: string;
98
+ Score: string;
99
+ MinMatch: IMinMatch;
100
+ Date: string;
101
+ ServingTeam: number;
102
+ NameTeam1: string;
103
+ NameTeam2: string;
104
+ TName: string;
105
+ SportName: number;
106
+ }
107
+ export interface ILiveData {
108
+ RospisGroups: IRospisGroup[];
109
+ TimeStamp: null | string;
110
+ Id: string;
111
+ Status: number;
112
+ CountRospis: number;
113
+ State: number;
114
+ Description: ILiveDescription;
115
+ Statistic: string;
116
+ ScoreStats: any[];
117
+ TVChannels: any[];
118
+ Markets: any[];
119
+ LineArchive: null | string;
120
+ }
121
+ export interface ILiveDataResponce {
122
+ ts: number;
123
+ events: ILiveData[];
124
+ isFullPackage: boolean;
125
+ Error?: string | null;
126
+ }
127
+ export interface ISport {
128
+ ID: number;
129
+ Name: string;
130
+ }
131
+ export interface ICountry {
132
+ ID: number;
133
+ Name: string;
134
+ }
135
+ export interface IChangePassword {
136
+ mailSubject: string;
137
+ userData: {
138
+ UserId: number;
139
+ OldPassword: string;
140
+ NewPassword: string;
141
+ /**
142
+ * offset from GMT in the format
143
+ * new Date().getTimezoneOffset() / 60
144
+ * @type {number}
145
+ */
146
+ Gmt: number;
147
+ /**
148
+ * Блять! Id Языка
149
+ * @type {number}
150
+ */
151
+ Language: number;
152
+ };
153
+ }
154
+ export interface ISearchEventsData {
155
+ CountryId: number;
156
+ Date: string;
157
+ Id: number;
158
+ Name: string;
159
+ PriceNum: number;
160
+ SportId: number;
161
+ SportName: string;
162
+ TournamentId: number;
163
+ TournamentName: string;
164
+ /**
165
+ * Types:
166
+ * * 0 = "Sport";
167
+ * * 1 = "Tournament";
168
+ * * 2 = "PrematchEvent";
169
+ * * 3 = "LiveEvent";
170
+ * @type {0|1|2|3}
171
+ */
172
+ Type: 0 | 1 | 2 | 3;
173
+ isLive: boolean;
174
+ to: {
175
+ name: string;
176
+ params: {
177
+ prEventId: string;
178
+ };
179
+ };
180
+ t1: string;
181
+ t2: string;
182
+ }
183
+ export interface IPayloadWithdrawal {
184
+ /**
185
+ * ID платёжной системы (Кассир(5), WebMoney(2), Skrill(10))
186
+ * Всю информацию выяснять у программистов
187
+ * @type {number}
188
+ */
189
+ psType: number;
190
+ amount: string;
191
+ /**
192
+ * Номер кошелька в случае
193
+ * вывода через кассира - номер кассы
194
+ * в случае вывода на карту - номер карты
195
+ * @type {string}
196
+ */
197
+ purse: string;
198
+ password: string;
199
+ /**
200
+ * Хрень
201
+ */
202
+ securityCode?: string;
203
+ secAnswer?: string;
204
+ additionalParams?: Record<string, any>;
205
+ }
206
+ export interface IPayloadCancelOrderedTransaction {
207
+ transactionId: number;
208
+ status: ETransactionInternalStatus;
209
+ }
210
+ /**
211
+ * Represents the payload for retrieving account transactions.
212
+ * "/account/GetAccountTransactions"
213
+ */
214
+ export interface IGetMovementOfMoneyPayload {
215
+ /**
216
+ * Start date format: DDMMYYYY
217
+ */
218
+ begin: string;
219
+ /**
220
+ * End date format: DDMMYYYY
221
+ */
222
+ end: string;
223
+ /**
224
+ * Transactions types:
225
+ */
226
+ type: ETransactionType;
227
+ /**
228
+ * Period types:
229
+ */
230
+ periodType: EPeriodType;
231
+ /**
232
+ * Number of page (default 0)
233
+ */
234
+ page: number;
235
+ /**
236
+ * Count items per page
237
+ */
238
+ count: number;
239
+ /**
240
+ * (optional) Added automatically in the API class
241
+ */
242
+ culture?: string;
243
+ }
244
+ declare enum ETransactionInternalStatus {
245
+ /** Пустой, значение по умолчанию для всех транзакций (0) */
246
+ None = 0,
247
+ /** Заказано на вывод, транзакция не обработана (1) */
248
+ Ordered = 1,
249
+ /** Транзакция подтверждена (разрешена) админом к выводу на кассе (2) */
250
+ Confirmed = 2,
251
+ /** Авто-отмена транзакции (нужна для отмены пользовательской транзакции и создания нового заказа) (3) */
252
+ AutoReturned = 3,
253
+ /** Авто-заказ денег на вывод (например, перезаказ на другую сумму) (4) */
254
+ AutoOrdered = 4,
255
+ /** Возвращено (отказ/отмена от выплаты) (5) */
256
+ Returned = 5,
257
+ /** Вывод денег пользователю (6) */
258
+ Paid = 6,
259
+ /** Подтвержденная транзакция отменена (7) */
260
+ ConfirmedReturned = 7,
261
+ /**
262
+ * Транзакция находится в ожидании
263
+ * (для платежки DengiOnline транзакция является подстверженной кассиром, но еще находится в ожидании подтверждения/отмены от платежной системы)
264
+ * можно использовать еще для банковских карточек, там ожидание от 3 до 5 рабочих дней
265
+ */
266
+ Pending = 8
267
+ }
268
+ export type TGetUserBetsPayload = {
269
+ /** Date format 'DDMMYYYY' */
270
+ begin: string;
271
+ /** Date format 'DDMMYYYY' */
272
+ end: string;
273
+ /** default: 0 */
274
+ page: number;
275
+ /** default: 500 */
276
+ count: number;
277
+ /** hardware: 0 */
278
+ periodType: number;
279
+ showLossBets: boolean;
280
+ showWinBets: boolean;
281
+ showWorkBets: boolean;
282
+ culture?: string;
283
+ };
284
+ export type TGetGameFrameGoldenRacePayload = {
285
+ /** Идентификатор игры. "gameId" Обязательный параметр. */
286
+ game: number;
287
+ /** URL, на который игра перенаправляет в случае неожиданной ошибки или используется для клиентских конфигураций, таких как URL лобби для мобильных игр. Обязательный параметр. */
288
+ backurl: string;
289
+ /** Режим игры: 0 для виртуального (fun) или 1 для реального (real). По умолчанию: 1. */
290
+ mode: 0 | 1;
291
+ /** Код языка в формате ISO 639-1 alpha-2 для загрузки локализации. По умолчанию: "en". */
292
+ language: string | "en" | "fr" | "es" | "pt" | "tr";
293
+ /** Платформа, с которой была запущена игра: "desktop" или "mobile". Укажите "mobile", если хотите открыть мобильный клиент игры. По умолчанию: "desktop". */
294
+ clientPlatform: "desktop" | "mobile";
295
+ };
296
+ export type TGetGameListGoldenRacePayload = {
297
+ platforms: "mobile" | "desktop" | "retail";
298
+ gameTitle?: string;
299
+ provider?: string[];
300
+ type?: string;
301
+ sub_type?: string;
302
+ };
303
+ export type TPlaceBetPayload = {
304
+ betAmount: number;
305
+ doAcceptOddsChanges: boolean;
306
+ /**
307
+ * Should look something like this:
308
+ * `{
309
+ * "4084082_132_1.5_null_null": true,
310
+ * "4083927_39_null_276_null": true
311
+ * }`
312
+ */
313
+ statuses: Record<string, boolean>;
314
+ /**
315
+ * Is system (-1) or size of system (number)
316
+ * * (`-1`) not a system
317
+ * * (`system_size`) e.g. 3 events with 2 each, so we pass (2)
318
+ */
319
+ systemIndex: number;
320
+ };
321
+ export type TSignUpPayload = {
322
+ /**
323
+ * UID Сайта партнера, например, "betbooster.win"
324
+ */
325
+ PartnerSiteUid: string;
326
+ FirstName?: string;
327
+ MiddleName?: string;
328
+ EmailOrPhone: string;
329
+ /**
330
+ * @deprecated
331
+ * Устарело, неорбходимо использовать PointId
332
+ */
333
+ CurrencyId?: number;
334
+ /**
335
+ * Новое поле, которое обозначает ID кассы, которое определяет валюту
336
+ */
337
+ PointId?: number;
338
+ Password: string;
339
+ PasswordRepeat: string;
340
+ UrlRedirect?: string;
341
+ /**
342
+ * Subject for e-mail
343
+ */
344
+ EmailSubject?: string;
345
+ /**
346
+ * e-mail text Body.
347
+ * Some text with {userHash}, and {userHash} can be in multiple places in {userHash} of this text.
348
+ * Instead of "{userHash}", the authorisation token must be substituted in all places.
349
+ */
350
+ EmailBody?: string;
351
+ EmailFrom?: string;
352
+ ConfirmUrl?: string;
353
+ Culture?: string;
354
+ };
355
+ export type TGetMovementOfMoney = {
356
+ result: {
357
+ income: boolean;
358
+ sign: string;
359
+ id: number;
360
+ typeId: number;
361
+ typeName: string;
362
+ date: string;
363
+ value: number;
364
+ amount: number;
365
+ bonus: number;
366
+ balance: number;
367
+ }[];
368
+ };
369
+ export interface TAddBetslip {
370
+ culture: string;
371
+ /** ID События */
372
+ eId: number;
373
+ /** ID Ставыки */
374
+ bId: number;
375
+ /** Коэфициент */
376
+ r: number;
377
+ /** Размер Форы или Тотала */
378
+ fs: number | null;
379
+ /** Доп. параметр */
380
+ a1: number | null;
381
+ /** Доп. параметр */
382
+ a2: number | null;
383
+ isLive: boolean;
384
+ }
385
+ export interface TCouponEdited {
386
+ BetId: number;
387
+ DoAcceptOddsChanges: boolean;
388
+ BetContentWeb: IBetContentWeb[];
389
+ Culture: string;
390
+ }
391
+ export interface IBetContentWeb {
392
+ BetContent: IOddsEdited;
393
+ IdOldBet: number;
394
+ }
395
+ export interface IOddsEdited {
396
+ Odds: number;
397
+ LinesID: number;
398
+ BetVarID: number;
399
+ Add1: number;
400
+ Add2: number;
401
+ HandSize: number;
402
+ IsBonus: boolean;
403
+ IsLive: boolean;
404
+ }
405
+ export interface IUser {
406
+ UserId?: number;
407
+ [key: string]: string | number | null | boolean | object | undefined;
408
+ }
409
+ declare enum EFavoriteType {
410
+ Tournament = 0,
411
+ Event = 1,
412
+ LiveEvent = 2,
413
+ LineEvent = 3,
414
+ None = 4
415
+ }
416
+ declare enum EPaymentSystemTypeEnum {
417
+ /** Не указана платёжная система */
418
+ None = 0,
419
+ /** Ручной ввод/вывод денег */
420
+ Manual = 1,
421
+ /** Система WebMoney */
422
+ WebMoney = 2,
423
+ /** SmsProxy */
424
+ SmsProxy = 3,
425
+ /** Ваучеры */
426
+ Voucher = 4,
427
+ /** Ввод/вывод денег через кассу */
428
+ Cashier = 5,
429
+ /** Система LiqPay */
430
+ LiqPay = 6,
431
+ /** Не поддерживаем */
432
+ UnSupported = 7,
433
+ /** OSMP system */
434
+ Osmp = 8,
435
+ /** ePay system */
436
+ EPay = 9,
437
+ /** MoneyBookers */
438
+ MoneyBookers = 10,
439
+ /** PayPal */
440
+ PayPal = 11,
441
+ /** MegaPay */
442
+ MegaPay = 12,
443
+ /** Tandem */
444
+ Tandem = 13,
445
+ /** TelCell */
446
+ TelCell = 14,
447
+ /** WalletOne */
448
+ WalletOne = 15,
449
+ /** OkPay */
450
+ OkPay = 16,
451
+ /** EDram */
452
+ EDram = 17,
453
+ /** ArCa */
454
+ ArCa = 18,
455
+ /** TotoCards */
456
+ ScratchCardsToto = 19,
457
+ /** bonus for register */
458
+ AccountBonus = 20,
459
+ /** Pay2pay */
460
+ Pay2Pay = 21,
461
+ /** InterKassa */
462
+ InterKassa = 22,
463
+ /** AlliedWallet Custom Pay(Bank cards) */
464
+ AlliedWallet = 23,
465
+ /** Terminal kz system */
466
+ CyberPlat = 24,
467
+ /** EasyPay */
468
+ EasyPay = 25,
469
+ /** Terminal kz system */
470
+ Altel = 26,
471
+ /** Партнер Нижний Новгород */
472
+ PartnerNN = 27,
473
+ /** BetsStore скачки */
474
+ BetsstoreHorseRace = 28,
475
+ /** BetsStore ставки */
476
+ BetsstoreBets = 29,
477
+ /** BetsStore бонусы */
478
+ BetsstoreBonus = 30,
479
+ /** www.dengionline.com */
480
+ DengiOnline = 31,
481
+ /** DengiOnlineLiqPay */
482
+ DengiOnlineLiqPay = 32,
483
+ /** DengiOnlineIPayMTS */
484
+ DengiOnlineIPayMTS = 33,
485
+ /** DengiOnlineIPayLife */
486
+ DengiOnlineIPayLife = 34,
487
+ /** DengiOnlineQiwi */
488
+ DengiOnlineQiwi = 35,
489
+ /** Golden Race */
490
+ GoldenRace = 44,
491
+ /** qiwi */
492
+ QiWi = 45,
493
+ /** beeline */
494
+ Beeline = 46,
495
+ /** PayTrio */
496
+ PayTrio = 47,
497
+ /** FcPay */
498
+ FcPay = 48,
499
+ /** слоты http://flashslots.s3.amazonaws.com */
500
+ FlashSlots = 49,
501
+ /** XProGamingCasino */
502
+ XProGamingCasino = 50,
503
+ /** BetsStore Kassa24 */
504
+ BetsstoreKassa24 = 51,
505
+ /** BetsStore Wooppay */
506
+ BetsstoreWooppay = 52,
507
+ /** map attack bets */
508
+ MapAttackBets = 53
509
+ }
510
+ declare enum EBetslipType {
511
+ Ordinar = 0,
512
+ Express = 1,
513
+ System = 2
514
+ }
515
+ declare enum ETransactionType {
516
+ /** (default) all without internal; */
517
+ AllWithoutInternal = 0,
518
+ /** external deposit */
519
+ ExternalDeposit = 1,
520
+ /** external withdraw */
521
+ ExternalWithdraw = 1,
522
+ /** internal win bets */
523
+ InternalWinBets = 3,
524
+ /** Internal loss bets */
525
+ InternalLossBets = 4,
526
+ /** Internal bets in work */
527
+ InternalBetsInWork = 5
528
+ }
529
+ export type TBetslipSettings = {
530
+ UserId: number;
531
+ IsOneClick: boolean;
532
+ OneClickAmount: number;
533
+ IsAgreeChangeUp: boolean;
534
+ IsAgreeChangeDown: boolean;
535
+ IsAgreeChangeTotal: boolean;
536
+ IsDeleteCupons: boolean;
537
+ DeleteCuponsTime: number;
538
+ FavAmount1: number;
539
+ FavAmount2: number;
540
+ FavAmount3: number;
541
+ };
542
+ export type TPersonalData = {
543
+ Country: string;
544
+ TimeZone: string;
545
+ PostalCode: string;
546
+ Region: string;
547
+ City: string;
548
+ Address: string;
549
+ Phone: string;
550
+ Email: string;
551
+ Image: string;
552
+ [key: string]: string;
553
+ };
554
+ declare enum EPeriodType {
555
+ /** Не определено (используется для выбора даты) */
556
+ None = 0,
557
+ /** За сегодня */
558
+ Today = 1,
559
+ /** За вчера */
560
+ Yesterday = 2,
561
+ /** За последние 7 дней */
562
+ Last7Days = 3,
563
+ /** За последние 14 дней */
564
+ Last14Days = 4,
565
+ /** За последние 30 дней */
566
+ Last30Days = 5,
567
+ /** За последние 2 дня */
568
+ Last2Days = 6,
569
+ /** За последнюю неделю */
570
+ LastWeek = 7,
571
+ /** За сутки(с начальной даты) */
572
+ SelectedDate = 8
573
+ }
574
+ export interface IResponseData<T> {
575
+ data: T;
576
+ status: number;
577
+ statusText: string;
578
+ error?: string | null;
579
+ }
580
+ export interface IApiResponse<T = any> {
581
+ Data: T;
582
+ Ok: boolean;
583
+ Error: string;
584
+ }
585
+ export interface IIntgrGetGamesListPayload {
586
+ /** Suppliers */
587
+ suppliers?: number[];
588
+ /** Group ID to which the site is linked */
589
+ groupId: number;
590
+ /** Specific games */
591
+ games?: string[];
592
+ /** String to search games by name */
593
+ searchName?: string;
594
+ /** List of providers */
595
+ providers?: {
596
+ Name: string;
597
+ CountGames: number;
598
+ }[];
599
+ /** List of game types */
600
+ types?: string[];
601
+ /** Platform (e.g., mobile, desktop) */
602
+ platforms: "mobile" | "desktop";
603
+ /** Maximum number of items */
604
+ maxItems?: number;
605
+ }
606
+ export interface IIntgrInitGamePayload {
607
+ /** ID of the integrator partner SQ:2, SI:1, CH:?, PP:? */
608
+ suppliers: number;
609
+ gameid: number | string;
610
+ /** url to which the page is returned after the game is closed */
611
+ backurl: string;
612
+ /** Game mode: 0 for virtual (fun) or 1 for real (real). Default: 1. */
613
+ mode: number;
614
+ /** Language code in ISO 639-1 alpha-2 format for downloading localisation. Default: "en". */
615
+ language: string;
616
+ /** The platform from which the game was launched: "desktop" or "mobile". Specify "mobile" if you want to open the mobile client of the game. Default: "desktop". */
617
+ clientPlatform: "mobile" | "desktop" | "retail";
618
+ }
619
+ export interface RedisPrematchSearchParams {
620
+ locale?: string;
621
+ searchString?: string | null;
622
+ negativeString?: string | null;
623
+ sportId?: number | null;
624
+ tournamentId?: number | null;
625
+ LIMIT?: {
626
+ from: number;
627
+ size: number;
628
+ } | null;
629
+ }
630
+ export declare function routeNameId(id: number | string, text?: string): string;
631
+ export declare function clearPhone(draftPhoneNumber: number | string, prefix?: string, suffix?: string): string;
632
+ export declare class BetBoosterApi {
633
+ private _baseUrl;
634
+ /**
635
+ * A clean superagent instance that can be used for http requests
636
+ */
637
+ axi: AxiosInstance;
638
+ private _locale;
639
+ private _locales;
640
+ private _languageIdsRemote;
641
+ private EXIST_LANGUAGES;
642
+ private _languageId;
643
+ private _lang;
644
+ private _TOKEN?;
645
+ private _USER_DATA;
646
+ private LANG_DEFAULT;
647
+ private LOCALE_DEFAULT;
648
+ private LANG_ID_DEFAULT;
649
+ private maxTimeExecutionMs;
650
+ liveTimestamp: string | number;
651
+ private _liveTimestampReset;
652
+ liveRecivedIsFullPackage?: boolean;
653
+ isNotActive?: boolean;
654
+ /**
655
+ * Represents the BetBoosterApi class.
656
+ * @constructor
657
+ * @param {AxiosInstance} axiosInstance - The Axios instance to be used for making HTTP requests. Aka axios.create()
658
+ * @param {string} baseUrl - The base URL of the API.
659
+ * @param {string} [lang='en'] - The language to be used for API requests. Defaults to 'en'.
660
+ * @param {number} [maxTimeExecutionMs=15000] - The maximum time allowed for API request execution in milliseconds. Defaults to 15000.
661
+ * @param {boolean} [isDev=false] - Indicates whether the API is running in development mode. Defaults to false.
662
+ */
663
+ constructor(axiosInstance: AxiosInstance, baseUrl: string, lang?: string, maxTimeExecutionMs?: number, isDev?: boolean);
664
+ get locale(): string;
665
+ get isSinged(): boolean;
666
+ get user(): IUser;
667
+ set user(value: IUser);
668
+ get lang(): string;
669
+ get languageId(): number;
670
+ get token(): string | undefined;
671
+ set token(value: string | undefined);
672
+ /**
673
+ * Processes the response data and returns an object with data, error, status and status text.
674
+ *
675
+ * @template T - Тип данных, возвращаемых в поле `data`.
676
+ * @param {any} rawData - Сырые данные ответа.
677
+ * @param {number} status - HTTP статус ответа.
678
+ * @param {string} statusText - Текст статуса HTTP ответа.
679
+ * @returns {{ data: T, error: string | null, status: number, statusText: string }} Объект, содержащий данные ответа, ошибку, статус и текст статуса.
680
+ */
681
+ responseHandlerData<T = any | null>(rawData: any, status: number, statusText: string): {
682
+ data: T | null;
683
+ error: string | null;
684
+ status: number;
685
+ statusText: string;
686
+ };
687
+ /**
688
+ * Converts rawData.Data.Data format to rawData.Data.data format
689
+ * Sometimes API returns a format that is difficult to process later.
690
+ * Therefore it is necessary to convert the format for proper data processing (responseHandlerData)
691
+ * @param rawData
692
+ * @returns
693
+ */
694
+ private convertDataData;
695
+ setDevMode(devMode?: boolean | undefined): void;
696
+ /**
697
+ * Adds new locale keys and values to the existing locales.
698
+ * Updates the list of existing languages with any new language codes found in the provided data.
699
+ *
700
+ * @param localesData - An object mapping locale keys to their translations
701
+ * @example
702
+ * // Add new translations
703
+ * betBoosterApi.addLocalesConverters({
704
+ * 'en': 'en-US',
705
+ * 'fr': 'fr-FR'
706
+ * });
707
+ */
708
+ addLocalesConverters(localesData: Record<string, string>): void;
709
+ checkLanguage(lang?: string): string;
710
+ /**
711
+ * Sets the language for the BetBooster API.
712
+ *
713
+ * @param {string} [lang='en'] - The language code to set. Defaults to 'en' if not provided.
714
+ * @returns {string} - The language code that was set.
715
+ * @example
716
+ * ```
717
+ * api.setLanguage('en');
718
+ * ```
719
+ * as result:
720
+ * lang='en';
721
+ * locale='en-US';
722
+ * languageId=1;
723
+ */
724
+ setLanguage(lang?: string): string;
725
+ /**
726
+ * Sets the language and locale for the remote API.
727
+ * @param lang Language (default 'en').
728
+ * @returns Returns true if the language and locale are successfully set, otherwise returns false.
729
+ */
730
+ setLanguageRemoteLocale(lang?: string): Promise<any>;
731
+ private setBaseUrl;
732
+ private statusHandler;
733
+ /**
734
+ * Query string handler. Replaces values
735
+ * * `null` на `'null'`
736
+ * * `false` на `'false'`
737
+ * * `true` на `'true'`
738
+ * * `undefined` на `''`
739
+ * @param queryStringData - queryString Record<string, any>
740
+ * @returns The processed data of the query string.
741
+ */
742
+ private queryStringHandler;
743
+ private responseHandler;
744
+ /**
745
+ * Error Handler for Axios.
746
+ *
747
+ * @param error - AxiosError object.
748
+ * @returns An object with error data, including the status and text of the error.
749
+ */
750
+ private axiosErrorHandler;
751
+ /**
752
+ * Returns the URL for the specified API path and version.
753
+ *
754
+ * @param apiPath - API Pathway.
755
+ * @param apiVersion - API Version.
756
+ * @returns URL for the specified API path and version.
757
+ */
758
+ private url;
759
+ /**
760
+ * Executes an HTTP request with the specified parameters.
761
+ * @param url - The URL to execute the request.
762
+ * @returns An object that contains methods for configuring the request and executing the request.
763
+ */
764
+ request(url: string): {
765
+ /**
766
+ * Executes a query with the specified parameters.
767
+ * @param queryParams - Query Parameters.
768
+ * @returns An instance of BetBoosterOfficeApi class.
769
+ */
770
+ query(queryParams?: Record<string, unknown> | object): any;
771
+ /**
772
+ * Sets the headers of the request.Sets the headers of the request.
773
+ * @param headers - Query header object.
774
+ * @returns An instance of BetBoosterOfficeApi class.
775
+ */
776
+ headers(headers?: Record<string, string>): any;
777
+ deleteAllHeaders(): any;
778
+ /**
779
+ * Sets the method of the GET request.
780
+ * @returns An instance of BetBoosterOfficeApi class.
781
+ */
782
+ GET(): any;
783
+ /**
784
+ * Sets the POST request method.
785
+ * @param payload - The payload for the enquiry.
786
+ * @returns An instance of BetBoosterOfficeApi class.
787
+ */
788
+ POST(payload?: Record<string, unknown> | object): any;
789
+ /**
790
+ * Устанавливает метод запроса PUT и устанавливает тело запроса.
791
+ * @param payload - Данные, которые будут отправлены в теле запроса.
792
+ * @returns Экземпляр класса BetBoosterOfficeApi с установленным методом запроса PUT и телом запроса.
793
+ */
794
+ PUT(payload?: Record<string, unknown> | object): any;
795
+ /**
796
+ * Устанавливает метод запроса DELETE.
797
+ * @param payload Данные запроса в формате объекта или записи.
798
+ * @returns Экземпляр класса BetBoosterOfficeApi.
799
+ */
800
+ DELETE(payload?: Record<string, unknown> | object): any;
801
+ /**
802
+ * Выполняет запрос к API.
803
+ *
804
+ * @returns Объект, содержащий данные, статус и текст статуса ответа.
805
+ * ```
806
+ * { data, status, statusText }
807
+ * ```
808
+ */
809
+ exec<T>(): Promise<IResponseData<T>>;
810
+ /**
811
+ * Получает значение.
812
+ * @returns Промис, который разрешается с данными.
813
+ */
814
+ value<T>(): Promise<void>;
815
+ };
816
+ /**
817
+ * Sends a GET request to the specified endpoint with optional query parameters and options.
818
+ * @param url - The endpoint to send the GET request to.
819
+ * @param queryParams - The query parameters to include in the request URL. Defaults to an empty object.
820
+ * @param headers - The options to include in the request. Defaults to an empty object.
821
+ * @returns A Promise that resolves to the response body of the GET request.
822
+ */
823
+ GET(url: string, queryParams?: Record<string, unknown> | object, headers?: Record<string, string>): Promise<any>;
824
+ POST(url: string, payload?: Record<string, unknown> | object, queryParams?: Record<string, unknown> | object, headers?: Record<string, string>): Promise<any>;
825
+ DELETE(url: string, payload?: Record<string, unknown> | object, queryParams?: Record<string, unknown> | object, headers?: Record<string, string>): Promise<any>;
826
+ PUT(url: string, payload?: Record<string, unknown> | object, queryParams?: Record<string, unknown> | object, headers?: Record<string, string>): Promise<any>;
827
+ /**
828
+ * Returns the list of prematch sports
829
+ *
830
+ * @param minutes The number of minutes to consider for the data retrieval. Defaults to 0.
831
+ * @returns {Promise<Array<any>>} A promise that resolves to an array of line sports data.
832
+ */
833
+ getLineSports(minutes?: number): Promise<ISport[]>;
834
+ /**
835
+ * Retrieves the hot prematch events
836
+ * @returns {Promise<Array<any>>} A promise that resolves to an array of hot events.
837
+ */
838
+ getHotEvents(): Promise<any[]>;
839
+ /**
840
+ * Получает список стран для указанного идентификатора спорта.
841
+ * @param sportId - Идентификатор спорта.
842
+ * @param minutes - Опциональный параметр, количество минут.
843
+ * @returns Промис, который разрешается в массив объектов типа ICountry.
844
+ */
845
+ getCountriesList(sportId: number, minutes?: number): Promise<ICountry[]>;
846
+ /**
847
+ * Retrieves prematch tournaments based on the specified sport ID, country ID, and minutes.
848
+ * @param sportId - The ID of the sport.
849
+ * @param countryId - The ID of the country.
850
+ * @param minutes - The number of minutes ago for which data is to be retrieved.
851
+ * @returns A promise that resolves to an array of prematch tournaments.
852
+ */
853
+ getPrematchTournaments(sportId: number, countryId: number, minutes?: number): Promise<GetPrematchTournament[]>;
854
+ /**
855
+ * Retrieves prematch tournaments based on the specified sport ID and minutes.
856
+ * @param sportId - The ID of the sport.
857
+ * @param minutes - The number of minutes ago for which data is to be retrieved.
858
+ * @returns A filtered list of prematch tournaments.
859
+ */
860
+ getPrematchTournamentsByMinutes(sportId?: number, minutes?: number): Promise<any>;
861
+ /**
862
+ * Retrieves the headers of prematch tournaments based on the specified sport ID and minutes.
863
+ * @param sportId The ID of the sport. Defaults to 0 if not provided.
864
+ * @param minutes - The number of minutes ago for which data is to be retrieved.
865
+ * @returns A promise that resolves to an array of tournament headers.
866
+ */
867
+ getPrematchTournamentsHeadersByMinutes(sportId?: number, minutes?: number): Promise<any>;
868
+ /**
869
+ * Retrieves prematch events based on the specified parameters.
870
+ * @param sportId - The ID of the sport.
871
+ * @param countryId - The ID of the country.
872
+ * @param tournamentId - The ID of the tournament.
873
+ * @param minutes - The number of minutes ago for which data is to be retrieved.
874
+ * @returns A Promise that resolves to an array of prematch events.
875
+ */
876
+ getPrematchEvents(sportId: number, countryId: number, tournamentId: number, minutes: number): Promise<any>;
877
+ /**
878
+ * Sets or resets the live timestamp reset flag.
879
+ *
880
+ * @param value - Whether to enable live timestamp reset. Defaults to true.
881
+ */
882
+ liveTimestampReset(value?: boolean): void;
883
+ /**
884
+ * Retrieves an array of live event headers with main bets.
885
+ * @description For interval request execution, the parameter ```this.liveTimestamp```
886
+ * stored in this class is used. After the request is executed, ```this.liveTimestamp```
887
+ * is updated from the response.
888
+ * @param requestFullEventsList - Flag indicating whether to request
889
+ * the full list of events or only changes since the previous request.
890
+ * @param events - Array of live event IDs. In this case, the selected live events are returned with all bets.
891
+ * @returns A promise that resolves to an array of live event data.
892
+ */
893
+ getLive(requestFullEventsList?: boolean, events?: (number | string)[]): Promise<ILiveDataResponce>;
894
+ /**
895
+ * Retrieves complete data on current live events without saving the timestamp.
896
+ * @returns A promise that resolves to an array of objects of type I.ILiveData.
897
+ */
898
+ private getFullLiveWithoutSaveTimeStamp;
899
+ /**
900
+ * Возвращает массив из одного полного лайв события со всеми ставками по ID .
901
+ * @param eventId - ID полного live события.
902
+ * @returns Массив с информацией о событии.
903
+ */
904
+ getLiveEventsAndFullEvent(eventId: number | string): Promise<ILiveData[]>;
905
+ /**
906
+ * Returns an array containing a single complete live event with all bets by ID.
907
+ * @param eventId - The ID of the complete live event.
908
+ * @returns An array with event information.
909
+ */
910
+ getLiveEventFull(eventId: number | string): Promise<ILiveData>;
911
+ /**
912
+ * Retrieves a pre-match event by its ID.
913
+ * @param eventId - The event identifier.
914
+ * @returns The pre-match event object.
915
+ */
916
+ getEventPrematch(eventId: number | string): Promise<any>;
917
+ verifyEmail(token: string): Promise<any>;
918
+ /**
919
+ * Registers a new user.
920
+ * @param payload - Data for registration.
921
+ * @returns A promise that resolves with the registered user data.
922
+ * @example
923
+ * ```
924
+ * const payload = {
925
+ * PartnerSiteUid: string;
926
+ * FirstName?: string;
927
+ * MiddleName?: string;
928
+ * EmailOrPhone: string;
929
+ * CurrencyId?: number; // <- Refer to Swagger !!!
930
+ * PointId?: number; // <- Refer to Swagger !!!
931
+ * Password: string;
932
+ * PasswordRepeat: string;
933
+ * UrlRedirect?: string;
934
+ * EmailSubject?: string;
935
+ * EmailBody?: string;
936
+ * EmailFrom?: string;
937
+ * ConfirmUrl?: string;
938
+ * Culture?: string;
939
+ * }
940
+ * ```
941
+ */
942
+ signUp(payload: TSignUpPayload): Promise<any>;
943
+ /**
944
+ * Registers a new user via email.
945
+ * ! NEW METHOD
946
+ * @param payload - Data for registration.
947
+ * @returns A promise that resolves with the registered user data.
948
+ * @example
949
+ * ```
950
+ * const payload = {
951
+ * "FirstName": "string",
952
+ * "MiddleName": "string",
953
+ * "EmailOrPhone": "string",
954
+ * "PointId": 0, // <- Refer to Swagger !!!
955
+ * "CurrencyId": 0, // <- Refer to Swagger !!!
956
+ * "Password": "string",
957
+ * "PasswordRepeat": "string",
958
+ * "Culture": "string",
959
+ * "EmailSubject": "string",
960
+ * "EmailFrom": "string",
961
+ * "EmailBody": "string",
962
+ * "PartnerSiteUid": "string"
963
+ * }
964
+ *
965
+ * ```
966
+ */
967
+ signUpViaEmail(payload: TSignUpPayload): Promise<any>;
968
+ /**
969
+ * Registers a new user directly in the database without confirmation.
970
+ * @param payload - Data for registration.
971
+ * @returns A promise that resolves with the registered user data.
972
+ * @deprecated use createInternetUser() method
973
+ * @example
974
+ * ```
975
+ * const payload = {
976
+ * "FirstName": "string",
977
+ * "MiddleName": "string",
978
+ * "EmailOrPhone": "string",
979
+ * "PointId": 0, // <- Refer to Swagger !!!
980
+ * "CurrencyId": 0, // <- Refer to Swagger !!!
981
+ * "Password": "string",
982
+ * "PasswordRepeat": "string",
983
+ * "Culture": "string",
984
+ * "EmailSubject": "string",
985
+ * "EmailFrom": "string",
986
+ * "EmailBody": "string",
987
+ * "PartnerSiteUid": "string"
988
+ * }
989
+ *
990
+ * ```
991
+ */
992
+ signUpDirect(payload: TSignUpPayload): Promise<any>;
993
+ /**
994
+ * Creates an internet user for the cash register directly in the database.
995
+ * @param payload - User registration parameters.
996
+ * @returns An object containing information about the result of the operation.
997
+ * @example
998
+ * const SignUpPayloadDirect: I.TSignUpPayload = {
999
+ * PartnerSiteUid: "partner.win",
1000
+ * EmailOrPhone: "380671110000", // phone number without "+"
1001
+ * PointId: 85, // <- Refer to Swagger !!!
1002
+ * CurrencyId: 85, // <- Refer to Swagger !!!
1003
+ * Password: "Password",
1004
+ * PasswordRepeat: "Password",
1005
+ * }
1006
+ */
1007
+ createInternetUser(payload: TSignUpPayload): Promise<{
1008
+ created: boolean | null;
1009
+ error: string | null;
1010
+ status: number;
1011
+ statusText: string;
1012
+ }>;
1013
+ /**
1014
+ * get a list of sports for the period
1015
+ * @param {string} from формат "DDMMYYYY"
1016
+ * @param {string} to формат "DDMMYYYY"
1017
+ * @returns
1018
+ */
1019
+ getResultsSports(from: string, to: string): Promise<any>;
1020
+ /**
1021
+ * Retrieves tournament results by sport ID.
1022
+ * @param sportId - The sport identifier.
1023
+ * @param from - The start date as a string.
1024
+ * @param to - The end date as a string.
1025
+ * @returns A list of tournament results.
1026
+ */
1027
+ getResultsTournamentsBySportId(sportId: number | string, from: string, to: string): Promise<any>;
1028
+ /**
1029
+ * Get results
1030
+ * @param {*} sportId - The sport identifier.
1031
+ * @param {*} countryId - The country identifier.
1032
+ * @param {*} tournamentId - The tournament identifier.
1033
+ * @param {*} from - The start date.
1034
+ * @param {*} to - The end date.
1035
+ * @returns The results.
1036
+ */
1037
+ getResultsGrid(sportId: number | string, countryId: number | string, tournamentId: number | string, from: string, to: string): Promise<any>;
1038
+ /**
1039
+ * Returns all games providers for the 21st game each
1040
+ */
1041
+ getGamesProvidersTopGames(): Promise<any>;
1042
+ /**
1043
+ * Retrieves the list of top game providers for games.
1044
+ * @returns {Promise<Array<any>>} The list of top game providers.
1045
+ */
1046
+ getGamesTopProviders(): Promise<Array<any>>;
1047
+ /**
1048
+ * Retrieves the list of slots.
1049
+ * @returns {Promise<Array<any>>} The list of slots.
1050
+ */
1051
+ getSlotsList(): Promise<Array<any>>;
1052
+ /**
1053
+ * Opens a session for Outcome slots
1054
+ * @deprecated
1055
+ * */
1056
+ createSlotOutcome(game_id: number | string): Promise<{}>;
1057
+ /**
1058
+ * Creates a slotintegrator DEMO.
1059
+ * @param model - The model containing the data for the slot integrator demo.
1060
+ * @returns A Promise that resolves to the parsed JSON response from the server.
1061
+ */
1062
+ createSlotIntegratorDemo(model: Record<string, unknown>): Promise<any>;
1063
+ /**
1064
+ * Initiates SlotIntegrators REAL Game
1065
+ * @example
1066
+ * ```javascript
1067
+ const model = {
1068
+ "game_uuid": "string",
1069
+ "player_id": "string",
1070
+ "player_name": "string",
1071
+ "currency": "string",
1072
+ "session_id": "string",
1073
+ "language": "string",
1074
+ }
1075
+ * ```
1076
+ */
1077
+ createSlotIntegratorReal(model: Record<string, unknown>): Promise<any>;
1078
+ /** Возвращает список провайдеров с логотипами */
1079
+ getSlotIntegratorProvidersHeaders(): Promise<any>;
1080
+ /** Retrieves all games for a given slot integrator provider.
1081
+ * @param {string} providerName - The name of the provider.
1082
+ * @returns {Promise<Array>} - A promise that resolves to an array of games.
1083
+ */
1084
+ getSlotIntegratorProviderAllGames(providerName: string): Promise<Array<any>>;
1085
+ /** Retrieves games by the given game name.
1086
+ * @param {string} gameName - The name of the provider.
1087
+ * @returns {Promise<Array>} - A promise that resolves to an array of games.
1088
+ */
1089
+ getSlotIntegratorFilteredGames(gameName: string): Promise<Array<any>>;
1090
+ /**
1091
+ * Asynchronously performs login.
1092
+ * @description If the login is successful, saves the token in the class property `token`
1093
+ * and saves the object representing the user in the class property `user`.
1094
+ * These properties are subsequently used for processing requests.
1095
+ * @param login - The user's login.
1096
+ * @param password - The user's password.
1097
+ * @returns An object representing the user if the login is successful. Otherwise, returns an empty object.
1098
+ */
1099
+ login({ login, password }: {
1100
+ login: string;
1101
+ password: string;
1102
+ }): Promise<IUser>;
1103
+ /**
1104
+ * Retrieves user data.
1105
+ * @returns User data or null if the user is not found.
1106
+ * @deprecated use this.getUserData()
1107
+ */
1108
+ getUserData_OLD(): Promise<any>;
1109
+ getUserData(): Promise<{
1110
+ data: any;
1111
+ error: string | null;
1112
+ status: number;
1113
+ statusText: string;
1114
+ }>;
1115
+ /**
1116
+ * @deprecated use this.getUserData()
1117
+ */
1118
+ getUserFullData(): Promise<{
1119
+ data: any;
1120
+ error: string | null;
1121
+ status: number;
1122
+ statusText: string;
1123
+ }>;
1124
+ /**
1125
+ * Logs the user out of the system.
1126
+ * @returns An object containing information about the success of the logout and the user's authorization status.
1127
+ */
1128
+ logout(): Promise<{
1129
+ ok: boolean;
1130
+ isLogged: any;
1131
+ }>;
1132
+ /**
1133
+ * Retrieves the user's balance.
1134
+ * @returns A promise that resolves to the user's balance.
1135
+ * @deprecated use this.getBalance();
1136
+ */
1137
+ balance(): Promise<{
1138
+ Amount: number;
1139
+ } | {}>;
1140
+ getBalance(): Promise<{
1141
+ data: string | null;
1142
+ error: string | null;
1143
+ status: number;
1144
+ statusText: string;
1145
+ }>;
1146
+ /**
1147
+ * Changes the user's password.
1148
+ * @param postBody - An object containing the data for changing the password.
1149
+ * @returns Returns `null` if the user is not authorized.
1150
+ */
1151
+ changePassword(postBody: IChangePassword): Promise<{
1152
+ ok: boolean;
1153
+ status: any;
1154
+ }>;
1155
+ /**
1156
+ * Converts a number to a GUID string.
1157
+ * It is used in the "Sslotegrator"
1158
+ * @param userId - The number to convert to a GUID.
1159
+ * @returns The GUID string.
1160
+ */
1161
+ longToGuid(userId: number): string;
1162
+ /**
1163
+ * Retrieves sports events (live & prematch) based on the provided search text.
1164
+ * @param searchText - The text to search for.
1165
+ * @returns A promise that resolves to an array of ISearchEventsData.
1166
+ */
1167
+ getSportsEventsSearch(searchText: string): Promise<ISearchEventsData[]>;
1168
+ /**
1169
+ * Retrieves the favorites from the BetBooster API.
1170
+ * @returns {Promise<any[]>} A promise that resolves to an array of favorites.
1171
+ */
1172
+ getFavorites(): Promise<any>;
1173
+ /**
1174
+ * Adds an item to the favorites list.
1175
+ * @param id - The ID of the item to add.
1176
+ * @param type - The type of the item to add. Types: 0 = "Tournament"; 1 = "Event"; 2 = "LiveEvent"; 3 = "LineEvent"; 4 = "None";
1177
+ * @returns A promise that resolves to a boolean indicating whether the item was successfully added to the favorites list.
1178
+ */
1179
+ addFavorite(id: number, type: EFavoriteType): Promise<boolean>;
1180
+ /**
1181
+ * Removes a favorite item.
1182
+ * @param favoriteId - The ID of the favorite item to be removed.
1183
+ * @returns A promise that resolves to a boolean indicating whether the removal was successful.
1184
+ */
1185
+ removeFavorite(favoriteId: number): Promise<boolean>;
1186
+ /**
1187
+ * Retrieves the user's wallets.
1188
+ * @param psType - The type of payment system (default is 5 - cashier).
1189
+ * @returns The user's wallets.
1190
+ */ getPurses(psType?: EPaymentSystemTypeEnum): Promise<any>;
1191
+ sendWithdrawal(apiPath: string, request: any): Promise<void>;
1192
+ /**
1193
+ * Sends a withdrawal request to the cashier.
1194
+ * @param payload - Parameters for the withdrawal request.
1195
+ * @returns An object with the result of the withdrawal operation.
1196
+ */
1197
+ sendWithdrawalAgent(payload: IPayloadWithdrawal): Promise<{
1198
+ ok: boolean;
1199
+ balance: number;
1200
+ userOrders: any;
1201
+ status?: undefined;
1202
+ } | {
1203
+ ok: boolean;
1204
+ status: any;
1205
+ balance?: undefined;
1206
+ userOrders?: undefined;
1207
+ }>;
1208
+ /**
1209
+ * Cancels a requested withdrawal transaction.
1210
+ * @param payload - Parameters for canceling the requested transaction.
1211
+ * @returns An object with information about the success of the transaction cancellation and the user's balance.
1212
+ */
1213
+ cancelOrderedTransaction(payload: IPayloadCancelOrderedTransaction): Promise<{
1214
+ ok: boolean;
1215
+ status: number;
1216
+ balance?: undefined;
1217
+ userOrders?: undefined;
1218
+ } | {
1219
+ ok: boolean;
1220
+ balance: number;
1221
+ userOrders: any;
1222
+ status?: undefined;
1223
+ }>;
1224
+ /**
1225
+ * Obtains information on cash flow.
1226
+ * @param payload - Query Parameters.
1227
+ * @returns An object with the result of the query.
1228
+ */
1229
+ getMovementOfMoney(payload: IGetMovementOfMoneyPayload): Promise<TGetMovementOfMoney>;
1230
+ /**
1231
+ * Retrieves a list of ordered transactions.
1232
+ *
1233
+ * @returns Ordered transactions or an empty array if the user is not authorized.
1234
+ */
1235
+ getOrderedTransactions(): Promise<any>;
1236
+ /**
1237
+ * Retrieves the content of a bet by betId.
1238
+ * @param betId - The bet identifier.
1239
+ * @returns The content of the bet.
1240
+ */
1241
+ getBetContent(betId: number): Promise<any>;
1242
+ /**
1243
+ * Retrieves user bets.
1244
+ * @param payload - Request parameters.
1245
+ * @returns A promise that resolves with the result of the request.
1246
+ * @note The page size should not exceed 20 rows per page.
1247
+ * @deprecated Use the getUserBets02 method.
1248
+ */
1249
+ getUserBets(payload: TGetUserBetsPayload): Promise<any>;
1250
+ /**
1251
+ * Retrieves user bets.
1252
+ * @param payload - Request parameters.
1253
+ * @returns A promise that resolves with the result of the request.
1254
+ * @note The page size should not exceed 20 rows per page.
1255
+ */
1256
+ getUserBets02(payload: TGetUserBetsPayload): Promise<{
1257
+ data: any;
1258
+ error: string | string[] | null;
1259
+ status: number;
1260
+ statusText: string;
1261
+ }>;
1262
+ /**
1263
+ * Retrieves the odds data for editing based on the provided payload.
1264
+ *
1265
+ * @param payload - The extended bet slip information required to fetch odds for editing.
1266
+ * @returns A promise that resolves to an object containing the data, any errors, and the HTTP response status information.
1267
+ */
1268
+ getOddsForEdit(payload: TAddBetslip): Promise<{
1269
+ data: any;
1270
+ error: string | string[] | null;
1271
+ status: number;
1272
+ statusText: string;
1273
+ }>;
1274
+ /**
1275
+ * Edits an existing coupon with the provided payload.
1276
+ *
1277
+ * @param payload - The coupon data to be edited, conforming to the `I.TCouponEdited` interface.
1278
+ * @returns A promise that resolves to an object containing:
1279
+ * - `data`: The response data from the API.
1280
+ * - `error`: Any error messages returned by the API, either as a string or an array of strings. Can be `null` if no errors occurred.
1281
+ * - `status`: The HTTP status code of the response.
1282
+ * - `statusText`: The HTTP status text corresponding to the status code.
1283
+ */
1284
+ placeCouponEdited(payload: TCouponEdited): Promise<{
1285
+ data: any;
1286
+ error: string | string[] | null;
1287
+ status: number;
1288
+ statusText: string;
1289
+ }>;
1290
+ /**
1291
+ * Retrieves the cashout information for the specified user bets.
1292
+ *
1293
+ * @param BetIds - An array of bet IDs for which to check the cashout information.
1294
+ * @returns A promise that resolves to an object containing the data, error, status, and statusText.
1295
+ * - data: The response data from the API.
1296
+ * - error: Any error message(s) returned by the API, or null if no errors occurred.
1297
+ * - status: The HTTP status code of the response.
1298
+ * - statusText: The HTTP status text of the response.
1299
+ */
1300
+ getUserBetsCashout(BetIds: number[]): Promise<{
1301
+ data: any;
1302
+ error: string | string[] | null;
1303
+ status: number;
1304
+ statusText: string;
1305
+ }>;
1306
+ /**
1307
+ * Processes a cashout return bet request.
1308
+ * @param payload - The cashout bet parameters
1309
+ * @param payload.betId - The ID of the bet to cash out
1310
+ * @param payload.cashOutAmount - The amount to cash out
1311
+ * @param payload.DoAcceptOddsChanges - Whether to accept odds changes
1312
+ * @returns A promise containing response data, error information, HTTP status code and status text
1313
+ * @returns {data} The response data from the API
1314
+ * @returns {error} Error message(s) if any occurred, null otherwise
1315
+ * @returns {status} HTTP status code
1316
+ * @returns {statusText} HTTP status message
1317
+ */
1318
+ returnCashoutBet(payload: {
1319
+ betId: number;
1320
+ cashOutAmount: number;
1321
+ DoAcceptOddsChanges: boolean;
1322
+ }): Promise<{
1323
+ data: any;
1324
+ error: string | string[] | null;
1325
+ status: number;
1326
+ statusText: string;
1327
+ }>;
1328
+ /**
1329
+ * Creates a coupon for placing a bet.
1330
+ * @param betslip - An array with information about the bets.
1331
+ * @param amount - The bet amount.
1332
+ * @param acceptChangeCoefs - A flag indicating whether to accept changes in coefficients.
1333
+ * @param systemIndex - The size of the system (e.g., for 3 events with 2 combinations, pass 2). Default value: -1 (if not a system).
1334
+ * @returns The created coupon for placing a bet.
1335
+ */
1336
+ createCoupon(betslip: any[], amount: number, acceptCahngeCoefs: boolean, systemIndex?: number): TPlaceBetPayload;
1337
+ /**
1338
+ * Places a bet.
1339
+ * @param payload - Parameters for placing the bet.
1340
+ * @returns The result of placing the bet.
1341
+ */
1342
+ placeCoupon(payload: TPlaceBetPayload): Promise<any>;
1343
+ /**
1344
+ * Places a bet on behalf of BetShop.
1345
+ * @param payload - Parameters for placing the bet.
1346
+ * @returns The result of placing the bet.
1347
+ */
1348
+ placeCouponBetShop(payload: TPlaceBetPayload): Promise<any>;
1349
+ /**
1350
+ * Checks the status of a bet by coupon number.
1351
+ * Used for BetShop when users try to check
1352
+ * whether the bet won or lost.
1353
+ * @param {string} couponCode - The coupon number.
1354
+ * @returns The result of the bet.
1355
+ */
1356
+ getBetShopCouponByCode(couponCode: string): Promise<{
1357
+ data: any;
1358
+ error: string | null;
1359
+ status: number;
1360
+ statusText: string;
1361
+ } | undefined>;
1362
+ /**
1363
+ * Checks if a user with the specified login exists.
1364
+ * @param login - The user's login.
1365
+ * @returns A promise that resolves with the result of the check.
1366
+ */
1367
+ loginIsExist(login: string): Promise<any>;
1368
+ /**
1369
+ * Checks if the specified email exists in the system.
1370
+ * @param email - The email to check.
1371
+ * @returns A promise that resolves with the result of the check.
1372
+ */
1373
+ emailIsExist(email: string): Promise<any>;
1374
+ /**
1375
+ * Updates the user's personal data.
1376
+ * @param personalData - An object containing the user's personal data.
1377
+ * @returns Returns true if the data was successfully updated, otherwise returns false.
1378
+ */
1379
+ changePersonalData(personalData: TPersonalData): Promise<boolean>;
1380
+ /**
1381
+ * Retrieves all messages.
1382
+ * @param page - The page number.
1383
+ * @param pageSize - The page size.
1384
+ * @returns An array of messages.
1385
+ */
1386
+ getMessagesAll({ page, pageSize }: {
1387
+ page: number | string;
1388
+ pageSize: number | string;
1389
+ }): Promise<any>;
1390
+ /**
1391
+ * Retrieves a message by its identifier.
1392
+ * @param id - The message identifier.
1393
+ * @returns The message object or an empty object if the message is not found.
1394
+ */
1395
+ getMessageById(id: number): Promise<any>;
1396
+ /**
1397
+ * Sends a message to a user.
1398
+ * @param {Object} params - Parameters for sending the message.
1399
+ * @param {number} params.ToUserId - The identifier of the user to whom the message is sent.
1400
+ * @param {string} params.Text - The text of the message.
1401
+ * @param {string} params.Subject - The subject of the message.
1402
+ * @param {number} params.ParentId - The identifier of the parent message (if any).
1403
+ * @returns {Promise<any>} - A promise that resolves with the result of sending the message or null if sending is not possible.
1404
+ */
1405
+ sensMessage({ ToUserId, Text, Subject, ParentId }: {
1406
+ ToUserId: number;
1407
+ Text: string;
1408
+ Subject: string;
1409
+ ParentId: number;
1410
+ }): Promise<any>;
1411
+ /**
1412
+ * Marks a message as read.
1413
+ *
1414
+ * @param {Object} params - Request parameters.
1415
+ * @param {number} params.MessageId - The message identifier.
1416
+ * @param {number} params.MessageTypeId - The message type identifier.
1417
+ * @returns {Promise<any>} - A promise that resolves with the result of the request or null if the user is not authorized.
1418
+ */
1419
+ markMessageAsRead({ MessageId, MessageTypeId }: {
1420
+ MessageId: number;
1421
+ MessageTypeId: number;
1422
+ }): Promise<any>;
1423
+ /**
1424
+ * Deletes a message by the specified message ID and type.
1425
+ * @param {Object} params - Parameters for deleting the message.
1426
+ * @param {number} params.MessageId - The message identifier.
1427
+ * @param {number} params.MessageTypeId - The message type identifier.
1428
+ * @returns {Promise<{ Result: boolean; Id: number } | null>} - An object containing the result of the deletion and the ID of the deleted message, or null if the deletion failed.
1429
+ */
1430
+ deleteMessage({ MessageId, MessageTypeId }: {
1431
+ MessageId: number;
1432
+ MessageTypeId: number;
1433
+ }): Promise<{
1434
+ Result: boolean;
1435
+ Id: number;
1436
+ } | null>;
1437
+ /**
1438
+ * Deletes all messages.
1439
+ * @returns A promise that resolves to true, false, or null.
1440
+ */
1441
+ deleteMessagesAll(): Promise<true | false | null>;
1442
+ /**
1443
+ * Retrieves the number of messages.
1444
+ * @returns An object containing the count of all messages, mass messages, and personal messages.
1445
+ * If the user is not authorized, returns null.
1446
+ */
1447
+ getMessagesCount(): Promise<{
1448
+ All: number;
1449
+ Mass: number;
1450
+ Personal: number;
1451
+ } | null>;
1452
+ /**
1453
+ * Retrieves the number of unread messages.
1454
+ * @returns The number of unread messages or null if the user is not authorized.
1455
+ */
1456
+ getMessagesUnreadCount(): Promise<number | null>;
1457
+ /** Checks if the user exists in the temporary table */
1458
+ isUserTempExist(userName: string): Promise<boolean | null>;
1459
+ /**
1460
+ * Creates a user only in the temporary table.
1461
+ */
1462
+ createUserTemp(payload: any): Promise<boolean | null>;
1463
+ /**
1464
+ * Returns a list of GoldenRace games.
1465
+ */
1466
+ getGamesListGR(payload?: TGetGameListGoldenRacePayload): Promise<{
1467
+ data: any[] | null;
1468
+ error: string | null;
1469
+ status: number;
1470
+ statusText: string;
1471
+ }>;
1472
+ /**
1473
+ * Asynchronous method to get the GoldenRace game frame.
1474
+ *
1475
+ * @param payload - An object with parameters for the request.
1476
+ * @param payload.game - The game identifier. gameId is a required parameter.
1477
+ * @param payload.backurl - The URL to which the game redirects in case of an unexpected error or is used for client configurations such as the lobby URL for mobile games. Required parameter.
1478
+ * @param payload.mode - The game mode: 0 for virtual (fun) or 1 for real. Default: 1.
1479
+ * @param payload.language - The language code in ISO 639-1 alpha-2 format for loading localization. Default: "en".
1480
+ * @param payload.clientPlatform - The platform from which the game was launched: "desktop" or "mobile". Specify "mobile" if you want to open the mobile client of the game. Default: "desktop".
1481
+ * @param payload.group - The user group. In the configuration, this is essentially the cashier number. Required parameter.
1482
+ * @returns An object with response data, error (if any), status, and status text.
1483
+ */
1484
+ getGameFrameUrlGR(payload: TGetGameFrameGoldenRacePayload): Promise<{
1485
+ data: string | null;
1486
+ error: string | null;
1487
+ status: number;
1488
+ statusText: string;
1489
+ }>;
1490
+ pingApi(): Promise<{
1491
+ data: IApiResponse<any> | null;
1492
+ error: string | null;
1493
+ status: number;
1494
+ statusText: string;
1495
+ }>;
1496
+ intgrGetGamesList(payload: IIntgrGetGamesListPayload): Promise<{
1497
+ data: any[] | null;
1498
+ error: string | null;
1499
+ status: number;
1500
+ statusText: string;
1501
+ }>;
1502
+ intgrGetGameTypes(groupId: number | string): Promise<{
1503
+ data: any[] | null;
1504
+ error: string | null;
1505
+ status: number;
1506
+ statusText: string;
1507
+ }>;
1508
+ intgrGetProvidersList(groupId: number | string): Promise<{
1509
+ data: any[] | null;
1510
+ error: string | null;
1511
+ status: number;
1512
+ statusText: string;
1513
+ }>;
1514
+ intgrGetTopGames(groupId: number | string): Promise<{
1515
+ data: any[] | null;
1516
+ error: string | null;
1517
+ status: number;
1518
+ statusText: string;
1519
+ }>;
1520
+ intgrInitGame(payload: IIntgrInitGamePayload): Promise<{
1521
+ data: any[] | null;
1522
+ error: string | null;
1523
+ status: number;
1524
+ statusText: string;
1525
+ }>;
1526
+ checkPromocode(promocode: string): Promise<void>;
1527
+ activatePromocode(promocode: any): Promise<void>;
1528
+ /**
1529
+ * @example
1530
+ * ```
1531
+ const payload = {
1532
+ "isphone": this.typeLogin.phone,
1533
+ "login": clearLogin,
1534
+ }
1535
+ * ```
1536
+ */
1537
+ sendSms(payload: {
1538
+ isphone: string;
1539
+ login: string;
1540
+ }): Promise<void>;
1541
+ signUpPhone(request: any): Promise<void>;
1542
+ passwordRecoveryRequest(post: any): Promise<void>;
1543
+ passwordRecoveryEmail(email: string): Promise<void>;
1544
+ passwordSetNewByPhone(request: any): Promise<void>;
1545
+ passwordSetNewByEmail(request: any): Promise<void>;
1546
+ signUpEmail(request: any): Promise<void>;
1547
+ getUserPersonalInfo(): Promise<void>;
1548
+ sendPayment(apiPath: string, request: any): Promise<void>;
1549
+ setUserPersonalInfo(request: any): Promise<void>;
1550
+ getGamesToken(sToken: any): Promise<void>;
1551
+ getProviderHedlines(providerHash: string): Promise<void>;
1552
+ createTempSignUp({ login, password }: {
1553
+ login: string;
1554
+ password: string;
1555
+ }): Promise<void>;
1556
+ setRemoteLanguage(lang?: string): Promise<any>;
1557
+ /**
1558
+ * Converts bonuses to an array.
1559
+ * @param bonus - An object containing bonuses.
1560
+ * @returns An array of bonuses.
1561
+ */
1562
+ convertBonuses(bonus: Record<string, any>): any[];
1563
+ /**
1564
+ * Retrieves ticket information.
1565
+ * @description Requires authorization.
1566
+ * @returns {Promise<Betslip | null>} An object with ticket information or null if the token is not set.
1567
+ * @example
1568
+ * ```typescript
1569
+ {
1570
+ BetslipType: 0,
1571
+ Bets: [],
1572
+ RecommendedAmount: 0,
1573
+ bonuses: [
1574
+ [ 'Koef', 9, 1.01 ],
1575
+ [ 'Koef', 20, 1.02 ],
1576
+ [ 'Koef', 50, 1.03 ],
1577
+ [ 'Koef', 100, 1.04 ],
1578
+ [ 'Koef', 200, 1.05 ],
1579
+ [ 'Koef', 500, 1.06 ],
1580
+ [ 'Kolvo', 5, 1.01 ],
1581
+ [ 'Kolvo', 9, 1.02 ],
1582
+ [ 'Kolvo', 22, 1.03 ],
1583
+ [ 'Kolvo', 11, 1.04 ],
1584
+ [ 'Kolvo', 13, 1.05 ],
1585
+ [ 'Kolvo', 15, 1.06 ],
1586
+ [ 'Perestavka', true, 1.03 ],
1587
+ [ 'MinOdds', true, 1.02 ]
1588
+ ]
1589
+ }
1590
+ * ```
1591
+ @deprecated
1592
+ */
1593
+ getBetslip_OLD(): Promise<any>;
1594
+ getBetslip(): Promise<any>;
1595
+ /**
1596
+ * Clears the bet slip.
1597
+ * @returns A promise that resolves to a boolean indicating the success of the operation.
1598
+ */
1599
+ clearBetslip(): Promise<boolean>;
1600
+ /**
1601
+ * Changes the type of the bet slip.
1602
+ * @param betslipType - The type of the bet slip.
1603
+ * @returns Returns true if the bet slip type was successfully changed, otherwise returns false.
1604
+ */
1605
+ changeBetslipType(betslipType: EBetslipType): Promise<boolean>;
1606
+ /**
1607
+ * Sets the bet slip settings.
1608
+ * @param betslipSettings - The bet slip settings.
1609
+ * @returns An array of results or an empty array if the user is not authorized.
1610
+ */
1611
+ setBetslipSettings(betslipSettings: TBetslipSettings): Promise<any>;
1612
+ /**
1613
+ * Adds a bet to the bet slip.
1614
+ * @param basket - The basket containing bet information.
1615
+ * @returns The result of the add operation to the bet slip or null if the operation failed.
1616
+ */
1617
+ addToBetslip(basket: TAddBetslip): Promise<any>;
1618
+ /**
1619
+ * Removes a bet from the bet slip.
1620
+ * @param basket - An object containing information about the bet slip.
1621
+ * @returns Returns true if the item was successfully removed, otherwise returns false.
1622
+ */
1623
+ removeFromBetslip(basket: TAddBetslip): Promise<any>;
1624
+ /**
1625
+ * Removes a bonus from the bet slip.
1626
+ * @returns {Promise<boolean>} Returns true if the bonus was successfully removed, otherwise returns false.
1627
+ */
1628
+ removeBonus(): Promise<boolean>;
1629
+ /**
1630
+ * Adds a bonus to the bet slip.
1631
+ * @param odd - The coefficient to which the bonus is added.
1632
+ * @returns The result of the operation or null if the result is undefined.
1633
+ */
1634
+ addBonus(odd: number): Promise<any>;
1635
+ /**
1636
+ * Updates a bet in the bet slip.
1637
+ * @param basket - The basket containing bet information.
1638
+ * @returns Returns true if the bet was successfully updated, otherwise returns false.
1639
+ */
1640
+ updateBet(basket: TAddBetslip): Promise<boolean>;
1641
+ /**
1642
+ * Retrieves bet limits.
1643
+ * @returns An object with the minimum and maximum bet limits.
1644
+ * @deprecated use api.getBetsLimitsNew();
1645
+ */
1646
+ getBetsLimits(): Promise<any>;
1647
+ /**
1648
+ * Retrieves bet limits.
1649
+ * @returns An object with the minimum and maximum bet limits.
1650
+ */
1651
+ getBetsLimitsNew(): Promise<{
1652
+ data: any;
1653
+ error: string | null;
1654
+ status: number;
1655
+ statusText: string;
1656
+ } | {
1657
+ data: {
1658
+ Min: number;
1659
+ Max: number;
1660
+ MaxOddForMulty: number;
1661
+ };
1662
+ status: number;
1663
+ statusText: string;
1664
+ }>;
1665
+ /**
1666
+ * Retrieves a list of available currencies (essentially a list of cash registers).
1667
+ * @returns A list of available currencies.
1668
+ */
1669
+ getCurrencies(): Promise<any>;
1670
+ /**
1671
+ * Retrieves a list of countries.
1672
+ * @returns A list of countries or null if the user is not authorized.
1673
+ */
1674
+ getCountries(): Promise<any>;
1675
+ getAllKeys(key: string): Promise<any>;
1676
+ /**
1677
+ * Fetches slides data from a predefined URL.
1678
+ *
1679
+ * @returns {Promise<string | null>} A promise that resolves to the slides data as a string, or null if an error occurs.
1680
+ *
1681
+ * @throws {Error} If the request fails or the response status is not successful.
1682
+ */
1683
+ getSlides(target?: string): Promise<{
1684
+ data: string | null;
1685
+ error: string | null;
1686
+ status: number;
1687
+ statusText: string;
1688
+ }>;
1689
+ /**
1690
+ * Fetches event statistic data for a given event ID.
1691
+ *
1692
+ * @param {number} brEventId - The ID of the event for which to fetch statistics.
1693
+ * @returns {Promise<any | null>} A promise that resolves to the event statistic data or null if an error occurs.
1694
+ */
1695
+ getEventStatisticData(brEventId: number): Promise<{
1696
+ data: any;
1697
+ error: string | null;
1698
+ status: number;
1699
+ statusText: string;
1700
+ }>;
1701
+ /**
1702
+ * Retrieves the statistics page for a specific event.
1703
+ * @param brEventId - The unique identifier for the betting radar event.
1704
+ * @returns {Promise<string | null>} A promise that resolves to the event statistics page content or null.
1705
+ * @throws {Error} If the request fails or returns an invalid response.
1706
+ */
1707
+ getEventStatisticPage(brEventId: number): Promise<{
1708
+ data: string | null;
1709
+ error: string | null;
1710
+ status: number;
1711
+ statusText: string;
1712
+ }>;
1713
+ /**
1714
+ * Searches for prematch events using the NV20 API.
1715
+ *
1716
+ * @param searchString - The search string to query events.
1717
+ * (Note: that all words containing cvr and words with one letter are removed from the searchString)
1718
+ * @param options - Optional parameters to refine the search.
1719
+ * @param options.LIMIT - Specifies the number of results to return. Defaults to `{ from: 0, size: 30 }` if not provided.
1720
+ * @param options.negativeString - Excludes results containing this string.
1721
+ * @param options.sportId - Filters events by the specified sport ID.
1722
+ * @param options.tournamentId - Filters events by the specified tournament ID.
1723
+ * @returns A promise that resolves with the search results or `null` if the request fails.
1724
+ */
1725
+ searchPrematchEventsNv20(searchString: string, options?: RedisPrematchSearchParams): Promise<{
1726
+ data: any;
1727
+ error: string | null;
1728
+ status: number;
1729
+ statusText: string;
1730
+ }>;
1731
+ searchPrematchTournametsEventsNv20(searchString: string, options?: RedisPrematchSearchParams): Promise<{
1732
+ data: any;
1733
+ error: string | null;
1734
+ status: number;
1735
+ statusText: string;
1736
+ }>;
1737
+ /**
1738
+ * Sends error information to the specified endpoint.
1739
+ *
1740
+ * @param text - The error message text.
1741
+ * @param code - The error code.
1742
+ * @returns A promise that resolves to a string or null based on the response.
1743
+ */
1744
+ sendErrInfo(text: string, code: string): Promise<{
1745
+ data: boolean | null;
1746
+ error: string | null;
1747
+ status: number;
1748
+ statusText: string;
1749
+ }>;
1750
+ cloneBetCoupon(payload: {
1751
+ betId?: number | null;
1752
+ code?: string | number | null;
1753
+ culture?: string | null;
1754
+ }): Promise<{
1755
+ data: any;
1756
+ error: string | null;
1757
+ status: number;
1758
+ statusText: string;
1759
+ }>;
1760
+ getAllBanners(): Promise<any>;
1761
+ depositBetKiosk(amount: number): Promise<{
1762
+ data: boolean | null;
1763
+ error: string | null;
1764
+ status: number;
1765
+ statusText: string;
1766
+ }>;
1767
+ getFaq(): Promise<any>;
1768
+ getFlatpagesList(): Promise<any>;
1769
+ test3(): Promise<string>;
1770
+ sellBet(data: any): Promise<void>;
1771
+ /** Конвертирует различные представления корзины в единый формат
1772
+ * @param betslipItem - элемент корзины
1773
+ */
1774
+ convertBasketToPost(betslipItem: IBetslipItems): IAddToBasket;
1775
+ }
1776
+
1777
+ export {};