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

medusa-interfaces

Package Overview
Dependencies
Maintainers
2
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

medusa-interfaces - npm Package Compare versions

Comparing version 1.0.10 to 1.0.11-alpha.421

33

dist/fulfillment-service.js

@@ -54,5 +54,27 @@ "use strict";

}
/**
* Called before a shipping option is created in Admin. The method should
* return all of the options that the fulfillment provider can be used with,
* and it is here the distinction between different shipping options are
* enforced. For example, a fulfillment provider may offer Standard Shipping
* and Express Shipping as fulfillment options, it is up to the store operator
* to create shipping options in Medusa that can be chosen between by the
* customer.
*/
}, {
key: "getFulfillmentOptions",
value: function getFulfillmentOptions() {}
/**
* Called before a shipping method is set on a cart to ensure that the data
* sent with the shipping method is valid. The data object may contain extra
* data about the shipment such as an id of a drop point. It is up to the
* fulfillment provider to enforce that the correct data is being sent
* through.
* @param {object} data - the data to validate
* @param {object} cart - the cart to which the shipping method will be applied
* @return {object} the data to populate `cart.shipping_methods.$.data` this
* is usually important for future actions like generating shipping labels
*/
}, {

@@ -63,2 +85,7 @@ key: "validateFulfillmentData",

}
/**
* Called before a shipping option is created in Admin. Use this to ensure
* that a fulfillment option does in fact exist.
*/
}, {

@@ -74,5 +101,9 @@ key: "validateOption",

}
/**
* Used to calculate a price for a given shipping option.
*/
}, {
key: "calculatePrice",
value: function calculatePrice(data) {
value: function calculatePrice(data, cart) {
throw Error("calculatePrice must be overridden by the child class");

@@ -79,0 +110,0 @@ }

4

package.json
{
"name": "medusa-interfaces",
"version": "1.0.10",
"version": "1.0.11-alpha.421+306099b",
"description": "Core interfaces for Medusa",

@@ -39,3 +39,3 @@ "main": "dist/index.js",

},
"gitHead": "cd39798b4b7c4932ea8e684eab9c584eb2c1d08c"
"gitHead": "306099b6a2a71765b2331ac033376376818ea6fa"
}

@@ -18,4 +18,24 @@ import BaseService from "./base-service"

/**
* Called before a shipping option is created in Admin. The method should
* return all of the options that the fulfillment provider can be used with,
* and it is here the distinction between different shipping options are
* enforced. For example, a fulfillment provider may offer Standard Shipping
* and Express Shipping as fulfillment options, it is up to the store operator
* to create shipping options in Medusa that can be chosen between by the
* customer.
*/
getFulfillmentOptions() {}
/**
* Called before a shipping method is set on a cart to ensure that the data
* sent with the shipping method is valid. The data object may contain extra
* data about the shipment such as an id of a drop point. It is up to the
* fulfillment provider to enforce that the correct data is being sent
* through.
* @param {object} data - the data to validate
* @param {object} cart - the cart to which the shipping method will be applied
* @return {object} the data to populate `cart.shipping_methods.$.data` this
* is usually important for future actions like generating shipping labels
*/
validateFulfillmentData(data, cart) {

@@ -25,2 +45,6 @@ throw Error("validateFulfillmentData must be overridden by the child class")

/**
* Called before a shipping option is created in Admin. Use this to ensure
* that a fulfillment option does in fact exist.
*/
validateOption(data) {

@@ -34,3 +58,6 @@ throw Error("validateOption must be overridden by the child class")

calculatePrice(data) {
/**
* Used to calculate a price for a given shipping option.
*/
calculatePrice(data, cart) {
throw Error("calculatePrice must be overridden by the child class")

@@ -37,0 +64,0 @@ }

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