@opexa/portal-sdk 0.0.95 → 0.0.97

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.
@@ -343,7 +343,10 @@ export interface Announcement {
343
343
  dateTimeCreated: Date;
344
344
  dateTimeLastUpdated: Date;
345
345
  }
346
+ interface AnnouncementsFilterInput extends Omit<Internal.AnnouncementsQueryVariables['filter'], 'visibility'> {
347
+ }
346
348
  export interface AnnouncementsInput extends Omit<Internal.AnnouncementsQueryVariables, 'filter'> {
349
+ filter?: AnnouncementsFilterInput;
347
350
  }
348
351
  export type AnnouncementsReturn = OperationResult<never, PaginatedQueryResult<'announcements', Announcement>>;
349
352
  export type BetRecordStatus = UnionAlias<Internal.BetRecordStatus>;
@@ -374,15 +377,16 @@ export interface BetRecord {
374
377
  odds?: string;
375
378
  };
376
379
  }
377
- export interface BetRecordsInput extends Internal.BetRecordsQueryVariables {
378
- filter?: {
379
- status?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['status'];
380
- serialCode?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['serialCode'];
381
- gameType?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['game__type'];
382
- gameProvider?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['game__provider'];
383
- vendorRoundId?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['vendorRoundId'];
384
- dateTimeCreated?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['dateTimeCreated'];
385
- };
380
+ interface BetRecordsFilterInput {
381
+ status?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['status'];
382
+ serialCode?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['serialCode'];
383
+ gameType?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['game__type'];
384
+ gameProvider?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['game__provider'];
385
+ vendorRoundId?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['vendorRoundId'];
386
+ dateTimeCreated?: NonNullable<Internal.BetRecordsQueryVariables['filter']>['dateTimeCreated'];
387
+ }
388
+ export interface BetRecordsInput extends Omit<Internal.BetRecordsQueryVariables, 'filter'> {
389
+ filter?: BetRecordsFilterInput;
386
390
  }
387
391
  export type BetRecordsReturn = OperationResult<never, PaginatedQueryResult<'betRecords', BetRecord>>;
388
392
  export interface LatestBetRecord {
@@ -433,108 +437,56 @@ export interface DepositRecord {
433
437
  export interface DepositRecordsInput extends Internal.DepositRecordsQueryVariables {
434
438
  }
435
439
  export type DepositRecordsReturn = OperationResult<never, PaginatedQueryResult<'depositRecords', DepositRecord>>;
436
- export type GCashDeposit = {
440
+ type DepositResult<T extends string, K extends string, V> = ({
437
441
  id: string;
438
- type: 'GCASH';
442
+ type: T;
439
443
  status: 'PENDING';
440
- checkoutUrl?: never;
441
- } | {
444
+ } & {
445
+ [P in K]?: never;
446
+ }) | ({
442
447
  id: string;
443
- type: 'GCASH';
448
+ type: T;
444
449
  status: 'REJECTED' | 'CANCELLED';
445
- checkoutUrl?: string;
446
- } | {
450
+ } & {
451
+ [P in K]?: V;
452
+ }) | ({
447
453
  id: string;
448
- type: 'GCASH';
454
+ type: T;
449
455
  status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
450
- checkoutUrl: string;
451
- };
452
- export type MayaDeposit = {
453
- id: string;
454
- type: 'MAYA';
455
- status: 'PENDING';
456
- checkoutUrl?: never;
457
- } | {
458
- id: string;
459
- type: 'MAYA';
460
- status: 'REJECTED' | 'CANCELLED';
461
- checkoutUrl?: string;
462
- } | {
463
- id: string;
464
- type: 'MAYA';
465
- status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
466
- checkoutUrl: string;
467
- };
468
- export type MayaAppDeposit = {
469
- id: string;
470
- type: 'MAYA_APP';
471
- status: 'PENDING';
472
- checkoutUrl?: never;
473
- } | {
474
- id: string;
475
- type: 'MAYA_APP';
476
- status: 'REJECTED' | 'CANCELLED';
477
- checkoutUrl?: never;
478
- } | {
479
- id: string;
480
- type: 'MAYA_APP';
481
- status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
482
- checkoutUrl?: never;
483
- };
484
- export type BankDeposit = {
485
- id: string;
486
- type: 'BANK';
487
- status: 'PENDING';
488
- checkoutUrl?: never;
489
- } | {
490
- id: string;
491
- type: 'BANK';
492
- status: 'REJECTED' | 'CANCELLED';
493
- checkoutUrl?: never;
494
- } | {
495
- id: string;
496
- type: 'BANK';
497
- status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
498
- checkoutUrl?: string;
499
- };
500
- export type ManualDeposit = {
501
- id: string;
502
- type: 'MANUAL';
503
- status: 'PENDING';
504
- checkoutUrl?: never;
505
- } | {
506
- id: string;
507
- type: 'MANUAL';
508
- status: 'REJECTED' | 'CANCELLED';
509
- checkoutUrl?: never;
510
- } | {
511
- id: string;
512
- type: 'MANUAL';
513
- status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
514
- checkoutUrl?: never;
515
- };
516
- export type Deposit = GCashDeposit | MayaDeposit | MayaAppDeposit | BankDeposit | ManualDeposit;
456
+ } & {
457
+ [P in K]: V;
458
+ });
459
+ export type GCashDeposit = DepositResult<'GCASH', 'checkoutUrl', string>;
460
+ export type MayaDeposit = DepositResult<'MAYA', 'checkoutUrl', string>;
461
+ export type MayaAppDeposit = DepositResult<'MAYA_APP', 'checkoutUrl', string>;
462
+ export type BankDeposit = DepositResult<'BANK', 'checkoutUrl', string>;
463
+ export type ManualDeposit = DepositResult<'MANUAL', 'checkoutUrl', never>;
464
+ export type QRPHDeposit = DepositResult<'QR_PH', 'qrCode', string>;
465
+ export type OnlineBankDeposit = DepositResult<'ONLINE_BANK', 'vca', string>;
466
+ export type Deposit = GCashDeposit | MayaDeposit | MayaAppDeposit | BankDeposit | ManualDeposit | QRPHDeposit | OnlineBankDeposit;
517
467
  export type DepositReturn = OperationResult<never, Deposit | null>;
518
468
  export type DepositsCountReturn = OperationResult<never, number>;
519
- export interface CreateMayaDepositInput {
469
+ interface CreateDepositBaseInput {
520
470
  id?: string;
521
- type: 'MAYA';
522
471
  amount: number;
523
472
  promo?: string;
524
473
  }
525
- export interface CreateGCashDepositInput {
526
- id?: string;
474
+ export interface CreateMayaDepositInput extends CreateDepositBaseInput {
475
+ type: 'MAYA';
476
+ }
477
+ export interface CreateGCashDepositInput extends CreateDepositBaseInput {
527
478
  type: 'GCASH';
528
- amount: number;
529
- promo?: string;
530
479
  }
531
- export interface CreateMayaAppDepositInput {
532
- id?: string;
480
+ export interface CreateMayaAppDepositInput extends CreateDepositBaseInput {
533
481
  type: 'MAYA_APP';
534
- amount: number;
535
- promo?: string;
536
482
  }
537
- export type CreateDepositInput = CreateMayaDepositInput | CreateGCashDepositInput | CreateMayaAppDepositInput;
483
+ export interface CreateAIOQRPHDepositInput extends CreateDepositBaseInput {
484
+ type: 'AIO_QRPH';
485
+ }
486
+ export interface CreateAIOOnlineBankDepositInput extends CreateDepositBaseInput {
487
+ type: 'AIO_ONLINE_BANK';
488
+ }
489
+ export type CreateDepositInput = CreateMayaDepositInput | CreateGCashDepositInput | CreateMayaAppDepositInput | CreateAIOQRPHDepositInput | CreateAIOOnlineBankDepositInput;
538
490
  export type CreateDepositError = UnionAlias<Internal.CreateDepositError>;
539
491
  export type CreateDepositReturn = OperationResult<CreateDepositError, {
540
492
  id: string;
@@ -25,6 +25,8 @@ export declare const DEPOSIT_RECORDS_QUERY: string;
25
25
  export declare const CREATE_GCASH_DEPOSIT_MUTATION: string;
26
26
  export declare const CREATE_MAYA_DEPOSIT_MUTATION: string;
27
27
  export declare const CREATE_MAYA_APP_DEPOSIT_MUTATION: string;
28
+ export declare const CREATE_AIO_QRPH_DEPOSIT_MUTATION: string;
29
+ export declare const CREATE_AIO_ONLINE_BANK_DEPOSIT_MUTATION: string;
28
30
  export declare const DEPOSIT_QUERY: string;
29
31
  export declare const DEPOSITS_COUNT_QUERY: string;
30
32
  export declare const BET_RECORDS_QUERY: string;
@@ -276,7 +276,7 @@ export interface LatestBetRecord {
276
276
  export interface LatestBetRecordsQuery {
277
277
  latestBetRecords: LatestBetRecord[];
278
278
  }
279
- export type DepositType = 'BANK' | 'GCASH' | 'MANUAL' | 'MAYA' | 'MAYA_APP';
279
+ export type DepositType = 'BANK' | 'GCASH' | 'MANUAL' | 'MAYA' | 'MAYA_APP' | 'QR_PH' | 'ONLINE_BANK';
280
280
  export type DepositStatus = 'PENDING' | 'ACCEPTED' | 'APPROVED' | 'REJECTED' | 'CONFIRMED' | 'CANCELLED';
281
281
  export interface DepositRecord {
282
282
  id: string;
@@ -330,6 +330,30 @@ export interface CreateMayaDepositMutationVariables {
330
330
  promo?: string;
331
331
  };
332
332
  }
333
+ export interface CreateAIOQRPHDepositMutation {
334
+ createAIOQRPHDeposit?: null | {
335
+ __typename: CreateDepositError;
336
+ };
337
+ }
338
+ export interface CreateAIOQRPHDepositMutationVariables {
339
+ input: {
340
+ id: string;
341
+ amount: Decimal;
342
+ promo?: string;
343
+ };
344
+ }
345
+ export interface CreateAIOOnlineBankDepositMutation {
346
+ createAIOOnlineBankDeposit?: null | {
347
+ __typename: CreateDepositError;
348
+ };
349
+ }
350
+ export interface CreateAIOOnlineBankDepositMutationVariables {
351
+ input: {
352
+ id: string;
353
+ amount: Decimal;
354
+ promo?: string;
355
+ };
356
+ }
333
357
  export interface CreateMayaAppDepositMutation {
334
358
  createMayaAppDeposit?: null | {
335
359
  __typename: CreateDepositError;
@@ -346,6 +370,7 @@ export interface Deposit {
346
370
  id: string;
347
371
  type: DepositType;
348
372
  status: DepositStatus;
373
+ qrCode?: string | null;
349
374
  checkoutUrl?: string;
350
375
  }
351
376
  export interface DepositQuery {
@@ -1,6 +1,6 @@
1
1
  import { GraphQLClient } from '../utils/graphql-client';
2
2
  import { OperationResult } from '../utils/types';
3
- import { AvailablePromosQueryVariables, Bonus, Cashback, CashbackBonus, ClaimCashbackBonusError, ClaimCashbackBonusMutationVariables, CreateBankWithdrawalMutationVariables, CreateDepositError, CreateGCashDepositMutationVariables, CreateGCashWithdrawalMutationVariables, CreateGameSessionError, CreateGameSessionMutationVariables, CreateMayaAppDepositMutationVariables, CreateMayaAppWithdrawalMutationVariables, CreateMayaDepositMutationVariables, CreateMayaWithdrawalMutationVariables, CreateWithdrawalError, Deposit, DepositQueryVariables, EndGameSessionMutationVariables, GameSession, GameSessionQueryVariables, MayaSession, MayaSessionQueryVariables, PointsWallet, Promo, RedeemPointsToCashError, RedeemPointsToCashMutationVariables, Wallet } from './types';
3
+ import { AvailablePromosQueryVariables, Bonus, Cashback, CashbackBonus, ClaimCashbackBonusError, ClaimCashbackBonusMutationVariables, CreateAIOOnlineBankDepositMutationVariables, CreateAIOQRPHDepositMutationVariables, CreateBankWithdrawalMutationVariables, CreateDepositError, CreateGCashDepositMutationVariables, CreateGCashWithdrawalMutationVariables, CreateGameSessionError, CreateGameSessionMutationVariables, CreateMayaAppDepositMutationVariables, CreateMayaAppWithdrawalMutationVariables, CreateMayaDepositMutationVariables, CreateMayaWithdrawalMutationVariables, CreateWithdrawalError, Deposit, DepositQueryVariables, EndGameSessionMutationVariables, GameSession, GameSessionQueryVariables, MayaSession, MayaSessionQueryVariables, PointsWallet, Promo, RedeemPointsToCashError, RedeemPointsToCashMutationVariables, Wallet } from './types';
4
4
 
5
5
  export declare class WalletService {
6
6
  private client;
@@ -15,6 +15,8 @@ export declare class WalletService {
15
15
  deposit(variables: DepositQueryVariables): Promise<OperationResult<never, Deposit | null | undefined>>;
16
16
  createGCashDeposit(variables: CreateGCashDepositMutationVariables): Promise<OperationResult<CreateDepositError>>;
17
17
  createMayaDeposit(variables: CreateMayaDepositMutationVariables): Promise<OperationResult<CreateDepositError>>;
18
+ createAIOQRPHDeposit(variables: CreateAIOQRPHDepositMutationVariables): Promise<OperationResult<CreateDepositError>>;
19
+ createAIOOnlineBankDeposit(variables: CreateAIOOnlineBankDepositMutationVariables): Promise<OperationResult<CreateDepositError>>;
18
20
  createMayaAppDeposit(variables: CreateMayaAppDepositMutationVariables): Promise<OperationResult<CreateDepositError>>;
19
21
  createGCashWithdrawal(variables: CreateGCashWithdrawalMutationVariables): Promise<OperationResult<CreateWithdrawalError>>;
20
22
  createMayaWithdrawal(variables: CreateMayaWithdrawalMutationVariables): Promise<OperationResult<CreateWithdrawalError>>;
package/package.json CHANGED
@@ -1,81 +1,81 @@
1
- {
2
- "name": "@opexa/portal-sdk",
3
- "type": "module",
4
- "version": "0.0.95",
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.97",
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
+ }