@opexa/portal-sdk 0.0.66 → 0.0.70

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,4 +1,4 @@
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';
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, 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;
@@ -112,6 +112,25 @@ export declare class Sdk {
112
112
  * ```
113
113
  */
114
114
  createAccount(input: CreateAccountInput): Promise<CreateAccountReturn>;
115
+ /**
116
+ * @example
117
+ * ```ts
118
+ * const res = await sdk.createAccount({
119
+ * id: ObjectId.generate(ObjectType.Account).toString(),
120
+ * name: data.name,
121
+ * password: data.password,
122
+ * mobileNumber: data.mobileNumber,
123
+ * reCAPTCHAResponse: data.reCAPTCHAResponse,
124
+ * });
125
+ *
126
+ * if (!res.ok) {
127
+ * window.alert(res.error.message);
128
+ * } else {
129
+ * // Do something
130
+ * }
131
+ * ```
132
+ */
133
+ createAccountNext(input: CreateAccountInput_next): Promise<CreateAccountReturn>;
115
134
  registerMayaAccount(input: RegisterMayaAccountInput): Promise<RegisterMayaAccountReturn>;
116
135
  /**
117
136
  * @example
@@ -140,6 +140,7 @@ export interface VerificationDetails {
140
140
  id: string;
141
141
  status: VerificationDetailsStatus;
142
142
  address: string;
143
+ permanentAddress: string;
143
144
  sourceOfIncome: string;
144
145
  natureOfWork: string;
145
146
  nationality: string;
@@ -223,6 +224,48 @@ export interface CreateAccountInput {
223
224
  */
224
225
  referralCode?: string;
225
226
  }
227
+ export interface CreateAccountInput_next {
228
+ /**
229
+ * @example
230
+ * ```ts
231
+ * import { ObjectId, ObjectType } from '@opexa/portal-sdk';
232
+ *
233
+ * const id = ObjectId.generate(ObjectType.Account).toString()
234
+ * ```
235
+ */
236
+ id?: string;
237
+ /**
238
+ * @validation
239
+ * - _min_: `8`
240
+ * - _max_: `30`
241
+ * - _pattern_: `/^[a-z0-9]{8,30}$/`
242
+ */
243
+ name: string;
244
+ /**
245
+ * @validation
246
+ * - _min_: `8`
247
+ * - _max_: `30`
248
+ */
249
+ password: string;
250
+ /**
251
+ * @validation
252
+ * - _pattern_: /^(\+?63|0)?9\d{9}$/
253
+ *
254
+ * @example
255
+ * ```bash
256
+ * +639190000000
257
+ * 09190000000
258
+ * 9190000000
259
+ * ```
260
+ */
261
+ mobileNumber?: string | undefined;
262
+ /**
263
+ * @validation
264
+ * - _format_: `date`
265
+ * - _min_: `21 (years)`
266
+ */
267
+ reCAPTCHAResponse?: string;
268
+ }
226
269
  export type CreateAccountError = UnionAlias<Internal.RegisterMemberAccountError>;
227
270
  export type CreateAccountReturn = OperationResult<CreateAccountError, {
228
271
  id: string;
@@ -378,6 +421,12 @@ export interface SubmitVerificationDetailsInput {
378
421
  * - _max_: `120`
379
422
  */
380
423
  address: string;
424
+ /**
425
+ * @validation
426
+ * - _min_: `2`
427
+ * - _max_: `120`
428
+ */
429
+ permanentAddress: string;
381
430
  /**
382
431
  * @validation
383
432
  * - _min_: `2`
@@ -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, ResetPasswordError, ResetPasswordMutationVariables, SendVerificationCodeError, SendVerificationCodeMutationVariables, UpdateMemberAccountError, UpdateMemberAccountMutationVariables, UpdateMemberVerificationError, UpdateMemberVerificationMutationVariables, UpdateReferralCodeError, UpdateReferralCodeMutationVariables, VerifyMobileNumberError, VerifyMobileNumberMutationVariables } from './types';
3
+ import { Announcement, AnnouncementsQueryVariables, CreateMemberVerificationError, CreateMemberVerificationMutationVariables, DeleteMemberAccountMutationVariables, MemberAccount, MemberVerification, PaginatedQueryResult, Platform, ProfileCompletion, RegisterMayaMemberAccountError, RegisterMayaMemberAccountMutationVariables, RegisterMemberAccountError, RegisterMemberAccountMutationVariables, RegisterMemberAccountNextMutationVariables, 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,6 +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
+ registerMemberAccountNext(variables: RegisterMemberAccountNextMutationVariables): Promise<OperationResult<RegisterMemberAccountError>>;
11
12
  updateMemberAccount(variables: UpdateMemberAccountMutationVariables): Promise<OperationResult<UpdateMemberAccountError>>;
12
13
  deleteMemberAccount(variables: DeleteMemberAccountMutationVariables): Promise<OperationResult>;
13
14
  resetPassword(variables: ResetPasswordMutationVariables): Promise<OperationResult<ResetPasswordError>>;
@@ -44,6 +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 REGISTER_MEMBER_NEXT_ACCOUNT_MUTATION: string;
47
48
  export declare const REGISTER_MAYA_MEMBER_ACCOUNT_MUTATION: string;
48
49
  export declare const UPDATE_MEMBER_ACCOUNT_MUTATION: string;
49
50
  export declare const RESET_PASSWORD_MUTATION: string;
@@ -657,6 +657,7 @@ export interface MemberVerification {
657
657
  id: string;
658
658
  status: MemberVerificationStatus;
659
659
  address: string;
660
+ permanentAddress: string;
660
661
  sourceOfIncome: string;
661
662
  natureOfWork: string;
662
663
  nationality: string;
@@ -675,6 +676,11 @@ export interface RegisterMemberAccountMutation {
675
676
  __typename: RegisterMemberAccountError;
676
677
  };
677
678
  }
679
+ export interface RegisterMemberAccountMutationNext {
680
+ registerMemberAccount_next?: null | {
681
+ __typename: RegisterMemberAccountError;
682
+ };
683
+ }
678
684
  export interface RegisterMemberAccountMutationVariables {
679
685
  input: {
680
686
  id: string;
@@ -692,6 +698,15 @@ export interface RegisterMemberAccountMutationVariables {
692
698
  reCAPTCHAResponse?: string;
693
699
  referralCode?: string;
694
700
  }
701
+ export interface RegisterMemberAccountNextMutationVariables {
702
+ input: {
703
+ id: string;
704
+ name: string;
705
+ password: string;
706
+ mobileNumber: string | undefined;
707
+ };
708
+ reCAPTCHAResponse?: string;
709
+ }
695
710
  export interface RegisterMayaMemberAccountMutationVariables {
696
711
  input: {
697
712
  name: string;
@@ -786,6 +801,7 @@ export interface CreateMemberVerificationMutationVariables {
786
801
  idFrontImage: string;
787
802
  selfieImage: string;
788
803
  address: string;
804
+ permanentAddress: string;
789
805
  sourceOfIncome: string;
790
806
  natureOfWork: string;
791
807
  nationality: string;
@@ -805,6 +821,7 @@ export interface UpdateMemberVerificationMutationVariables {
805
821
  idFrontImage?: string;
806
822
  selfieImage?: string;
807
823
  address?: string;
824
+ permanentAddress?: string;
808
825
  sourceOfIncome?: string;
809
826
  natureOfWork?: string;
810
827
  nationality?: string;
package/package.json CHANGED
@@ -1,81 +1,81 @@
1
- {
2
- "name": "@opexa/portal-sdk",
3
- "type": "module",
4
- "version": "0.0.66",
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.70",
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
+ }