@opexa/portal-sdk 0.0.96 → 0.0.98
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 +158 -79
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +773 -602
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/types.d.ts +37 -86
- package/dist/services/queries.d.ts +2 -0
- package/dist/services/types.d.ts +32 -1
- package/dist/services/wallet.service.d.ts +3 -1
- package/package.json +1 -1
package/dist/sdk/types.d.ts
CHANGED
|
@@ -437,108 +437,56 @@ export interface DepositRecord {
|
|
|
437
437
|
export interface DepositRecordsInput extends Internal.DepositRecordsQueryVariables {
|
|
438
438
|
}
|
|
439
439
|
export type DepositRecordsReturn = OperationResult<never, PaginatedQueryResult<'depositRecords', DepositRecord>>;
|
|
440
|
-
|
|
440
|
+
type DepositResult<T extends string, K extends string, V> = ({
|
|
441
441
|
id: string;
|
|
442
|
-
type:
|
|
443
|
-
status: 'PENDING';
|
|
444
|
-
checkoutUrl?: never;
|
|
445
|
-
} | {
|
|
446
|
-
id: string;
|
|
447
|
-
type: 'GCASH';
|
|
448
|
-
status: 'REJECTED' | 'CANCELLED';
|
|
449
|
-
checkoutUrl?: string;
|
|
450
|
-
} | {
|
|
451
|
-
id: string;
|
|
452
|
-
type: 'GCASH';
|
|
453
|
-
status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
|
|
454
|
-
checkoutUrl: string;
|
|
455
|
-
};
|
|
456
|
-
export type MayaDeposit = {
|
|
457
|
-
id: string;
|
|
458
|
-
type: 'MAYA';
|
|
459
|
-
status: 'PENDING';
|
|
460
|
-
checkoutUrl?: never;
|
|
461
|
-
} | {
|
|
462
|
-
id: string;
|
|
463
|
-
type: 'MAYA';
|
|
464
|
-
status: 'REJECTED' | 'CANCELLED';
|
|
465
|
-
checkoutUrl?: string;
|
|
466
|
-
} | {
|
|
467
|
-
id: string;
|
|
468
|
-
type: 'MAYA';
|
|
469
|
-
status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
|
|
470
|
-
checkoutUrl: string;
|
|
471
|
-
};
|
|
472
|
-
export type MayaAppDeposit = {
|
|
473
|
-
id: string;
|
|
474
|
-
type: 'MAYA_APP';
|
|
475
|
-
status: 'PENDING';
|
|
476
|
-
checkoutUrl?: never;
|
|
477
|
-
} | {
|
|
478
|
-
id: string;
|
|
479
|
-
type: 'MAYA_APP';
|
|
480
|
-
status: 'REJECTED' | 'CANCELLED';
|
|
481
|
-
checkoutUrl?: never;
|
|
482
|
-
} | {
|
|
483
|
-
id: string;
|
|
484
|
-
type: 'MAYA_APP';
|
|
485
|
-
status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
|
|
486
|
-
checkoutUrl?: never;
|
|
487
|
-
};
|
|
488
|
-
export type BankDeposit = {
|
|
489
|
-
id: string;
|
|
490
|
-
type: 'BANK';
|
|
442
|
+
type: T;
|
|
491
443
|
status: 'PENDING';
|
|
492
|
-
|
|
493
|
-
|
|
444
|
+
} & {
|
|
445
|
+
[P in K]?: never;
|
|
446
|
+
}) | ({
|
|
494
447
|
id: string;
|
|
495
|
-
type:
|
|
448
|
+
type: T;
|
|
496
449
|
status: 'REJECTED' | 'CANCELLED';
|
|
497
|
-
|
|
498
|
-
|
|
450
|
+
} & {
|
|
451
|
+
[P in K]?: V;
|
|
452
|
+
}) | ({
|
|
499
453
|
id: string;
|
|
500
|
-
type:
|
|
454
|
+
type: T;
|
|
501
455
|
status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
checkoutUrl?: never;
|
|
514
|
-
} | {
|
|
515
|
-
id: string;
|
|
516
|
-
type: 'MANUAL';
|
|
517
|
-
status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
|
|
518
|
-
checkoutUrl?: never;
|
|
519
|
-
};
|
|
520
|
-
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;
|
|
521
467
|
export type DepositReturn = OperationResult<never, Deposit | null>;
|
|
522
468
|
export type DepositsCountReturn = OperationResult<never, number>;
|
|
523
|
-
|
|
469
|
+
interface CreateDepositBaseInput {
|
|
524
470
|
id?: string;
|
|
525
|
-
type: 'MAYA';
|
|
526
471
|
amount: number;
|
|
527
472
|
promo?: string;
|
|
528
473
|
}
|
|
529
|
-
export interface
|
|
530
|
-
|
|
474
|
+
export interface CreateMayaDepositInput extends CreateDepositBaseInput {
|
|
475
|
+
type: 'MAYA';
|
|
476
|
+
}
|
|
477
|
+
export interface CreateGCashDepositInput extends CreateDepositBaseInput {
|
|
531
478
|
type: 'GCASH';
|
|
532
|
-
amount: number;
|
|
533
|
-
promo?: string;
|
|
534
479
|
}
|
|
535
|
-
export interface CreateMayaAppDepositInput {
|
|
536
|
-
id?: string;
|
|
480
|
+
export interface CreateMayaAppDepositInput extends CreateDepositBaseInput {
|
|
537
481
|
type: 'MAYA_APP';
|
|
538
|
-
amount: number;
|
|
539
|
-
promo?: string;
|
|
540
482
|
}
|
|
541
|
-
export
|
|
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;
|
|
542
490
|
export type CreateDepositError = UnionAlias<Internal.CreateDepositError>;
|
|
543
491
|
export type CreateDepositReturn = OperationResult<CreateDepositError, {
|
|
544
492
|
id: string;
|
|
@@ -638,12 +586,15 @@ export interface PaymentSettings {
|
|
|
638
586
|
gcash: GatewaySettings;
|
|
639
587
|
maya: GatewaySettings;
|
|
640
588
|
mayaApp: GatewaySettings;
|
|
589
|
+
qrph: GatewaySettings;
|
|
590
|
+
onlineBank: GatewaySettings;
|
|
641
591
|
};
|
|
642
592
|
withdrawalGateway: {
|
|
643
593
|
bank: GatewaySettings;
|
|
644
594
|
gcash: GatewaySettings;
|
|
645
595
|
maya: GatewaySettings;
|
|
646
596
|
mayaApp: GatewaySettings;
|
|
597
|
+
instapay: GatewaySettings;
|
|
647
598
|
};
|
|
648
599
|
}
|
|
649
600
|
/** @deprecated */
|
|
@@ -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;
|
package/dist/services/types.d.ts
CHANGED
|
@@ -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 {
|
|
@@ -860,10 +885,13 @@ export interface Platform {
|
|
|
860
885
|
gcashDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
861
886
|
mayaDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
862
887
|
mayaAppDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
888
|
+
onlineBankDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
889
|
+
qrphDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
863
890
|
bankWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
864
891
|
gcashWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
865
892
|
mayaWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
866
893
|
mayaAppWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
894
|
+
instapayWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
867
895
|
pointsClubSettings?: PointsClubSettings | null;
|
|
868
896
|
}
|
|
869
897
|
/** @deprecated */
|
|
@@ -880,10 +908,13 @@ export interface PaymentSettings {
|
|
|
880
908
|
gcashDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
881
909
|
mayaDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
882
910
|
mayaAppDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
911
|
+
onlineBankDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
912
|
+
qrphDepositGatewaySettings?: DepositGatewaySettings | null;
|
|
883
913
|
bankWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
884
914
|
gcashWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
885
915
|
mayaWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
886
916
|
mayaAppWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
917
|
+
instapayWithdrawalGatewaySettings?: WithdrawalGatewaySettings | null;
|
|
887
918
|
}
|
|
888
919
|
export type PaymentSettingsQuery = PaymentSettings;
|
|
889
920
|
export interface Session {
|
|
@@ -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>>;
|