Commit Graph

3786 Commits

Author SHA1 Message Date
Shahed Nasser
914d773d3a api-ref: custom API reference (#4770)
* initialized next.js project

* finished markdown sections

* added operation schema component

* change page metadata

* eslint fixes

* fixes related to deployment

* added response schema

* resolve max stack issue

* support for different property types

* added support for property types

* added loading for components

* added more loading

* type fixes

* added oneOf type

* removed console

* fix replace with push

* refactored everything

* use static content for description

* fixes and improvements

* added code examples section

* fix path name

* optimizations

* fixed tag navigation

* add support for admin and store references

* general enhancements

* optimizations and fixes

* fixes and enhancements

* added search bar

* loading enhancements

* added loading

* added code blocks

* added margin top

* add empty response text

* fixed oneOf parameters

* added path and query parameters

* general fixes

* added base path env variable

* small fix for arrays

* enhancements

* design enhancements

* general enhancements

* fix isRequired

* added enum values

* enhancements

* general fixes

* general fixes

* changed oas generation script

* additions to the introduction section

* added copy button for code + other enhancements

* fix response code block

* fix metadata

* formatted store introduction

* move sidebar logic to Tags component

* added test env variables

* fix code block bug

* added loading animation

* added expand param + loading

* enhance operation loading

* made responsive + improvements

* added loading provider

* fixed loading

* adjustments for small devices

* added sidebar label for endpoints

* added feedback component

* fixed analytics

* general fixes

* listen to scroll for other headings

* added sample env file

* update api ref files + support new fields

* fix for external docs link

* added new sections

* fix last item in sidebar not showing

* move docs content to www/docs

* change redirect url

* revert change

* resolve build errors

* configure rewrites

* changed to environment variable url

* revert changing environment variable name

* add environment variable for API path

* fix links

* fix tailwind settings

* remove vercel file

* reconfigured api route

* move api page under api

* fix page metadata

* fix external link in navigation bar

* update api spec

* updated api specs

* fixed google lint error

* add max-height on request samples

* add padding before loading

* fix for one of name

* fix undefined types

* general fixes

* remove response schema example

* redesigned navigation bar

* redesigned sidebar

* fixed up paddings

* added feedback component + report issue

* fixed up typography, padding, and general styling

* redesigned code blocks

* optimization

* added error timeout

* fixes

* added indexing with algolia + fixes

* fix errors with algolia script

* redesign operation sections

* fix heading scroll

* design fixes

* fix padding

* fix padding + scroll issues

* fix scroll issues

* improve scroll performance

* fixes for safari

* optimization and fixes

* fixes to docs + details animation

* padding fixes for code block

* added tab animation

* fixed incorrect link

* added selection styling

* fix lint errors

* redesigned details component

* added detailed feedback form

* api reference fixes

* fix tabs

* upgrade + fixes

* updated documentation links

* optimizations to sidebar items

* fix spacing in sidebar item

* optimizations and fixes

* fix endpoint path styling

* remove margin

* final fixes

* change margin on small devices

* generated OAS

* fixes for mobile

* added feedback modal

* optimize dark mode button

* fixed color mode useeffect

* minimize dom size

* use new style system

* radius and spacing design system

* design fixes

* fix eslint errors

* added meta files

* change cron schedule

* fix docusaurus configurations

* added operating system to feedback data

* change content directory name

* fixes to contribution guidelines

* revert renaming content

* added api-reference to documentation workflow

* fixes for search

* added dark mode + fixes

* oas fixes

* handle bugs

* added code examples for clients

* changed tooltip text

* change authentication to card

* change page title based on selected section

* redesigned mobile navbar

* fix icon colors

* fix key colors

* fix medusa-js installation command

* change external regex in algolia

* change changeset

* fix padding on mobile

* fix hydration error

* update depedencies
2023-08-15 18:07:54 +03:00
Oli Juhl
16249ec280 fix(actions): Disable OAS unit tests + add flags to test commands (#4767)
* wip

* skip models test

* ignore plugins loader test
2023-08-15 14:32:58 +02:00
Shahed Nasser
30ce35b163 feat(create-medusa-app): add database options (#4733)
## What

Adds new options for easier usage of the `create-medusa-app` command for regular medusa users.

The following options are added:

- `--skip-db`: Skips creating the database, running migrations, and seeding, and subsequently skips opening the browser. Useful if the developer wants to set the database URL at a later point in the configurations.
- `--db-url <url>`:  Skips database creation and sets the database URL to the provided URL. Throws an error if can't connect to the database. Will still run migrations and open the admin after project creation. Useful if the developer already has database created, locally or remotely.
- `--no-migrations`: Skips running migrations, creating admin user, and seeding. If used, it's expected that you pass the `--db-url` option with a url of a database that has all necessary migrations. Otherwise, unexpected errors will occur. Helpful only if combined with `--db-url`
- `--no-browser`: Disables opening the browser at the end of the project creation and only shows success message.
- `--directory-path <path>`: Allows specifying the directory path to install the project in. Useful for testing.
2023-08-15 08:08:54 +00:00
Frane Polić
4a448b68fd feat(admin-ui): bulk advanced selections + copy/paste (#4568)
* wip: bulk editor copy/paste

* feat: exit edit mode with "enter" press

* wip: arrow navigation + onEnter

* wip: 2D select + arrow navigation

* feat: arrow navigation and multiselect, tabs navigation and multiselect

* fix: region cols offset

* feat: 2d copy

* feat: 2d paste

* fix: trailing tab

* fix: borders

* feat: ensure consistent copy order

* fix: off by one col, pass `cmd` keypress

* feat: `cmd` select

* refactor: cleanup 1

* refactor: cleanup 2, utils

* fix: copy paste

* fix: copy paste indicator

* fix: reduce dashed border size

* fix: issue with leading empty cell

* feat: cp support 2 formats of content, notification on copy, remove dashed box

* fix: last empty cell case

* feat: buffer content edge cases

* refactor: remove log

* feat: past fill selected area

* feat: simplify copy-paste

* fix: throw error if textual cell is in the buffer

* Create eighty-zebras-grow.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-14 21:37:12 +02:00
github-actions[bot]
0887e5007f chore(docs): Removed Docs Announcement Bar (automated) (#4752)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2023-08-13 07:39:59 +00:00
Sebastian Rindom
9d8f87b03b fix(medusa): ignore region_id update w/o value change (#4751) 2023-08-13 09:26:32 +02:00
Josip Matić
803aca0689 feat(medusa-plugin-restock-notifications): Multi-warehouse support (#4718)
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-12 12:02:39 +00:00
Simons
d8a908bd8e fix(medusa): removal of shipping methods on addOrUpdateLineItems (#4725)
* added removal of shipping methods on addOrUpdateLineItems

* Create lovely-beds-design.md

---------

Co-authored-by: Thijs Simons <thijs@careeraim.nl>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-12 12:44:35 +02:00
Pedro Tigre
6dd3056776 fix: Update algolia.md (#4734)
## Fix bug where products are not added to Algolia index

Previously, the id property was used as the unique identifier for products in the Algolia index. However, Algolia requires the use of the objectID property as the unique identifier. 

This commit updates the transformer function for the products index to use the objectID property instead of the id property, ensuring that products are properly added to the Algolia index.
2023-08-11 21:45:19 +00:00
Oli Juhl
1d2637572b chore: Remove rimraf from prepare (#4741) 2023-08-11 22:55:59 +02:00
Oli Juhl
9469063f64 fix(medusa-js): return type of collection hook + export (#4747) 2023-08-11 13:37:54 +02:00
Sebabrata Kundu
410ac86ae1 fix: Spelling medusa in desc of package.json of Stripe and PayPal package (#2454)
Fix the incorrect spelling of medusa in package.json file of paypal and stripe packages.

Closes #2453
2023-08-11 08:47:16 +00:00
Shahed Nasser
324c9d62ef docs: fix method names in complete checkout code block (#4746)
Closes #4744
2023-08-11 09:47:24 +03:00
Adrien de Peretti
a268d2cb0b feat(workflows): Data aggregation (#4732)
* apply the aggregator automatically

* add comment

* apply aggregate

* improve pipe aggregation

* improve test cases

* improvements

* clean tests

* renameing to merge

* fix merge apply

* move merge apply

* cleanup cart workflow and end point

* fixes and naming
2023-08-10 14:01:56 +02:00
Shahed Nasser
2363a5324e docs: general fixes across docs (#4737)
* docs: general fixes across docs

* added deploy button to railway

* fix eslint errors

* fixes
2023-08-10 11:44:20 +03:00
Adrien de Peretti
f8d3d5f91a chore(product): remove decorator where it is not necessary and cleanup (#4731)
* chore(product): remove decorator where it is not necessary and cleanup

* Create twenty-gorillas-exist.md
2023-08-10 09:57:32 +02:00
Adrien de Peretti
ac866ebb51 test(): Test the create product workflow compensation (#4716)
**What**
Integration tests to validate the workflow compensation.
Also, fix the transaction state when the workflow is compensating and some steps does not have any compensation
2023-08-09 14:33:04 +00:00
Oli Juhl
86c314eb2a chore: Update FUNDING.yml 2023-08-09 10:28:53 +02:00
Oli Juhl
df3b0c673a chore: Update FUNDING.yml 2023-08-09 10:26:22 +02:00
Adrien de Peretti
3f3a84262c feat(types, product, utils, medusa): Include shared connection for modules (#4626) 2023-08-08 15:10:34 +00:00
Oli Juhl
a2d7540e40 fix(medusa): Remove shipping on updates to cart.items (#4715)
* rm shipping on line item updates

* Add tests

* remove verbose flag

* Create real-items-rhyme.md
2023-08-08 14:53:47 +02:00
Didier Guyon
0cba4d647d fix(medusa): ExistingItems query in addOrUpdateLineItems (#4714) 2023-08-08 13:51:44 +02:00
Carlos R. L. Rodrigues
c0ca002901 feat(orchestration,workflows): pipe oncomplete and workflow preparation (#4697)
* chore: pipe onComplete and workflow preparation step

* changeset

* fix: tests

---------

Co-authored-by: Adrien de Peretti <adrien.deperetti@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-08 13:06:47 +02:00
Oli Juhl
d1e298f5dc chore: Remove FlagRouter from core (#4710)
* Allow nested feature flags

* clean up

* Create loud-wombats-shave.md

* add warning

* Add more tests

* Address PR comments

* add back boolean check

* Replace core flag router with utils one

* lol - actually remove it

* Create eleven-doors-roll.md

---------

Co-authored-by: carlos-r-l-rodrigues <rodrigolr@gmail.com>
2023-08-08 13:05:50 +02:00
Riqwan Thamir
281b0746cf feat(medusa,workflows) Create cart workflow (#4685)
* chore: add baseline test for create cart

* chore: add basic paths into handlers + make first tests pass

* chore: move input alias to cart specific workflow

* chore: move data around into buckets

* chore: normalize handlers and introduce types

* chore: move aliases to handlers concern

* chore: add compensation step for create cart

* chore: merge with latest develop

* chore: handle error manually + type inputs

* chore: handle error manually

* chore: added types for each handler

* chore: remove addresses

* chore: added changset

* chore: undo package changes

* chore: added config settings to retreieve, cleanup of types

* chore: capitalize cart handlers

* chore: rename todo

* chore: add feature flag for workflow

* chore: reorder handlers

* chore: add logger to route handler

* chore: removed weird vscode moving around things

* chore: refactor handlers

* chore: refactor compensate step

* chore: changed poistion

* chore: aggregate config data

* chore: moved handlers to their own domain + pr review addressing

* chore: address pr reviews

* chore: move types to type package

* chore: update type to include config

* chore: remove error scoping
2023-08-08 12:10:27 +02:00
Riqwan Thamir
a42c41e8ab chore: scope errors on workflow to invoke (#4709)
what:

Scopes the errors from the exported workflow to return only invoke errors. 

If an error occurs on the invoke level, it'll stop the invoke flow and begin the compensation flow. If another error shows up on the compensate level, it doesn't make sense to throw that error since the user won't be able to do anything about it.
2023-08-07 17:02:38 +00:00
Adrien de Peretti
8ae31aff4b feat(workflows):product handlers should be reusable in different context (#4703)
**What**
The listProducts handler should not be specific to the workflow.
Same for the product removal, shouldn't expect an entire DTO but just a collection of object that at least contains the id.
Same principle applied to other product handlers
2023-08-07 16:22:22 +00:00
github-actions[bot]
b396168dfd chore(docs): Generated Services Reference (automated) (#4705)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-07 17:14:50 +03:00
github-actions[bot]
658339767b chore(docs): Generated API Reference (#4706)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-07 16:54:48 +03:00
github-actions[bot]
efdea04963 chore(docs): Generated Docs Announcement Bar (automated) (#4704)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2023-08-07 16:20:13 +03:00
olivermrbl
755f9cf307 chore: Update lock file 2023-08-07 13:48:05 +02:00
github-actions[bot]
0deecf353f chore: Version Packages (#4643)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-08-07 13:43:54 +02:00
olivermrbl
f2c854fc0d chore(medusa): Replace workspace version 2023-08-07 13:02:53 +02:00
Oli Juhl
5c60aad177 feat(medusa, utils): Allow object feature flags (#4701)
Feature flags can be set as follows:

**Environment variables**
```
MEDUSA_FF_ANALYTICS=true
MEDUSA_FF_WORKFLOWS=createProducts,addShippingMethods
```

**Project config**
```
{
  featureFlags: {
    analytics: true,
    workflows: {
      createProducts: true,
      addShippingMethods: true,
    }
  }
}
```
2023-08-07 09:38:25 +00:00
Lacey Pevey
03fb0479c0 feat(medusa): Allow logging to file (#4696)
* enable additional log transport to file if FILE_NAME env var is set

* change var declaration to const

* Create chilly-geckos-look.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-06 15:14:49 +02:00
Adrien de Peretti
dc46927bc6 feat(medusa, types, utils, workflow): Migrate medusa workflow to the workflow package (#4682) 2023-08-05 16:03:45 +02:00
Shahed Nasser
433914ae01 docs: revamp plugin documentation pages (#4694)
* docs: revamp plugin documentation pages

* fix eslint errors

* change order of scripts
2023-08-04 17:26:39 +03:00
Riqwan Thamir
1260b1a806 chore: fix module test (#4693) 2023-08-04 14:38:07 +02:00
Riqwan Thamir
8af55aed87 feat(product, types, modules-sdk): added event bus events for products (#4654)
what:

- adds an eventbus dependency to product module.
- emits events on product, category and collection CUD

RESOLVES CORE-1450
2023-08-04 09:26:02 +00:00
Adrien de Peretti
43f34866c8 feat(workflows): Improve typings (#4689)
Just improve some typings for simpler usage
2023-08-04 08:11:44 +00:00
Adrien de Peretti
ce3326c5fb feat(prduct, utils, types): Create soft delete pattern for link module (#4649)
* feat(prouct, utils, types): Create soft delete pattern for link module

* add comment

* add comment

* finalise

* remove linkable keys

* cleanup and tests

* cleanup

* add some comments and renaming

* re work

* fix tests

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2023-08-02 19:29:01 +02:00
zhangpengchen
fc6c9df035 fix(medusa): Assign metadata when creating a draft order or creating a line item (#4662)
When creating a draft order or creating a line item via Postman, filled metadata is not saved, metadata remains null in the API response

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-02 16:02:29 +00:00
Lacey Pevey
9c682ce288 chore(medusa): Update request-ip dependency version (#4636)
This updates the request-ip package dependency in @medusajs/medusa.

This resolves the critical security warnings seen when creating a new medusa backend OTHER THAN medusa-admin related issues.  Because the admin is undergoing an extensive rewrite, I didn't address the older version of node-fetch that is at the root of those issues.

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-02 15:29:12 +00:00
Adrien de Peretti
8b67c676fa feat(workflow): Add pipe tests (#4675)
* feat(workflow): Add pipe tests

* improve tests
2023-08-02 16:46:30 +02:00
Shahed Nasser
738eac63aa docs: fixes to medusa-react (#4672)
* docs: fixes to medusa-react

* fixes to admin customization pages

* fix eslint errors

* added routes and settings props

* fixes to settings page

* small fix for settings
2023-08-02 15:27:32 +03:00
Adrien de Peretti
e78c47b66f fix(workflows): Workflow types (#4673)
* fix(workflow): types and handlers

* add middleware pipe example

* Create nine-gorillas-collect.md
2023-08-02 13:50:06 +02:00
zhangpengchen
dae34297eb feat(medusa): Expose some commonly used utils (#4630)
* feat(medusa): Expose some commonly used utils

* Create chilled-lions-raise.md

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-08-02 13:48:56 +02:00
Oli Juhl
bb534e0453 fix(admin-ui): Customer Groups in Pricing + TIP (#4670)
* Use NextSelect

* Ensure boolean value of includes taxa

* Create thin-kings-grab.md
2023-08-02 13:45:27 +02:00
Adrien de Peretti
4b80ba8a35 fix(product, integration-tests): Fix integration tests (#4674)
* fix(product, integration-tests): Fix integration tests

* improve test

* Create dirty-eagles-shop.md
2023-08-02 13:44:53 +02:00
Minh Tu Ngo
7f1421c218 docs: fixes env variable name in next.js docs (#4665)
the SEARCH_INDEX_NAME variable should equal to  process.env.NEXT_PUBLIC_SEARCH_API_KEY  (as in the .env file) instead of NEXT_PUBLIC_INDEX_NAME.

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-08-02 11:47:59 +03:00