@spritz-finance/service-client 0.3.18 → 0.3.20

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.
@@ -4,8 +4,14 @@ export declare function getUserReferrer(userId: string): Promise<string>;
4
4
  export declare function initializePointsRedemption(input: {
5
5
  userId: string;
6
6
  paymentRequestId: string;
7
+ accountId: string;
7
8
  redemptionId: string;
8
9
  }): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<PointsRedemption>>;
10
+ export declare function validatePointsRedemption(input: {
11
+ userId: string;
12
+ accountId: string;
13
+ redemptionId: string;
14
+ }): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<boolean>>;
9
15
  export declare function confirmPointsRedemption(input: {
10
16
  userId: string;
11
17
  redemptionId: string;
@@ -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.confirmPointsRedemption = exports.initializePointsRedemption = exports.getUserReferrer = exports.GrowthClient = void 0;
26
+ exports.confirmPointsRedemption = exports.validatePointsRedemption = exports.initializePointsRedemption = exports.getUserReferrer = exports.GrowthClient = void 0;
27
27
  exports.GrowthClient = __importStar(require("./growthServiceClient"));
28
28
  const serviceClient_1 = require("../serviceClient");
29
29
  const GROWTH_ENDPOINT = '/growth';
@@ -39,6 +39,12 @@ async function initializePointsRedemption(input) {
39
39
  .then((res) => res.data);
40
40
  }
41
41
  exports.initializePointsRedemption = initializePointsRedemption;
42
+ async function validatePointsRedemption(input) {
43
+ return serviceClient_1.baseClient
44
+ .post(`${GROWTH_ENDPOINT}/v2/points/redemption/validate`, input)
45
+ .then((res) => res.data);
46
+ }
47
+ exports.validatePointsRedemption = validatePointsRedemption;
42
48
  async function confirmPointsRedemption(input) {
43
49
  return serviceClient_1.baseClient
44
50
  .post(`${GROWTH_ENDPOINT}/v2/points/redemption/confirm`, input)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.3.18",
3
+ "version": "0.3.20",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",