@beamnetwork/eco-prime-trust-api
Advanced tools
Comparing version 1.0.15 to 1.0.16
export declare class APIOptions { | ||
baseUrl: string; | ||
authorization: string; | ||
jwtTTL: number; | ||
jwtTTL?: number; | ||
} |
@@ -6,2 +6,3 @@ "use strict"; | ||
function APIOptions() { | ||
this.jwtTTL = 3600; | ||
} | ||
@@ -8,0 +9,0 @@ return APIOptions; |
@@ -92,4 +92,4 @@ /// <reference types="node" /> | ||
createFundsTransferMethod(request: CreateProcessorTokenFundsTransferMethodRequest): Promise<APIResponse<FundsTransferMethodResponse>>; | ||
depositFundsUsingFundsTransferMethod(request: DepositFundsUsingFundsTransferMethodRequest): Promise<APIResponse<ContributionsResponse>>; | ||
withdrawFundsUsingFundsTransferMethod(request: WithdrawFundsUsingFundsTransferMethodRequest): Promise<APIResponse<DisbursementsResponse>>; | ||
depositFundsUsingFundsTransferMethod(idempotentID: string, request: DepositFundsUsingFundsTransferMethodRequest): Promise<APIResponse<ContributionsResponse>>; | ||
withdrawFundsUsingFundsTransferMethod(idempotentID: string, request: WithdrawFundsUsingFundsTransferMethodRequest): Promise<APIResponse<DisbursementsResponse>>; | ||
cancelFundsTransfer(request: FetchResourceByIDRequest): Promise<APIResponse<FundsTransferResponse>>; | ||
@@ -99,3 +99,3 @@ getFundsTransferByID(request: FetchResourceByIDRequest): Promise<APIResponse<QueryResponse<FundsTransfer>>>; | ||
getFundsTransfers(query: Query): Promise<APIResponse<QueryResponse<FundsTransfer[]>>>; | ||
transferCash(request: TransferCashRequest): Promise<APIResponse<TransferCashResponse>>; | ||
transferCash(idempotentID: string, request: TransferCashRequest): Promise<APIResponse<TransferCashResponse>>; | ||
getCashTransferByID(request: FetchResourceByIDRequest): Promise<APIResponse<QueryResponse<AccountCashTransfer>>>; | ||
@@ -102,0 +102,0 @@ getWebhookConfigByID(request: FetchResourceByIDRequest): Promise<APIResponse<QueryResponse<WebhookConfig>>>; |
@@ -637,5 +637,5 @@ "use strict"; | ||
}; | ||
PrimeTrustAPI.prototype.depositFundsUsingFundsTransferMethod = function (request) { | ||
PrimeTrustAPI.prototype.depositFundsUsingFundsTransferMethod = function (idempotentID, request) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var include, reqUri, req; | ||
var include, reqUri, headers, req; | ||
return __generator(this, function (_a) { | ||
@@ -651,3 +651,6 @@ switch (_a.label) { | ||
} | ||
req = this.getAxiosInstance().post(reqUri, request); | ||
headers = { | ||
'X-Idempotent-ID-V2': idempotentID, | ||
}; | ||
req = this.getAxiosInstance().post(reqUri, request, { headers: headers }); | ||
return [4, this.executeRequest(req)]; | ||
@@ -659,5 +662,5 @@ case 1: return [2, _a.sent()]; | ||
}; | ||
PrimeTrustAPI.prototype.withdrawFundsUsingFundsTransferMethod = function (request) { | ||
PrimeTrustAPI.prototype.withdrawFundsUsingFundsTransferMethod = function (idempotentID, request) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var include, reqUri, req; | ||
var include, reqUri, headers, req; | ||
return __generator(this, function (_a) { | ||
@@ -673,3 +676,6 @@ switch (_a.label) { | ||
} | ||
req = this.getAxiosInstance().post(reqUri, request); | ||
headers = { | ||
'X-Idempotent-ID-V2': idempotentID, | ||
}; | ||
req = this.getAxiosInstance().post(reqUri, request, { headers: headers }); | ||
return [4, this.executeRequest(req)]; | ||
@@ -754,5 +760,5 @@ case 1: return [2, _a.sent()]; | ||
}; | ||
PrimeTrustAPI.prototype.transferCash = function (request) { | ||
PrimeTrustAPI.prototype.transferCash = function (idempotentID, request) { | ||
return __awaiter(this, void 0, void 0, function () { | ||
var include, reqUri, req; | ||
var include, reqUri, headers, req; | ||
return __generator(this, function (_a) { | ||
@@ -768,3 +774,6 @@ switch (_a.label) { | ||
} | ||
req = this.getAxiosInstance().post(reqUri, request); | ||
headers = { | ||
'X-Idempotent-ID-V2': idempotentID, | ||
}; | ||
req = this.getAxiosInstance().post(reqUri, request, { headers: headers }); | ||
return [4, this.executeRequest(req)]; | ||
@@ -771,0 +780,0 @@ case 1: return [2, _a.sent()]; |
{ | ||
"name": "@beamnetwork/eco-prime-trust-api", | ||
"private": false, | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"description": "Eco Prime Trust API TypeScript Implementation", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
export class APIOptions { | ||
baseUrl: string | ||
authorization: string | ||
jwtTTL: number | ||
jwtTTL?: number = 3600 | ||
} |
@@ -591,2 +591,3 @@ import { APIOptions } from './APIOptions' | ||
async depositFundsUsingFundsTransferMethod( | ||
idempotentID: string, | ||
request: DepositFundsUsingFundsTransferMethodRequest, | ||
@@ -604,5 +605,10 @@ ): Promise<APIResponse<ContributionsResponse>> { | ||
const headers = { | ||
'X-Idempotent-ID-V2': idempotentID, | ||
} | ||
const req = this.getAxiosInstance().post( | ||
reqUri, | ||
request, | ||
{ headers }, | ||
) | ||
@@ -614,2 +620,3 @@ | ||
async withdrawFundsUsingFundsTransferMethod( | ||
idempotentID: string, | ||
request: WithdrawFundsUsingFundsTransferMethodRequest, | ||
@@ -627,5 +634,10 @@ ): Promise<APIResponse<DisbursementsResponse>> { | ||
const headers = { | ||
'X-Idempotent-ID-V2': idempotentID, | ||
} | ||
const req = this.getAxiosInstance().post( | ||
reqUri, | ||
request, | ||
{ headers }, | ||
) | ||
@@ -703,2 +715,3 @@ | ||
async transferCash( | ||
idempotentID: string, | ||
request: TransferCashRequest, | ||
@@ -716,5 +729,10 @@ ): Promise<APIResponse<TransferCashResponse>> { | ||
const headers = { | ||
'X-Idempotent-ID-V2': idempotentID, | ||
} | ||
const req = this.getAxiosInstance().post( | ||
reqUri, | ||
request, | ||
{ headers }, | ||
) | ||
@@ -721,0 +739,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
476262
5635