@spritz-finance/service-client 0.5.0 → 0.5.2
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.
|
@@ -28,7 +28,7 @@ exports.FeaturesClient = __importStar(require("./featuresServiceClient"));
|
|
|
28
28
|
const serviceClient_1 = require("../serviceClient");
|
|
29
29
|
const utils_1 = require("../utils");
|
|
30
30
|
const types_1 = require("./types");
|
|
31
|
-
const FEATURES_ENDPOINT = "/users";
|
|
31
|
+
const FEATURES_ENDPOINT = "/v2/users/api/feature-flags";
|
|
32
32
|
const networkToFlag = (network) => {
|
|
33
33
|
switch (network) {
|
|
34
34
|
case "ethereum":
|
|
@@ -65,12 +65,12 @@ function updateFeatureFlag(input) {
|
|
|
65
65
|
...input,
|
|
66
66
|
source: (_a = input.source) !== null && _a !== void 0 ? _a : types_1.FlagSource.Automatic,
|
|
67
67
|
};
|
|
68
|
-
return serviceClient_1.baseClient.post(
|
|
68
|
+
return serviceClient_1.baseClient.post(FEATURES_ENDPOINT, payload);
|
|
69
69
|
}
|
|
70
70
|
exports.updateFeatureFlag = updateFeatureFlag;
|
|
71
71
|
async function getFeatureFlags() {
|
|
72
72
|
return serviceClient_1.baseClient
|
|
73
|
-
.get(
|
|
73
|
+
.get(FEATURES_ENDPOINT)
|
|
74
74
|
.then((res) => res.data);
|
|
75
75
|
}
|
|
76
76
|
exports.getFeatureFlags = getFeatureFlags;
|
|
@@ -43,9 +43,9 @@ export declare function getValidPaymentsForAccount(accountId: string): Promise<P
|
|
|
43
43
|
export declare function getValidPaymentsForUser(userId: string): Promise<Payment[]>;
|
|
44
44
|
export declare function getRewardTransactionVolume(args: GetUsersTransactionVolumeBody): Promise<number>;
|
|
45
45
|
export declare function getRewardFeeAmount(args: GetUserRewardFeeAmountBody): Promise<number>;
|
|
46
|
-
export declare function initializeExternalPayment(args: ExternalPaymentInput): Promise<Payment
|
|
47
|
-
export declare function scheduleExternalPayment(args: ExternalPaymentInput): Promise<Payment
|
|
48
|
-
export declare function updateExternalPaymentStatus(paymentId: string, input: ExternalPaymentStatusInput): Promise<Payment
|
|
46
|
+
export declare function initializeExternalPayment(args: ExternalPaymentInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<Payment>>;
|
|
47
|
+
export declare function scheduleExternalPayment(args: ExternalPaymentInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<Payment>>;
|
|
48
|
+
export declare function updateExternalPaymentStatus(paymentId: string, input: ExternalPaymentStatusInput): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<Payment>>;
|
|
49
49
|
export declare function getDirectPaymentToken(directPaymentId: string): Promise<string | null>;
|
|
50
50
|
export declare function getDirectPaymentDetails(directPaymentId: string): Promise<import("../types").ApiFailure | import("../types").ApiSuccess<{
|
|
51
51
|
tokenAddress: string;
|
|
@@ -35,7 +35,7 @@ async function createCardApplication(userId, input) {
|
|
|
35
35
|
exports.createCardApplication = createCardApplication;
|
|
36
36
|
async function getUserDepositAddress({ userId, network, }) {
|
|
37
37
|
return serviceClient_1.baseClient
|
|
38
|
-
.get(`${RAIN_ENDPOINT}/
|
|
38
|
+
.get(`${RAIN_ENDPOINT}/api/users/${userId}/deposit-address?network=${network}`)
|
|
39
39
|
.then((res) => res.data);
|
|
40
40
|
}
|
|
41
41
|
exports.getUserDepositAddress = getUserDepositAddress;
|
|
@@ -79,7 +79,7 @@ async function activatePhysicalCard({ userId, accountId, expirationMonth, expira
|
|
|
79
79
|
exports.activatePhysicalCard = activatePhysicalCard;
|
|
80
80
|
async function getLiveBalance({ userId }) {
|
|
81
81
|
return serviceClient_1.baseClient
|
|
82
|
-
.get(`${RAIN_ENDPOINT}/
|
|
82
|
+
.get(`${RAIN_ENDPOINT}/api/users/${userId}/cards/balance`)
|
|
83
83
|
.then((res) => res.data);
|
|
84
84
|
}
|
|
85
85
|
exports.getLiveBalance = getLiveBalance;
|