@getvolume/volume-shared
Advanced tools
Comparing version 0.0.14-canary.c64cc55 to 0.0.14
@@ -89,3 +89,9 @@ interface IVolumeContext { | ||
*/ | ||
SupportedDevice = "SUPPORTED_DEVICE" | ||
SupportedDevice = "SUPPORTED_DEVICE", | ||
InstitutionsFetched = "INSTITUTIONS_FETCHED", | ||
CancelUrlFetched = "CANCEL_URL_FETCHED", | ||
ConfirmPageLoaded = "CONFIRM_PAGE_LOADED", | ||
BankSelectionLoaded = "BANK_SELECTION_LOADED", | ||
AwaitingAuthorisation = "AWAITING_AUTHORISATION", | ||
BankLaunchedLoaded = "BANK_LAUNCHED_LOADED" | ||
} | ||
@@ -134,2 +140,3 @@ /** | ||
source: string; | ||
causes?: string[]; | ||
} | ||
@@ -169,2 +176,17 @@ interface Payment { | ||
} | ||
declare class VolumeError extends Error { | ||
context?: { | ||
type: VolumeErrorContextType; | ||
value: string; | ||
}; | ||
httpErrorMessage?: ErrorMessage; | ||
type: string; | ||
constructor(msg: string, context?: { | ||
type: VolumeErrorContextType; | ||
value: string; | ||
}, httpErrorMessage?: ErrorMessage); | ||
} | ||
declare enum VolumeErrorContextType { | ||
HTTP_CALL = "HTTP_CALL" | ||
} | ||
@@ -182,2 +204,3 @@ declare const apiUrlFromVolumeEnvironment: (volumeEnvironment: VolumeEnvironment) => string; | ||
readonly PAYMENT_STATUS: "/api/payments/{0}/status"; | ||
readonly CANCEL_URL: "/api/merchants/applications/{0}/cancel-url"; | ||
}; | ||
@@ -187,2 +210,2 @@ | ||
export { AgentType, Endpoints, ErrorMessage, FeatureFlags, INTEGRATION_API_URL, IVolumeContext, Institution, InstitutionMetadata, LIVE_API_URL, LOCAL_API_URL, Payment, PaymentRequest, PaymentStatus, PaymentStatusResponse, ResponseWrapper, SANDBOX_API_URL, UseVolume, VolumeEnvironment, VolumeEvent, VolumeEventType, apiUrlFromVolumeEnvironment, numberToCurrency }; | ||
export { AgentType, Endpoints, ErrorMessage, FeatureFlags, INTEGRATION_API_URL, IVolumeContext, Institution, InstitutionMetadata, LIVE_API_URL, LOCAL_API_URL, Payment, PaymentRequest, PaymentStatus, PaymentStatusResponse, ResponseWrapper, SANDBOX_API_URL, UseVolume, VolumeEnvironment, VolumeError, VolumeErrorContextType, VolumeEvent, VolumeEventType, apiUrlFromVolumeEnvironment, numberToCurrency }; |
@@ -29,2 +29,4 @@ var __defProp = Object.defineProperty; | ||
SANDBOX_API_URL: () => SANDBOX_API_URL, | ||
VolumeError: () => VolumeError, | ||
VolumeErrorContextType: () => VolumeErrorContextType, | ||
VolumeEventType: () => VolumeEventType, | ||
@@ -44,2 +46,8 @@ apiUrlFromVolumeEnvironment: () => apiUrlFromVolumeEnvironment, | ||
VolumeEventType2["SupportedDevice"] = "SUPPORTED_DEVICE"; | ||
VolumeEventType2["InstitutionsFetched"] = "INSTITUTIONS_FETCHED"; | ||
VolumeEventType2["CancelUrlFetched"] = "CANCEL_URL_FETCHED"; | ||
VolumeEventType2["ConfirmPageLoaded"] = "CONFIRM_PAGE_LOADED"; | ||
VolumeEventType2["BankSelectionLoaded"] = "BANK_SELECTION_LOADED"; | ||
VolumeEventType2["AwaitingAuthorisation"] = "AWAITING_AUTHORISATION"; | ||
VolumeEventType2["BankLaunchedLoaded"] = "BANK_LAUNCHED_LOADED"; | ||
return VolumeEventType2; | ||
@@ -63,2 +71,15 @@ })(VolumeEventType || {}); | ||
})(PaymentStatus || {}); | ||
var VolumeError = class extends Error { | ||
constructor(msg, context, httpErrorMessage) { | ||
super(msg); | ||
this.context = context; | ||
this.httpErrorMessage = httpErrorMessage; | ||
this.type = "VolumeError"; | ||
Object.setPrototypeOf(this, VolumeError.prototype); | ||
} | ||
}; | ||
var VolumeErrorContextType = /* @__PURE__ */ ((VolumeErrorContextType2) => { | ||
VolumeErrorContextType2["HTTP_CALL"] = "HTTP_CALL"; | ||
return VolumeErrorContextType2; | ||
})(VolumeErrorContextType || {}); | ||
@@ -74,3 +95,4 @@ // src/constants.ts | ||
CREATE_PAYMENT: "/api/payments", | ||
PAYMENT_STATUS: "/api/payments/{0}/status" | ||
PAYMENT_STATUS: "/api/payments/{0}/status", | ||
CANCEL_URL: "/api/merchants/applications/{0}/cancel-url" | ||
}; | ||
@@ -111,2 +133,4 @@ | ||
SANDBOX_API_URL, | ||
VolumeError, | ||
VolumeErrorContextType, | ||
VolumeEventType, | ||
@@ -113,0 +137,0 @@ apiUrlFromVolumeEnvironment, |
{ | ||
"name": "@getvolume/volume-shared", | ||
"version": "0.0.14-canary.c64cc55", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsup src/index.ts --dts", | ||
"dev": "yarn build --watch", | ||
"clean": "rm -rf dist .turbo" | ||
}, | ||
"files": [ | ||
"dist/**" | ||
], | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"devDependencies": { | ||
"tsup": "^6.7.0" | ||
} | ||
"name": "@getvolume/volume-shared", | ||
"version": "0.0.14", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "tsup src/index.ts --dts", | ||
"dev": "yarn build --watch", | ||
"clean": "rm -rf dist .turbo" | ||
}, | ||
"files": [ | ||
"dist/**" | ||
], | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"devDependencies": { | ||
"tsup": "^6.7.0" | ||
} | ||
} |
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
11472
332
3