@opexa/portal-sdk 0.8.2 → 0.10.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 +1623 -1623
- package/dist/index.cjs +52 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +52 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -237,6 +237,7 @@ interface SecurityQuestionAuthenticateInput$1 {
|
|
|
237
237
|
secretAnswer: string;
|
|
238
238
|
}
|
|
239
239
|
type AuthenticateError$1 = 'InvalidTokenOrSecretAnswerError';
|
|
240
|
+
type CreateSignleUseTokenError = 'InvalidTokenError';
|
|
240
241
|
interface TextField$1 {
|
|
241
242
|
id: string;
|
|
242
243
|
type: 'text';
|
|
@@ -435,8 +436,8 @@ interface MayaSignInInput {
|
|
|
435
436
|
type: 'MAYA';
|
|
436
437
|
sessionId: string;
|
|
437
438
|
}
|
|
438
|
-
interface
|
|
439
|
-
type: '
|
|
439
|
+
interface SingleUseTokenSignInInput {
|
|
440
|
+
type: 'SINGLE_USE_TOKEN';
|
|
440
441
|
token: string;
|
|
441
442
|
}
|
|
442
443
|
type MayaSignInReturn = OperationResult<SignInError>;
|
|
@@ -445,7 +446,7 @@ type MobileNumberSignInReturn = OperationResult<SignInError>;
|
|
|
445
446
|
type TokenSignInReturn = OperationResult<SignInError>;
|
|
446
447
|
type SocialsSignInReturn = OperationResult<SignInError>;
|
|
447
448
|
type CabinetSignInReturn = OperationResult<SignInError>;
|
|
448
|
-
type
|
|
449
|
+
type SingleUseTokenSignInReturn = OperationResult<SignInError>;
|
|
449
450
|
type NameAndPasswordSignInReturn = OperationResult<SignInError, {
|
|
450
451
|
'2FAEnabled': true;
|
|
451
452
|
authenticator: Authenticator;
|
|
@@ -453,9 +454,9 @@ type NameAndPasswordSignInReturn = OperationResult<SignInError, {
|
|
|
453
454
|
'2FAEnabled': false;
|
|
454
455
|
authenticator?: never;
|
|
455
456
|
}>;
|
|
456
|
-
type SignInInput = NameAndPasswordSignInInput | MobileNumberSignInInput | MayaSignInInput | TokenSignInInput | SocialsSignInInput | CabinetSignInInput |
|
|
457
|
+
type SignInInput = NameAndPasswordSignInInput | MobileNumberSignInInput | MayaSignInInput | TokenSignInInput | SocialsSignInInput | CabinetSignInInput | SingleUseTokenSignInInput;
|
|
457
458
|
type SignInError = UnionAlias<CreateSessionError>;
|
|
458
|
-
type SignInReturn = NameAndPasswordSignInReturn | MobileNumberSignInReturn | MayaSignInReturn | TokenSignInReturn | SocialsSignInReturn | CabinetSignInReturn |
|
|
459
|
+
type SignInReturn = NameAndPasswordSignInReturn | MobileNumberSignInReturn | MayaSignInReturn | TokenSignInReturn | SocialsSignInReturn | CabinetSignInReturn | SingleUseTokenSignInReturn;
|
|
459
460
|
type RefreshSessionError = UnionAlias<RefreshSessionError$1>;
|
|
460
461
|
interface SecurityQuestionAuthenticateInput extends SecurityQuestionAuthenticateInput$1 {
|
|
461
462
|
}
|
|
@@ -473,6 +474,8 @@ interface WatchSessionInput {
|
|
|
473
474
|
onInvalid: () => void | Promise<void>;
|
|
474
475
|
}
|
|
475
476
|
type ValidateMayaSessionReturn = OperationResult;
|
|
477
|
+
type CreateSingleUseTokenError = UnionAlias<CreateSignleUseTokenError>;
|
|
478
|
+
type CreateSingleUseTokenReturn = OperationResult<CreateSingleUseTokenError, string>;
|
|
476
479
|
type File = {
|
|
477
480
|
id: string;
|
|
478
481
|
url?: never;
|
|
@@ -1499,12 +1502,13 @@ declare class Sdk {
|
|
|
1499
1502
|
signIn(input: TokenSignInInput): Promise<TokenSignInReturn>;
|
|
1500
1503
|
signIn(input: SocialsSignInInput): Promise<SocialsSignInReturn>;
|
|
1501
1504
|
signIn(input: CabinetSignInInput): Promise<CabinetSignInReturn>;
|
|
1502
|
-
signIn(input:
|
|
1505
|
+
signIn(input: SingleUseTokenSignInInput): Promise<SingleUseTokenSignInReturn>;
|
|
1503
1506
|
authenticate(input: AuthenticateInput): Promise<AuthenticateReturn>;
|
|
1504
1507
|
signOut(): Promise<void>;
|
|
1505
1508
|
watchSession(input: WatchSessionInput): () => void;
|
|
1506
1509
|
session(): Promise<SessionReturn>;
|
|
1507
1510
|
validateMayaSession(): Promise<ValidateMayaSessionReturn>;
|
|
1511
|
+
createSingleUseToken(): Promise<CreateSingleUseTokenReturn>;
|
|
1508
1512
|
site(): Promise<SiteReturn>;
|
|
1509
1513
|
/** @deprecated */
|
|
1510
1514
|
platform(): Promise<PlatformReturn>;
|
|
@@ -1596,4 +1600,4 @@ declare class Sdk {
|
|
|
1596
1600
|
private formatYmd;
|
|
1597
1601
|
}
|
|
1598
1602
|
|
|
1599
|
-
export { type Account, type AccountReturn, type AccountStatus, type AccountVerificationStatus, type ActivityRecord, type ActivityRecordType, type ActivityRecordsInput, type ActivityRecordsReturn, type Announcement, type AnnouncementStatus, type AnnouncementType, type AnnouncementsInput, type AnnouncementsReturn, type AuthenticateError, type AuthenticateInput, type AuthenticateReturn, type Authenticator, type AvailablePromosReturn, type AvailableQuestsReturn, type Bank, type BankDeposit, type BankWithdrawalRecord, type BetRecord, type BetRecordStatus, type BetRecordsInput, type BetRecordsReturn, type
|
|
1603
|
+
export { type Account, type AccountReturn, type AccountStatus, type AccountVerificationStatus, type ActivityRecord, type ActivityRecordType, type ActivityRecordsInput, type ActivityRecordsReturn, type Announcement, type AnnouncementStatus, type AnnouncementType, type AnnouncementsInput, type AnnouncementsReturn, type AuthenticateError, type AuthenticateInput, type AuthenticateReturn, type Authenticator, type AvailablePromosReturn, type AvailableQuestsReturn, type Bank, type BankDeposit, type BankWithdrawalRecord, type BetRecord, type BetRecordStatus, type BetRecordsInput, type BetRecordsReturn, type Bonus, type BonusReturn, type BonusesReturn, type CabinetSignInInput, type CabinetSignInReturn, type Cashback, type CashbackBonus, type CashbackBonusReturn, type CashbackStatus, type CashbacksReturn, type CheckInDailyQuestReturn, type ClaimCashbackBonusError, type ClaimCashbackBonusReturn, type ClaimRewardError, type ClaimRewardReturn, type ClaimSpotBonusReturn, type CompleteOnboardingInput, type CompleteOnboardingReturn, type CompoundField, type CreateAIOInstapayWithdrawalInput, type CreateAIOOnlineBankDepositInput, type CreateAIOQRPHDepositInput, type CreateAccountError, type CreateAccountInput, type CreateAccountInput__Next, type CreateAccountReturn, type CreateBankWithdrawalInput, type CreateDepositError, type CreateDepositInput, type CreateDepositReturn, type CreateGCashDepositInput, type CreateGCashWithdrawalInput, type CreateGameSessionByIdInput, type CreateGameSessionByReferenceInput, type CreateGameSessionError, type CreateGameSessionInput, type CreateGameSessionReturn, type CreateManualBankDepositInput, type CreateManualBankWithdrawalInput, type CreateManualUPIDepositInput, type CreateManualUPIWithdrawalInput, type CreateMayaAppDepositInput, type CreateMayaAppWithdrawalInput, type CreateMayaDepositInput, type CreateMayaWithdrawalInput, type CreateSingleUseTokenError, type CreateSingleUseTokenReturn, type CreateWithdrawalError, type CreateWithdrawalInput, type CreateWithdrawalReturn, type Currency, type DeleteAccountReturn, type Deposit, type DepositRecord, type DepositRecordsInput, type DepositRecordsReturn, type DepositReturn, type DepositStatus, type DepositType, type DepositsCountReturn, type DownlinesByNameInput, type DownlinesByNameReturn, type EndGameSessionReturn, type FCMDeviceType, type FavoriteGamesReturn, type Field, type FieldType, type File, type FileReturn, type GCashDeposit, type GCashWithdrawalRecord, type Game, type GameProvider, type GameReturn, type GameSession, type GameSessionReturn, type GameSessionStatus, type GameTag, type GameType, type GamesInput, type GamesInput__Next, type GamesReturn, type GatewaySettings, type HttpError, type ImageField, type InstapayBank, type InstapayBankListReturn, type InstapayBankType, type InstapayWithdrawalRecord, type Jackpot, type JackpotPayout, type JackpotPayoutsInput, type JackpotPayoutsReturn, type JackpotStatus, type JackpotsInput, type JackpotsReturn, type KnownDepositError, type LatestBetRecord, type LatestBetRecordsReturn, type Locale, type ManualBankDeposit, type ManualBankWithdrawalRecord, type ManualDeposit, type ManualUPIDeposit, type ManualUPIWithdrawalRecord, type ManualWithdrawalRecord, type MarkAllMessagesAsReadReturn, type MarkGameAsFavoriteInput, type MarkGameAsFavoriteReturn, type MarkMessageAsReadReturn, type MayaAppDeposit, type MayaDeposit, type MayaSignInInput, type MayaSignInReturn, type MayaWithdrawalRecord, type MemberStatus, type Message, type MessageAction, type MessageIcon, type MessagesInput, type MessagesReturn, type MobileNumberCreateAccountInput, type MobileNumberInrCreateAccountInput, type MobileNumberSignInInput, type MobileNumberSignInReturn, type MultiSelectField, type NameAndPasswordCreateAccountInput, type NameAndPasswordSignInInput, type NameAndPasswordSignInReturn, type NameCreateAccountInput, ObjectType, type OnboardingPlayerExperience, type OnboardingStatus, type OnboardingStatusReturn, type OnlineBankDeposit, type OperationError, type OperationResult, type PaymentSettings, type PaymentSettingsReturn, type Platform, type PlatformReturn, type PlatformReturn__Next, type Platform__Next, type PointsClubSettings, type PointsClubSettingsReturn, type PointsWallet, type PointsWalletReturn, type PointsWalletTransaction, type PointsWalletTransactionType, type PointsWalletTransactionsInput, type PointsWalletTransactionsReturn, type ProfileCompletion, type ProfileCompletionReturn, type Promo, type PromoByCodeReturn, type PromoStatus, type PromoType, type PromosReturn, type QRPHDeposit, type Quest, type QuestProgram, type QuestProgramStatus, type QuestStatus, type QuestType, type RecommendedGamesInput, type RecommendedGamesReturn, type RedeemPointsError, type RedeemPointsInput, type RedeemPointsReturn, type Referral, type ReferralCodeReturn, type ReferralCommission, type ReferralCommissionReturn, type ReferralsInput, type ReferralsReturn, type RefreshSessionError, type RegisterFCMDeviceInput, type RegisterFCMDeviceReturn, type RegisterMayaAccountError, type RegisterMayaAccountInput, type RegisterMayaAccountReturn, type RemainingDailyWithdrawalsCountReturn, type ResetPasswordError, type ResetPasswordInput, type ResetPasswordReturn, type RichTextField, Sdk, type SdkConfig, type SecretQuestion, type SecurityQuestionAuthenticateInput, type SecurityQuestionAuthenticator, type SelectField, type SendEmailVerificationCodeInput, type SendSmsVerificationCodeInput, type SendVerificationCodeError, type SendVerificationCodeError__Next, type SendVerificationCodeInput__Next, type SendVerificationCodeReturn, type SendVerificationCodeReturn__Next, type Session, type SessionError, type SessionReturn, type SignInError, type SignInInput, type SignInReturn, type SingleUseTokenSignInInput, type SingleUseTokenSignInReturn, type Site, type SiteReturn, type SkipOnboardingReturn, type SocialsSignInInput, type SocialsSignInReturn, type SpotBonusPromo, type SubmitVerificationDetailsInput, type SubmitVerificationDetailsReturn, type SubmitVerificationError, type TextField, type ToggleField, type TokenSignInInput, type TokenSignInReturn, type TopWin, type TopWinsReturn, type TouchDepositInput, type TouchDepositReturn, type TransactionRecord, type TransactionRecordsInput, type TransactionRecordsReturn, type TransactionType, type TurnoverRequirementType, type UnmarkGameAsFavoriteInput, type UnmarkGameAsFavoriteReturn, type UnreadMessagesCountInput, type UnreadMessagesCountReturn, type UnregisterFCMDeviceInput, type UnregisterFCMDeviceReturn, type UpdateAccountError, type UpdateAccountInput, type UpdateAccountReturn, type UpdateReferralCodeError, type UpdateReferralCodeInput, type UpdateReferralCodeReturn, type UpdateVerificationDetailsInput, type UpdateVerificationDetailsReturn, type UpdateVerificationError, type UplinesByNameInput, type UplinesByNameReturn, type UploadImageFileError, type UploadImageFileInput, type UploadImageFileReturn, type ValidateMayaSessionReturn, type VerificationDetails, type VerificationDetailsReturn, type VerificationDetailsStatus, type VerifyMobileNumberError, type VerifyMobileNumberReturn, type Wallet, type WalletReturn, type WatchSessionInput, type WithdrawalError, type WithdrawalRecord, type WithdrawalRecordsInput, type WithdrawalRecordsReturn, type WithdrawalStatus, type WithdrawalType };
|
package/dist/index.d.ts
CHANGED
|
@@ -237,6 +237,7 @@ interface SecurityQuestionAuthenticateInput$1 {
|
|
|
237
237
|
secretAnswer: string;
|
|
238
238
|
}
|
|
239
239
|
type AuthenticateError$1 = 'InvalidTokenOrSecretAnswerError';
|
|
240
|
+
type CreateSignleUseTokenError = 'InvalidTokenError';
|
|
240
241
|
interface TextField$1 {
|
|
241
242
|
id: string;
|
|
242
243
|
type: 'text';
|
|
@@ -435,8 +436,8 @@ interface MayaSignInInput {
|
|
|
435
436
|
type: 'MAYA';
|
|
436
437
|
sessionId: string;
|
|
437
438
|
}
|
|
438
|
-
interface
|
|
439
|
-
type: '
|
|
439
|
+
interface SingleUseTokenSignInInput {
|
|
440
|
+
type: 'SINGLE_USE_TOKEN';
|
|
440
441
|
token: string;
|
|
441
442
|
}
|
|
442
443
|
type MayaSignInReturn = OperationResult<SignInError>;
|
|
@@ -445,7 +446,7 @@ type MobileNumberSignInReturn = OperationResult<SignInError>;
|
|
|
445
446
|
type TokenSignInReturn = OperationResult<SignInError>;
|
|
446
447
|
type SocialsSignInReturn = OperationResult<SignInError>;
|
|
447
448
|
type CabinetSignInReturn = OperationResult<SignInError>;
|
|
448
|
-
type
|
|
449
|
+
type SingleUseTokenSignInReturn = OperationResult<SignInError>;
|
|
449
450
|
type NameAndPasswordSignInReturn = OperationResult<SignInError, {
|
|
450
451
|
'2FAEnabled': true;
|
|
451
452
|
authenticator: Authenticator;
|
|
@@ -453,9 +454,9 @@ type NameAndPasswordSignInReturn = OperationResult<SignInError, {
|
|
|
453
454
|
'2FAEnabled': false;
|
|
454
455
|
authenticator?: never;
|
|
455
456
|
}>;
|
|
456
|
-
type SignInInput = NameAndPasswordSignInInput | MobileNumberSignInInput | MayaSignInInput | TokenSignInInput | SocialsSignInInput | CabinetSignInInput |
|
|
457
|
+
type SignInInput = NameAndPasswordSignInInput | MobileNumberSignInInput | MayaSignInInput | TokenSignInInput | SocialsSignInInput | CabinetSignInInput | SingleUseTokenSignInInput;
|
|
457
458
|
type SignInError = UnionAlias<CreateSessionError>;
|
|
458
|
-
type SignInReturn = NameAndPasswordSignInReturn | MobileNumberSignInReturn | MayaSignInReturn | TokenSignInReturn | SocialsSignInReturn | CabinetSignInReturn |
|
|
459
|
+
type SignInReturn = NameAndPasswordSignInReturn | MobileNumberSignInReturn | MayaSignInReturn | TokenSignInReturn | SocialsSignInReturn | CabinetSignInReturn | SingleUseTokenSignInReturn;
|
|
459
460
|
type RefreshSessionError = UnionAlias<RefreshSessionError$1>;
|
|
460
461
|
interface SecurityQuestionAuthenticateInput extends SecurityQuestionAuthenticateInput$1 {
|
|
461
462
|
}
|
|
@@ -473,6 +474,8 @@ interface WatchSessionInput {
|
|
|
473
474
|
onInvalid: () => void | Promise<void>;
|
|
474
475
|
}
|
|
475
476
|
type ValidateMayaSessionReturn = OperationResult;
|
|
477
|
+
type CreateSingleUseTokenError = UnionAlias<CreateSignleUseTokenError>;
|
|
478
|
+
type CreateSingleUseTokenReturn = OperationResult<CreateSingleUseTokenError, string>;
|
|
476
479
|
type File = {
|
|
477
480
|
id: string;
|
|
478
481
|
url?: never;
|
|
@@ -1499,12 +1502,13 @@ declare class Sdk {
|
|
|
1499
1502
|
signIn(input: TokenSignInInput): Promise<TokenSignInReturn>;
|
|
1500
1503
|
signIn(input: SocialsSignInInput): Promise<SocialsSignInReturn>;
|
|
1501
1504
|
signIn(input: CabinetSignInInput): Promise<CabinetSignInReturn>;
|
|
1502
|
-
signIn(input:
|
|
1505
|
+
signIn(input: SingleUseTokenSignInInput): Promise<SingleUseTokenSignInReturn>;
|
|
1503
1506
|
authenticate(input: AuthenticateInput): Promise<AuthenticateReturn>;
|
|
1504
1507
|
signOut(): Promise<void>;
|
|
1505
1508
|
watchSession(input: WatchSessionInput): () => void;
|
|
1506
1509
|
session(): Promise<SessionReturn>;
|
|
1507
1510
|
validateMayaSession(): Promise<ValidateMayaSessionReturn>;
|
|
1511
|
+
createSingleUseToken(): Promise<CreateSingleUseTokenReturn>;
|
|
1508
1512
|
site(): Promise<SiteReturn>;
|
|
1509
1513
|
/** @deprecated */
|
|
1510
1514
|
platform(): Promise<PlatformReturn>;
|
|
@@ -1596,4 +1600,4 @@ declare class Sdk {
|
|
|
1596
1600
|
private formatYmd;
|
|
1597
1601
|
}
|
|
1598
1602
|
|
|
1599
|
-
export { type Account, type AccountReturn, type AccountStatus, type AccountVerificationStatus, type ActivityRecord, type ActivityRecordType, type ActivityRecordsInput, type ActivityRecordsReturn, type Announcement, type AnnouncementStatus, type AnnouncementType, type AnnouncementsInput, type AnnouncementsReturn, type AuthenticateError, type AuthenticateInput, type AuthenticateReturn, type Authenticator, type AvailablePromosReturn, type AvailableQuestsReturn, type Bank, type BankDeposit, type BankWithdrawalRecord, type BetRecord, type BetRecordStatus, type BetRecordsInput, type BetRecordsReturn, type
|
|
1603
|
+
export { type Account, type AccountReturn, type AccountStatus, type AccountVerificationStatus, type ActivityRecord, type ActivityRecordType, type ActivityRecordsInput, type ActivityRecordsReturn, type Announcement, type AnnouncementStatus, type AnnouncementType, type AnnouncementsInput, type AnnouncementsReturn, type AuthenticateError, type AuthenticateInput, type AuthenticateReturn, type Authenticator, type AvailablePromosReturn, type AvailableQuestsReturn, type Bank, type BankDeposit, type BankWithdrawalRecord, type BetRecord, type BetRecordStatus, type BetRecordsInput, type BetRecordsReturn, type Bonus, type BonusReturn, type BonusesReturn, type CabinetSignInInput, type CabinetSignInReturn, type Cashback, type CashbackBonus, type CashbackBonusReturn, type CashbackStatus, type CashbacksReturn, type CheckInDailyQuestReturn, type ClaimCashbackBonusError, type ClaimCashbackBonusReturn, type ClaimRewardError, type ClaimRewardReturn, type ClaimSpotBonusReturn, type CompleteOnboardingInput, type CompleteOnboardingReturn, type CompoundField, type CreateAIOInstapayWithdrawalInput, type CreateAIOOnlineBankDepositInput, type CreateAIOQRPHDepositInput, type CreateAccountError, type CreateAccountInput, type CreateAccountInput__Next, type CreateAccountReturn, type CreateBankWithdrawalInput, type CreateDepositError, type CreateDepositInput, type CreateDepositReturn, type CreateGCashDepositInput, type CreateGCashWithdrawalInput, type CreateGameSessionByIdInput, type CreateGameSessionByReferenceInput, type CreateGameSessionError, type CreateGameSessionInput, type CreateGameSessionReturn, type CreateManualBankDepositInput, type CreateManualBankWithdrawalInput, type CreateManualUPIDepositInput, type CreateManualUPIWithdrawalInput, type CreateMayaAppDepositInput, type CreateMayaAppWithdrawalInput, type CreateMayaDepositInput, type CreateMayaWithdrawalInput, type CreateSingleUseTokenError, type CreateSingleUseTokenReturn, type CreateWithdrawalError, type CreateWithdrawalInput, type CreateWithdrawalReturn, type Currency, type DeleteAccountReturn, type Deposit, type DepositRecord, type DepositRecordsInput, type DepositRecordsReturn, type DepositReturn, type DepositStatus, type DepositType, type DepositsCountReturn, type DownlinesByNameInput, type DownlinesByNameReturn, type EndGameSessionReturn, type FCMDeviceType, type FavoriteGamesReturn, type Field, type FieldType, type File, type FileReturn, type GCashDeposit, type GCashWithdrawalRecord, type Game, type GameProvider, type GameReturn, type GameSession, type GameSessionReturn, type GameSessionStatus, type GameTag, type GameType, type GamesInput, type GamesInput__Next, type GamesReturn, type GatewaySettings, type HttpError, type ImageField, type InstapayBank, type InstapayBankListReturn, type InstapayBankType, type InstapayWithdrawalRecord, type Jackpot, type JackpotPayout, type JackpotPayoutsInput, type JackpotPayoutsReturn, type JackpotStatus, type JackpotsInput, type JackpotsReturn, type KnownDepositError, type LatestBetRecord, type LatestBetRecordsReturn, type Locale, type ManualBankDeposit, type ManualBankWithdrawalRecord, type ManualDeposit, type ManualUPIDeposit, type ManualUPIWithdrawalRecord, type ManualWithdrawalRecord, type MarkAllMessagesAsReadReturn, type MarkGameAsFavoriteInput, type MarkGameAsFavoriteReturn, type MarkMessageAsReadReturn, type MayaAppDeposit, type MayaDeposit, type MayaSignInInput, type MayaSignInReturn, type MayaWithdrawalRecord, type MemberStatus, type Message, type MessageAction, type MessageIcon, type MessagesInput, type MessagesReturn, type MobileNumberCreateAccountInput, type MobileNumberInrCreateAccountInput, type MobileNumberSignInInput, type MobileNumberSignInReturn, type MultiSelectField, type NameAndPasswordCreateAccountInput, type NameAndPasswordSignInInput, type NameAndPasswordSignInReturn, type NameCreateAccountInput, ObjectType, type OnboardingPlayerExperience, type OnboardingStatus, type OnboardingStatusReturn, type OnlineBankDeposit, type OperationError, type OperationResult, type PaymentSettings, type PaymentSettingsReturn, type Platform, type PlatformReturn, type PlatformReturn__Next, type Platform__Next, type PointsClubSettings, type PointsClubSettingsReturn, type PointsWallet, type PointsWalletReturn, type PointsWalletTransaction, type PointsWalletTransactionType, type PointsWalletTransactionsInput, type PointsWalletTransactionsReturn, type ProfileCompletion, type ProfileCompletionReturn, type Promo, type PromoByCodeReturn, type PromoStatus, type PromoType, type PromosReturn, type QRPHDeposit, type Quest, type QuestProgram, type QuestProgramStatus, type QuestStatus, type QuestType, type RecommendedGamesInput, type RecommendedGamesReturn, type RedeemPointsError, type RedeemPointsInput, type RedeemPointsReturn, type Referral, type ReferralCodeReturn, type ReferralCommission, type ReferralCommissionReturn, type ReferralsInput, type ReferralsReturn, type RefreshSessionError, type RegisterFCMDeviceInput, type RegisterFCMDeviceReturn, type RegisterMayaAccountError, type RegisterMayaAccountInput, type RegisterMayaAccountReturn, type RemainingDailyWithdrawalsCountReturn, type ResetPasswordError, type ResetPasswordInput, type ResetPasswordReturn, type RichTextField, Sdk, type SdkConfig, type SecretQuestion, type SecurityQuestionAuthenticateInput, type SecurityQuestionAuthenticator, type SelectField, type SendEmailVerificationCodeInput, type SendSmsVerificationCodeInput, type SendVerificationCodeError, type SendVerificationCodeError__Next, type SendVerificationCodeInput__Next, type SendVerificationCodeReturn, type SendVerificationCodeReturn__Next, type Session, type SessionError, type SessionReturn, type SignInError, type SignInInput, type SignInReturn, type SingleUseTokenSignInInput, type SingleUseTokenSignInReturn, type Site, type SiteReturn, type SkipOnboardingReturn, type SocialsSignInInput, type SocialsSignInReturn, type SpotBonusPromo, type SubmitVerificationDetailsInput, type SubmitVerificationDetailsReturn, type SubmitVerificationError, type TextField, type ToggleField, type TokenSignInInput, type TokenSignInReturn, type TopWin, type TopWinsReturn, type TouchDepositInput, type TouchDepositReturn, type TransactionRecord, type TransactionRecordsInput, type TransactionRecordsReturn, type TransactionType, type TurnoverRequirementType, type UnmarkGameAsFavoriteInput, type UnmarkGameAsFavoriteReturn, type UnreadMessagesCountInput, type UnreadMessagesCountReturn, type UnregisterFCMDeviceInput, type UnregisterFCMDeviceReturn, type UpdateAccountError, type UpdateAccountInput, type UpdateAccountReturn, type UpdateReferralCodeError, type UpdateReferralCodeInput, type UpdateReferralCodeReturn, type UpdateVerificationDetailsInput, type UpdateVerificationDetailsReturn, type UpdateVerificationError, type UplinesByNameInput, type UplinesByNameReturn, type UploadImageFileError, type UploadImageFileInput, type UploadImageFileReturn, type ValidateMayaSessionReturn, type VerificationDetails, type VerificationDetailsReturn, type VerificationDetailsStatus, type VerifyMobileNumberError, type VerifyMobileNumberReturn, type Wallet, type WalletReturn, type WatchSessionInput, type WithdrawalError, type WithdrawalRecord, type WithdrawalRecordsInput, type WithdrawalRecordsReturn, type WithdrawalStatus, type WithdrawalType };
|
package/dist/index.js
CHANGED
|
@@ -2436,10 +2436,10 @@ var AuthService = class {
|
|
|
2436
2436
|
headers.set("Authorization", `Token ${input.token}`);
|
|
2437
2437
|
}
|
|
2438
2438
|
if (input.type === "CABINET") {
|
|
2439
|
-
headers.set("Authorization", `
|
|
2439
|
+
headers.set("Authorization", `Opexa-Cabinet-Token ${input.token}`);
|
|
2440
2440
|
}
|
|
2441
|
-
if (input.type === "
|
|
2442
|
-
headers.set("Authorization", `
|
|
2441
|
+
if (input.type === "SINGLE_USE_TOKEN") {
|
|
2442
|
+
headers.set("Authorization", `Single-Use-Token ${input.token}`);
|
|
2443
2443
|
}
|
|
2444
2444
|
if (input.reCAPTCHAResponse) {
|
|
2445
2445
|
headers.set("google-recaptcha-response", input.reCAPTCHAResponse);
|
|
@@ -2641,6 +2641,38 @@ var AuthService = class {
|
|
|
2641
2641
|
};
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
|
+
async createSingleUseToken(accessToken) {
|
|
2645
|
+
const headers = new Headers(this.headers);
|
|
2646
|
+
headers.append("Authorization", `Bearer ${accessToken}`);
|
|
2647
|
+
try {
|
|
2648
|
+
const res = await fetch(`${this.url}/token`, {
|
|
2649
|
+
method: "POST",
|
|
2650
|
+
headers
|
|
2651
|
+
});
|
|
2652
|
+
const data = await res.json();
|
|
2653
|
+
if (res.ok) {
|
|
2654
|
+
return {
|
|
2655
|
+
ok: true,
|
|
2656
|
+
data
|
|
2657
|
+
};
|
|
2658
|
+
}
|
|
2659
|
+
if (res.status === 403 || res.status === 401) {
|
|
2660
|
+
return {
|
|
2661
|
+
ok: false,
|
|
2662
|
+
error: createOperationError("InvalidTokenError")
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2665
|
+
return {
|
|
2666
|
+
ok: false,
|
|
2667
|
+
error: statusCodeToOperationError(res.status)
|
|
2668
|
+
};
|
|
2669
|
+
} catch {
|
|
2670
|
+
return {
|
|
2671
|
+
ok: false,
|
|
2672
|
+
error: statusCodeToOperationError(500)
|
|
2673
|
+
};
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2644
2676
|
};
|
|
2645
2677
|
|
|
2646
2678
|
// src/services/cms-portal.service.ts
|
|
@@ -5475,9 +5507,9 @@ var Sdk = class {
|
|
|
5475
5507
|
});
|
|
5476
5508
|
return res.ok ? { ok: true } : res;
|
|
5477
5509
|
}
|
|
5478
|
-
case "
|
|
5510
|
+
case "SINGLE_USE_TOKEN": {
|
|
5479
5511
|
const res = await this.sessionManager.create({
|
|
5480
|
-
type: "
|
|
5512
|
+
type: "SINGLE_USE_TOKEN",
|
|
5481
5513
|
token: input.token
|
|
5482
5514
|
});
|
|
5483
5515
|
return res.ok ? { ok: true } : res;
|
|
@@ -5544,6 +5576,21 @@ var Sdk = class {
|
|
|
5544
5576
|
async validateMayaSession() {
|
|
5545
5577
|
return await this.walletService.validateMayaSession();
|
|
5546
5578
|
}
|
|
5579
|
+
async createSingleUseToken() {
|
|
5580
|
+
const res0 = await this.sessionManager.get();
|
|
5581
|
+
if (!res0.ok || !res0.data) {
|
|
5582
|
+
return {
|
|
5583
|
+
ok: false,
|
|
5584
|
+
error: {
|
|
5585
|
+
name: "UnknownError",
|
|
5586
|
+
message: "Something went wrong"
|
|
5587
|
+
}
|
|
5588
|
+
};
|
|
5589
|
+
}
|
|
5590
|
+
const res1 = await this.authService.createSingleUseToken(res0.data.accessToken);
|
|
5591
|
+
if (!res1.ok) return res1;
|
|
5592
|
+
return { ok: true, data: res1.data.token };
|
|
5593
|
+
}
|
|
5547
5594
|
/**/
|
|
5548
5595
|
/*+----------------------------------------+*/
|
|
5549
5596
|
/*+ SITE +*/
|