@spritz-finance/service-client 0.3.76 → 0.3.77

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.
@@ -1,4 +1,5 @@
1
1
  export * as BridgeClient from './bridgeServiceClient';
2
+ import { ExternalPayment } from '../lib/graphClient/generated';
2
3
  import { BridgeUser } from '../onramp/types';
3
4
  import { BridgeExternalAccount, BridgeNetwork, BridgeTransfer, BridgeTransferOffRampPaymentRail, CreateBridgeAccountParams } from './types';
4
5
  export declare function createBridgeBankAccount(userId: string, accountId: string, input: CreateBridgeAccountParams): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<BridgeExternalAccount>>;
@@ -17,3 +18,4 @@ export declare function createBridgeTransfer(userId: string, input: {
17
18
  accountId: string;
18
19
  paymentRail: BridgeTransferOffRampPaymentRail;
19
20
  }): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<BridgeTransfer>>;
21
+ export declare function getExternalPayments(paymentIds: string[]): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<ExternalPayment[]>>;
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.createBridgeTransfer = exports.validateTransfer = exports.getBridgeUser = exports.createBridgeBankAccount = exports.BridgeClient = void 0;
26
+ exports.getExternalPayments = exports.createBridgeTransfer = exports.validateTransfer = exports.getBridgeUser = exports.createBridgeBankAccount = exports.BridgeClient = void 0;
27
27
  exports.BridgeClient = __importStar(require("./bridgeServiceClient"));
28
28
  const serviceClient_1 = require("../serviceClient");
29
29
  const ONRAMP_ENDPOINT = '/bridge';
@@ -56,3 +56,9 @@ async function createBridgeTransfer(userId, input) {
56
56
  .then((res) => res.data);
57
57
  }
58
58
  exports.createBridgeTransfer = createBridgeTransfer;
59
+ async function getExternalPayments(paymentIds) {
60
+ return serviceClient_1.baseClient
61
+ .get(`${ONRAMP_ENDPOINT}/external-payments?paymentIds=${paymentIds.join(',')}`)
62
+ .then((res) => res.data);
63
+ }
64
+ exports.getExternalPayments = getExternalPayments;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.3.76",
3
+ "version": "0.3.77",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",