paypal-isomorphic-functions
Advanced tools
Comparing version 1.0.5 to 1.0.6
import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
export declare function createBillingAgreementToken(token: IPayPalAccessToken, data?: any): Promise<Response>; | ||
export declare function createBillingAgreement(token: IPayPalAccessToken, token_id: string): Promise<Response>; | ||
export declare function createToken(token: IPayPalAccessToken, data?: any): Promise<Response>; | ||
export declare function create(token: IPayPalAccessToken, token_id: string): Promise<Response>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const config_1 = require("../config"); | ||
async function createBillingAgreementToken(token, data = {}) { | ||
async function createToken(token, data = {}) { | ||
const payload = Object.keys(data).length > 0 | ||
@@ -20,4 +20,4 @@ ? data | ||
} | ||
exports.createBillingAgreementToken = createBillingAgreementToken; | ||
async function createBillingAgreement(token, token_id) { | ||
exports.createToken = createToken; | ||
async function create(token, token_id) { | ||
const options = { | ||
@@ -33,3 +33,3 @@ method: "POST", | ||
} | ||
exports.createBillingAgreement = createBillingAgreement; | ||
exports.create = create; | ||
//# sourceMappingURL=index.js.map |
@@ -7,6 +7,2 @@ import "./polyfills"; | ||
import * as Webhooks from './webhooks'; | ||
export * from "./billing-agreements"; | ||
export * from "./oauth"; | ||
export * from "./payments"; | ||
export * from "./webhooks"; | ||
export { Orders, Oauth, BillingAgreements, Payments, Webhooks }; |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
@@ -24,6 +21,2 @@ if (mod && mod.__esModule) return mod; | ||
exports.Webhooks = Webhooks; | ||
__export(require("./billing-agreements")); | ||
__export(require("./oauth")); | ||
__export(require("./payments")); | ||
__export(require("./webhooks")); | ||
//# sourceMappingURL=index.js.map |
import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
export declare function createOrder(token: IPayPalAccessToken, data: any): Promise<Response>; | ||
export declare function updateOrder(token: IPayPalAccessToken, id: string, data: any): Promise<Response>; | ||
export declare function create(token: IPayPalAccessToken, data: any): Promise<Response>; | ||
export declare function update(token: IPayPalAccessToken, id: string, data: any): Promise<Response>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const constants_1 = require("./constants"); | ||
async function createOrder(token, data) { | ||
async function create(token, data) { | ||
const payload = data || constants_1.DEFAULT_CREATE_ORDER_PAYLOAD; | ||
@@ -18,4 +18,4 @@ const options = { | ||
} | ||
exports.createOrder = createOrder; | ||
async function updateOrder(token, id, data) { | ||
exports.create = create; | ||
async function update(token, id, data) { | ||
const payload = data || constants_1.DEFAULT_UPDATE_ORDER_PAYLOAD; | ||
@@ -32,3 +32,3 @@ const options = { | ||
} | ||
exports.updateOrder = updateOrder; | ||
exports.update = update; | ||
//# sourceMappingURL=index.js.map |
import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
export declare function createPayment(token: IPayPalAccessToken, data?: any): Promise<Response>; | ||
export declare function create(token: IPayPalAccessToken, data?: any): Promise<Response>; |
@@ -5,3 +5,3 @@ "use strict"; | ||
const constants_1 = require("./constants"); | ||
async function createPayment(token, data) { | ||
async function create(token, data) { | ||
const payload = data || constants_1.DEFAULT_PAYMENT_CREATE_PAYLOAD; | ||
@@ -18,3 +18,3 @@ const options = { | ||
} | ||
exports.createPayment = createPayment; | ||
exports.create = create; | ||
//# sourceMappingURL=index.js.map |
import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
export declare function listWebhooks(token: IPayPalAccessToken): Promise<Response>; | ||
export declare function listWebhookEventTypes(token: IPayPalAccessToken): Promise<Response>; | ||
export declare function createWebhookListener(token: IPayPalAccessToken, url: string, event_types: any[]): Promise<Response>; | ||
export declare function deleteWebhook(token: IPayPalAccessToken, id: string): Promise<Response>; | ||
export declare function verifyWebhookSignature(token: IPayPalAccessToken, webhook_id: string, headers: any, webhook_event: any): Promise<Response>; | ||
export declare function list(token: IPayPalAccessToken): Promise<Response>; | ||
export declare function listEventTypes(token: IPayPalAccessToken): Promise<Response>; | ||
export declare function create(token: IPayPalAccessToken, url: string, event_types: any[]): Promise<Response>; | ||
export declare function remove(token: IPayPalAccessToken, id: string): Promise<Response>; | ||
export declare function verify(token: IPayPalAccessToken, webhook_id: string, headers: any, webhook_event: any): Promise<Response>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const config_1 = require("../config"); | ||
async function listWebhooks(token) { | ||
async function list(token) { | ||
const options = { | ||
@@ -14,4 +14,4 @@ method: "GET", | ||
} | ||
exports.listWebhooks = listWebhooks; | ||
async function listWebhookEventTypes(token) { | ||
exports.list = list; | ||
async function listEventTypes(token) { | ||
const options = { | ||
@@ -26,4 +26,4 @@ method: "GET", | ||
} | ||
exports.listWebhookEventTypes = listWebhookEventTypes; | ||
async function createWebhookListener(token, url, event_types) { | ||
exports.listEventTypes = listEventTypes; | ||
async function create(token, url, event_types) { | ||
const options = { | ||
@@ -39,4 +39,4 @@ method: "POST", | ||
} | ||
exports.createWebhookListener = createWebhookListener; | ||
async function deleteWebhook(token, id) { | ||
exports.create = create; | ||
async function remove(token, id) { | ||
const options = { | ||
@@ -51,4 +51,4 @@ method: "DELETE", | ||
} | ||
exports.deleteWebhook = deleteWebhook; | ||
async function verifyWebhookSignature(token, webhook_id, headers, webhook_event) { | ||
exports.remove = remove; | ||
async function verify(token, webhook_id, headers, webhook_event) { | ||
const payload = { | ||
@@ -73,3 +73,3 @@ transmission_id: headers["paypal-transmission-id"], | ||
} | ||
exports.verifyWebhookSignature = verifyWebhookSignature; | ||
exports.verify = verify; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "paypal-isomorphic-functions", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "Library of helpful paypal functions that can be run in a browser or server", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -5,3 +5,3 @@ import { DEFAULT_CREATE_BILLING_AGREEMENT_TOKEN_PAYLOAD } from "./constants"; | ||
export async function createBillingAgreementToken( | ||
export async function createToken( | ||
token: IPayPalAccessToken, | ||
@@ -32,3 +32,3 @@ data: any = {} | ||
export async function createBillingAgreement( | ||
export async function create( | ||
token: IPayPalAccessToken, | ||
@@ -35,0 +35,0 @@ token_id: string |
@@ -9,7 +9,2 @@ import "./polyfills"; | ||
export * from "./billing-agreements"; | ||
export * from "./oauth"; | ||
export * from "./payments"; | ||
export * from "./webhooks"; | ||
export { | ||
@@ -16,0 +11,0 @@ Orders, |
@@ -5,3 +5,3 @@ import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
export async function createOrder(token: IPayPalAccessToken, data: any) { | ||
export async function create(token: IPayPalAccessToken, data: any) { | ||
const payload = data || DEFAULT_CREATE_ORDER_PAYLOAD; | ||
@@ -23,3 +23,3 @@ | ||
export async function updateOrder(token: IPayPalAccessToken, id: string, data: any) { | ||
export async function update(token: IPayPalAccessToken, id: string, data: any) { | ||
const payload = data || DEFAULT_UPDATE_ORDER_PAYLOAD; | ||
@@ -26,0 +26,0 @@ |
@@ -5,3 +5,3 @@ import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
export async function createPayment(token: IPayPalAccessToken, data?: any) { | ||
export async function create(token: IPayPalAccessToken, data?: any) { | ||
const payload = data || DEFAULT_PAYMENT_CREATE_PAYLOAD; | ||
@@ -8,0 +8,0 @@ |
import { IPayPalAccessToken } from "../oauth/interfaces"; | ||
import { CONFIG } from "../config"; | ||
export async function listWebhooks(token: IPayPalAccessToken) { | ||
export async function list(token: IPayPalAccessToken) { | ||
const options = { | ||
@@ -18,3 +18,3 @@ method: "GET", | ||
export async function listWebhookEventTypes(token: IPayPalAccessToken) { | ||
export async function listEventTypes(token: IPayPalAccessToken) { | ||
const options = { | ||
@@ -35,3 +35,3 @@ method: "GET", | ||
export async function createWebhookListener( | ||
export async function create( | ||
token: IPayPalAccessToken, | ||
@@ -55,3 +55,3 @@ url: string, | ||
export async function deleteWebhook(token: IPayPalAccessToken, id: string) { | ||
export async function remove(token: IPayPalAccessToken, id: string) { | ||
const options = { | ||
@@ -70,3 +70,3 @@ method: "DELETE", | ||
export async function verifyWebhookSignature( | ||
export async function verify( | ||
token: IPayPalAccessToken, | ||
@@ -73,0 +73,0 @@ webhook_id: string, |
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
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 too big to display
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
352847
1222