Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lightrail-client

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightrail-client - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

3

dist/cards.d.ts

@@ -11,2 +11,3 @@ import * as transactions from "./cardTransactions";

import { Contact } from "./model/Contact";
import { Transaction } from "./model/Transaction";
export { transactions, valueStores };

@@ -23,2 +24,4 @@ export declare function createCard(params: CreateCardParams): Promise<Card>;

export declare function updateCard(card: string | Card, params: UpdateCardParams): Promise<Card>;
export declare function cancelCard(card: string | Card, userSuppliedId: string): Promise<Card>;
export declare function activeCard(card: string | Card, userSuppliedId: string): Promise<Transaction>;
/**

@@ -25,0 +28,0 @@ * Get cardId from the string (as the ID itself) or Card object.

@@ -104,2 +104,24 @@ "use strict";

exports.updateCard = updateCard;
function cancelCard(card, userSuppliedId) {
return __awaiter(this, void 0, void 0, function* () {
const cardId = getCardId(card);
const resp = yield lightrail.request("POST", `cards/${encodeURIComponent(cardId)}/cancel`).send({ userSuppliedId: userSuppliedId });
if (resp.status === 200) {
return resp.body.card;
}
throw new LightrailRequestError_1.LightrailRequestError(resp);
});
}
exports.cancelCard = cancelCard;
function activeCard(card, userSuppliedId) {
return __awaiter(this, void 0, void 0, function* () {
const cardId = getCardId(card);
const resp = yield lightrail.request("POST", `cards/${encodeURIComponent(cardId)}/activate`).send({ userSuppliedId: userSuppliedId });
if (resp.status === 200) {
return resp.body.transaction;
}
throw new LightrailRequestError_1.LightrailRequestError(resp);
});
}
exports.activeCard = activeCard;
/**

@@ -106,0 +128,0 @@ * Get cardId from the string (as the ID itself) or Card object.

2

package.json
{
"name": "lightrail-client",
"version": "0.0.7",
"version": "0.0.8",
"description": "A Javascript and Typescript client for Lightrail",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc