@spritz-finance/service-client 0.2.74 → 0.2.76

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/lib/config.d.ts CHANGED
@@ -11,6 +11,7 @@ interface GraphClientConfig {
11
11
  exchangeRatesServiceEndpoint: string;
12
12
  web3ServiceEndpoint: string;
13
13
  unblockServiceEndpoint: string;
14
+ onrampServiceEndpoint: string;
14
15
  }
15
16
  export declare const config: GraphClientConfig;
16
17
  export {};
package/lib/config.js CHANGED
@@ -17,6 +17,7 @@ const envConfigs = {
17
17
  exchangeRatesServiceEndpoint: 'https://api-dev.spritz.finance/exchange-rates',
18
18
  web3ServiceEndpoint: 'https://api-dev.spritz.finance/web3',
19
19
  unblockServiceEndpoint: 'https://api-dev.spritz.finance/unblock',
20
+ onrampServiceEndpoint: 'https://api-dev.spritz.finance/bridge',
20
21
  },
21
22
  test: {
22
23
  env: 'staging',
@@ -30,6 +31,7 @@ const envConfigs = {
30
31
  growthServiceEndpoint: 'https://api-staging.spritz.finance/growth',
31
32
  exchangeRatesServiceEndpoint: 'https://api-staging.spritz.finance/exchange-rates',
32
33
  web3ServiceEndpoint: 'https://api-staging.spritz.finance/web3',
34
+ onrampServiceEndpoint: 'https://api-staging.spritz.finance/bridge',
33
35
  },
34
36
  staging: {
35
37
  authEndpoint: 'https://auth-staging.spritz.finance/oauth2/token',
@@ -56,6 +58,7 @@ const envConfigs = {
56
58
  exchangeRatesServiceEndpoint: 'https://api.spritz.finance/exchange-rates',
57
59
  web3ServiceEndpoint: 'https://api.spritz.finance/web3',
58
60
  unblockServiceEndpoint: 'https://api.spritz.finance/unblock',
61
+ onrampServiceEndpoint: 'https://api.spritz.finance/bridge',
59
62
  },
60
63
  };
61
64
  exports.config = (0, config_1.setupEnvConfig)(envConfigs);
package/lib/index.d.ts CHANGED
@@ -10,3 +10,4 @@ export * from './payableAccountsServiceClient';
10
10
  export * from './exchangeRatesServiceClient';
11
11
  export * from './web3ServiceClient';
12
12
  export * from './unblockServiceClient';
13
+ export * from './onrampServiceClient';
package/lib/index.js CHANGED
@@ -26,3 +26,4 @@ __exportStar(require("./payableAccountsServiceClient"), exports);
26
26
  __exportStar(require("./exchangeRatesServiceClient"), exports);
27
27
  __exportStar(require("./web3ServiceClient"), exports);
28
28
  __exportStar(require("./unblockServiceClient"), exports);
29
+ __exportStar(require("./onrampServiceClient"), exports);
@@ -122,7 +122,7 @@ export type AvailableVirtualCardType = {
122
122
  export type BankAccount = PayableAccount & {
123
123
  __typename?: 'BankAccount';
124
124
  accountNumber: Scalars['String']['output'];
125
- bankAccountDetails: BankAccountDetails;
125
+ bankAccountDetails?: Maybe<BankAccountDetails>;
126
126
  bankAccountFeatures?: Maybe<BankAccountFeatures>;
127
127
  bankAccountSubType: BankAccountSubType;
128
128
  bankAccountType: BankAccountType;
@@ -360,6 +360,7 @@ export type CheckbookPayment = {
360
360
  number: Scalars['Float']['output'];
361
361
  paymentId: Scalars['ObjectID']['output'];
362
362
  recipient: Scalars['String']['output'];
363
+ releaseDate?: Maybe<Scalars['DateTimeISO']['output']>;
363
364
  status: CheckbookPaymentStatus;
364
365
  userId: Scalars['ObjectID']['output'];
365
366
  };
@@ -488,6 +489,7 @@ export type DirectPayment = {
488
489
  toAddress?: Maybe<Scalars['String']['output']>;
489
490
  tokenAddress: Scalars['String']['output'];
490
491
  totalAmount: Scalars['Float']['output'];
492
+ totalTargetCurrencyAmount: Scalars['Float']['output'];
491
493
  transaction?: Maybe<DirectPaymentTransactionReference>;
492
494
  transactionReferences: Array<DirectPaymentTransactionReference>;
493
495
  user: User;
@@ -498,6 +500,7 @@ export declare enum DirectPaymentStatus {
498
500
  Confirmed = "CONFIRMED",
499
501
  Created = "CREATED",
500
502
  Failed = "FAILED",
503
+ FailedValidation = "FAILED_VALIDATION",
501
504
  Pending = "PENDING",
502
505
  Refunded = "REFUNDED",
503
506
  TransactionFailed = "TRANSACTION_FAILED",
@@ -536,6 +539,7 @@ export type ExternalPayment = {
536
539
  estimatedCompletionDate?: Maybe<Scalars['DateTimeISO']['output']>;
537
540
  id: Scalars['ID']['output'];
538
541
  paymentProvider: PaymentProvider;
542
+ releaseDate?: Maybe<Scalars['DateTimeISO']['output']>;
539
543
  status: PaymentStatus;
540
544
  };
541
545
  export type GasPrice = {
@@ -551,36 +555,6 @@ export type GasSpeed = {
551
555
  instant?: Maybe<Scalars['Float']['output']>;
552
556
  standard?: Maybe<Scalars['Float']['output']>;
553
557
  };
554
- export type GrowsurfParticipant = {
555
- __typename?: 'GrowsurfParticipant';
556
- checkedFeeRewards: Scalars['Boolean']['output'];
557
- email: Scalars['String']['output'];
558
- fraudRiskLevel: Scalars['String']['output'];
559
- id: Scalars['ID']['output'];
560
- impressionCount: Scalars['Float']['output'];
561
- monthlyReferralCount: Scalars['Float']['output'];
562
- prevMonthlyReferralCount: Scalars['Float']['output'];
563
- referralCount: Scalars['Float']['output'];
564
- referralSource: Scalars['String']['output'];
565
- referralStatus?: Maybe<Scalars['String']['output']>;
566
- referredBy?: Maybe<Scalars['String']['output']>;
567
- referrer?: Maybe<GrowsurfParticipant>;
568
- shareCount: Scalars['Float']['output'];
569
- shareUrl: Scalars['String']['output'];
570
- uniqueImpressionCount: Scalars['Float']['output'];
571
- userId: Scalars['ObjectID']['output'];
572
- vanityKeys: Array<Scalars['String']['output']>;
573
- };
574
- export type GrowsurfReferralStats = {
575
- __typename?: 'GrowsurfReferralStats';
576
- id: Scalars['ID']['output'];
577
- /** Number of qualified referrals, having paid bills */
578
- qualifiedReferrals: Scalars['Float']['output'];
579
- /** Dollar amount earned from referrals */
580
- rewardsEarned: Scalars['Float']['output'];
581
- /** Number of users signed up from this user's referrals */
582
- signups: Scalars['Float']['output'];
583
- };
584
558
  export type IdentityModule = {
585
559
  __typename?: 'IdentityModule';
586
560
  accountType?: Maybe<Scalars['String']['output']>;
@@ -622,15 +596,6 @@ export type LiquidityLimitsInput = {
622
596
  checkbookHighWaterMark: Scalars['Float']['input'];
623
597
  checkbookLowWaterMark: Scalars['Float']['input'];
624
598
  };
625
- export type MemberReferralStats = {
626
- __typename?: 'MemberReferralStats';
627
- allTimeEarnings: Scalars['Float']['output'];
628
- currentMonthEarnings: Scalars['Float']['output'];
629
- currentMonthRevenueShare: Scalars['Float']['output'];
630
- referralsAllTime: Scalars['Int']['output'];
631
- referralsThisMonth: Scalars['Int']['output'];
632
- signupsThisMonth: Scalars['Int']['output'];
633
- };
634
599
  export type MercuryAccountInfo = {
635
600
  __typename?: 'MercuryAccountInfo';
636
601
  accountNumber: Scalars['String']['output'];
@@ -813,7 +778,6 @@ export declare enum ModuleStatus {
813
778
  }
814
779
  export type Mutation = {
815
780
  __typename?: 'Mutation';
816
- addAffiliateReferralCode: Scalars['Boolean']['output'];
817
781
  addAssociatedWallet: Scalars['Boolean']['output'];
818
782
  addSignupCode: Scalars['Boolean']['output'];
819
783
  /** @deprecated No longer used */
@@ -824,14 +788,16 @@ export type Mutation = {
824
788
  approvePaymentReversal: Scalars['Boolean']['output'];
825
789
  associateNotificationToken: UserNotificationToken;
826
790
  cancelOnrampPayment: Scalars['Boolean']['output'];
791
+ cancelPayment: Payment;
827
792
  changeBillType: Bill;
828
793
  checkbookNotifyFunding: Scalars['Boolean']['output'];
794
+ checkbookReleasePayment?: Maybe<Scalars['Boolean']['output']>;
829
795
  checkbookSendQueuedPayments?: Maybe<Array<CheckbookPayment>>;
796
+ checkbookSetReleaseDate?: Maybe<Scalars['Boolean']['output']>;
830
797
  createApiToken: ApiToken;
831
798
  createApiTokenFor?: Maybe<ApiToken>;
832
799
  createBankAccount: BankAccount;
833
800
  createDirectPayment: DirectPayment;
834
- createGrowsurfParticipant?: Maybe<GrowsurfParticipant>;
835
801
  createIntegrationToken: IntegrationToken;
836
802
  createIntegrator: Integrator;
837
803
  createOnrampPayment: OnRampPayment;
@@ -861,6 +827,7 @@ export type Mutation = {
861
827
  renamePayableAccount: PayableAccount;
862
828
  requestAccountDeletion: Scalars['Boolean']['output'];
863
829
  requestBankAccountVerification: Scalars['Boolean']['output'];
830
+ requestUnblockOTP: Scalars['Boolean']['output'];
864
831
  resetEntity: Scalars['Boolean']['output'];
865
832
  restartFlow: Verification;
866
833
  resubmitEntityVerification: Scalars['Boolean']['output'];
@@ -871,12 +838,15 @@ export type Mutation = {
871
838
  setIntegrator: Scalars['Boolean']['output'];
872
839
  setLiquidityLimits: LiquidityLimits;
873
840
  setUserAccountType: User;
841
+ setUserDeleted: User;
874
842
  setUserLimits: PricingUser;
875
843
  setUserPricing: PricingUser;
876
844
  setUserTwitterVerified: User;
877
845
  setVerificationStatus?: Maybe<Verification>;
878
846
  setupWallet: Scalars['Boolean']['output'];
879
847
  simulatePaymentUpdate: Scalars['Boolean']['output'];
848
+ simulateUnblockAccountPayment: Scalars['Boolean']['output'];
849
+ simulateUnblockKycStatus: Scalars['Boolean']['output'];
880
850
  skipAttributionSurvey: Scalars['Boolean']['output'];
881
851
  submitAttributionSurvey: Scalars['Boolean']['output'];
882
852
  submitBankAccountVerification: BankAccount;
@@ -885,11 +855,9 @@ export type Mutation = {
885
855
  updateAttributionSource?: Maybe<User>;
886
856
  updateCurrentUser: User;
887
857
  updateEntityAuthentication?: Maybe<MethodFiEntity>;
858
+ updateTokenPreferences: Scalars['Boolean']['output'];
888
859
  updateUserTimezone: User;
889
860
  };
890
- export type MutationAddAffiliateReferralCodeArgs = {
891
- referralCode: Scalars['String']['input'];
892
- };
893
861
  export type MutationAddAssociatedWalletArgs = {
894
862
  address: Scalars['String']['input'];
895
863
  };
@@ -919,6 +887,9 @@ export type MutationAssociateNotificationTokenArgs = {
919
887
  export type MutationCancelOnrampPaymentArgs = {
920
888
  paymentId: Scalars['String']['input'];
921
889
  };
890
+ export type MutationCancelPaymentArgs = {
891
+ paymentId: Scalars['String']['input'];
892
+ };
922
893
  export type MutationChangeBillTypeArgs = {
923
894
  accountId: Scalars['String']['input'];
924
895
  billType: BillType;
@@ -926,9 +897,16 @@ export type MutationChangeBillTypeArgs = {
926
897
  export type MutationCheckbookNotifyFundingArgs = {
927
898
  notifyFundingInput: CheckbookNotifyFundingInput;
928
899
  };
900
+ export type MutationCheckbookReleasePaymentArgs = {
901
+ paymentId: Scalars['String']['input'];
902
+ };
929
903
  export type MutationCheckbookSendQueuedPaymentsArgs = {
930
904
  checkbookSendQueuedPaymentsInput?: InputMaybe<CheckbookSendQueuedPaymentsInput>;
931
905
  };
906
+ export type MutationCheckbookSetReleaseDateArgs = {
907
+ paymentId: Scalars['String']['input'];
908
+ releaseDate?: InputMaybe<Scalars['DateTimeISO']['input']>;
909
+ };
932
910
  export type MutationCreateApiTokenForArgs = {
933
911
  integratorId?: InputMaybe<Scalars['String']['input']>;
934
912
  userId: Scalars['String']['input'];
@@ -939,9 +917,6 @@ export type MutationCreateBankAccountArgs = {
939
917
  export type MutationCreateDirectPaymentArgs = {
940
918
  createDirectPaymentInput: CreateDirectPaymentInput;
941
919
  };
942
- export type MutationCreateGrowsurfParticipantArgs = {
943
- referrerId?: InputMaybe<Scalars['String']['input']>;
944
- };
945
920
  export type MutationCreateIntegrationTokenArgs = {
946
921
  integratorId: Scalars['String']['input'];
947
922
  };
@@ -1055,6 +1030,10 @@ export type MutationSetUserAccountTypeArgs = {
1055
1030
  accountType: Scalars['String']['input'];
1056
1031
  userId: Scalars['String']['input'];
1057
1032
  };
1033
+ export type MutationSetUserDeletedArgs = {
1034
+ deleted: Scalars['Boolean']['input'];
1035
+ userId: Scalars['String']['input'];
1036
+ };
1058
1037
  export type MutationSetUserLimitsArgs = {
1059
1038
  input: SetUserLimitsInput;
1060
1039
  };
@@ -1078,6 +1057,13 @@ export type MutationSimulatePaymentUpdateArgs = {
1078
1057
  paymentId: Scalars['String']['input'];
1079
1058
  status: Scalars['String']['input'];
1080
1059
  };
1060
+ export type MutationSimulateUnblockAccountPaymentArgs = {
1061
+ accountExternalId: Scalars['String']['input'];
1062
+ otp: Scalars['String']['input'];
1063
+ };
1064
+ export type MutationSimulateUnblockKycStatusArgs = {
1065
+ otp: Scalars['String']['input'];
1066
+ };
1081
1067
  export type MutationSubmitAttributionSurveyArgs = {
1082
1068
  attributionSurveyInput: AttributionSurveyInput;
1083
1069
  };
@@ -1100,6 +1086,9 @@ export type MutationUpdateCurrentUserArgs = {
1100
1086
  export type MutationUpdateEntityAuthenticationArgs = {
1101
1087
  connectionId?: InputMaybe<Scalars['String']['input']>;
1102
1088
  };
1089
+ export type MutationUpdateTokenPreferencesArgs = {
1090
+ tokenPreferencesInput: TokenPreferencesInput;
1091
+ };
1103
1092
  export type MutationUpdateUserTimezoneArgs = {
1104
1093
  timezone: Scalars['String']['input'];
1105
1094
  };
@@ -1121,11 +1110,14 @@ export type OnRampPayment = {
1121
1110
  amount: Scalars['Float']['output'];
1122
1111
  createdAt: Scalars['DateTimeISO']['output'];
1123
1112
  currency: Scalars['String']['output'];
1124
- depositInstructions: OnrampPaymentDepositInstructions;
1113
+ depositInstructions?: Maybe<OnrampPaymentDepositInstructions>;
1125
1114
  externalId: Scalars['String']['output'];
1126
1115
  feeAmount: Scalars['Float']['output'];
1127
1116
  id: Scalars['ID']['output'];
1128
1117
  network: Scalars['String']['output'];
1118
+ sourceCurrency: Scalars['String']['output'];
1119
+ sourceCurrencyAmount: Scalars['Float']['output'];
1120
+ sourceCurrencyFee: Scalars['Float']['output'];
1129
1121
  status: OnrampPaymentStatus;
1130
1122
  token: Scalars['String']['output'];
1131
1123
  totalAmount: Scalars['Float']['output'];
@@ -1147,8 +1139,24 @@ export declare enum OnrampPaymentStatus {
1147
1139
  AwaitingFunds = "AWAITING_FUNDS",
1148
1140
  Cancelled = "CANCELLED",
1149
1141
  Completed = "COMPLETED",
1142
+ Failed = "FAILED",
1143
+ OnHold = "ON_HOLD",
1150
1144
  Pending = "PENDING"
1151
1145
  }
1146
+ export type PaginatedReferral = {
1147
+ __typename?: 'PaginatedReferral';
1148
+ currentPage: Scalars['Float']['output'];
1149
+ items: Array<Referral>;
1150
+ pages: Scalars['Float']['output'];
1151
+ totalCount: Scalars['Float']['output'];
1152
+ };
1153
+ export type PaginatedReferralReward = {
1154
+ __typename?: 'PaginatedReferralReward';
1155
+ currentPage: Scalars['Float']['output'];
1156
+ items: Array<ReferralReward>;
1157
+ pages: Scalars['Float']['output'];
1158
+ totalCount: Scalars['Float']['output'];
1159
+ };
1152
1160
  export type PaginatedRewardTransaction = {
1153
1161
  __typename?: 'PaginatedRewardTransaction';
1154
1162
  currentPage: Scalars['Float']['output'];
@@ -1343,8 +1351,10 @@ export declare enum PaymentType {
1343
1351
  }
1344
1352
  export type PaymentsFilter = {
1345
1353
  accountId?: InputMaybe<Scalars['ObjectID']['input']>;
1354
+ endDate?: InputMaybe<Scalars['DateTimeISO']['input']>;
1346
1355
  paymentId?: InputMaybe<Scalars['String']['input']>;
1347
1356
  paymentProvider?: InputMaybe<PaymentProvider>;
1357
+ startDate?: InputMaybe<Scalars['DateTimeISO']['input']>;
1348
1358
  status?: InputMaybe<Array<PaymentStatus>>;
1349
1359
  type?: InputMaybe<PaymentType>;
1350
1360
  };
@@ -1389,8 +1399,6 @@ export type Query = {
1389
1399
  getUserByEmail?: Maybe<User>;
1390
1400
  getUserPricing?: Maybe<PricingUser>;
1391
1401
  getUsers: Array<User>;
1392
- growsurfParticipant?: Maybe<GrowsurfParticipant>;
1393
- growsurfSecret?: Maybe<Scalars['String']['output']>;
1394
1402
  /** @deprecated No longer used */
1395
1403
  hasBillPayPayments: Scalars['Boolean']['output'];
1396
1404
  /** @deprecated No longer used */
@@ -1398,7 +1406,6 @@ export type Query = {
1398
1406
  integrators: Array<Integrator>;
1399
1407
  liquidityLimits: LiquidityLimits;
1400
1408
  me: User;
1401
- memberStats?: Maybe<MemberReferralStats>;
1402
1409
  merchants: Array<MethodFiMerchant>;
1403
1410
  mercuryAccountInfo: MercuryAccountInfo;
1404
1411
  mercuryAccounts: Array<MercuryAccountInfo>;
@@ -1412,6 +1419,8 @@ export type Query = {
1412
1419
  /** @deprecated no longer in use */
1413
1420
  outstandingDirectPayments: Array<DirectPayment>;
1414
1421
  paginatedCardTransactions: PaginatedSimpleTransaction;
1422
+ paginatedReferralRewards: PaginatedReferralReward;
1423
+ paginatedReferrals: PaginatedReferral;
1415
1424
  paginatedRewardTransactions: PaginatedRewardTransaction;
1416
1425
  payableAccounts: Array<PayableAccount>;
1417
1426
  payment?: Maybe<Payment>;
@@ -1425,10 +1434,11 @@ export type Query = {
1425
1434
  paymentsInProgress: Array<Payment>;
1426
1435
  pendingVerificationBills: Array<Bill>;
1427
1436
  popularUSBillInstitutions: Array<PayableAccountInstitution>;
1428
- referralStats?: Maybe<GrowsurfReferralStats>;
1437
+ referralParticipant?: Maybe<Referral>;
1429
1438
  reversals: MethodFiReversal;
1430
1439
  rewardTransactions: Array<RewardTransaction>;
1431
1440
  rewardsBalance: Scalars['Float']['output'];
1441
+ rewardsBalanceReport: Scalars['JSON']['output'];
1432
1442
  scheduledPayments: Array<Payment>;
1433
1443
  sdkConfig: Array<Scalars['String']['output']>;
1434
1444
  searchUSBillInstitutions: Array<BillInstitution>;
@@ -1441,6 +1451,7 @@ export type Query = {
1441
1451
  transactions: Array<Transaction>;
1442
1452
  tronBalance: Array<TronBalance>;
1443
1453
  unblockKycToken?: Maybe<Scalars['String']['output']>;
1454
+ unblockPortal?: Maybe<UnblockVirtualAccount>;
1444
1455
  unblockUser?: Maybe<UnblockUser>;
1445
1456
  unblockWallets?: Maybe<Array<UnblockWallet>>;
1446
1457
  usBankAccountInstitution?: Maybe<BankAccountInstitution>;
@@ -1453,7 +1464,6 @@ export type Query = {
1453
1464
  userVerification?: Maybe<Verification>;
1454
1465
  userVirtualDebitCard?: Maybe<VirtualCard>;
1455
1466
  utxoBalance: UtxoBalance;
1456
- validateReferralCode: Scalars['Boolean']['output'];
1457
1467
  verification?: Maybe<Verification>;
1458
1468
  verificationFlow: CognitoKycFlow;
1459
1469
  virtualCardDetails?: Maybe<Scalars['String']['output']>;
@@ -1500,8 +1510,11 @@ export type QueryDirectPaymentArgs = {
1500
1510
  paymentId: Scalars['String']['input'];
1501
1511
  };
1502
1512
  export type QueryEstimateTransactionInputArgs = {
1513
+ accountId?: InputMaybe<Scalars['String']['input']>;
1503
1514
  deliveryMethod?: InputMaybe<PaymentDeliveryMethod>;
1515
+ network?: InputMaybe<Scalars['String']['input']>;
1504
1516
  outputAmount: Scalars['Float']['input'];
1517
+ token?: InputMaybe<Scalars['String']['input']>;
1505
1518
  };
1506
1519
  export type QueryExchangeRateArgs = {
1507
1520
  base?: InputMaybe<Scalars['String']['input']>;
@@ -1525,9 +1538,6 @@ export type QueryGetUserPricingArgs = {
1525
1538
  export type QueryGetUsersArgs = {
1526
1539
  searchText?: InputMaybe<Scalars['String']['input']>;
1527
1540
  };
1528
- export type QueryMemberStatsArgs = {
1529
- memberId: Scalars['String']['input'];
1530
- };
1531
1541
  export type QueryMerchantsArgs = {
1532
1542
  name?: InputMaybe<Scalars['String']['input']>;
1533
1543
  type?: InputMaybe<BillType>;
@@ -1543,6 +1553,14 @@ export type QueryPaginatedCardTransactionsArgs = {
1543
1553
  page?: Scalars['Int']['input'];
1544
1554
  perPage?: Scalars['Int']['input'];
1545
1555
  };
1556
+ export type QueryPaginatedReferralRewardsArgs = {
1557
+ page?: Scalars['Int']['input'];
1558
+ perPage?: Scalars['Int']['input'];
1559
+ };
1560
+ export type QueryPaginatedReferralsArgs = {
1561
+ page?: Scalars['Int']['input'];
1562
+ perPage?: Scalars['Int']['input'];
1563
+ };
1546
1564
  export type QueryPaginatedRewardTransactionsArgs = {
1547
1565
  page?: Scalars['Int']['input'];
1548
1566
  perPage?: Scalars['Int']['input'];
@@ -1587,8 +1605,11 @@ export type QueryTotalTokenBalanceArgs = {
1587
1605
  networks?: InputMaybe<Array<Network>>;
1588
1606
  };
1589
1607
  export type QueryTransactionPriceArgs = {
1608
+ accountId?: InputMaybe<Scalars['String']['input']>;
1590
1609
  amount: Scalars['Float']['input'];
1591
1610
  deliveryMethod?: InputMaybe<PaymentDeliveryMethod>;
1611
+ network?: InputMaybe<Scalars['String']['input']>;
1612
+ token?: InputMaybe<Scalars['String']['input']>;
1592
1613
  };
1593
1614
  export type QueryTransactionsArgs = {
1594
1615
  address: Scalars['String']['input'];
@@ -1621,9 +1642,6 @@ export type QueryUtxoBalanceArgs = {
1621
1642
  address: Scalars['String']['input'];
1622
1643
  network: Scalars['String']['input'];
1623
1644
  };
1624
- export type QueryValidateReferralCodeArgs = {
1625
- referralCode: Scalars['String']['input'];
1626
- };
1627
1645
  export type QueryVirtualCardDetailsArgs = {
1628
1646
  key: Scalars['String']['input'];
1629
1647
  renderSecret: Scalars['String']['input'];
@@ -1634,6 +1652,53 @@ export type RawContract = {
1634
1652
  decimals?: Maybe<Scalars['Float']['output']>;
1635
1653
  rawValue?: Maybe<Scalars['String']['output']>;
1636
1654
  };
1655
+ export type Referral = {
1656
+ __typename?: 'Referral';
1657
+ code: Scalars['String']['output'];
1658
+ createdAt: Scalars['DateTimeISO']['output'];
1659
+ id: Scalars['ID']['output'];
1660
+ maskedEmail: Scalars['String']['output'];
1661
+ note?: Maybe<Scalars['String']['output']>;
1662
+ referralClubStatus?: Maybe<ReferralClubStatus>;
1663
+ referralStatus: ReferralStatus;
1664
+ referralTier?: Maybe<ReferralTier>;
1665
+ rewardsCheckedAt?: Maybe<Scalars['DateTimeISO']['output']>;
1666
+ shareUrl: Scalars['String']['output'];
1667
+ userId: Scalars['String']['output'];
1668
+ };
1669
+ export declare enum ReferralClubStatus {
1670
+ Affiliate = "Affiliate",
1671
+ Elite = "Elite"
1672
+ }
1673
+ export type ReferralReward = {
1674
+ __typename?: 'ReferralReward';
1675
+ amount: Scalars['Float']['output'];
1676
+ createdAt: Scalars['DateTimeISO']['output'];
1677
+ id: Scalars['ID']['output'];
1678
+ referralClubTier?: Maybe<ReferralClubStatus>;
1679
+ referralId?: Maybe<Scalars['String']['output']>;
1680
+ referralTier?: Maybe<ReferralTier>;
1681
+ referrerId: Scalars['String']['output'];
1682
+ rewardType: ReferralRewardType;
1683
+ userId: Scalars['String']['output'];
1684
+ };
1685
+ export declare enum ReferralRewardType {
1686
+ Referral = "Referral",
1687
+ ReferralClub = "ReferralClub",
1688
+ Referrer = "Referrer"
1689
+ }
1690
+ export declare enum ReferralStatus {
1691
+ Converted = "Converted",
1692
+ Disabled = "Disabled",
1693
+ Expired = "Expired",
1694
+ NotReferred = "NotReferred",
1695
+ Pending = "Pending"
1696
+ }
1697
+ export declare enum ReferralTier {
1698
+ Local = "Local",
1699
+ Tourist = "Tourist",
1700
+ Vip = "VIP"
1701
+ }
1637
1702
  export type RefundPaymentInput = {
1638
1703
  amount: Scalars['Float']['input'];
1639
1704
  paymentId: Scalars['String']['input'];
@@ -1761,6 +1826,12 @@ export type TokenBalance = {
1761
1826
  /** Controlling wallet address */
1762
1827
  walletAddress: Scalars['String']['output'];
1763
1828
  };
1829
+ export type TokenPreferencesInput = {
1830
+ chain?: InputMaybe<Scalars['String']['input']>;
1831
+ otp: Scalars['String']['input'];
1832
+ targetAddress?: InputMaybe<Scalars['String']['input']>;
1833
+ token?: InputMaybe<Scalars['String']['input']>;
1834
+ };
1764
1835
  export type Transaction = {
1765
1836
  __typename?: 'Transaction';
1766
1837
  /** @deprecated Unused */
@@ -1819,16 +1890,43 @@ export type UsBankAccountInput = {
1819
1890
  routingNumber: Scalars['String']['input'];
1820
1891
  subType: BankAccountSubType;
1821
1892
  };
1893
+ export type UnblockPreference = {
1894
+ __typename?: 'UnblockPreference';
1895
+ chain: Scalars['String']['output'];
1896
+ currency: Scalars['String']['output'];
1897
+ token: Scalars['String']['output'];
1898
+ userExternalId: Scalars['String']['output'];
1899
+ userId: Scalars['String']['output'];
1900
+ };
1822
1901
  export type UnblockUser = {
1823
1902
  __typename?: 'UnblockUser';
1903
+ country: Scalars['String']['output'];
1824
1904
  externalId: Scalars['String']['output'];
1825
- id: Scalars['String']['output'];
1905
+ first_name: Scalars['String']['output'];
1906
+ id: Scalars['ID']['output'];
1907
+ last_name: Scalars['String']['output'];
1908
+ onrampAddress?: Maybe<Scalars['String']['output']>;
1909
+ preferences?: Maybe<UnblockPreference>;
1826
1910
  status: Scalars['String']['output'];
1911
+ userId: Scalars['ObjectID']['output'];
1912
+ };
1913
+ export type UnblockVirtualAccount = {
1914
+ __typename?: 'UnblockVirtualAccount';
1915
+ account_number?: Maybe<Scalars['String']['output']>;
1916
+ bank_code?: Maybe<Scalars['String']['output']>;
1917
+ bank_country: Scalars['String']['output'];
1918
+ bic?: Maybe<Scalars['String']['output']>;
1919
+ currency: Scalars['String']['output'];
1920
+ externalId: Scalars['String']['output'];
1921
+ iban?: Maybe<Scalars['String']['output']>;
1922
+ id: Scalars['ID']['output'];
1923
+ sort_code?: Maybe<Scalars['String']['output']>;
1924
+ userId: Scalars['ObjectID']['output'];
1827
1925
  };
1828
1926
  export type UnblockWallet = {
1829
1927
  __typename?: 'UnblockWallet';
1830
1928
  address: Scalars['String']['output'];
1831
- network: Scalars['String']['output'];
1929
+ chain: Scalars['String']['output'];
1832
1930
  };
1833
1931
  /** Fields to update on userClient */
1834
1932
  export type UpdateCurrentUserInput = {
@@ -1845,11 +1943,11 @@ export type User = {
1845
1943
  attributionSource?: Maybe<Scalars['String']['output']>;
1846
1944
  attributionSurvey?: Maybe<AttributionSurvey>;
1847
1945
  createdAt: Scalars['DateTimeISO']['output'];
1946
+ deleted?: Maybe<Scalars['Boolean']['output']>;
1848
1947
  dob?: Maybe<Scalars['String']['output']>;
1849
1948
  email: Scalars['String']['output'];
1850
1949
  firstName?: Maybe<Scalars['String']['output']>;
1851
1950
  growsurfId?: Maybe<Scalars['String']['output']>;
1852
- growsurfParticipant?: Maybe<GrowsurfParticipant>;
1853
1951
  id: Scalars['ID']['output'];
1854
1952
  kycStatus: KycStatus;
1855
1953
  lastLogin?: Maybe<Scalars['DateTimeISO']['output']>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.VirtualCardType = exports.UtxoInvoiceStatus = exports.SubscriptionType = exports.SubscriptionFrequency = exports.SubscriptionErrorType = exports.RewardTransactionType = exports.RewardProvider = exports.RewardCreditSource = exports.PaymentType = exports.PaymentStatus = exports.PaymentSource = exports.PaymentProvider = exports.PaymentDeliveryMethod = exports.PayableAccountType = exports.PayableAccountOriginator = exports.OnrampPaymentStatus = exports.Network = exports.ModuleStatus = exports.DirectPaymentTransactionReferenceStatus = exports.DirectPaymentStatus = exports.CheckbookPaymentStatus = exports.BillType = exports.BasicPayableAccountType = exports.BankAccountType = exports.BankAccountSubType = exports.BankAccountPaymentType = exports.AppDomain = exports.AccountSyncStatus = exports.AccountProvider = void 0;
3
+ exports.VirtualCardType = exports.UtxoInvoiceStatus = exports.SubscriptionType = exports.SubscriptionFrequency = exports.SubscriptionErrorType = exports.RewardTransactionType = exports.RewardProvider = exports.RewardCreditSource = exports.ReferralTier = exports.ReferralStatus = exports.ReferralRewardType = exports.ReferralClubStatus = exports.PaymentType = exports.PaymentStatus = exports.PaymentSource = exports.PaymentProvider = exports.PaymentDeliveryMethod = exports.PayableAccountType = exports.PayableAccountOriginator = exports.OnrampPaymentStatus = exports.Network = exports.ModuleStatus = exports.DirectPaymentTransactionReferenceStatus = exports.DirectPaymentStatus = exports.CheckbookPaymentStatus = exports.BillType = exports.BasicPayableAccountType = exports.BankAccountType = exports.BankAccountSubType = exports.BankAccountPaymentType = exports.AppDomain = exports.AccountSyncStatus = exports.AccountProvider = void 0;
4
4
  var AccountProvider;
5
5
  (function (AccountProvider) {
6
6
  AccountProvider["Checkbook"] = "CHECKBOOK";
@@ -76,6 +76,7 @@ var DirectPaymentStatus;
76
76
  DirectPaymentStatus["Confirmed"] = "CONFIRMED";
77
77
  DirectPaymentStatus["Created"] = "CREATED";
78
78
  DirectPaymentStatus["Failed"] = "FAILED";
79
+ DirectPaymentStatus["FailedValidation"] = "FAILED_VALIDATION";
79
80
  DirectPaymentStatus["Pending"] = "PENDING";
80
81
  DirectPaymentStatus["Refunded"] = "REFUNDED";
81
82
  DirectPaymentStatus["TransactionFailed"] = "TRANSACTION_FAILED";
@@ -115,6 +116,8 @@ var OnrampPaymentStatus;
115
116
  OnrampPaymentStatus["AwaitingFunds"] = "AWAITING_FUNDS";
116
117
  OnrampPaymentStatus["Cancelled"] = "CANCELLED";
117
118
  OnrampPaymentStatus["Completed"] = "COMPLETED";
119
+ OnrampPaymentStatus["Failed"] = "FAILED";
120
+ OnrampPaymentStatus["OnHold"] = "ON_HOLD";
118
121
  OnrampPaymentStatus["Pending"] = "PENDING";
119
122
  })(OnrampPaymentStatus || (exports.OnrampPaymentStatus = OnrampPaymentStatus = {}));
120
123
  var PayableAccountOriginator;
@@ -169,6 +172,31 @@ var PaymentType;
169
172
  PaymentType["ExternalPayment"] = "EXTERNAL_PAYMENT";
170
173
  PaymentType["ScheduledPayment"] = "SCHEDULED_PAYMENT";
171
174
  })(PaymentType || (exports.PaymentType = PaymentType = {}));
175
+ var ReferralClubStatus;
176
+ (function (ReferralClubStatus) {
177
+ ReferralClubStatus["Affiliate"] = "Affiliate";
178
+ ReferralClubStatus["Elite"] = "Elite";
179
+ })(ReferralClubStatus || (exports.ReferralClubStatus = ReferralClubStatus = {}));
180
+ var ReferralRewardType;
181
+ (function (ReferralRewardType) {
182
+ ReferralRewardType["Referral"] = "Referral";
183
+ ReferralRewardType["ReferralClub"] = "ReferralClub";
184
+ ReferralRewardType["Referrer"] = "Referrer";
185
+ })(ReferralRewardType || (exports.ReferralRewardType = ReferralRewardType = {}));
186
+ var ReferralStatus;
187
+ (function (ReferralStatus) {
188
+ ReferralStatus["Converted"] = "Converted";
189
+ ReferralStatus["Disabled"] = "Disabled";
190
+ ReferralStatus["Expired"] = "Expired";
191
+ ReferralStatus["NotReferred"] = "NotReferred";
192
+ ReferralStatus["Pending"] = "Pending";
193
+ })(ReferralStatus || (exports.ReferralStatus = ReferralStatus = {}));
194
+ var ReferralTier;
195
+ (function (ReferralTier) {
196
+ ReferralTier["Local"] = "Local";
197
+ ReferralTier["Tourist"] = "Tourist";
198
+ ReferralTier["Vip"] = "VIP";
199
+ })(ReferralTier || (exports.ReferralTier = ReferralTier = {}));
172
200
  var RewardCreditSource;
173
201
  (function (RewardCreditSource) {
174
202
  RewardCreditSource["Compensation"] = "COMPENSATION";
@@ -0,0 +1,24 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { OnRampPayment, OnrampPaymentStatus } from './lib/graphClient/generated';
3
+ export type SyncOnrampTransferInput = {
4
+ externalId: string;
5
+ provider: string;
6
+ status: OnrampPaymentStatus;
7
+ amount: number;
8
+ sourceCurrencyAmount: number;
9
+ totalAmount: number;
10
+ feeAmount: number;
11
+ sourceCurrencyFee: number;
12
+ internalFeeUSD: string;
13
+ network: string;
14
+ token: string;
15
+ address: string;
16
+ currency: string;
17
+ sourceCurrency: string;
18
+ userId: string;
19
+ };
20
+ export declare class OnrampServiceClient {
21
+ client: AxiosInstance;
22
+ constructor();
23
+ syncTransfer(input: SyncOnrampTransferInput): Promise<OnRampPayment>;
24
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OnrampServiceClient = void 0;
4
+ const config_1 = require("./config");
5
+ const serviceClient_1 = require("./serviceClient");
6
+ class OnrampServiceClient {
7
+ constructor() {
8
+ this.client = (0, serviceClient_1.createServiceClient)({
9
+ baseURL: config_1.config.onrampServiceEndpoint,
10
+ });
11
+ }
12
+ async syncTransfer(input) {
13
+ return this.client
14
+ .post('/external-transfer', input)
15
+ .then((res) => res.data);
16
+ }
17
+ }
18
+ exports.OnrampServiceClient = OnrampServiceClient;
@@ -55,6 +55,33 @@ export type UnblockAccount = {
55
55
  country: string;
56
56
  };
57
57
  };
58
+ export type UnblockPayment = {
59
+ id: string;
60
+ _id: string;
61
+ paymentId: string;
62
+ externalId: UnblockUserStatus;
63
+ userId: string;
64
+ accountId: string;
65
+ subType: string;
66
+ status: string;
67
+ amountCrypto: number;
68
+ transactionHash: string;
69
+ targetAmount: number;
70
+ inputCurrency: string;
71
+ targetCurrency: string;
72
+ targetCurrencyRate: number;
73
+ targetFee: number;
74
+ amountUSD: number;
75
+ usdExchangeRate: number;
76
+ currencyCrypto: string;
77
+ fees: number;
78
+ externalTargetFeeAmount: number;
79
+ internalTargetFeeAmount: number;
80
+ internalFeeAmountUSD: number;
81
+ sendingAddress: number;
82
+ remoteBankAccountUuid: number;
83
+ chain: string;
84
+ };
58
85
  export type UnblockUser = {
59
86
  id: string;
60
87
  _id: string;
@@ -76,4 +103,5 @@ export declare class UnblockServiceClient {
76
103
  }>;
77
104
  createUnblockAccount(input: CreateUnblockAccountInput): Promise<UnblockAccount>;
78
105
  createUnblockUser(input: CreateUnblockUserInput): Promise<UnblockAccount>;
106
+ getUnblockPayment(externalPaymentId: string): Promise<UnblockPayment>;
79
107
  }
@@ -35,5 +35,10 @@ class UnblockServiceClient {
35
35
  .post(`/user`, input)
36
36
  .then((res) => res.data);
37
37
  }
38
+ async getUnblockPayment(externalPaymentId) {
39
+ return this.client
40
+ .get(`/payment/id/${externalPaymentId}`)
41
+ .then((res) => res.data);
42
+ }
38
43
  }
39
44
  exports.UnblockServiceClient = UnblockServiceClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.74",
3
+ "version": "0.2.76",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",