feat: Create cart with line items (#6449)

**What**
- Add support for creating a cart with items
- Add endpoint `POST /store/carts/:id/line-items`
- Add `CreateCartWorkflow`
- Add `AddToCartWorkflow`
- Add steps for both workflows

**Testing**
- Endpoints
- Workflows

I would still call this a first iteration, as we are missing a few pieces of the full flow, such as payment sessions, discounts, and taxes.

Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
This commit is contained in:
Oli Juhl
2024-02-26 13:32:16 +00:00
committed by GitHub
co-authored by Adrien de Peretti
parent ac86362e81
commit 7ebe885ec9
26 changed files with 1100 additions and 157 deletions
@@ -1,7 +1,7 @@
import { NextFunction, Request, Response } from "express"
import { Logger } from "../../types/global"
import { MedusaError } from "medusa-core-utils"
import { Logger } from "../../types/global"
import { formatException } from "../../utils"
const QUERY_RUNNER_RELEASED = "QueryRunnerAlreadyReleasedError"