@spritz-finance/service-client 0.2.44 → 0.2.46
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.
|
@@ -18,6 +18,22 @@ export declare enum RewardCreditSource {
|
|
|
18
18
|
OTHER = "OTHER",
|
|
19
19
|
REVENUE_SHARE = "REVENUE_SHARE"
|
|
20
20
|
}
|
|
21
|
+
declare type Payment = {
|
|
22
|
+
_id: string;
|
|
23
|
+
accountId: string;
|
|
24
|
+
amount: number;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
directPaymentId: string;
|
|
27
|
+
feeAmount: number;
|
|
28
|
+
id: string;
|
|
29
|
+
paymentProvider: string;
|
|
30
|
+
rewardsAmount: number;
|
|
31
|
+
status: string;
|
|
32
|
+
subscriptionId: string | null;
|
|
33
|
+
type: string;
|
|
34
|
+
updatedAt: string;
|
|
35
|
+
userId: string;
|
|
36
|
+
};
|
|
21
37
|
export declare type CheckbookCardResponse = {
|
|
22
38
|
userId: string;
|
|
23
39
|
externalId: string;
|
|
@@ -179,5 +195,6 @@ export declare class LiabilitiesServiceClient {
|
|
|
179
195
|
getVirtualCardBalance(cardExternalId: string, userId: string): Promise<number>;
|
|
180
196
|
getVirtualCardTransactions(cardExternalId: string, userId: string): Promise<CardTransaction[]>;
|
|
181
197
|
canUserMakeTestPayment(userId: string): Promise<boolean>;
|
|
198
|
+
getValidPaymentsForAccount(accountId: string): Promise<Payment[]>;
|
|
182
199
|
}
|
|
183
200
|
export {};
|
|
@@ -82,5 +82,10 @@ class LiabilitiesServiceClient {
|
|
|
82
82
|
.get(`/direct-payments/test-payment-available/user/${userId}`)
|
|
83
83
|
.then((res) => res.data);
|
|
84
84
|
}
|
|
85
|
+
async getValidPaymentsForAccount(accountId) {
|
|
86
|
+
return this.client
|
|
87
|
+
.get(`/payments/valid-payments/account/${accountId}`)
|
|
88
|
+
.then((res) => res.data);
|
|
89
|
+
}
|
|
85
90
|
}
|
|
86
91
|
exports.LiabilitiesServiceClient = LiabilitiesServiceClient;
|
|
@@ -55,10 +55,11 @@ declare type PayableAccountModelExtension = {
|
|
|
55
55
|
nickname?: string | null;
|
|
56
56
|
payable: boolean;
|
|
57
57
|
testPaymentAvailable: boolean;
|
|
58
|
+
provider: AccountProvider;
|
|
58
59
|
};
|
|
59
|
-
declare type BillModel = Omit<Bill, 'type'> & PayableAccountModelExtension;
|
|
60
|
-
declare type BankAcountModel = Omit<BankAccount, 'type'> & PayableAccountModelExtension;
|
|
61
|
-
declare type VirtualCardModel = Omit<VirtualCard, 'type'> & PayableAccountModelExtension;
|
|
60
|
+
declare type BillModel = Omit<Bill, 'type' | 'institution'> & PayableAccountModelExtension;
|
|
61
|
+
declare type BankAcountModel = Omit<BankAccount, 'type' | 'institution'> & PayableAccountModelExtension;
|
|
62
|
+
declare type VirtualCardModel = Omit<VirtualCard, 'type' | 'institution'> & PayableAccountModelExtension;
|
|
62
63
|
export declare type PayableAccount = BankAcountModel | VirtualCardModel | BillModel;
|
|
63
64
|
export declare type PayableAccountBankAccount = BankAcountModel;
|
|
64
65
|
export declare type PayableAccountVirtualCard = VirtualCardModel;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
interface User {
|
|
2
|
+
export interface User {
|
|
3
3
|
id: string;
|
|
4
4
|
email: string;
|
|
5
5
|
firstName?: string;
|
|
@@ -16,4 +16,3 @@ export declare class UsersServiceClient {
|
|
|
16
16
|
findOrInitialize(email: string): Promise<User>;
|
|
17
17
|
findByEmail(email: string): Promise<User>;
|
|
18
18
|
}
|
|
19
|
-
export {};
|