@shipengine/js-api
Advanced tools
| import { AxiosInstance } from "axios"; | ||
| import { ConfigResponse, CreateSessionRequest, CreateSessionResponse } from "./types"; | ||
| import { ConfigResponse, CreateSessionRequest, CreateSessionResponse, PreviewTransactionRequest, PreviewTransactionResponse } from "./types"; | ||
| /** | ||
@@ -24,2 +24,9 @@ * # Auctane Pay API module - /v1/payments | ||
| getConfig: () => Promise<import("axios").AxiosResponse<ConfigResponse, any>>; | ||
| /** | ||
| * The `previewTransaction` method previews transaction costs including fees and surcharges | ||
| * @docs https://auctane-pay-dev.kubedev.sslocal.com/swagger/index.html#tag/Transactions | ||
| * @param request - The request object containing amount and transaction category | ||
| * @returns a promise that resolves to the transaction preview with fees | ||
| */ | ||
| previewTransaction: (request: PreviewTransactionRequest) => Promise<import("axios").AxiosResponse<PreviewTransactionResponse, any>>; | ||
| } |
+81
-50
| /** | ||
| * @category Entities | ||
| * Auctane Pay Session can return a lot of metadata, but will always returns the same 5 keys. | ||
| * Auctane Pay Session can return a lot of metadata, | ||
| * but will always returns the same 5 keys. | ||
| */ | ||
| export interface AuctanePaySessionMetadata { | ||
| [key: string]: string; | ||
| /** Adyen client key */ | ||
| adyenClientKey: string; | ||
| /** Adyen expiration */ | ||
| adyenExpiration: string; | ||
| /** Adyen session data */ | ||
| adyenSessionData: string; | ||
| /** Adyen session ID */ | ||
| adyenSessionId: string; | ||
| /** Client key */ | ||
| clientKey: string; | ||
@@ -42,5 +48,3 @@ } | ||
| export interface PaymentMethodHolderAddress { | ||
| /** | ||
| * Account holder address | ||
| */ | ||
| /** Account holder address */ | ||
| accountHolderAddress: { | ||
@@ -54,51 +58,40 @@ addressLine1: string; | ||
| } | null; | ||
| /** | ||
| * Account holder name | ||
| */ | ||
| /** Account holder name */ | ||
| accountHolderName: string | null; | ||
| /** | ||
| * The last four of the account number, this is only provided for bank accounts and card schemes. | ||
| /** The last four of the account number, this is only | ||
| * provided for bank accounts and card schemes. | ||
| */ | ||
| accountNumberLastFour: string; | ||
| /** | ||
| * An account number preview, for a CC this is the last 4 digits, but shown like 1234. | ||
| /** An account number preview, for a CC this is the last 4 digits, but shown like 1234. | ||
| * For an e-mail account it might be ay@auctane.com, etc. | ||
| */ | ||
| accountNumberPreview: string; | ||
| /** | ||
| * If applicable/available, the current expiration we have on file for the payment method. | ||
| /** If applicable/available, the current expiration | ||
| * we have on file for the payment method. | ||
| */ | ||
| assignedPreferences: AuctanePayTransactionCategory[]; | ||
| /** | ||
| * Date the payment method was last used. If the date it was last used is unavailable, | ||
| /** Date the payment method was last used. | ||
| * If the date it was last used is unavailable, | ||
| * this will be the date created/updated. | ||
| */ | ||
| dateLastUsed: string; | ||
| /** | ||
| * List of processes or payment gateways in which this Payment Method is registered | ||
| /** List of processes or payment gateways | ||
| * in which this Payment Method is registered | ||
| */ | ||
| enrolledProcessors: string[]; | ||
| /** | ||
| * If applicable/available, the current expiration we have on file for the payment method. | ||
| /** If applicable/available, the current expiration | ||
| * we have on file for the payment method. | ||
| */ | ||
| expiration: string; | ||
| /** | ||
| * The Payment Method ID | ||
| */ | ||
| /** The Payment Method ID */ | ||
| id: string; | ||
| /** | ||
| * The nickname of the payment method | ||
| */ | ||
| /** The nickname of the payment method */ | ||
| nickname: string; | ||
| /** | ||
| * Enumeration of supported payment methods. | ||
| */ | ||
| /** Enumeration of supported payment methods. */ | ||
| paymentMethod: "unknown" | "visa" | "mastercard" | "amex" | "discover" | "maestro" | "dinersclub" | "ach" | "jcb" | "pulse" | "star" | "unionpay"; | ||
| /** | ||
| * The Display Name to show in any text based UI/context for the Logo. | ||
| /** The Display Name to show in any text | ||
| * based UI/context for the Logo. | ||
| */ | ||
| paymentMethodDisplayName: string; | ||
| /** | ||
| * Source account ID | ||
| */ | ||
| /** Source account ID */ | ||
| sourceAccountId: string; | ||
@@ -116,26 +109,16 @@ } | ||
| export interface CreateSessionResponse { | ||
| /** | ||
| * Active payment methods | ||
| */ | ||
| /** Active payment methods */ | ||
| activePaymentMethods: PaymentMethodHolderAddress[]; | ||
| /** | ||
| * Client key | ||
| */ | ||
| /** Client key */ | ||
| clientKey: string; | ||
| /** | ||
| * Eligible payment method types | ||
| */ | ||
| /** Eligible payment method types */ | ||
| eligiblePaymentMethodTypes: AuctanePayPaymentMethod[]; | ||
| /** | ||
| * The Auctane Pay Internal Session ID, use this ID to request the result of this session | ||
| /** The Auctane Pay Internal Session ID, | ||
| * use this ID to request the result of this session | ||
| * and payment methods created from it. | ||
| */ | ||
| id: string; | ||
| /** | ||
| * Metadata | ||
| */ | ||
| /** Metadata */ | ||
| metadata: AuctanePaySessionMetadata; | ||
| /** | ||
| * Recent payment methods | ||
| */ | ||
| /** Recent payment methods */ | ||
| recentPaymentMethods: PaymentMethodHolderAddress[]; | ||
@@ -147,1 +130,49 @@ /** @deprecated */ | ||
| } | ||
| /** | ||
| * @category Entities | ||
| * Request body for preview transaction endpoint | ||
| */ | ||
| export interface PreviewTransactionRequest { | ||
| /** Transaction amount */ | ||
| amount: number; | ||
| /** Category of the transaction */ | ||
| transactionCategory: AuctanePayTransactionCategory; | ||
| } | ||
| /** | ||
| * @category Entities | ||
| * Money amount with currency | ||
| */ | ||
| export interface MoneyAmount { | ||
| /** Amount value */ | ||
| amount: number; | ||
| /** Currency code */ | ||
| currencyCode: string; | ||
| } | ||
| /** | ||
| * @category Entities | ||
| * Fee information for a transaction | ||
| */ | ||
| export interface TransactionFee { | ||
| /** Fee amount */ | ||
| amount: number; | ||
| /** Fee percentage */ | ||
| percentage: number; | ||
| /** Fee type */ | ||
| type: string; | ||
| } | ||
| /** | ||
| * @category Entities | ||
| * Response from preview transaction endpoint | ||
| */ | ||
| export interface PreviewTransactionResponse { | ||
| /** Total transaction amount */ | ||
| amount: MoneyAmount; | ||
| /** Base amount before fees */ | ||
| baseAmount: MoneyAmount; | ||
| /** Array of fee details */ | ||
| fees: TransactionFee[]; | ||
| /** Total transaction fee */ | ||
| totalTransactionFee: MoneyAmount; | ||
| /** Transaction currency code */ | ||
| transactionCurrencyCode: string; | ||
| } |
+1
-1
| { | ||
| "name": "@shipengine/js-api", | ||
| "version": "4.6.1", | ||
| "version": "4.7.0", | ||
| "main": "./index.js", | ||
@@ -5,0 +5,0 @@ "types": "./index.d.ts", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1587120
0.17%45047
0.14%