lightrail-client
Advanced tools
Comparing version 1.3.2 to 1.4.0
@@ -12,2 +12,3 @@ import * as transactions from "./cardTransactions"; | ||
import { Transaction } from "./model/Transaction"; | ||
import { CardDetails } from "./model/CardDetails"; | ||
export { transactions, valueStores }; | ||
@@ -23,2 +24,3 @@ export declare function createCard(params: CreateCardParams): Promise<Card>; | ||
export declare function getFullcode(card: string | Card): Promise<Fullcode>; | ||
export declare function getDetails(card: string | Card): Promise<CardDetails>; | ||
export declare function updateCard(card: string | Card, params: UpdateCardParams): Promise<Card>; | ||
@@ -25,0 +27,0 @@ export declare function cancelCard(card: string | Card, userSuppliedId: string): Promise<Card>; |
@@ -93,2 +93,16 @@ "use strict"; | ||
exports.getFullcode = getFullcode; | ||
function getDetails(card) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const cardId = getCardId(card); | ||
const resp = yield lightrail.request("GET", `cards/${encodeURIComponent(cardId)}/details`); | ||
if (resp.status === 200) { | ||
return resp.body.details; | ||
} | ||
else if (resp.status === 404) { | ||
return null; | ||
} | ||
throw new LightrailRequestError_1.LightrailRequestError(resp); | ||
}); | ||
} | ||
exports.getDetails = getDetails; | ||
function updateCard(card, params) { | ||
@@ -95,0 +109,0 @@ return __awaiter(this, void 0, void 0, function* () { |
export * from "./Card"; | ||
export * from "./CardDetails"; | ||
export * from "./Contact"; | ||
@@ -3,0 +4,0 @@ export * from "./Fullcode"; |
@@ -7,4 +7,5 @@ "use strict"; | ||
__export(require("./Card")); | ||
__export(require("./CardDetails")); | ||
__export(require("./Program")); | ||
__export(require("./Transaction")); | ||
__export(require("./ValueStore")); |
{ | ||
"name": "lightrail-client", | ||
"version": "1.3.2", | ||
"version": "1.4.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
71353
79
1463