@spritz-finance/service-client 0.3.14 → 0.3.15

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.
@@ -11,3 +11,4 @@ export declare function initializeExternalPayment(args: ExternalPaymentInput): P
11
11
  export declare function scheduleExternalPayment(args: ExternalPaymentInput): Promise<Payment>;
12
12
  export declare function updateExternalPaymentStatus(paymentId: string, status: PaymentStatus): Promise<Payment>;
13
13
  export declare function getDirectPaymentToken(directPaymentId: string): Promise<string | null>;
14
+ export declare function getAllPaymentsForUser(userId: string): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<Payment[]>>;
@@ -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.getDirectPaymentToken = exports.updateExternalPaymentStatus = exports.scheduleExternalPayment = exports.initializeExternalPayment = exports.getRewardFeeAmount = exports.getRewardTransactionVolume = exports.getValidPaymentsForUser = exports.getValidPaymentsForAccount = exports.validateDirectPayment = exports.createDirectPayment = exports.PaymentsClient = void 0;
26
+ exports.getAllPaymentsForUser = exports.getDirectPaymentToken = exports.updateExternalPaymentStatus = exports.scheduleExternalPayment = exports.initializeExternalPayment = exports.getRewardFeeAmount = exports.getRewardTransactionVolume = exports.getValidPaymentsForUser = exports.getValidPaymentsForAccount = exports.validateDirectPayment = exports.createDirectPayment = exports.PaymentsClient = void 0;
27
27
  exports.PaymentsClient = __importStar(require("./paymentsClient"));
28
28
  const serviceClient_1 = require("../serviceClient");
29
29
  const PAYMENTS_ENDPOINT = '/liabilities';
@@ -90,3 +90,9 @@ async function getDirectPaymentToken(directPaymentId) {
90
90
  .then((res) => res.data);
91
91
  }
92
92
  exports.getDirectPaymentToken = getDirectPaymentToken;
93
+ async function getAllPaymentsForUser(userId) {
94
+ return serviceClient_1.baseClient
95
+ .get(`${PAYMENTS_ENDPOINT}/payments/user/${userId}/all`)
96
+ .then((res) => res.data);
97
+ }
98
+ exports.getAllPaymentsForUser = getAllPaymentsForUser;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",