fix merge conflicts

This commit is contained in:
olivermrbl committed 2021-03-17 14:50:07 +01:00
commit 7872d37c04
65 files changed
+3527 -2619

No files matched your search

+60
View File
@@ -3,6 +3,66 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.13](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.11...@medusajs/medusa@1.1.13) (2021-03-17)
### Bug Fixes
* add region to gift-cards ([ffac0d3](https://github.com/medusajs/medusa/commit/ffac0d3a3de876a5fe5b6b75910ef02f249fae4c))
* adds integration test to create endpoint ([521d306](https://github.com/medusajs/medusa/commit/521d306b7126a820297d7374b9c16bea465fa643))
* allows shipping option filters in return ([#202](https://github.com/medusajs/medusa/issues/202)) ([7c7f86e](https://github.com/medusajs/medusa/commit/7c7f86e8e8be20173e774ea86b53e75c98e72e9a))
* contentful sync ([#206](https://github.com/medusajs/medusa/issues/206)) ([227cdb6](https://github.com/medusajs/medusa/commit/227cdb622234126df6087992203ce82ff9446974))
* enable gift-card creation without order_id ([9ce935a](https://github.com/medusajs/medusa/commit/9ce935a779aec90ff1ad301c73114ab69ce51b36))
* enable gift-card creation without order_id ([#195](https://github.com/medusajs/medusa/issues/195)) ([1263d24](https://github.com/medusajs/medusa/commit/1263d24ca380918345c844c1793f2706a49f85c6))
* merge ([49f1d0f](https://github.com/medusajs/medusa/commit/49f1d0f67a3eb285397d8b7c8e9033fcf42589ff))
* merge ([31d5bb0](https://github.com/medusajs/medusa/commit/31d5bb017d3028beb5325185ccec80cd1772165e))
* **medusa:** expose items.refundable ([3fbf38f](https://github.com/medusajs/medusa/commit/3fbf38ffc93b969adbb5033e5b7cb31aeff36896))
* merge api ([6ad2b0e](https://github.com/medusajs/medusa/commit/6ad2b0e6e9f339f60a3cc9d8674e5055121685b4))
* **medusa:** Upsert product images ([#200](https://github.com/medusajs/medusa/issues/200)) ([a031f1f](https://github.com/medusajs/medusa/commit/a031f1f33873dddd0246e668c5b98c12bbaa108b))
* round totals ([a1ba2e8](https://github.com/medusajs/medusa/commit/a1ba2e8b5cdf586ac2d646f2334e46ceae96bc8f))
* test ([caf1ecf](https://github.com/medusajs/medusa/commit/caf1ecfd5af58559d035d6c17a4993bdd6a5cc0b))
### Features
* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580))
* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f))
* **medusa:** storefront return ([#194](https://github.com/medusajs/medusa/issues/194)) ([252db5e](https://github.com/medusajs/medusa/commit/252db5ef7e09e844fac72bbb8e2b2de34a541d25))
## [1.1.12](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.11...@medusajs/medusa@1.1.12) (2021-03-17)
### Bug Fixes
* add region to gift-cards ([ffac0d3](https://github.com/medusajs/medusa/commit/ffac0d3a3de876a5fe5b6b75910ef02f249fae4c))
* adds integration test to create endpoint ([521d306](https://github.com/medusajs/medusa/commit/521d306b7126a820297d7374b9c16bea465fa643))
* allows shipping option filters in return ([#202](https://github.com/medusajs/medusa/issues/202)) ([7c7f86e](https://github.com/medusajs/medusa/commit/7c7f86e8e8be20173e774ea86b53e75c98e72e9a))
* contentful sync ([#206](https://github.com/medusajs/medusa/issues/206)) ([227cdb6](https://github.com/medusajs/medusa/commit/227cdb622234126df6087992203ce82ff9446974))
* enable gift-card creation without order_id ([9ce935a](https://github.com/medusajs/medusa/commit/9ce935a779aec90ff1ad301c73114ab69ce51b36))
* enable gift-card creation without order_id ([#195](https://github.com/medusajs/medusa/issues/195)) ([1263d24](https://github.com/medusajs/medusa/commit/1263d24ca380918345c844c1793f2706a49f85c6))
* merge ([49f1d0f](https://github.com/medusajs/medusa/commit/49f1d0f67a3eb285397d8b7c8e9033fcf42589ff))
* merge ([31d5bb0](https://github.com/medusajs/medusa/commit/31d5bb017d3028beb5325185ccec80cd1772165e))
* **medusa:** expose items.refundable ([3fbf38f](https://github.com/medusajs/medusa/commit/3fbf38ffc93b969adbb5033e5b7cb31aeff36896))
* merge api ([6ad2b0e](https://github.com/medusajs/medusa/commit/6ad2b0e6e9f339f60a3cc9d8674e5055121685b4))
* **medusa:** Upsert product images ([#200](https://github.com/medusajs/medusa/issues/200)) ([a031f1f](https://github.com/medusajs/medusa/commit/a031f1f33873dddd0246e668c5b98c12bbaa108b))
* round totals ([a1ba2e8](https://github.com/medusajs/medusa/commit/a1ba2e8b5cdf586ac2d646f2334e46ceae96bc8f))
* test ([caf1ecf](https://github.com/medusajs/medusa/commit/caf1ecfd5af58559d035d6c17a4993bdd6a5cc0b))
### Features
* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580))
* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f))
* **medusa:** storefront return ([#194](https://github.com/medusajs/medusa/issues/194)) ([252db5e](https://github.com/medusajs/medusa/commit/252db5ef7e09e844fac72bbb8e2b2de34a541d25))
## [1.1.11](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.10...@medusajs/medusa@1.1.11) (2021-02-25)
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@medusajs/medusa",
"version": "1.1.11",
"version": "1.1.13",
"description": "E-commerce for JAMstack",
"main": "dist/index.js",
"repository": {
@@ -67,8 +67,8 @@
"joi": "^17.3.0",
"joi-objectid": "^3.0.1",
"jsonwebtoken": "^8.5.1",
"medusa-core-utils": "^1.1.0",
"medusa-test-utils": "^1.1.3",
"medusa-core-utils": "^1.1.2",
"medusa-test-utils": "^1.1.5",
"morgan": "^1.9.1",
"multer": "^1.4.2",
"passport": "^0.4.0",
@@ -2,7 +2,7 @@ import { MedusaError, Validator } from "medusa-core-utils"
import { defaultRelations, defaultFields } from "./"
/**
* @oas [post] /return-reasons/:id
* @oas [post] /return-reasons/{id}
* operationId: "PostReturnReasonsReason"
* summary: "Update a Return Reason"
* description: "Updates a Return Reason"
@@ -5,8 +5,10 @@ import { defaultRelations, defaultFields } from "./"
* operationId: "GetGiftCardsCode"
* summary: "Retrieve Gift Card by Code"
* description: "Retrieves a Gift Card by its associated unqiue code."
* parameters:
* - (path) code=* {string} The unique Gift Card code.
* tags:
* - Region
* - Gift Card
* responses:
* 200:
* description: OK
@@ -22,6 +24,8 @@ import { defaultRelations, defaultFields } from "./"
* description: The original value of the Gift Card.
* balance:
* description: The current balanace of the Gift Card
* region:
* $ref: "#/components/schemas/region"
*/
export default async (req, res) => {
const { code } = req.params
@@ -11,10 +11,10 @@ export default app => {
return app
}
export const defaultRelations = []
export const defaultRelations = ["region"]
export const defaultFields = ["id", "code", "value", "balance"]
export const allowedRelations = []
export const allowedRelations = ["region"]
export const allowedFields = ["id", "code", "value", "balance"]
@@ -6,9 +6,19 @@ const route = Router()
export default app => {
app.use("/orders", route)
/**
* Lookup
*/
route.get("/", middlewares.wrap(require("./lookup-order").default))
/**
* Retrieve Order
*/
route.get("/:id", middlewares.wrap(require("./get-order").default))
/**
* Retrieve by Cart Id
*/
route.get(
"/cart/:cart_id",
middlewares.wrap(require("./get-order-by-cart").default)
@@ -32,6 +42,9 @@ export const defaultRelations = [
export const defaultFields = [
"id",
"status",
"fulfillment_status",
"payment_status",
"display_id",
"cart_id",
"customer_id",
@@ -43,6 +56,7 @@ export const defaultFields = [
"shipping_total",
"discount_total",
"tax_total",
"items.refundable",
"refunded_total",
"gift_card_total",
"subtotal",
@@ -65,12 +79,16 @@ export const allowedRelations = [
export const allowedFields = [
"id",
"status",
"fulfillment_status",
"payment_status",
"display_id",
"cart_id",
"customer_id",
"email",
"region_id",
"currency_code",
"items.refundable",
"tax_rate",
"created_at",
"shipping_total",
@@ -1,6 +1,26 @@
import { Validator, MedusaError } from "medusa-core-utils"
import { defaultRelations, defaultFields } from "./index"
/**
* @oas [get] /orders
* operationId: "GetOrders"
* summary: "Look Up an Order"
* description: "Looks for an Order with a given `display_id`, `email` pair. The `display_id`, `email` pair must match in order for the Order to be returned."
* parameters:
* - (query) display_id=* {number} The display id given to the Order.
* - (query) email=* {string} The email of the Order with the given display_id.
* tags:
* - Order
* responses:
* 200:
* description: OK
* content:
* application/json:
* schema:
* properties:
* order:
* $ref: "#/components/schemas/order"
*/
export default async (req, res) => {
const schema = Validator.object().keys({
display_id: Validator.number().required(),
@@ -1,6 +1,48 @@
import { MedusaError, Validator } from "medusa-core-utils"
import { defaultRelations, defaultFields } from "./"
/**
* @oas [post] /returns
* operationId: "PostReturns"
* summary: "Create Return"
* description: "Creates a Return for an Order."
* requestBody:
* content:
* application/json:
* schema:
* properties:
* order_id:
* type: string
* description: The id of the Order to create the Return from.
* items:
* description: "The items to include in the Return."
* type: array
* items:
* properties:
* item_id:
* description: The id of the Line Item from the Order.
* type: string
* quantity:
* description: The quantity to return.
* type: integer
* return_shipping:
* description: If the Return is to be handled by the store operator the Customer can choose a Return Shipping Method. Alternatvely the Customer can handle the Return themselves.
* type: object
* properties:
* option_id:
* type: string
* description: The id of the Shipping Option to create the Shipping Method from.
* tags:
* - Return
* responses:
* 200:
* description: OK
* content:
* application/json:
* schema:
* properties:
* return:
* $ref: "#/components/schemas/return"
*/
export default async (req, res) => {
const schema = Validator.object().keys({
order_id: Validator.string().required(),