Commit Graph

2956 Commits

Author SHA1 Message Date
Oliver Windall Juhl
08324355a4 chore: Patch bump all dependencies + minor bumps winston (#3185) 2023-02-07 19:15:29 +01:00
Adrien de Peretti
ce866475b4 chore(*-payment-*): Cleanup PaymentProvider plugins (#3011) 2023-02-07 12:43:24 +01:00
olivermrbl
0a2bf7845d Merge branch 'master' into develop 2023-02-06 20:01:54 +01:00
Pevey
78650ea665 feat(medusa): Include name in session options (#3186) 2023-02-06 19:26:02 +01:00
Frane Polić
5b63533c77 feat(medusa): Preserve custom adjustments when refreshing adjustments (#3085) 2023-02-06 19:22:05 +01:00
Kasper Fabricius Kristensen
d0adaf57ed fix(medusa): Shipping profile CRUD (#3154)
**What**
- Fixes wrong payload class for `POST /admin/shipping-profiles`
- Fixes wrong payload class for `POST /admin/shipping-profiles/:id`
- Fixes an issue where updating a shipping profile with products and/or shipping options would fail.
- Fixes an issue where passing `profile_id` to `ShippingOptionService.update()` would not update the shipping profile of the option.

**Testing** 
- Adds new `simpleshippingProfileFactory`
- Adds new integration test suite for shipping profiles operations.

Resolves CORE-1065
2023-02-06 16:57:12 +00:00
Frane Polić
4d6e63d68f feat(medusa): Decorate OrderEdit LineItems with totals (#3108) 2023-02-06 17:32:26 +01:00
Frane Polić
e22a383f47 fix(medusa): fields params usage in the storefront endpoints (#2980) 2023-02-06 16:18:23 +01:00
Pevey
4339d47e1f feat(medusa): Include rolling in session options config (#3184) 2023-02-06 14:51:59 +01:00
Adrien de Peretti
82da3605fb feat(medusa-payment-stripe): Avoid unnecessary customer update if the stripe id already exists (#3046) 2023-02-06 14:25:02 +01:00
Oliver Windall Juhl
5c1d2a5e83 feat(medusa): Option to override existing cron job (#2989) 2023-02-06 14:24:32 +01:00
Adrien de Peretti
dc156861d4 fix(medusa): ShippingOption type on listAndCount (#2040)
**What**
Fix typing issue

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-02-06 13:00:32 +00:00
Carlos R. L. Rodrigues
923ccece24 feat(medusa,stock-location,inventory): Integration tests (#3149) 2023-02-06 09:02:43 -03:00
Oliver Windall Juhl
71fdd28198 fix(medusa-payment-stripe): Prevent Stripe events from retrying (#3160) 2023-02-06 11:23:39 +01:00
Riqwan Thamir
28697e1bd0 chore(medusa): refactor service test for product categories (#3161)
Refactor:

- Moves the mocks to a separate file under
- Re-uses existing mocks
- Use actual IDs instead of id string in mocks

RESOLVES CORE-977
2023-02-06 09:55:25 +00:00
Shahed Nasser
6729f9b5a8 docs: updated docusaurus to the latest version 2.3.1 (#3181) 2023-02-06 11:46:21 +02:00
Daniel Barion
a3acf24f01 docs: add and use react-tooltip (#3176)
* chore: add react-tooltip package into docs

* chore: add react-tooltip styles globally into Layout

* chore: use react-tooltip component into docs

* fixes to the CSS

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-02-06 11:33:11 +02:00
Oliver Windall Juhl
9ebb50104c feat(medusa): Expose session options (#3162) 2023-02-03 13:36:59 +01:00
Carlos R. L. Rodrigues
d50db84a33 Feat: TO variant creation (#3097) 2023-02-02 09:01:10 -03:00
Riqwan Thamir
a049987215 chore: recommended meaningful oas fixes (#3159) 2023-02-02 10:45:57 +01:00
Riqwan Thamir
be0d36432a feat(medusa-js): added resources for product categories (#3157)
What:

JS client resources for product categories

Why:

To manage product categories and managing product-category relationship

How:

- adds a JS client resource for product categories.

RESOLVES CORE-1066
RESOLVES CORE-969
RESOLVES CORE-1061
2023-02-01 17:52:39 +00:00
Riqwan Thamir
4105405f28 feat(medusa): Filter products by category params in store/admin (#3155)
What:

Products can be filtered through the API by category parameters

Why:

To filter products by category

How:

- adds 2 params in admin/store route
- updates repository to accept 2 new parameters

RESOLVES CORE-1032
RESOLVES CORE-1033
2023-02-01 17:25:07 +00:00
Kasper Fabricius Kristensen
4fbf6b7ad3 fix(medusa-react): Fix production.min.js causing invalid hook usage error in CJS environments (#3144) 2023-02-01 14:07:02 +01:00
Oliver Windall Juhl
b242e22326 fix(medusa): Upsert addresses on Orders (#3153) 2023-02-01 13:57:24 +01:00
Carlos R. L. Rodrigues
f776ed234f feat(medusa): Run shared module migrations (#3109) 2023-02-01 08:10:59 -03:00
Rafał Fortuński
63d61e31a9 docs: fix type in Spaces documentation (#3150) 2023-01-31 19:46:40 +02:00
Shahed Nasser
499427fbc4 docs: fix bug resulted from react-tooltip (#3147)
* docs: fixed bug from using react-tooltip

* reverted removing react-uuid
2023-01-31 16:33:54 +02:00
olivermrbl
0326d6cfa3 Merge branch 'master' into develop 2023-01-31 12:10:52 +01:00
Riqwan Thamir
5ec6d438fb feat(medusa): batch remove products from a category (#3141)
* chore: added batch endpoint to remove products from categories

* chore: remove consoles

* Apply suggestions from code review

Co-authored-by: Patrick <116003638+patrick-medusajs@users.noreply.github.com>

* chore: added oas changes

---------

Co-authored-by: Patrick <116003638+patrick-medusajs@users.noreply.github.com>
2023-01-31 10:23:03 +01:00
Shahed Nasser
15a7ba2914 chore(docs): updated docusaurus to v2.3.0 (#3145) 2023-01-30 16:41:02 +02:00
github-actions[bot]
061a0a37fa chore(docs): Updated API Reference (#3142)
* chore(docs): Generated API Reference

* Update admin-spec3.json

* Update admin-spec3.yaml

* Update openapi.yaml

---------

Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-01-30 15:37:43 +02:00
Shahed Nasser
6f058b389b docs: added information about metadata attribute (#3139)
* docs: added information about metdata fields

* docs: changed a subheader to avoid confusion

* added acronym expanding for jsonb
2023-01-30 15:24:44 +02:00
Shahed Nasser
771c54952a chore: fixed OAS using incorrect store resource (#3138) (#3140) 2023-01-30 15:24:26 +02:00
Shahed Nasser
e3dcf4fd75 chore: fixed OAS using incorrect store resource (#3138) 2023-01-30 14:41:22 +02:00
RegisHubelia
2551fe0b93 fix(medusa-plugin-sendgrid): Inject GiftCardService to eliminate undefined error (#2941) 2023-01-30 13:11:03 +01:00
Shahed Nasser
3566bccb76 docs: added publish plugin documentation (#3137) 2023-01-30 14:11:00 +02:00
Adrien de Peretti
e581d3bd90 chore(integration-tests): Flaky tests (#3126) 2023-01-27 17:45:54 +01:00
Riqwan Thamir
4f0d8992a0 feat(medusa): Products can be added to categories in batch request (#3123)
* wip

* chore: fix issues with join table

* chore: fix issues

* chore: fix ordering issue on random failing test

* chore: revert table name

* chore: added oas for category

* chore: update categories for a product

* chore: add remove category test

* chore: added changeset

* chore: address review comments

* chore: Products can be added to categories in batch request

* chore: address review comments + add unit specs

* chore: make template optional
2023-01-27 15:58:58 +01:00
Riqwan Thamir
ee42b60a20 feat(medusa): add or remove categories from products (#3114)
* wip

* chore: fix issues with join table

* chore: fix issues

* chore: fix ordering issue on random failing test

* chore: revert table name

* chore: added oas for category

* chore: update categories for a product

* chore: add remove category test

* chore: added changeset

* chore: address review comments

* Apply suggestions from code review

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>

Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
2023-01-27 15:25:46 +01:00
Shahed Nasser
cf89624747 docs: fixed mobile usability of tooltips (#3124) 2023-01-27 11:05:57 +02:00
Shahed Nasser
a65e115844 docs: added user guide for order editing (#3120) 2023-01-26 19:30:17 +02:00
Shahed Nasser
5af39e7beb docs: added product category events to reference (#3118) 2023-01-26 16:54:27 +02:00
Shahed Nasser
589cb18f98 docs: improved SEO of documentation (#3117)
* docs: added description to documentation pages

* docs: added more descriptions

* docs: finished improving meta description

* docs: added searchbox structured data

* docs: added breadcrumbs structured data

* docs: added how to structured data

* docs: improved 404 page

* docs: added how-to frontmatter option
2023-01-26 15:58:33 +02:00
Patrick
44dbe55f50 feat(oas): declare x-codegen on Admin routes - S to V (#3102)
### What

Declare `x-codegen` in OAS for Admin routes - S to V.

### Why

We are introducing a new `x-codegen` OpenApi extension, also known as _vendor extension_, in order to help with passing information down to code generators.

In our case, we wish to declare the `method` name that we would expect to call on a client. This mimics our current JS client package. 
E.g. `medusaClient.product.list` where `product` is the tag of the route and `list` is the x-codegen.method value.

We are also defining the name of a potential typed object for query parameters. OAS 3.0 does not allow to bundle query parameters under a single definition but it is not uncommon to see API clients handle all query parameters as a single typed object, like our JS client package. With x-codegen.queryParams, a code generator can create a named and typed object to bundle all query parameters for a given route. 
E.g. `medusaClient.customer.retrieve(id: string, queryParams: AdminGetCustomerParams)` 

### How

Declare `x-codegen` as an object with fields `method` and `queryParams` on all paths.

Match method and queryParams values with equivalent ones from our current JS client package.

### Test

* Ran OAS validator.
* Ran docs build script.

Expect no visible changes to the documentation.
2023-01-25 14:49:49 +00:00
Patrick
d8ffbe25b0 feat(oas): declare x-codegen on Admin routes - S to V (#3102)
### What

Declare `x-codegen` in OAS for Admin routes - S to V.

### Why

We are introducing a new `x-codegen` OpenApi extension, also known as _vendor extension_, in order to help with passing information down to code generators.

In our case, we wish to declare the `method` name that we would expect to call on a client. This mimics our current JS client package. 
E.g. `medusaClient.product.list` where `product` is the tag of the route and `list` is the x-codegen.method value.

We are also defining the name of a potential typed object for query parameters. OAS 3.0 does not allow to bundle query parameters under a single definition but it is not uncommon to see API clients handle all query parameters as a single typed object, like our JS client package. With x-codegen.queryParams, a code generator can create a named and typed object to bundle all query parameters for a given route. 
E.g. `medusaClient.customer.retrieve(id: string, queryParams: AdminGetCustomerParams)` 

### How

Declare `x-codegen` as an object with fields `method` and `queryParams` on all paths.

Match method and queryParams values with equivalent ones from our current JS client package.

### Test

* Ran OAS validator.
* Ran docs build script.

Expect no visible changes to the documentation.
2023-01-25 13:58:48 +00:00
Oliver Windall Juhl
0009da0261 fix(medusa-payment-stripe): Resend capture event to ensure auto-capture (#3100) 2023-01-25 10:10:31 +01:00
github-actions[bot]
4e82ec0734 chore(docs): Updated API Reference (#3107)
* chore(docs): Generated API Reference

* small fix

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-01-25 10:28:11 +02:00
github-actions[bot]
0312eceda7 chore(docs): Removed Docs Announcement Bar (automated) (#3106)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2023-01-25 10:07:20 +02:00
Riqwan Thamir
2e7e16b917 feat(medusa): Added models + repo for products in multiple categories (#3083)
* chore: Added models + repo for products in multiple categories

* chore: remove join table model + repo

* chore: add foreign key constraints

* Update packages/medusa/src/migrations/1674455083104-product_category_product.ts

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>

* chore: cascade on delete

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-01-25 07:24:39 +01:00
Patrick
d25a531045 feat(oas): declare x-codegen on Admin routes - PRO to R (#3093)
### What

Declare `x-codegen` in OAS for Admin routes - PRO to R.

### Why

We are introducing a new `x-codegen` OpenApi extension, also known as _vendor extension_, in order to help with passing information down to code generators.

In our case, we wish to declare the `method` name that we would expect to call on a client. This mimics our current JS client package. 
E.g. `medusaClient.product.list` where `product` is the tag of the route and `list` is the x-codegen.method value.

We are also defining the name of a potential typed object for query parameters. OAS 3.0 does not allow to bundle query parameters under a single definition but it is not uncommon to see API clients handle all query parameters as a single typed object, like our JS client package. With x-codegen.queryParams, a code generator can create a named and typed object to bundle all query parameters for a given route. 
E.g. `medusaClient.customer.retrieve(id: string, queryParams: AdminGetCustomerParams)` 

### How

Declare `x-codegen` as an object with fields `method` and `queryParams` on all paths.

Match method and queryParams values with equivalent ones from our current JS client package.

### Test

* Ran OAS validator.
* Ran docs build script.

Expect no visible changes to the documentation.
2023-01-24 15:11:34 +00:00