lightrail-client
Advanced tools
Comparing version 4.0.0 to 4.1.0
# Changelog | ||
## 4.1.0 | ||
- getTransactionChain | ||
- Added Transaction properties -> simulated | pending | pendingVoidDate | ||
## 4.0.0 | ||
@@ -4,0 +8,0 @@ - Added listValuesTransactions to values |
@@ -99,2 +99,5 @@ export declare type TransactionParty = LightrailTransactionParty | StripeTransactionParty | InternalTransactionParty; | ||
createdBy: string; | ||
pending?: boolean; | ||
pendingVoidDate?: string; | ||
simulated?: true; | ||
} | ||
@@ -101,0 +104,0 @@ export interface DebitSource { |
@@ -31,2 +31,3 @@ export * from "./contacts/AttachContactToValueParams"; | ||
export * from "./transactions/VoidPendingParams"; | ||
export * from "./transactions/GetTransactionChainParams"; | ||
export * from "./values/ChangeValuesCodeParams"; | ||
@@ -33,0 +34,0 @@ export * from "./values/CreateValueParams"; |
@@ -1,2 +0,2 @@ | ||
import { CapturePendingParams, CapturePendingResponse, CheckoutParams, CheckoutResponse, CreditParams, CreditResponse, DebitParams, DebitResponse, GetTransactionResponse, ListTransactionsParams, ListTransactionsResponse, ReverseParams, ReverseResponse, TransferParams, TransferResponse, VoidPendingParams, VoidPendingResponse } from "./params"; | ||
import { CapturePendingParams, CapturePendingResponse, CheckoutParams, CheckoutResponse, CreditParams, CreditResponse, DebitParams, DebitResponse, GetTransactionChainResponse, GetTransactionResponse, ListTransactionsParams, ListTransactionsResponse, ReverseParams, ReverseResponse, TransferParams, TransferResponse, VoidPendingParams, VoidPendingResponse } from "./params"; | ||
import { Transaction } from "./model"; | ||
@@ -12,2 +12,3 @@ export declare function checkout(params: CheckoutParams): Promise<CheckoutResponse>; | ||
export declare function getTransaction(transaction: string | Transaction): Promise<GetTransactionResponse>; | ||
export declare function getTransactionChain(transaction: string | Transaction): Promise<GetTransactionChainResponse>; | ||
/** | ||
@@ -14,0 +15,0 @@ * Get transactionId from the string (as the ID itself) or Transaction object. |
@@ -147,2 +147,13 @@ "use strict"; | ||
exports.getTransaction = getTransaction; | ||
function getTransactionChain(transaction) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const transactionId = getTransactionId(transaction); | ||
const resp = yield lightrail.request("GET", `transactions/${encodeURIComponent(transactionId)}/chain`); | ||
if (requestUtils_1.isSuccessStatus(resp.status)) { | ||
return requestUtils_1.formatResponse(resp); | ||
} | ||
throw new LightrailRequestError_1.LightrailRequestError(resp); | ||
}); | ||
} | ||
exports.getTransactionChain = getTransactionChain; | ||
/** | ||
@@ -149,0 +160,0 @@ * Get transactionId from the string (as the ID itself) or Transaction object. |
{ | ||
"name": "lightrail-client", | ||
"version": "4.0.0", | ||
"version": "4.1.0", | ||
"description": "A Javascript and Typescript client for Lightrail", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83781
130
1916