Commit Graph

2856 Commits

Author SHA1 Message Date
Riqwan Thamir
7d4b8b9cc5 feat(medusa): List (service + controller) product categories #3004 (#3023)
**What:**

Introduces a store endpoint to retrieve a list of product categories

**Why:**

This is part of a greater goal of allowing products to be added to multiple categories.

**How:**

- Creates an endpoint in store routes

RESOLVES CORE-968
2023-01-16 19:20:42 +00:00
Patrick
c49747b3ad Merge pull request #3043 from medusajs/chore/oas-res-schema-AtoPAY
chore(oas): replace response with $ref class JSDoc (Store A-PAY)
2023-01-16 13:32:21 -05:00
Patrick
1ec1a78dfa Merge branch 'develop' into chore/oas-res-schema-AtoPAY 2023-01-16 11:59:19 -05:00
Patrick
542daeeadd chore: changeset 2023-01-16 11:59:05 -05:00
Patrick
b791e34589 chore(oas): replace response with $ref class JSDoc (Store A-PAY)
chore(oas): replace response with $ref class JSDoc (Store A-PAY)
2023-01-16 11:54:48 -05:00
Patrick
a0c4cfe0f7 chore(oas): replace response with $ref class JSDoc (Admin PR0-SAL) (#3030)
### Scope

Admin routes directories PRO to SAL.

### What

Move inline OAS response schema declaration under their respective class declarations in order to expose them through  `#/components/schemas`. Replace inline OAS response schema with a `$ref` reference pointing to the newly declared schema.

### Why

Having response declared as its own "named" schema will allow OAS code generators to output typed entities/DTO that can be consumed without having to reference the route/operation.

### How

Declare a new @schema JSDoc for each "Res" class used to parse and validate request body. Move the current inline requestBody to the new @schema.

### Test

- Ran OAS validator.
- Ran docs build script.

Expect no visible changes to the documentation.

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-01-16 16:00:05 +00:00
Adrien de Peretti
8c08d00319 fix(medusa): Legacy total service to accept custom items (#3027) 2023-01-16 09:57:01 +01:00
Patrick
27a29ef24e chore(oas): replace response with $ref class JSDoc (Admin SHI-V) (#3031)
### Scope

Admin routes directories SHI to V.

### What

Move inline OAS response schema declaration under their respective class declarations in order to expose them through  `#/components/schemas`. Replace inline OAS response schema with a `$ref` reference pointing to the newly declared schema.

### Why

Having response declared as its own "named" schema will allow OAS code generators to output typed entities/DTO that can be consumed without having to reference the route/operation.

### How

Declare a new @schema JSDoc for each "Res" class used to parse and validate request body. Move the current inline requestBody to the new @schema.

### Test

- Ran OAS validator.
- Ran docs build script.

Expect no visible changes to the documentation.

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-01-15 19:04:26 +00:00
Oliver Windall Juhl
1547dd8143 fix(medusa): Add module config to transaction base service (#3033) 2023-01-15 19:37:11 +01:00
Adrien de Peretti
93d0dc1bdc fix(medusa): test, build and watch scripts (#3025) 2023-01-15 17:10:26 +01:00
Carlos R. L. Rodrigues
f6ec05f3f9 feat(medusa): Validate module required properties (#3029) 2023-01-15 17:08:08 +01:00
Adrien de Peretti
142c8aa70f fix(medusa, medusa-payment-paypal): Add missing data in Payment Collection input (#3010) 2023-01-13 16:26:39 +01:00
Patrick
8221e089b8 chore(oas): replace response with $ref class JSDoc (Admin D-N) (#3015)
### Scope

Admin routes directories D to N.

### What

Move inline OAS response schema declaration under their respective class declarations in order to expose them through  `#/components/schemas`. Replace inline OAS response schema with a `$ref` reference pointing to the newly declared schema.

### Why

Having response declared as its own "named" schema will allow OAS code generators to output typed entities/DTO that can be consumed without having to reference the route/operation.

### How

Declare a new @schema JSDoc for each "Res" class used to parse and validate request body. Move the current inline requestBody to the new @schema.

### Test

- Ran OAS validator.
- Ran docs build script.

Expect no visible changes to the documentation.
2023-01-13 15:02:13 +00:00
Patrick
cdcbc064b7 chore(oas): replace response with $ref class JSDoc (Admin O-PRI) (#3018)
### Scope

Admin routes directories O to PRI.

### What

Move inline OAS response schema declaration under their respective class declarations in order to expose them through  `#/components/schemas`. Replace inline OAS response schema with a `$ref` reference pointing to the newly declared schema.

### Why

Having response declared as its own "named" schema will allow OAS code generators to output typed entities/DTO that can be consumed without having to reference the route/operation.

### How

Declare a new @schema JSDoc for each "Res" class used to parse and validate request body. Move the current inline requestBody to the new @schema.

### Test

- Ran OAS validator.
- Ran docs build script.

Expect no visible changes to the documentation.
2023-01-13 14:40:15 +00:00
Carlos R. L. Rodrigues
9dbccd9ca7 feat(medusa, stock-location, inventory): Allow modules to integrate with core (#2997)
* feat: module shared resources
2023-01-13 10:39:43 -03:00
Adrien de Peretti
b3e4be7208 fix(medusa): Draft order totals not working with custom items (#3008) 2023-01-13 13:52:09 +01:00
Oliver Windall Juhl
9e3beaf531 chore(feature-flags): Remove OrderEditing feature flag (#3006) 2023-01-13 11:10:09 +00:00
Oliver Windall Juhl
d2c692aa96 fix(medusa): Add default sales channel to product in seeding (#3013) 2023-01-13 10:01:30 +01:00
Shahed Nasser
5d769ccad2 chore(oas): fixed oas for product category endpoints and model (#3014) 2023-01-12 21:35:13 +02:00
Riqwan Thamir
b2839e2e4d feat(medusa): Retrieve (service + controller) a product category (#3004)
What:

Introduces a store endpoint to retrieve a product category

Why:

This is part of a greater goal of allowing products to be added to multiple categories.

How:

- Creates an endpoint in store routes

RESOLVES CORE-967
2023-01-12 16:19:06 +00:00
Oliver Windall Juhl
b80124d32d feat(medusa): Allow custom created_by on order edits (#3007) 2023-01-12 15:47:18 +01:00
Patrick
d10ffa8118 chore(oas): replace response with $ref to res class JSDoc OAS (A-C) (#3002) 2023-01-12 09:49:39 +01:00
Riqwan Thamir
aef8421235 feat(medusa): Emit events on product category mutations (#3003)
* chore: added events on product category mutation

* chore: remove duplicates + refactor test
2023-01-12 09:32:03 +01:00
Philip Korsholm
1dc79590b3 fix(medusa): Rename quantity to required quantity (#2963) 2023-01-11 19:21:05 +01:00
Kasper Fabricius Kristensen
8d1275c942 feat(medusa-react): Upgrade react-query and clean up dependencies (#2969) 2023-01-11 19:19:34 +01:00
Riqwan Thamir
aab163babb feat(medusa): Nested Categories Admin Update Endpoint (#2986)
What:

Introduces an admin endpoint that allows a user to update a product category

Why:

This is part of a greater goal of allowing products to be added to multiple categories.

How:

- Creates a route on the admin scope to update category
- Creates a method in product category services to update a category

RESOLVES CORE-956
2023-01-11 16:21:53 +00:00
olivermrbl
6dafb51547 Merge branch 'master' into develop 2023-01-11 16:46:32 +01:00
github-actions[bot]
3b632c5130 chore(docs): Generated API Reference (#2991)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2023-01-11 17:43:03 +02:00
github-actions[bot]
f20cdeb680 chore(docs): Generated Docs Announcement Bar (automated) (#2990)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2023-01-11 17:41:01 +02:00
Oliver Windall Juhl
0d9e3e86dd docs: Temporarily remove note on peer deps in documentation (#2988)
* docs: Temporarily remove note on peer deps in documentation

* Update docs/content/advanced/backend/plugins/create.md

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-01-11 17:37:00 +02:00
Shahed Nasser
4156e280ab docs: added publishable API keys documentation pages (#2972)
* docs: added publishable api keys docs

* Update docs/content/advanced/admin/manage-publishable-api-keys.mdx

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>

* Update publishable-api-keys.mdx

* Update docs/content/advanced/storefront/use-sales-channels.mdx

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

* added note in admin how-to guide

* added note in conceptual guide

* Update docs/content/advanced/backend/publishable-api-keys/index.md

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

* small fixes

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-01-11 17:36:51 +02:00
Shahed Nasser
c94ce03aa2 docs: added upgrade guide for 1.7.3 (#2968)
* docs: added upgrade guide for 1.7.3

* remove sales channel note
2023-01-11 17:36:29 +02:00
olivermrbl
a8bde8ba74 chore(release): Publish 2023-01-11 16:27:54 +01:00
olivermrbl
9cf971c6bd chore: Add missing changeset for PayPal plugin 2023-01-11 16:24:41 +01:00
Riqwan Thamir
8ed4eab73a feat(medusa): added admin create endpoint for nested categories (#2985)
What:

Introduces an admin endpoint that allows a user to create a product category

Why:

This is part of a greater goal of allowing products to be added to multiple categories.

How:

- Creates a route on the admin scope to create category
- Creates a method in product category services to create a category

RESOLVES CORE-958
2023-01-11 13:29:02 +00:00
Oliver Windall Juhl
39c3513b2c fix(medusa): Rename location migration (#2987) 2023-01-11 14:06:12 +01:00
Adrien de Peretti
6239fa0704 feat(medusa): Migrate setPaymentSession to use new session flow (#2982)
**What**
When selecting a payment session, we do not necessarily run setPaymentSessions. manage the previously selected session.m accordingly.
2023-01-11 10:43:54 +00:00
Shahed Nasser
21b1ae53e4 docs: changed links on the homepage (#2981)
* docs: changed homepage

* added missing import

* added related links

* added a link to the user guide on homepage
2023-01-10 21:09:11 +02:00
olivermrbl
8e80e50638 chore: Update changesets 2023-01-10 19:26:34 +01:00
olivermrbl
abb98f99dd Merge branch 'master' into develop 2023-01-10 19:23:34 +01:00
Carlos R. L. Rodrigues
93ee248493 feat(medusa, inventory): Inventory Management module (#2956)
* feat: inventory module
2023-01-10 14:38:30 -03:00
Adrien de Peretti
a2df11fc10 fix(medusa-payment-manual): Correct wrongly used input data (#2979) 2023-01-10 18:23:24 +01:00
Oliver Windall Juhl
3308766389 chore(feature-flags): Sales Channels enabled by default (#2966) 2023-01-10 16:45:23 +00:00
Adrien de Peretti
cac81749ea feat(medusa): Update payment session management (#2937) 2023-01-10 16:33:24 +01:00
Riqwan Thamir
71fa60892c feat(medusa): Nested Categories Admin Delete Endpoint (#2975)
**What:**

Introduces an admin endpoint that allows a user to delete a product category, given an ID.

Why:

This is part of a greater goal of allowing products to be added to multiple categories.

How:

- Creates a route on the admin scope to delete category
- Creates a method in product category services to delete a category

RESOLVES CORE-957
2023-01-10 14:28:46 +00:00
Kasper Fabricius Kristensen
f6c81dab9e feat(medusa-js): Bundle package using Rollup (#2964) 2023-01-10 14:44:25 +01:00
Riqwan Thamir
f3ced106ad feat(medusa): Nested Categories Admin List Endpoint (#2973)
* chore: added get route for admin categories API

* chore: add tree method to mock repository

* chore: added changeset to the PR

* chore: rename id to productCategoryId in service

* chore: switch cli option to string

* chore: lint fixes, tests for parent category

* chore: move Nested Categories behind feature flag

* chore: use transformQuery hook in api

* chore: add feature flag in migrations

* chore: remove migration FF, fix FF name

* chore: add free text search + count repo function

* chore: added list endpoint for admin

* chore: added changeset for feature

* chore: address pr review comments

* chore: change oas comment

* chore: add nullable parent category filter + test
2023-01-10 12:52:31 +01:00
Adrien de Peretti
4a50786fbc feat(medusa): Introduce Payment Processor API (#2737) 2023-01-10 12:15:42 +01:00
Adrien de Peretti
1817b810fc fix(medusa): Cancel order missing refunds relation (#2976)
**What**

The order cancelation does not include the refunds relation. It means that the check of the length of the refund is never true and therefore no errors are thrown if the order contains the refunds.

**How**

Add the refunds relation and tests

FIXES CORE-976

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-01-10 09:38:59 +00:00
Riqwan Thamir
47d075351f feat(medusa): Get route for admin product categories API (#2961) 2023-01-10 10:08:16 +01:00