@getvolume/volume-js
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -1,1 +0,1 @@ | ||
"use strict";var f=Object.defineProperty,N=Object.defineProperties,T=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var C=(e,i,n)=>i in e?f(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,g=(e,i)=>{for(var n in i||(i={}))v.call(i,n)&&C(e,n,i[n]);if(h)for(var n of h(i))P.call(i,n)&&C(e,n,i[n]);return e},I=(e,i)=>N(e,w(i));var D=(e,i)=>{for(var n in i)f(e,n,{get:i[n],enumerable:!0})},U=(e,i,n,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of b(i))!v.call(e,t)&&t!==n&&f(e,t,{get:()=>i[t],enumerable:!(o=T(i,t))||o.enumerable});return e};var _=e=>U(f({},"__esModule",{value:!0}),e);var d=(e,i,n)=>new Promise((o,t)=>{var a=r=>{try{p(n.next(r))}catch(m){t(m)}},c=r=>{try{p(n.throw(r))}catch(m){t(m)}},p=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,c);p((n=n.apply(e,i)).next())});var O={};D(O,{Volume:()=>l});module.exports=_(O);var R=require("@getvolume/volume-shared");var y={name:"@getvolume/volume-js",version:"1.0.21",description:"Volume JS",main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",exports:{".":{require:"./dist/index.js",import:"./dist/index.mjs",types:"./dist/index.d.ts"}},files:["dist/**"],scripts:{test:"vitest run","test:watch":"vitest",build:"tsup",clean:"rm -rf dist .turbo",dev:"pnpm build --watch"},dependencies:{"@getvolume/volume-shared":"workspace:*"},author:"Kai Spencer",license:"ISC",devDependencies:{msw:"^2.3.0",tsup:"^8.0.2",vitest:"^1.6.0"}};var A=require("@getvolume/volume-shared");var s=require("@getvolume/volume-shared"),V=e=>e==="local"?s.LOCAL_API_URL:e==="live"?s.LIVE_API_URL:e==="sandbox"?s.SANDBOX_API_URL:e==="integration"?s.INTEGRATION_API_URL:e;function j(e,i){for(let n=0;n<i.length;n++)e=e.replace(`{${n}}`,i[n]);return e}function u(G){return d(this,arguments,function*({applicationId:e,environment:i,endpoint:n,method:o="GET",body:t=void 0,params:a=void 0,xVolumeVersion:c="",xAppName:p="",xDeviceInfo:r="",xCommitSha:m="",additionalHeaders:S={}}){let x=`${V(i)}${A.Endpoints[n]}`,E=a!==void 0?j(x,a):x;return yield fetch(E,{method:o,body:t,headers:new Headers(g({"x-application-id":e,Accept:"application/json","Content-Type":"application/vnd.volume.v0.7+json","x-volume-version":c,"x-app-name":p,"x-device-info":r,"x-commitSha":m},S))})})}var l=class{constructor(i){this.initConfig=i}get version(){return y.version}institutions(i){return d(this,null,function*(){try{return{response:yield u({applicationId:this.initConfig.applicationId,endpoint:"INSTITUTIONS",environment:this.initConfig.environment,xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:i})}}catch(n){return{error:n}}})}paymentStatus(i,n){return d(this,null,function*(){try{return{response:yield u({applicationId:this.initConfig.applicationId,endpoint:"PAYMENT_STATUS",params:[i],environment:this.initConfig.environment,xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:n})}}catch(o){return{error:o}}})}createSingleDomesticPayment(r){return d(this,arguments,function*({institutionId:i,paymentRequest:n,merchantPaymentId:o,shopperId:t,paymentId:a,headers:c,metadata:p}){try{return{response:yield u({environment:this.initConfig.environment,applicationId:this.initConfig.applicationId,endpoint:"CREATE_PAYMENT",method:"POST",body:JSON.stringify(I(g(g({},t&&{shopperId:t}),a&&{paymentId:a}),{paymentRequest:n,institutionId:i,merchantPaymentId:o,metadata:p,applicationId:this.initConfig.applicationId,agentType:this.initConfig.agentType?this.initConfig.agentType:R.AgentType.MOBILE_APPLICATION})),xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:c})}}catch(m){return{error:m}}})}cancelUrl(i){return d(this,null,function*(){try{return{response:yield u({applicationId:this.initConfig.applicationId,endpoint:"CANCEL_URL",params:[this.initConfig.applicationId],environment:this.initConfig.environment,xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:i})}}catch(n){return{error:n}}})}};0&&(module.exports={Volume}); | ||
"use strict";var f=Object.defineProperty,N=Object.defineProperties,T=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,P=Object.prototype.propertyIsEnumerable;var C=(e,i,n)=>i in e?f(e,i,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[i]=n,g=(e,i)=>{for(var n in i||(i={}))v.call(i,n)&&C(e,n,i[n]);if(h)for(var n of h(i))P.call(i,n)&&C(e,n,i[n]);return e},I=(e,i)=>N(e,w(i));var D=(e,i)=>{for(var n in i)f(e,n,{get:i[n],enumerable:!0})},U=(e,i,n,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of b(i))!v.call(e,t)&&t!==n&&f(e,t,{get:()=>i[t],enumerable:!(o=T(i,t))||o.enumerable});return e};var _=e=>U(f({},"__esModule",{value:!0}),e);var d=(e,i,n)=>new Promise((o,t)=>{var a=r=>{try{p(n.next(r))}catch(m){t(m)}},c=r=>{try{p(n.throw(r))}catch(m){t(m)}},p=r=>r.done?o(r.value):Promise.resolve(r.value).then(a,c);p((n=n.apply(e,i)).next())});var O={};D(O,{Volume:()=>l});module.exports=_(O);var R=require("@getvolume/volume-shared");var y={name:"@getvolume/volume-js",version:"1.0.22",description:"Volume JS",main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",exports:{".":{require:"./dist/index.js",import:"./dist/index.mjs",types:"./dist/index.d.ts"}},files:["dist/**"],scripts:{test:"vitest run","test:watch":"vitest",build:"tsup",clean:"rm -rf dist .turbo",dev:"pnpm build --watch"},dependencies:{"@getvolume/volume-shared":"workspace:*"},author:"Kai Spencer",license:"ISC",devDependencies:{msw:"^2.3.0",tsup:"^8.0.2",vitest:"^1.6.0"}};var A=require("@getvolume/volume-shared");var s=require("@getvolume/volume-shared"),V=e=>e==="local"?s.LOCAL_API_URL:e==="live"?s.LIVE_API_URL:e==="sandbox"?s.SANDBOX_API_URL:e==="integration"?s.INTEGRATION_API_URL:e;function j(e,i){for(let n=0;n<i.length;n++)e=e.replace(`{${n}}`,i[n]);return e}function u(G){return d(this,arguments,function*({applicationId:e,environment:i,endpoint:n,method:o="GET",body:t=void 0,params:a=void 0,xVolumeVersion:c="",xAppName:p="",xDeviceInfo:r="",xCommitSha:m="",additionalHeaders:S={}}){let x=`${V(i)}${A.Endpoints[n]}`,E=a!==void 0?j(x,a):x;return yield fetch(E,{method:o,body:t,headers:new Headers(g({"x-application-id":e,Accept:"application/json","Content-Type":"application/vnd.volume.v0.7+json","x-volume-version":c,"x-app-name":p,"x-device-info":r,"x-commitSha":m},S))})})}var l=class{constructor(i){this.initConfig=i}get version(){return y.version}institutions(i){return d(this,null,function*(){try{return{response:yield u({applicationId:this.initConfig.applicationId,endpoint:"INSTITUTIONS",environment:this.initConfig.environment,xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:i})}}catch(n){return{error:n}}})}paymentStatus(i,n){return d(this,null,function*(){try{return{response:yield u({applicationId:this.initConfig.applicationId,endpoint:"PAYMENT_STATUS",params:[i],environment:this.initConfig.environment,xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:n})}}catch(o){return{error:o}}})}createSingleDomesticPayment(r){return d(this,arguments,function*({institutionId:i,paymentRequest:n,merchantPaymentId:o,shopperId:t,paymentId:a,headers:c,metadata:p}){try{return{response:yield u({environment:this.initConfig.environment,applicationId:this.initConfig.applicationId,endpoint:"CREATE_PAYMENT",method:"POST",body:JSON.stringify(I(g(g({},t&&{shopperId:t}),a&&{paymentId:a}),{paymentRequest:n,institutionId:i,merchantPaymentId:o,metadata:p,applicationId:this.initConfig.applicationId,agentType:this.initConfig.agentType?this.initConfig.agentType:R.AgentType.MOBILE_APPLICATION})),xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:c})}}catch(m){return{error:m}}})}cancelUrl(i){return d(this,null,function*(){try{return{response:yield u({applicationId:this.initConfig.applicationId,endpoint:"CANCEL_URL",params:[this.initConfig.applicationId],environment:this.initConfig.environment,xAppName:this.initConfig.xAppName,xDeviceInfo:this.initConfig.xDeviceInfo,xVolumeVersion:this.initConfig.xVolumeVersion,xCommitSha:this.initConfig.xCommitSha,additionalHeaders:i})}}catch(n){return{error:n}}})}};0&&(module.exports={Volume}); |
{ | ||
"name": "@getvolume/volume-js", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "Volume JS", | ||
@@ -19,3 +19,3 @@ "main": "./dist/index.js", | ||
"dependencies": { | ||
"@getvolume/volume-shared": "0.0.16" | ||
"@getvolume/volume-shared": "0.0.17" | ||
}, | ||
@@ -22,0 +22,0 @@ "author": "Kai Spencer", |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
2
+ Added@getvolume/volume-shared@0.0.17(transitive)
- Removed@getvolume/volume-shared@0.0.16(transitive)