@opexa/portal-sdk 0.0.70 → 0.0.71
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 +1622 -1622
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +224 -198
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +8 -2
- package/dist/sdk/types.d.ts +2 -1
- package/dist/services/account.service.d.ts +2 -2
- package/dist/services/auth.service.d.ts +5 -0
- package/dist/services/queries.d.ts +1 -1
- package/dist/services/types.d.ts +1 -9
- package/package.json +81 -81
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,
|
|
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, 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, SendVerificationCodeReturn__Next, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TransactionRecordsInput, TransactionRecordsReturn, UpdateAccountInput, UpdateAccountReturn, UpdateReferralCodeInput, UpdateReferralCodeReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, UploadImageFileInput, UploadImageFileReturn, ValidateMayaSessionReturn, VerificationDetailsReturn, VerifyMobileNumberReturn, WalletReturn, WatchSessionInput, WithdrawalRecordsInput, WithdrawalRecordsReturn } from './types';
|
|
2
2
|
|
|
3
3
|
export interface SdkConfig {
|
|
4
4
|
site: string;
|
|
@@ -24,6 +24,9 @@ export declare class Sdk {
|
|
|
24
24
|
signIn(input: NameAndPasswordSignInInput): Promise<NameAndPasswordSignInReturn>;
|
|
25
25
|
signIn(input: MobileNumberSignInInput): Promise<MobileNumberSignInReturn>;
|
|
26
26
|
signIn(input: MayaSignInInput): Promise<MayaSignInReturn>;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated use `sendVerificationCode__next`
|
|
29
|
+
*/
|
|
27
30
|
sendAuthenticationCode(mobileNumber: string): Promise<SendAuthenticationCodeReturn>;
|
|
28
31
|
/**
|
|
29
32
|
* @example
|
|
@@ -119,7 +122,9 @@ export declare class Sdk {
|
|
|
119
122
|
* id: ObjectId.generate(ObjectType.Account).toString(),
|
|
120
123
|
* name: data.name,
|
|
121
124
|
* password: data.password,
|
|
125
|
+
* dateOfBirth: new Date(data.dateOfBirth),
|
|
122
126
|
* mobileNumber: data.mobileNumber,
|
|
127
|
+
* domain: data.domain,
|
|
123
128
|
* reCAPTCHAResponse: data.reCAPTCHAResponse,
|
|
124
129
|
* });
|
|
125
130
|
*
|
|
@@ -130,7 +135,7 @@ export declare class Sdk {
|
|
|
130
135
|
* }
|
|
131
136
|
* ```
|
|
132
137
|
*/
|
|
133
|
-
|
|
138
|
+
createAccount__next(input: CreateAccountInput__Next): Promise<CreateAccountReturn>;
|
|
134
139
|
registerMayaAccount(input: RegisterMayaAccountInput): Promise<RegisterMayaAccountReturn>;
|
|
135
140
|
/**
|
|
136
141
|
* @example
|
|
@@ -192,6 +197,7 @@ export declare class Sdk {
|
|
|
192
197
|
verifyMobileNumber(verificationCode: string): Promise<VerifyMobileNumberReturn>;
|
|
193
198
|
profileCompletion(): Promise<ProfileCompletionReturn>;
|
|
194
199
|
sendVerificationCode(mobileNumber: string): Promise<SendVerificationCodeReturn>;
|
|
200
|
+
sendVerificationCode__next(mobileNumber: string): Promise<SendVerificationCodeReturn__Next>;
|
|
195
201
|
wallet(): Promise<WalletReturn>;
|
|
196
202
|
announcements(input?: AnnouncementsInput): Promise<AnnouncementsReturn>;
|
|
197
203
|
/**
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -224,7 +224,7 @@ export interface CreateAccountInput {
|
|
|
224
224
|
*/
|
|
225
225
|
referralCode?: string;
|
|
226
226
|
}
|
|
227
|
-
export interface
|
|
227
|
+
export interface CreateAccountInput__Next {
|
|
228
228
|
/**
|
|
229
229
|
* @example
|
|
230
230
|
* ```ts
|
|
@@ -462,6 +462,7 @@ export type UpdateVerificationError = UnionAlias<Internal.UpdateMemberVerificati
|
|
|
462
462
|
export type UpdateVerificationDetailsReturn = OperationResult<UpdateVerificationError>;
|
|
463
463
|
export type SendVerificationCodeError = UnionAlias<Internal.SendVerificationCodeError>;
|
|
464
464
|
export type SendVerificationCodeReturn = OperationResult<SendVerificationCodeError>;
|
|
465
|
+
export type SendVerificationCodeReturn__Next = OperationResult;
|
|
465
466
|
export type VerifyMobileNumberError = UnionAlias<Internal.VerifyMobileNumberError>;
|
|
466
467
|
export type VerifyMobileNumberReturn = OperationResult<VerifyMobileNumberError>;
|
|
467
468
|
export type Currency = UnionAlias<Internal.Currency>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
2
|
import { OperationResult } from '../utils/types';
|
|
3
|
-
import { Announcement, AnnouncementsQueryVariables, CreateMemberVerificationError, CreateMemberVerificationMutationVariables, DeleteMemberAccountMutationVariables, MemberAccount, MemberVerification, PaginatedQueryResult, Platform, ProfileCompletion, RegisterMayaMemberAccountError, RegisterMayaMemberAccountMutationVariables, RegisterMemberAccountError, RegisterMemberAccountMutationVariables,
|
|
3
|
+
import { Announcement, AnnouncementsQueryVariables, CreateMemberVerificationError, CreateMemberVerificationMutationVariables, DeleteMemberAccountMutationVariables, MemberAccount, MemberVerification, PaginatedQueryResult, Platform, ProfileCompletion, RegisterMayaMemberAccountError, RegisterMayaMemberAccountMutationVariables, RegisterMemberAccountError, RegisterMemberAccountMutationVariables, RegisterMemberAccountMutationVariables__Next, ResetPasswordError, ResetPasswordMutationVariables, SendVerificationCodeError, SendVerificationCodeMutationVariables, UpdateMemberAccountError, UpdateMemberAccountMutationVariables, UpdateMemberVerificationError, UpdateMemberVerificationMutationVariables, UpdateReferralCodeError, UpdateReferralCodeMutationVariables, VerifyMobileNumberError, VerifyMobileNumberMutationVariables } from './types';
|
|
4
4
|
|
|
5
5
|
export declare class AccountService {
|
|
6
6
|
private client;
|
|
@@ -8,7 +8,7 @@ export declare class AccountService {
|
|
|
8
8
|
/** aka `Query.self` */
|
|
9
9
|
memberAccount(): Promise<OperationResult<never, MemberAccount>>;
|
|
10
10
|
registerMemberAccount(variables: RegisterMemberAccountMutationVariables): Promise<OperationResult<RegisterMemberAccountError>>;
|
|
11
|
-
|
|
11
|
+
registerMemberAccount__next(variables: RegisterMemberAccountMutationVariables__Next): Promise<OperationResult<RegisterMemberAccountError>>;
|
|
12
12
|
updateMemberAccount(variables: UpdateMemberAccountMutationVariables): Promise<OperationResult<UpdateMemberAccountError>>;
|
|
13
13
|
deleteMemberAccount(variables: DeleteMemberAccountMutationVariables): Promise<OperationResult>;
|
|
14
14
|
resetPassword(variables: ResetPasswordMutationVariables): Promise<OperationResult<ResetPasswordError>>;
|
|
@@ -9,10 +9,15 @@ export declare class AuthService {
|
|
|
9
9
|
private url;
|
|
10
10
|
private platform;
|
|
11
11
|
constructor(config: AuthServiceConfig);
|
|
12
|
+
private get headers();
|
|
12
13
|
createSession(input: CreateSessionInput): Promise<OperationResult<CreateSessionError, CreateSessionMutation>>;
|
|
13
14
|
authenticate(input: AuthenticateInput): Promise<OperationResult<AuthenticateError, AuthenticateMutation>>;
|
|
14
15
|
refreshSession(refreshToken: string): Promise<OperationResult<RefreshSessionError, RefreshSessionMutation>>;
|
|
15
16
|
destroySession(accessToken: string): Promise<OperationResult>;
|
|
16
17
|
verifySession(accessToken: string): Promise<boolean>;
|
|
18
|
+
/**
|
|
19
|
+
* @deprecated use `sendOtp`
|
|
20
|
+
*/
|
|
17
21
|
sendVerificationCode(mobileNumber: string): Promise<OperationResult>;
|
|
22
|
+
sendVerificationCode__next(mobileNumber: string): Promise<OperationResult>;
|
|
18
23
|
}
|
|
@@ -44,7 +44,7 @@ export declare const MEMBER_QUERY: string;
|
|
|
44
44
|
export declare const MEMBER_ACCOUNT_QUERY: string;
|
|
45
45
|
export declare const MEMBER_VERIFICATION_QUERY: string;
|
|
46
46
|
export declare const REGISTER_MEMBER_ACCOUNT_MUTATION: string;
|
|
47
|
-
export declare const
|
|
47
|
+
export declare const REGISTER_MEMBER_ACCOUNT_MUTATION__NEXT: string;
|
|
48
48
|
export declare const REGISTER_MAYA_MEMBER_ACCOUNT_MUTATION: string;
|
|
49
49
|
export declare const UPDATE_MEMBER_ACCOUNT_MUTATION: string;
|
|
50
50
|
export declare const RESET_PASSWORD_MUTATION: string;
|
package/dist/services/types.d.ts
CHANGED
|
@@ -676,11 +676,6 @@ export interface RegisterMemberAccountMutation {
|
|
|
676
676
|
__typename: RegisterMemberAccountError;
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
export interface RegisterMemberAccountMutationNext {
|
|
680
|
-
registerMemberAccount_next?: null | {
|
|
681
|
-
__typename: RegisterMemberAccountError;
|
|
682
|
-
};
|
|
683
|
-
}
|
|
684
679
|
export interface RegisterMemberAccountMutationVariables {
|
|
685
680
|
input: {
|
|
686
681
|
id: string;
|
|
@@ -689,16 +684,13 @@ export interface RegisterMemberAccountMutationVariables {
|
|
|
689
684
|
mobileNumber: string;
|
|
690
685
|
birthDay: string;
|
|
691
686
|
domain?: string;
|
|
692
|
-
/**
|
|
693
|
-
* @deprecated use `referralCode` instead
|
|
694
|
-
*/
|
|
695
687
|
btag?: string;
|
|
696
688
|
};
|
|
697
689
|
verificationCode?: string;
|
|
698
690
|
reCAPTCHAResponse?: string;
|
|
699
691
|
referralCode?: string;
|
|
700
692
|
}
|
|
701
|
-
export interface
|
|
693
|
+
export interface RegisterMemberAccountMutationVariables__Next {
|
|
702
694
|
input: {
|
|
703
695
|
id: string;
|
|
704
696
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@opexa/portal-sdk",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"typings": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"require": "./dist/index.js",
|
|
11
|
-
"import": "./dist/index.mjs",
|
|
12
|
-
"types": "./dist/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"publishConfig": {
|
|
17
|
-
"access": "public"
|
|
18
|
-
},
|
|
19
|
-
"files": [
|
|
20
|
-
"dist"
|
|
21
|
-
],
|
|
22
|
-
"scripts": {
|
|
23
|
-
"dev": "vite",
|
|
24
|
-
"build": "tsc --noEmit && vite build --mode library",
|
|
25
|
-
"test": "vitest",
|
|
26
|
-
"release": "release-it"
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@opexa/object-id": "0.1.6"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@ark-ui/react": "3.5.0",
|
|
33
|
-
"@faker-js/faker": "8.4.1",
|
|
34
|
-
"@fontsource/fira-code": "5.0.18",
|
|
35
|
-
"@fontsource/inter": "5.0.19",
|
|
36
|
-
"@hookform/resolvers": "3.9.0",
|
|
37
|
-
"@types/node": "20.14.11",
|
|
38
|
-
"@types/react": "18.3.3",
|
|
39
|
-
"@types/react-dom": "18.3.0",
|
|
40
|
-
"@untitled-theme/icons-react": "0.10.5",
|
|
41
|
-
"@vitejs/plugin-react-swc": "3.7.0",
|
|
42
|
-
"autoprefixer": "10.4.19",
|
|
43
|
-
"clsx": "2.1.1",
|
|
44
|
-
"date-fns": "3.6.0",
|
|
45
|
-
"graphql-config": "5.0.3",
|
|
46
|
-
"msw": "2.3.2",
|
|
47
|
-
"postcss": "8.4.39",
|
|
48
|
-
"react": "18.3.1",
|
|
49
|
-
"react-dom": "18.3.1",
|
|
50
|
-
"react-hook-form": "7.52.1",
|
|
51
|
-
"react-router-dom": "6.25.1",
|
|
52
|
-
"release-it": "17.6.0",
|
|
53
|
-
"shiki": "1.11.0",
|
|
54
|
-
"tailwind-variants": "0.2.1",
|
|
55
|
-
"tailwindcss": "3.4.6",
|
|
56
|
-
"typescript": "5.5.4",
|
|
57
|
-
"vite": "5.3.4",
|
|
58
|
-
"vite-plugin-dts": "3.9.1",
|
|
59
|
-
"vite-plugin-node-polyfills": "0.22.0",
|
|
60
|
-
"vite-tsconfig-paths": "4.3.2",
|
|
61
|
-
"vitest": "2.0.4",
|
|
62
|
-
"zod": "3.23.8"
|
|
63
|
-
},
|
|
64
|
-
"release-it": {
|
|
65
|
-
"git": {
|
|
66
|
-
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
67
|
-
"tagName": "${npm.name}@${version}"
|
|
68
|
-
},
|
|
69
|
-
"github": {
|
|
70
|
-
"release": false
|
|
71
|
-
},
|
|
72
|
-
"hooks": {
|
|
73
|
-
"before:init": [
|
|
74
|
-
"pnpm test"
|
|
75
|
-
],
|
|
76
|
-
"after:bump": [
|
|
77
|
-
"pnpm build"
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@opexa/portal-sdk",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.71",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"typings": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"scripts": {
|
|
23
|
+
"dev": "vite",
|
|
24
|
+
"build": "tsc --noEmit && vite build --mode library",
|
|
25
|
+
"test": "vitest",
|
|
26
|
+
"release": "release-it"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@opexa/object-id": "0.1.6"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@ark-ui/react": "3.5.0",
|
|
33
|
+
"@faker-js/faker": "8.4.1",
|
|
34
|
+
"@fontsource/fira-code": "5.0.18",
|
|
35
|
+
"@fontsource/inter": "5.0.19",
|
|
36
|
+
"@hookform/resolvers": "3.9.0",
|
|
37
|
+
"@types/node": "20.14.11",
|
|
38
|
+
"@types/react": "18.3.3",
|
|
39
|
+
"@types/react-dom": "18.3.0",
|
|
40
|
+
"@untitled-theme/icons-react": "0.10.5",
|
|
41
|
+
"@vitejs/plugin-react-swc": "3.7.0",
|
|
42
|
+
"autoprefixer": "10.4.19",
|
|
43
|
+
"clsx": "2.1.1",
|
|
44
|
+
"date-fns": "3.6.0",
|
|
45
|
+
"graphql-config": "5.0.3",
|
|
46
|
+
"msw": "2.3.2",
|
|
47
|
+
"postcss": "8.4.39",
|
|
48
|
+
"react": "18.3.1",
|
|
49
|
+
"react-dom": "18.3.1",
|
|
50
|
+
"react-hook-form": "7.52.1",
|
|
51
|
+
"react-router-dom": "6.25.1",
|
|
52
|
+
"release-it": "17.6.0",
|
|
53
|
+
"shiki": "1.11.0",
|
|
54
|
+
"tailwind-variants": "0.2.1",
|
|
55
|
+
"tailwindcss": "3.4.6",
|
|
56
|
+
"typescript": "5.5.4",
|
|
57
|
+
"vite": "5.3.4",
|
|
58
|
+
"vite-plugin-dts": "3.9.1",
|
|
59
|
+
"vite-plugin-node-polyfills": "0.22.0",
|
|
60
|
+
"vite-tsconfig-paths": "4.3.2",
|
|
61
|
+
"vitest": "2.0.4",
|
|
62
|
+
"zod": "3.23.8"
|
|
63
|
+
},
|
|
64
|
+
"release-it": {
|
|
65
|
+
"git": {
|
|
66
|
+
"commitMessage": "chore: release ${npm.name} v${version}",
|
|
67
|
+
"tagName": "${npm.name}@${version}"
|
|
68
|
+
},
|
|
69
|
+
"github": {
|
|
70
|
+
"release": false
|
|
71
|
+
},
|
|
72
|
+
"hooks": {
|
|
73
|
+
"before:init": [
|
|
74
|
+
"pnpm test"
|
|
75
|
+
],
|
|
76
|
+
"after:bump": [
|
|
77
|
+
"pnpm build"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|