@opexa/portal-sdk 0.0.59 → 0.0.62

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/sdk/sdk.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import { GraphQLClientFetchOptions } from '../utils/graphql-client';
2
- import { AccountReturn, ActivityRecordsInput, ActivityRecordsReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, EndGameSessionReturn, EndGameSessionReturn__Legacy, FileReturn, GameReturn__Next, GameSessionReturn, GamesByNameInput, GamesByNameReturn, GamesInput, GamesReturn, GamesReturn__Next, LatestBetRecordsReturn, MayaSignInInput, MayaSignInReturn, MobileNumberSignInInput, MobileNumberSignInReturn, NameAndPasswordSignInInput, NameAndPasswordSignInReturn, PlatformReturn, PointsToCashConversionReturn, PointsWalletReturn, PointsWalletTransactionsInput, PointsWalletTransactionsReturn, ProfileCompletionReturn, PromosReturn, ReferralCodeReturn, RegisterMayaAccountInput, RegisterMayaAccountReturn, RemainingDailyWithdrawalsCountReturn, ResetPasswordInput, ResetPasswordReturn, SendVerificationCodeReturn, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TransactionRecordsInput, TransactionRecordsReturn, UpdateAccountInput, UpdateAccountReturn, UpdateReferralCodeInput, UpdateReferralCodeReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, 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, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, EndGameSessionReturn, EndGameSessionReturn__Legacy, FileReturn, GameReturn__Next, GameSessionReturn, GamesByNameInput, GamesByNameReturn, GamesInput, GamesReturn, GamesReturn__Next, LatestBetRecordsReturn, MayaSignInInput, MayaSignInReturn, MobileNumberSignInInput, MobileNumberSignInReturn, NameAndPasswordSignInInput, NameAndPasswordSignInReturn, PlatformReturn, PointsToCashConversionReturn, PointsWalletReturn, PointsWalletTransactionsInput, PointsWalletTransactionsReturn, ProfileCompletionReturn, PromosReturn, ReferralCodeReturn, RegisterMayaAccountInput, RegisterMayaAccountReturn, RemainingDailyWithdrawalsCountReturn, ResetPasswordInput, ResetPasswordReturn, SendAuthenticationCodeReturn, SendVerificationCodeReturn, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TransactionRecordsInput, TransactionRecordsReturn, UpdateAccountInput, UpdateAccountReturn, UpdateReferralCodeInput, UpdateReferralCodeReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, UploadImageFileInput, UploadImageFileReturn, ValidateMayaSessionReturn, VerificationDetailsReturn, VerifyMobileNumberReturn, WalletReturn, WatchSessionInput, WithdrawalRecordsInput, WithdrawalRecordsReturn } from './types';
3
2
 
4
3
  export interface SdkConfig {
5
4
  site: string;
@@ -7,10 +6,10 @@ export interface SdkConfig {
7
6
  platform: string;
8
7
  environment?: 'production' | 'development';
9
8
  logs?: boolean;
10
- graphql?: GraphQLClientFetchOptions;
11
9
  }
12
10
  export declare class Sdk {
13
11
  private cmsPortalService;
12
+ private authService;
14
13
  private gameService;
15
14
  private fileService;
16
15
  private walletService;
@@ -25,6 +24,7 @@ export declare class Sdk {
25
24
  signIn(input: NameAndPasswordSignInInput): Promise<NameAndPasswordSignInReturn>;
26
25
  signIn(input: MobileNumberSignInInput): Promise<MobileNumberSignInReturn>;
27
26
  signIn(input: MayaSignInInput): Promise<MayaSignInReturn>;
27
+ sendAuthenticationCode(mobileNumber: string): Promise<SendAuthenticationCodeReturn>;
28
28
  /**
29
29
  * @example
30
30
  * ```ts
@@ -1,4 +1,4 @@
1
- import { AuthServiceConfig } from '../services';
1
+ import { AuthService, WalletService } from '../services';
2
2
  import { OperationResult } from '../utils/types';
3
3
  import { AuthenticateError, AuthenticateInput, Authenticator, RefreshSessionError, Session, SignInError, SignInInput } from './types';
4
4
 
@@ -9,11 +9,10 @@ interface Data {
9
9
  refreshToken: string;
10
10
  refreshTokenExpiresAt: number;
11
11
  }
12
- interface SessionManagerConfig extends Omit<AuthServiceConfig, 'url'> {
13
- authUrl: string;
14
- walletUrl: string;
15
- platform: string;
12
+ interface SessionManagerConfig {
16
13
  logs?: boolean;
14
+ authService: AuthService;
15
+ walletService: WalletService;
17
16
  }
18
17
  export declare class SessionManager {
19
18
  private logger;
@@ -52,6 +52,7 @@ export interface SecurityQuestionAuthenticateInput extends Internal.SecurityQues
52
52
  export type AuthenticateInput = SecurityQuestionAuthenticateInput;
53
53
  export type AuthenticateError = UnionAlias<Internal.AuthenticateError>;
54
54
  export type AuthenticateReturn = OperationResult<AuthenticateError>;
55
+ export type SendAuthenticationCodeReturn = OperationResult;
55
56
  export interface Session {
56
57
  id: string;
57
58
  dateTimeCreated: Date;
@@ -14,4 +14,5 @@ export declare class AuthService {
14
14
  refreshSession(refreshToken: string): Promise<OperationResult<RefreshSessionError, RefreshSessionMutation>>;
15
15
  destroySession(accessToken: string): Promise<OperationResult>;
16
16
  verifySession(accessToken: string): Promise<boolean>;
17
+ sendVerificationCode(mobileNumber: string): Promise<OperationResult>;
17
18
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opexa/portal-sdk",
3
3
  "type": "module",
4
- "version": "0.0.59",
4
+ "version": "0.0.62",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "typings": "dist/index.d.ts",