@spritz-finance/service-client 0.2.86 → 0.2.87

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.
@@ -86,6 +86,7 @@ export type Address = {
86
86
  export type AdminIssuePaymentInput = {
87
87
  accountId: Scalars['String']['input'];
88
88
  amount: Scalars['Float']['input'];
89
+ paymentProvider: PaymentProvider;
89
90
  userId: Scalars['String']['input'];
90
91
  };
91
92
  export type ApiToken = {
@@ -213,7 +214,6 @@ export type BasicPayableAccount = {
213
214
  export declare enum BasicPayableAccountType {
214
215
  BankAccount = "BANK_ACCOUNT",
215
216
  Bill = "BILL",
216
- DebitCard = "DEBIT_CARD",
217
217
  PayOthers = "PAY_OTHERS",
218
218
  SpritzCard = "SPRITZ_CARD"
219
219
  }
@@ -310,20 +310,6 @@ export type BridgeUser = {
310
310
  type?: Maybe<Scalars['String']['output']>;
311
311
  userId: Scalars['ObjectID']['output'];
312
312
  };
313
- export type BridgeVirtualAccount = {
314
- __typename?: 'BridgeVirtualAccount';
315
- address: Scalars['String']['output'];
316
- createdAt: Scalars['DateTimeISO']['output'];
317
- currency: Scalars['String']['output'];
318
- depositInstructions?: Maybe<VirtualAccountDepositInstructions>;
319
- deposited: Scalars['Boolean']['output'];
320
- externalId: Scalars['String']['output'];
321
- id: Scalars['ID']['output'];
322
- microdeposits?: Maybe<Array<Scalars['Float']['output']>>;
323
- network: Scalars['String']['output'];
324
- token: Scalars['String']['output'];
325
- userId: Scalars['ObjectID']['output'];
326
- };
327
313
  export type BusinessIdentity = {
328
314
  __typename?: 'BusinessIdentity';
329
315
  address?: Maybe<Address>;
@@ -425,11 +411,6 @@ export type CognitoKycFlowTemplate = {
425
411
  id: Scalars['ID']['output'];
426
412
  version: Scalars['Int']['output'];
427
413
  };
428
- export type CreateBridgeVirtualAccountInput = {
429
- address: Scalars['String']['input'];
430
- network: Scalars['String']['input'];
431
- token: Scalars['String']['input'];
432
- };
433
414
  export type CreateDirectPaymentInput = {
434
415
  accountId: Scalars['String']['input'];
435
416
  amount: Scalars['Float']['input'];
@@ -496,7 +477,6 @@ export type DebitCard = PayableAccount & {
496
477
  originalName?: Maybe<Scalars['String']['output']>;
497
478
  originator: PayableAccountOriginator;
498
479
  payable: Scalars['Boolean']['output'];
499
- paymentAddresses: Array<PaymentAddress>;
500
480
  paymentCount: Scalars['Int']['output'];
501
481
  paymentVolume: Scalars['Float']['output'];
502
482
  provider: Scalars['String']['output'];
@@ -588,10 +568,6 @@ export declare enum DirectPaymentTransactionReferenceStatus {
588
568
  Confirmed = "CONFIRMED",
589
569
  Pending = "PENDING"
590
570
  }
591
- export type DismissedItems = {
592
- __typename?: 'DismissedItems';
593
- onboardingChecklist?: Maybe<Scalars['DateTimeISO']['output']>;
594
- };
595
571
  export type ExchangeRate = {
596
572
  __typename?: 'ExchangeRate';
597
573
  base: Scalars['String']['output'];
@@ -883,12 +859,10 @@ export type Mutation = {
883
859
  createUSBankAccount: BankAccount;
884
860
  createUSVirtualDebitCard: VirtualCard;
885
861
  createUser: User;
886
- createVirtualAccount: BridgeVirtualAccount;
887
862
  deleteDirectPayment: Scalars['Boolean']['output'];
888
863
  deletePayableAccount: PayableAccount;
889
864
  deleteSubscription: Scalars['Boolean']['output'];
890
865
  disableUser?: Maybe<Verification>;
891
- dismissItem: Scalars['Boolean']['output'];
892
866
  finishBridgeUserSetup: BridgeUser;
893
867
  flushBalances: Array<TokenBalance>;
894
868
  forcePayment: Payment;
@@ -900,8 +874,6 @@ export type Mutation = {
900
874
  markNotificationAsRead?: Maybe<UserNotification>;
901
875
  methodFiUpdateSSN: MethodFiEntity;
902
876
  moveMoney: Scalars['Boolean']['output'];
903
- paymentAddressForceWithdrawal: Scalars['String']['output'];
904
- paymentAddressRescueNative: Scalars['String']['output'];
905
877
  refreshEntities: Scalars['Boolean']['output'];
906
878
  refundPayment: Payment;
907
879
  refundPaymentWithCredits: Payment;
@@ -1025,9 +997,6 @@ export type MutationCreateUsVirtualDebitCardArgs = {
1025
997
  export type MutationCreateUserArgs = {
1026
998
  createUser: CreateUserInput;
1027
999
  };
1028
- export type MutationCreateVirtualAccountArgs = {
1029
- createBridgeVirtualAccountInput: CreateBridgeVirtualAccountInput;
1030
- };
1031
1000
  export type MutationDeleteDirectPaymentArgs = {
1032
1001
  directPaymentId: Scalars['String']['input'];
1033
1002
  };
@@ -1040,9 +1009,6 @@ export type MutationDeleteSubscriptionArgs = {
1040
1009
  export type MutationDisableUserArgs = {
1041
1010
  userId: Scalars['String']['input'];
1042
1011
  };
1043
- export type MutationDismissItemArgs = {
1044
- property: Scalars['String']['input'];
1045
- };
1046
1012
  export type MutationFinishBridgeUserSetupArgs = {
1047
1013
  ssn: Scalars['String']['input'];
1048
1014
  };
@@ -1076,17 +1042,6 @@ export type MutationMoveMoneyArgs = {
1076
1042
  from: Scalars['String']['input'];
1077
1043
  to: Scalars['String']['input'];
1078
1044
  };
1079
- export type MutationPaymentAddressForceWithdrawalArgs = {
1080
- address: Scalars['String']['input'];
1081
- network: Scalars['String']['input'];
1082
- token: Scalars['String']['input'];
1083
- validate: Scalars['Boolean']['input'];
1084
- };
1085
- export type MutationPaymentAddressRescueNativeArgs = {
1086
- address: Scalars['String']['input'];
1087
- network: Scalars['String']['input'];
1088
- to: Scalars['String']['input'];
1089
- };
1090
1045
  export type MutationRefundPaymentArgs = {
1091
1046
  refundPaymentInput: RefundPaymentInput;
1092
1047
  };
@@ -1226,9 +1181,7 @@ export type OnRampPayment = {
1226
1181
  status: OnrampPaymentStatus;
1227
1182
  token: Scalars['String']['output'];
1228
1183
  totalAmount: Scalars['Float']['output'];
1229
- transactionHash?: Maybe<Scalars['String']['output']>;
1230
1184
  userId: Scalars['ObjectID']['output'];
1231
- virtualAccountId?: Maybe<Scalars['ObjectID']['output']>;
1232
1185
  };
1233
1186
  export type OnrampPaymentDepositInstructions = {
1234
1187
  __typename?: 'OnrampPaymentDepositInstructions';
@@ -1408,7 +1361,6 @@ export type PaymentRefund = {
1408
1361
  to?: Maybe<Scalars['String']['output']>;
1409
1362
  };
1410
1363
  export declare enum PaymentSource {
1411
- Admin = "Admin",
1412
1364
  External = "External",
1413
1365
  Integrator = "Integrator",
1414
1366
  Mobile = "Mobile",
@@ -1416,8 +1368,7 @@ export declare enum PaymentSource {
1416
1368
  MobileIos = "MobileIOS",
1417
1369
  PaymentAddress = "PaymentAddress",
1418
1370
  Subscription = "Subscription",
1419
- Web = "Web",
1420
- Widget = "Widget"
1371
+ Web = "Web"
1421
1372
  }
1422
1373
  export declare enum PaymentStatus {
1423
1374
  Cancelled = "CANCELLED",
@@ -1480,28 +1431,24 @@ export type PricingUser = {
1480
1431
  };
1481
1432
  export type Query = {
1482
1433
  __typename?: 'Query';
1483
- adminBridgeUser: BridgeUser;
1484
1434
  adminDirectPayment?: Maybe<DirectPayment>;
1485
1435
  adminDirectPayments: Array<DirectPayment>;
1486
- adminOnrampPayments: Array<OnRampPayment>;
1487
1436
  adminPayments: Array<Payment>;
1488
1437
  adminPaymentsCount: Scalars['Int']['output'];
1489
1438
  adminRecentPayments: Array<Payment>;
1439
+ adminTransactionPrice: Scalars['Float']['output'];
1490
1440
  adminUtxoInvoices: Array<UtxoInvoice>;
1491
- adminVirtualAccounts: Array<BridgeVirtualAccount>;
1492
1441
  apiTokens: Array<ApiToken>;
1493
1442
  bankAccounts: Array<BankAccount>;
1494
1443
  bills: Array<Bill>;
1495
1444
  brexBalance: BrexBalance;
1496
1445
  bridgeUser: BridgeUser;
1497
- btcCashValue: UtxoBalance;
1498
1446
  checkPayment?: Maybe<UtxoInvoice>;
1499
1447
  checkbookBatchSize: Scalars['Float']['output'];
1500
1448
  checkbookPrefundedAccountBalance?: Maybe<Scalars['Float']['output']>;
1501
1449
  circleBalances: CircleBalances;
1502
1450
  coinbaseBalance: Scalars['Float']['output'];
1503
1451
  cryptoExchangeRate: CryptoExchangeRate;
1504
- dashCashValue: UtxoBalance;
1505
1452
  debitCards: Array<DebitCard>;
1506
1453
  /** @deprecated no longer in use */
1507
1454
  directPayment?: Maybe<DirectPayment>;
@@ -1552,7 +1499,6 @@ export type Query = {
1552
1499
  paymentsForAccount: Array<Payment>;
1553
1500
  paymentsInProgress: Array<Payment>;
1554
1501
  pendingVerificationBills: Array<Bill>;
1555
- points: Scalars['Int']['output'];
1556
1502
  popularUSBillInstitutions: Array<PayableAccountInstitution>;
1557
1503
  referralParticipant?: Maybe<Referral>;
1558
1504
  reversals: MethodFiReversal;
@@ -1581,30 +1527,22 @@ export type Query = {
1581
1527
  userPayableAccounts: Array<PayableAccount>;
1582
1528
  userPayment: Payment;
1583
1529
  userPayments: Array<Payment>;
1584
- userPoints: Scalars['Int']['output'];
1585
1530
  userUpcomingPayments: Array<Payment>;
1586
1531
  userVerification?: Maybe<Verification>;
1587
1532
  userVirtualDebitCard?: Maybe<VirtualCard>;
1588
1533
  utxoBalance: UtxoBalance;
1589
1534
  verification?: Maybe<Verification>;
1590
1535
  verificationFlow: CognitoKycFlow;
1591
- virtualAccounts: Array<BridgeVirtualAccount>;
1592
1536
  virtualCardDetails?: Maybe<Scalars['String']['output']>;
1593
1537
  virtualDebitCard?: Maybe<VirtualCard>;
1594
1538
  virtualDebitCards: Array<VirtualCard>;
1595
1539
  };
1596
- export type QueryAdminBridgeUserArgs = {
1597
- userId: Scalars['String']['input'];
1598
- };
1599
1540
  export type QueryAdminDirectPaymentArgs = {
1600
1541
  directPaymentId: Scalars['String']['input'];
1601
1542
  };
1602
1543
  export type QueryAdminDirectPaymentsArgs = {
1603
1544
  userId?: InputMaybe<Scalars['String']['input']>;
1604
1545
  };
1605
- export type QueryAdminOnrampPaymentsArgs = {
1606
- userId: Scalars['String']['input'];
1607
- };
1608
1546
  export type QueryAdminPaymentsArgs = {
1609
1547
  filter?: InputMaybe<PaymentsFilter>;
1610
1548
  pagination?: InputMaybe<Pagination>;
@@ -1617,12 +1555,10 @@ export type QueryAdminPaymentsCountArgs = {
1617
1555
  export type QueryAdminRecentPaymentsArgs = {
1618
1556
  userId: Scalars['String']['input'];
1619
1557
  };
1620
- export type QueryAdminVirtualAccountsArgs = {
1558
+ export type QueryAdminTransactionPriceArgs = {
1559
+ amount: Scalars['Float']['input'];
1621
1560
  userId: Scalars['String']['input'];
1622
1561
  };
1623
- export type QueryBtcCashValueArgs = {
1624
- address: Scalars['String']['input'];
1625
- };
1626
1562
  export type QueryCheckPaymentArgs = {
1627
1563
  address: Scalars['String']['input'];
1628
1564
  };
@@ -1637,9 +1573,6 @@ export type QueryCryptoExchangeRateArgs = {
1637
1573
  base?: InputMaybe<Scalars['String']['input']>;
1638
1574
  symbol: Scalars['String']['input'];
1639
1575
  };
1640
- export type QueryDashCashValueArgs = {
1641
- address: Scalars['String']['input'];
1642
- };
1643
1576
  export type QueryDirectPaymentArgs = {
1644
1577
  paymentId: Scalars['String']['input'];
1645
1578
  };
@@ -1660,7 +1593,7 @@ export type QueryFeeCalculatorArgs = {
1660
1593
  currency: Scalars['String']['input'];
1661
1594
  deliveryMethod?: InputMaybe<PaymentDeliveryMethod>;
1662
1595
  network: Scalars['String']['input'];
1663
- token: Scalars['String']['input'];
1596
+ usdc: Scalars['Boolean']['input'];
1664
1597
  };
1665
1598
  export type QueryFindByWalletAddressArgs = {
1666
1599
  address: Scalars['String']['input'];
@@ -1751,10 +1684,10 @@ export type QueryTotalTokenBalanceArgs = {
1751
1684
  networks?: InputMaybe<Array<Network>>;
1752
1685
  };
1753
1686
  export type QueryTransactionPriceArgs = {
1754
- accountId: Scalars['String']['input'];
1687
+ accountId?: InputMaybe<Scalars['String']['input']>;
1755
1688
  amount: Scalars['Float']['input'];
1756
1689
  deliveryMethod?: InputMaybe<PaymentDeliveryMethod>;
1757
- network: Scalars['String']['input'];
1690
+ network?: InputMaybe<Scalars['String']['input']>;
1758
1691
  token?: InputMaybe<Scalars['String']['input']>;
1759
1692
  };
1760
1693
  export type QueryTransactionsArgs = {
@@ -1778,9 +1711,6 @@ export type QueryUserPaymentArgs = {
1778
1711
  export type QueryUserPaymentsArgs = {
1779
1712
  userId: Scalars['String']['input'];
1780
1713
  };
1781
- export type QueryUserPointsArgs = {
1782
- userId: Scalars['String']['input'];
1783
- };
1784
1714
  export type QueryUserUpcomingPaymentsArgs = {
1785
1715
  userId: Scalars['String']['input'];
1786
1716
  };
@@ -2104,7 +2034,6 @@ export type User = {
2104
2034
  attributionSurvey?: Maybe<AttributionSurvey>;
2105
2035
  createdAt: Scalars['DateTimeISO']['output'];
2106
2036
  deleted?: Maybe<Scalars['Boolean']['output']>;
2107
- dismissedItems?: Maybe<DismissedItems>;
2108
2037
  dob?: Maybe<Scalars['String']['output']>;
2109
2038
  email: Scalars['String']['output'];
2110
2039
  firstName?: Maybe<Scalars['String']['output']>;
@@ -2197,16 +2126,6 @@ export type Verification = {
2197
2126
  userId: Scalars['ObjectID']['output'];
2198
2127
  virtualCard: VirtualCardModule;
2199
2128
  };
2200
- export type VirtualAccountDepositInstructions = {
2201
- __typename?: 'VirtualAccountDepositInstructions';
2202
- bankAccountNumber: Scalars['String']['output'];
2203
- bankAddress: Scalars['String']['output'];
2204
- bankBeneficiaryName: Scalars['String']['output'];
2205
- bankName: Scalars['String']['output'];
2206
- bankRoutingNumber: Scalars['String']['output'];
2207
- currency: Scalars['String']['output'];
2208
- paymentMethod: Scalars['String']['output'];
2209
- };
2210
2129
  export type VirtualCard = PayableAccount & {
2211
2130
  __typename?: 'VirtualCard';
2212
2131
  balance: Scalars['Float']['output'];
@@ -43,7 +43,6 @@ var BasicPayableAccountType;
43
43
  (function (BasicPayableAccountType) {
44
44
  BasicPayableAccountType["BankAccount"] = "BANK_ACCOUNT";
45
45
  BasicPayableAccountType["Bill"] = "BILL";
46
- BasicPayableAccountType["DebitCard"] = "DEBIT_CARD";
47
46
  BasicPayableAccountType["PayOthers"] = "PAY_OTHERS";
48
47
  BasicPayableAccountType["SpritzCard"] = "SPRITZ_CARD";
49
48
  })(BasicPayableAccountType || (exports.BasicPayableAccountType = BasicPayableAccountType = {}));
@@ -151,7 +150,6 @@ var PaymentProvider;
151
150
  })(PaymentProvider || (exports.PaymentProvider = PaymentProvider = {}));
152
151
  var PaymentSource;
153
152
  (function (PaymentSource) {
154
- PaymentSource["Admin"] = "Admin";
155
153
  PaymentSource["External"] = "External";
156
154
  PaymentSource["Integrator"] = "Integrator";
157
155
  PaymentSource["Mobile"] = "Mobile";
@@ -160,7 +158,6 @@ var PaymentSource;
160
158
  PaymentSource["PaymentAddress"] = "PaymentAddress";
161
159
  PaymentSource["Subscription"] = "Subscription";
162
160
  PaymentSource["Web"] = "Web";
163
- PaymentSource["Widget"] = "Widget";
164
161
  })(PaymentSource || (exports.PaymentSource = PaymentSource = {}));
165
162
  var PaymentStatus;
166
163
  (function (PaymentStatus) {
@@ -21,4 +21,5 @@ export declare class OnrampServiceClient {
21
21
  client: AxiosInstance;
22
22
  constructor();
23
23
  syncTransfer(input: SyncOnrampTransferInput): Promise<OnRampPayment>;
24
+ getUserCompletedPayments(userId: string): Promise<OnRampPayment[]>;
24
25
  }
@@ -14,5 +14,10 @@ class OnrampServiceClient {
14
14
  .post('/external-transfer', input)
15
15
  .then((res) => res.data);
16
16
  }
17
+ async getUserCompletedPayments(userId) {
18
+ return this.client
19
+ .get(`/payments/user/${userId}/completed`)
20
+ .then((res) => res.data);
21
+ }
17
22
  }
18
23
  exports.OnrampServiceClient = OnrampServiceClient;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.86",
3
+ "version": "0.2.87",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",