@spritz-finance/service-client 0.3.25 → 0.3.27

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,6 +1,31 @@
1
1
  export * as PaymentsClient from './paymentsClient';
2
- import { DirectPayment, PaymentStatus } from '../lib/graphClient/generated';
3
- import { CreateDirectPaymentArgs, ExternalPaymentInput, GetUserRewardFeeAmountBody, GetUsersTransactionVolumeBody, Payment } from './types';
2
+ import { DirectPayment, DirectPaymentStatus, PaymentDeliveryMethod, PaymentStatus } from '../lib/graphClient/generated';
3
+ import { CreateDirectPaymentArgs, ExternalPaymentInput, GetUserRewardFeeAmountBody, GetUsersTransactionVolumeBody, Payment, PaymentSource } from './types';
4
+ export type DirectPaymentModel = {
5
+ _id?: string;
6
+ id: string;
7
+ userId: string;
8
+ accountId: string;
9
+ createdAt: Date;
10
+ status: DirectPaymentStatus;
11
+ toAddress?: string;
12
+ amount: number;
13
+ rewardsAmount?: number;
14
+ feeAmount: number;
15
+ transactionFee: number;
16
+ source: PaymentSource;
17
+ deliveryMethod?: PaymentDeliveryMethod;
18
+ paymentId: string;
19
+ tokenAddress: string;
20
+ network: string;
21
+ subscriptionId?: string;
22
+ isToPaymentAddress: boolean;
23
+ targetCurrency: string;
24
+ targetCurrencyRate: number;
25
+ targetCurrencyFee: number;
26
+ integratorId?: string;
27
+ targetCurrencyAmount: number;
28
+ };
4
29
  export declare function createDirectPayment(args: CreateDirectPaymentArgs): Promise<DirectPayment>;
5
30
  export declare function validateDirectPayment(args: CreateDirectPaymentArgs): Promise<DirectPayment>;
6
31
  export declare function getValidPaymentsForAccount(accountId: string): Promise<Payment[]>;
@@ -17,3 +42,4 @@ export declare function getDirectPaymentDetails(directPaymentId: string): Promis
17
42
  source: string;
18
43
  }>>;
19
44
  export declare function getAllPaymentsForUser(userId: string): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<Payment[]>>;
45
+ export declare function directPaymentsForRiskAnalysis(userId: string): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<DirectPaymentModel[]>>;
@@ -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.getAllPaymentsForUser = exports.getDirectPaymentDetails = 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.directPaymentsForRiskAnalysis = exports.getAllPaymentsForUser = exports.getDirectPaymentDetails = 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';
@@ -102,3 +102,9 @@ async function getAllPaymentsForUser(userId) {
102
102
  .then((res) => res.data);
103
103
  }
104
104
  exports.getAllPaymentsForUser = getAllPaymentsForUser;
105
+ async function directPaymentsForRiskAnalysis(userId) {
106
+ return serviceClient_1.baseClient
107
+ .get(`${PAYMENTS_ENDPOINT}/direct-payments/user/${userId}/risk-analysis`)
108
+ .then((res) => res.data);
109
+ }
110
+ exports.directPaymentsForRiskAnalysis = directPaymentsForRiskAnalysis;
@@ -18,6 +18,7 @@ export type Verification = {
18
18
  country?: string;
19
19
  status: VerificationModuleStatus;
20
20
  updatedAt: string;
21
+ verifiedAt?: string;
21
22
  user?: {
22
23
  firstName?: string;
23
24
  lastName?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spritz-finance/service-client",
3
- "version": "0.3.25",
3
+ "version": "0.3.27",
4
4
  "description": "Service client",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",