@spritz-finance/service-client 0.2.80 → 0.2.82

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.
@@ -219,6 +219,28 @@ export type ExternalPaymentInput = {
219
219
  targetCurrencyFee: number;
220
220
  targetCurrencyAmount: number;
221
221
  };
222
+ type CheckbookAddress = {
223
+ line_1: string;
224
+ line_2: string;
225
+ state: string;
226
+ city: string;
227
+ country: string;
228
+ zip: string;
229
+ };
230
+ export type CreateDebitCardInput = {
231
+ userId: string;
232
+ cardNumber: string;
233
+ expirationDate: string;
234
+ address: CheckbookAddress;
235
+ };
236
+ export type CheckbookDebitCardResponse = {
237
+ userId: string;
238
+ externalId: string;
239
+ mask: string;
240
+ address: CheckbookAddress;
241
+ cardNumber: string;
242
+ expirationDate: string;
243
+ };
222
244
  export declare class LiabilitiesServiceClient {
223
245
  client: AxiosInstance;
224
246
  constructor();
@@ -228,6 +250,7 @@ export declare class LiabilitiesServiceClient {
228
250
  createCheckbookUser(args: CreateCheckbookUserParams): Promise<CheckbookUser>;
229
251
  getCheckbookUser(userId: string): Promise<CheckbookUser>;
230
252
  createCheckbookVirtualCard(userId: string): Promise<CheckbookCardResponse>;
253
+ createCheckbookDebitCard(input: CreateDebitCardInput): Promise<CheckbookDebitCardResponse>;
231
254
  createUSBillFromAccountNumber(userId: string, accountNumber: string, merchantId: string): Promise<ExternalBillInput>;
232
255
  getVirtualCardBalance(cardExternalId: string, userId: string): Promise<number>;
233
256
  getVirtualCardTransactions(cardExternalId: string, userId: string): Promise<CardTransaction[]>;
@@ -68,6 +68,11 @@ class LiabilitiesServiceClient {
68
68
  .post(`/virtual-card/create/${userId}`)
69
69
  .then((res) => res.data);
70
70
  }
71
+ async createCheckbookDebitCard(input) {
72
+ return this.client
73
+ .post('/debit-card/create', input)
74
+ .then((res) => res.data);
75
+ }
71
76
  async createUSBillFromAccountNumber(userId, accountNumber, merchantId) {
72
77
  return this.client
73
78
  .post(`/methodFi/bill/user/${userId}`, {
@@ -64,7 +64,7 @@ export declare class TransactionsServiceClient {
64
64
  createPaymentInvoice(network: string, amount: number, paymentReference: string, tokenAddress?: string): Promise<UtxoInvoice>;
65
65
  reserveAddress(network: string, accountId: string): Promise<ReservePaymentAddressResponse>;
66
66
  getWalletMembership(address: string): Promise<AddressMembershipResponse>;
67
- getOutstandingUserTransactions(userId: string): Promise<SpritzWalletTransaction[]>;
67
+ getOutstandingUserTransactions(userId: string, accountId: string): Promise<SpritzWalletTransaction[]>;
68
68
  updateUserTransactionStatus(input: UpdateUserTransactionStatusEvent): Promise<boolean>;
69
69
  }
70
70
  export {};
@@ -46,9 +46,9 @@ class TransactionsServiceClient {
46
46
  .get(`/addresses/${address}/membership`)
47
47
  .then((res) => res.data);
48
48
  }
49
- async getOutstandingUserTransactions(userId) {
49
+ async getOutstandingUserTransactions(userId, accountId) {
50
50
  return this.client
51
- .get(`/wallet-transactions/outstanding/${userId}`)
51
+ .get(`/wallet-transactions/outstanding/${userId}/account/${accountId}`)
52
52
  .then((res) => res.data);
53
53
  }
54
54
  async updateUserTransactionStatus(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.2.80",
3
+ "version": "0.2.82",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",