@opexa/portal-sdk 0.0.81 → 0.0.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +287 -258
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +2 -2
- package/dist/sdk/types.d.ts +20 -1
- package/dist/services/account.service.d.ts +1 -0
- package/dist/services/auth.service.d.ts +2 -2
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/types.d.ts +17 -5
- package/dist/services/utils.d.ts +2 -2
- package/package.json +1 -1
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountReturn, ActivityRecordsInput, ActivityRecordsReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountInput__Next, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, DownlinesByNameInput, DownlinesByNameReturn, EndGameSessionReturn, FileReturn, GameReturn, GameSessionReturn, GamesInput, GamesReturn, LatestBetRecordsReturn, MayaSignInInput, MayaSignInReturn, MobileNumberSignInInput, MobileNumberSignInReturn, NameAndPasswordSignInInput, NameAndPasswordSignInReturn, PlatformReturn, PointsWalletReturn, PointsWalletTransactionsInput, PointsWalletTransactionsReturn, ProfileCompletionReturn, PromosReturn, RedeemPointsInput, RedeemPointsReturn, ReferralCodeReturn, ReferralCommissionReturn, ReferralsInput, ReferralsReturn, RegisterMayaAccountInput, RegisterMayaAccountReturn, RemainingDailyWithdrawalsCountReturn, ResetPasswordInput, ResetPasswordReturn, SendVerificationCodeReturn, SendVerificationCodeReturn__Next, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TransactionRecordsInput, TransactionRecordsReturn, UpdateAccountInput, UpdateAccountReturn, UpdateReferralCodeInput, UpdateReferralCodeReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, UplinesByNameInput, UplinesByNameReturn, UploadImageFileInput, UploadImageFileReturn, ValidateMayaSessionReturn, VerificationDetailsReturn, VerifyMobileNumberReturn, WalletReturn, WatchSessionInput, WithdrawalRecordsInput, WithdrawalRecordsReturn } from './types';
|
|
1
|
+
import { AccountReturn, ActivityRecordsInput, ActivityRecordsReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountInput__Next, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, DownlinesByNameInput, DownlinesByNameReturn, EndGameSessionReturn, FileReturn, GameReturn, GameSessionReturn, GamesInput, GamesReturn, LatestBetRecordsReturn, MayaSignInInput, MayaSignInReturn, MobileNumberSignInInput, MobileNumberSignInReturn, NameAndPasswordSignInInput, NameAndPasswordSignInReturn, PlatformReturn, PointsWalletReturn, PointsWalletTransactionsInput, PointsWalletTransactionsReturn, ProfileCompletionReturn, PromosReturn, RedeemPointsInput, RedeemPointsReturn, ReferralCodeReturn, ReferralCommissionReturn, ReferralsInput, ReferralsReturn, RegisterMayaAccountInput, RegisterMayaAccountReturn, RemainingDailyWithdrawalsCountReturn, ResetPasswordInput, ResetPasswordReturn, SendVerificationCodeInput__Next, SendVerificationCodeReturn, SendVerificationCodeReturn__Next, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TransactionRecordsInput, TransactionRecordsReturn, UpdateAccountInput, UpdateAccountReturn, UpdateReferralCodeInput, UpdateReferralCodeReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, UplinesByNameInput, UplinesByNameReturn, UploadImageFileInput, UploadImageFileReturn, ValidateMayaSessionReturn, VerificationDetailsReturn, VerifyMobileNumberReturn, WalletReturn, WatchSessionInput, WithdrawalRecordsInput, WithdrawalRecordsReturn } from './types';
|
|
2
2
|
|
|
3
3
|
export interface SdkConfig {
|
|
4
4
|
site: string;
|
|
@@ -50,7 +50,7 @@ export declare class Sdk {
|
|
|
50
50
|
* @deprecated use `sendVerificationCode__next`
|
|
51
51
|
*/
|
|
52
52
|
sendVerificationCode(mobileNumber: string): Promise<SendVerificationCodeReturn>;
|
|
53
|
-
sendVerificationCode__next(
|
|
53
|
+
sendVerificationCode__next(input: SendVerificationCodeInput__Next): Promise<SendVerificationCodeReturn__Next>;
|
|
54
54
|
wallet(): Promise<WalletReturn>;
|
|
55
55
|
announcements(input?: AnnouncementsInput): Promise<AnnouncementsReturn>;
|
|
56
56
|
createWithdrawal(input: CreateWithdrawalInput): Promise<CreateWithdrawalReturn>;
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -214,15 +214,32 @@ export interface UpdateVerificationDetailsInput extends Partial<Omit<SubmitVerif
|
|
|
214
214
|
}
|
|
215
215
|
export type UpdateVerificationError = UnionAlias<Internal.UpdateMemberVerificationError>;
|
|
216
216
|
export type UpdateVerificationDetailsReturn = OperationResult<UpdateVerificationError>;
|
|
217
|
+
/** @deprecated */
|
|
217
218
|
export type SendVerificationCodeError = UnionAlias<Internal.SendVerificationCodeError>;
|
|
219
|
+
/** @deprecated */
|
|
218
220
|
export type SendVerificationCodeReturn = OperationResult<SendVerificationCodeError>;
|
|
219
|
-
export
|
|
221
|
+
export interface SendSmsVerificationCodeInput {
|
|
222
|
+
type: 'SMS';
|
|
223
|
+
mobileNumber: string;
|
|
224
|
+
strict?: boolean;
|
|
225
|
+
}
|
|
226
|
+
export interface SendEmailVerificationCodeInput {
|
|
227
|
+
type: 'EMAIL';
|
|
228
|
+
emailAddress: string;
|
|
229
|
+
strict?: boolean;
|
|
230
|
+
}
|
|
231
|
+
export type SendVerificationCodeInput__Next = SendSmsVerificationCodeInput | SendEmailVerificationCodeInput;
|
|
232
|
+
export type SendVerificationCodeError__Next = UnionAlias<Internal.SendVerificationCodeError__Next>;
|
|
233
|
+
export type SendVerificationCodeReturn__Next = OperationResult<SendVerificationCodeError__Next>;
|
|
220
234
|
export type VerifyMobileNumberError = UnionAlias<Internal.VerifyMobileNumberError>;
|
|
221
235
|
export type VerifyMobileNumberReturn = OperationResult<VerifyMobileNumberError>;
|
|
222
236
|
export type Currency = UnionAlias<Internal.Currency>;
|
|
223
237
|
export interface Wallet {
|
|
224
238
|
id: string;
|
|
225
239
|
balance: number;
|
|
240
|
+
/**
|
|
241
|
+
* @deprecated use `Platform.currency`
|
|
242
|
+
*/
|
|
226
243
|
currency: Currency;
|
|
227
244
|
dateTimeCreated: Date;
|
|
228
245
|
dateTimeLastUpdated: Date;
|
|
@@ -609,6 +626,8 @@ export interface PaymentSettings {
|
|
|
609
626
|
};
|
|
610
627
|
}
|
|
611
628
|
export interface Platform {
|
|
629
|
+
currency: Currency;
|
|
630
|
+
timezone: string;
|
|
612
631
|
paymentSettings: PaymentSettings;
|
|
613
632
|
pointsClubSettings: PointsClubSettings;
|
|
614
633
|
}
|
|
@@ -15,6 +15,7 @@ export declare class AccountService {
|
|
|
15
15
|
resetPassword(variables: ResetPasswordMutationVariables): Promise<OperationResult<ResetPasswordError>>;
|
|
16
16
|
profileCompletion(): Promise<OperationResult<never, ProfileCompletion>>;
|
|
17
17
|
platform(): Promise<OperationResult<never, Platform>>;
|
|
18
|
+
/** @deprecated */
|
|
18
19
|
sendVerificationCode(variables: SendVerificationCodeMutationVariables): Promise<OperationResult<SendVerificationCodeError>>;
|
|
19
20
|
verifyMobileNumber(variables: VerifyMobileNumberMutationVariables): Promise<OperationResult<VerifyMobileNumberError>>;
|
|
20
21
|
createMemberVerification(variables: CreateMemberVerificationMutationVariables): Promise<OperationResult<CreateMemberVerificationError>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OperationResult } from '../utils/types';
|
|
2
|
-
import { AuthenticateError, AuthenticateInput, AuthenticateMutation, CreateSessionError, CreateSessionInput, CreateSessionMutation, RefreshSessionError, RefreshSessionMutation,
|
|
2
|
+
import { AuthenticateError, AuthenticateInput, AuthenticateMutation, CreateSessionError, CreateSessionInput, CreateSessionMutation, RefreshSessionError, RefreshSessionMutation, SendVerificationCodeError__Next, SendVerificationCodeInput__Next } from './types';
|
|
3
3
|
|
|
4
4
|
export interface AuthServiceConfig {
|
|
5
5
|
url: string;
|
|
@@ -15,5 +15,5 @@ export declare class AuthService {
|
|
|
15
15
|
refreshSession(refreshToken: string): Promise<OperationResult<RefreshSessionError, RefreshSessionMutation>>;
|
|
16
16
|
destroySession(accessToken: string): Promise<OperationResult>;
|
|
17
17
|
verifySession(accessToken: string): Promise<boolean>;
|
|
18
|
-
sendVerificationCode(input:
|
|
18
|
+
sendVerificationCode(input: SendVerificationCodeInput__Next): Promise<OperationResult<SendVerificationCodeError__Next>>;
|
|
19
19
|
}
|
|
@@ -55,6 +55,7 @@ export declare const VERIFY_MOBILE_NUMBER_MUTATION: string;
|
|
|
55
55
|
export declare const CREATE_MEMBER_VERIFICATION_MUTATION: string;
|
|
56
56
|
export declare const UPDATE_MEMBER_VERIFICATION_MUTATION: string;
|
|
57
57
|
export declare const PROFILE_COMPLETION_QUERY: string;
|
|
58
|
+
/** @deprecated */
|
|
58
59
|
export declare const SEND_VERIFICATION_CODE_MUTATION: string;
|
|
59
60
|
export declare const PLATFORM_QUERY: string;
|
|
60
61
|
export declare const MAYA_SESSION_QUERY: string;
|
package/dist/services/types.d.ts
CHANGED
|
@@ -548,7 +548,7 @@ export interface TransactionRecordsQueryVariables {
|
|
|
548
548
|
dateTimeCreated?: DateFilterField;
|
|
549
549
|
};
|
|
550
550
|
}
|
|
551
|
-
export type Currency = 'PHP' | 'USD' | (string & {});
|
|
551
|
+
export type Currency = 'PHP' | 'USD' | 'INR' | 'MYR' | 'IDR' | (string & {});
|
|
552
552
|
export interface Wallet {
|
|
553
553
|
id: string;
|
|
554
554
|
balance: Decimal;
|
|
@@ -741,18 +741,32 @@ export interface DeleteMemberAccountMutationVariables {
|
|
|
741
741
|
id: string;
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
|
+
/** @deprecated */
|
|
745
|
+
export interface SendVerificationCodeInput {
|
|
746
|
+
channel: 'SMS' | 'EMAIL';
|
|
747
|
+
recipient: string;
|
|
748
|
+
}
|
|
749
|
+
/** @deprecated */
|
|
744
750
|
export type SendVerificationCodeError = 'InvalidPlatformError' | 'NotReadyToSendVerficationCodeError';
|
|
751
|
+
/** @deprecated */
|
|
745
752
|
export interface SendVerificationCodeMutation {
|
|
746
753
|
sendVerificationCode?: null | {
|
|
747
754
|
__typename: SendVerificationCodeError;
|
|
748
755
|
};
|
|
749
756
|
}
|
|
757
|
+
/** @deprecated */
|
|
750
758
|
export interface SendVerificationCodeMutationVariables {
|
|
751
759
|
input: {
|
|
752
760
|
channel: 'SMS' | 'EMAIL';
|
|
753
761
|
recipient: string;
|
|
754
762
|
};
|
|
755
763
|
}
|
|
764
|
+
export type SendVerificationCodeError__Next = 'NotReadyToSendVerficationCodeError' | 'AccountNotFound';
|
|
765
|
+
export interface SendVerificationCodeInput__Next {
|
|
766
|
+
channel: 'SMS' | 'EMAIL';
|
|
767
|
+
recipient: string;
|
|
768
|
+
verificationType?: 'MEMBER';
|
|
769
|
+
}
|
|
756
770
|
export type VerifyMobileNumberError = 'InvalidSMSVerificationCodeError' | 'MobileNumberAlreadyVerifiedError';
|
|
757
771
|
export interface VerifyMobileNumberMutation {
|
|
758
772
|
verifyMobileNumber?: null | {
|
|
@@ -837,6 +851,8 @@ export interface PointsClubSettings {
|
|
|
837
851
|
multiplier: Decimal;
|
|
838
852
|
}
|
|
839
853
|
export interface Platform {
|
|
854
|
+
currency: Currency;
|
|
855
|
+
timezone: string;
|
|
840
856
|
restrictWithdrawalsToVerifiedMembers: boolean;
|
|
841
857
|
minimumFirstDepositAmount: Decimal;
|
|
842
858
|
bankDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
@@ -921,10 +937,6 @@ export interface MayaSessionQueryVariables {
|
|
|
921
937
|
export interface ValidateMayaSessionMutation {
|
|
922
938
|
validateMayaSession: boolean;
|
|
923
939
|
}
|
|
924
|
-
export interface SendVerificationCodeInput {
|
|
925
|
-
channel: 'SMS' | 'EMAIL';
|
|
926
|
-
recipient: string;
|
|
927
|
-
}
|
|
928
940
|
export interface TextField {
|
|
929
941
|
id: string;
|
|
930
942
|
type: 'text';
|
package/dist/services/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OperationError } from '../utils/types';
|
|
2
|
-
import { AuthenticateError, ClaimCashbackBonusError, CreateDepositError, CreateGameSessionError, CreateMemberVerificationError, CreateSessionError, CreateWithdrawalError, EndGameSessionError, RedeemPointsToCashError, RefreshSessionError, RegisterMayaMemberAccountError, RegisterMemberAccountError, ResetPasswordError, SendVerificationCodeError, UpdateMemberAccountError, UpdateMemberVerificationError, UpdateReferralCodeError, UploadPrivateImageFileError, VerifyMobileNumberError } from './types';
|
|
2
|
+
import { AuthenticateError, ClaimCashbackBonusError, CreateDepositError, CreateGameSessionError, CreateMemberVerificationError, CreateSessionError, CreateWithdrawalError, EndGameSessionError, RedeemPointsToCashError, RefreshSessionError, RegisterMayaMemberAccountError, RegisterMemberAccountError, ResetPasswordError, SendVerificationCodeError, SendVerificationCodeError__Next, UpdateMemberAccountError, UpdateMemberVerificationError, UpdateReferralCodeError, UploadPrivateImageFileError, VerifyMobileNumberError } from './types';
|
|
3
3
|
|
|
4
|
-
type E = ClaimCashbackBonusError | CreateDepositError | UploadPrivateImageFileError | CreateGameSessionError | EndGameSessionError | RegisterMemberAccountError | RegisterMayaMemberAccountError | UpdateMemberAccountError | ResetPasswordError | SendVerificationCodeError | VerifyMobileNumberError | CreateMemberVerificationError | UpdateMemberVerificationError | RedeemPointsToCashError | CreateWithdrawalError | CreateSessionError | RefreshSessionError | AuthenticateError | UpdateReferralCodeError;
|
|
4
|
+
type E = ClaimCashbackBonusError | CreateDepositError | UploadPrivateImageFileError | CreateGameSessionError | EndGameSessionError | RegisterMemberAccountError | RegisterMayaMemberAccountError | UpdateMemberAccountError | ResetPasswordError | SendVerificationCodeError | VerifyMobileNumberError | CreateMemberVerificationError | UpdateMemberVerificationError | RedeemPointsToCashError | CreateWithdrawalError | CreateSessionError | RefreshSessionError | AuthenticateError | UpdateReferralCodeError | SendVerificationCodeError__Next;
|
|
5
5
|
export declare function createOperationError<T extends E>(code: T): OperationError<T>;
|
|
6
6
|
export {};
|