@opexa/portal-sdk 0.0.99 → 0.0.100

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.
Files changed (2) hide show
  1. package/dist/sdk/types.d.ts +20 -24
  2. package/package.json +1 -1
@@ -437,32 +437,28 @@ export interface DepositRecord {
437
437
  export interface DepositRecordsInput extends Internal.DepositRecordsQueryVariables {
438
438
  }
439
439
  export type DepositRecordsReturn = OperationResult<never, PaginatedQueryResult<'depositRecords', DepositRecord>>;
440
- type DepositResult<T extends string, K extends string, V> = ({
440
+ interface DepositBase<T extends DepositType> {
441
441
  id: string;
442
442
  type: T;
443
- status: 'PENDING';
444
- } & {
445
- [P in K]?: never;
446
- }) | ({
447
- id: string;
448
- type: T;
449
- status: 'REJECTED' | 'CANCELLED';
450
- } & {
451
- [P in K]?: V;
452
- }) | ({
453
- id: string;
454
- type: T;
455
- status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
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>;
443
+ status: DepositStatus;
444
+ vca?: T extends 'ONLINE_BANK' ? string : never;
445
+ qrCode?: T extends 'QR_PH' ? string : never;
446
+ checkoutUrl?: T extends 'GCASH' | 'MAYA' | 'MAYA_APP' ? string : never;
447
+ }
448
+ export interface GCashDeposit extends DepositBase<'GCASH'> {
449
+ }
450
+ export interface MayaDeposit extends DepositBase<'MAYA'> {
451
+ }
452
+ export interface MayaAppDeposit extends DepositBase<'MAYA_APP'> {
453
+ }
454
+ export interface BankDeposit extends DepositBase<'BANK'> {
455
+ }
456
+ export interface ManualDeposit extends DepositBase<'MANUAL'> {
457
+ }
458
+ export interface QRPHDeposit extends DepositBase<'QR_PH'> {
459
+ }
460
+ export interface OnlineBankDeposit extends DepositBase<'ONLINE_BANK'> {
461
+ }
466
462
  export type Deposit = GCashDeposit | MayaDeposit | MayaAppDeposit | BankDeposit | ManualDeposit | QRPHDeposit | OnlineBankDeposit;
467
463
  export type DepositReturn = OperationResult<never, Deposit | null>;
468
464
  export type DepositsCountReturn = OperationResult<never, number>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opexa/portal-sdk",
3
3
  "type": "module",
4
- "version": "0.0.99",
4
+ "version": "0.0.100",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "typings": "dist/index.d.ts",