Commit Graph

4132 Commits

Author SHA1 Message Date
Adrien de Peretti
60360d2fd2 fix(medusa): Fix order service linting issues (#5071)
* style(medusa): Fix order service linting issues

* Create short-ligers-pull.md
2023-09-15 10:58:30 +02:00
Oli Juhl
dc94f053d3 fix(medusa): Support fields param in list-variants (#5053)
* fix(medusa): Support fields param in list-variants

* Create cuddly-pigs-tease.md

* address pr comments
2023-09-15 09:08:04 +02:00
Philip Korsholm
edf90eecb4 feat(pricing) Add Price Set Rule Type (#4977)
* initial

* initial service

* update pricing module service

* add integration test for rule-type

* update pricing-module integration tests

* update pricing service interface

* feat(pricing): PriceSets as entry point to pricing module

* chore: add price set money amount

* chore: add price set money amount

* chore: change name of test

* chore: added changeset

* chore: use filterable props from money amount in price sets

* chore: update migrations

* test update integration test

* fix weird behavior

* Update packages/pricing/integration-tests/__fixtures__/rule-type/index.ts

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>

* Apply suggestions from code review

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>

* move rule-type to common

* chore: reset migration

* chore: remove incorrect conflicts

* chore: address review

* chore: remove ghost price list

* Apply suggestions from code review

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

* update id prefix

* use persist not persistAndflush

* rename key_value to rule_attribute

* more renaming

---------

Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-14 17:58:31 +02:00
Shahed Nasser
5b09f816cb fix(create-medusa-app): fix command for windows OS (#5061) 2023-09-14 18:07:43 +03:00
Shahed Nasser
d14966abca api-ref: fix feedback component client error (#5055) 2023-09-14 17:06:18 +03:00
Geoffroy Empain
ab754a4cc2 feat(admin-ui): Add French translations (#5031)
* feat(admin-ui): add fr translations

* chore: register french in available languages

* chore: apply suggestions

---------

Co-authored-by: Geoffroy Empain <geoffroy@charlie-bravo.be>
2023-09-14 14:19:11 +02:00
olivermrbl
77c85fc6c6 chore(changesets): Minor bump @medusajs/medusa 2023-09-14 13:43:21 +02:00
github-actions[bot]
c8188ffe7a chore(docs): Removed Docs Announcement Bar (automated) (#5049)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
2023-09-14 10:09:32 +03:00
Adrien de Peretti
05a32683a3 feat(medusa): Get product with isolated product module (#5010) 2023-09-13 14:39:59 +02:00
Adrien de Peretti
4fa675ec25 chore(medusa, modules-sdk, types): Refactor modules loading from medusa (#5018) 2023-09-13 14:26:54 +02:00
Carlos R. L. Rodrigues
5362bfc348 feat(medusa): Drop FKs to isolate products (#5042)
What:
Remove FKs related to product domain tables
2023-09-13 12:05:37 +00:00
Philip Korsholm
5d10c46bb1 feat(medusa): Separate money amount and variant (#4906)
* initial changes

* working test

* final changes to product tests

* update integration tests

* update price list integration tests

* update integration tests

* update unit tests

* update plugin integration tests

* remove catch from integration test

* undo change

* add andWhere

* update upsertCurrencyMoneyAmount method

* undo line item changes

* undo changes

* update deprecated method

* Update packages/medusa/src/migrations/1692953518123-drop_money_amount_constraints_for_pricing_module.ts

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* rename joinTable

* update with joinTable entity

* update load methods

* remove await create

* re-add context test

* update price list behavior for prices

* update price list snapshots

* re-add admin seeder

* pr feedback

* fix unit tests

* fix plugin integration tests

* initial review changes

* redo changes to variant creation

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-13 13:26:20 +02:00
Riqwan Thamir
3d68be2b6b fix(orchestration,link-modules,pricing,types): fix shippingprofile errror outside of core + change link alias name (#5025)
* fix(orchestration,link-modules,pricing,types): fix shippingprofile error outside of core + change link alias name

* chore: scope relationships and move condition inside

* chore: remove islist

* chore: fix merge conflict

* chore: reverted serviceName scoping

* chore: change shape to make methodOverride compatible

* chore: added methodOverride to remote query

* chore: revert override
2023-09-13 12:16:00 +02:00
Adrien de Peretti
7231f65833 feat(medusa): Prevent default SC to be assign if the isolated product flag is enabled (#5037)
* feat(medusa): Prevent default SC to be assign if the isolated product flag is enabled

* Create breezy-fans-accept.md
2023-09-13 10:36:55 +02:00
Shahed Nasser
973c79bef6 docs: change usage of AbstractPaymentService with AbstractPaymentProcessor (#5038)
Fixes #5033
2023-09-13 11:19:25 +03:00
Oli Juhl
d4432dd183 feat(admin-ui): Add display name + pull supported languages from config (#5028) 2023-09-13 09:45:26 +02:00
Carlos R. L. Rodrigues
05fcfd803e Fix(medusa): duplicated migration (#5029)
Fix duplicated migration class name
2023-09-12 20:15:47 +00:00
Adrien de Peretti
30863fee52 feat(medusa): List products with Remote Query (#4969)
**What**
- includes some type fixes in the DAL layer
- List products including their prices and filtered by the sales channel as well as q parameter and category scope and all other filters
- Assign shipping profile
- ordering
- Add missing columns in the product module
- update product module migrations

**Comment**
-  In regards to the fields, we can pass whatever we want the module will only return the one that exists (default behavior), but on the other hand, that is not possible for the relations.

**question**
- To simplify usage, should we expose the fields/relations available from the module to simplify building a query for the user and be aware of what the module provides

**todo**
- Add back the support for the user to ask for fields/relations
2023-09-12 15:55:05 +00:00
Geoffroy Empain
afd4e72cdf feat(admin-ui): Multi-language support (#4962) 2023-09-12 14:53:48 +02:00
Adrien de Peretti
107aaa371c fix(orchestration): Infinite loop by reference update (#5023)
* fix(orchestration): Infinite loop by reference update

* fix

* handle conflict alias config

* rm field alias

* Create wet-gorillas-laugh.md
2023-09-12 13:24:35 +02:00
Carlos R. L. Rodrigues
0953bdfe84 feat(orchestration): Remote Joiner field aliases (#5013)
* initial commit

* chore: unit tests and forward arguments
2023-09-12 08:43:25 +02:00
Riqwan Thamir
834da5c41a feat(pricing, types): PriceSets as entry point to pricing module (#4978)
What:
- Adds PriceSet, PriceSetMoneyAmount, updates schema
- Adds service/repo for PriceSet
- Shifts entry point to use PriceSet
- Updates link/joiner config

RESOLVES CORE-1495
2023-09-11 17:24:31 +00:00
Shahed Nasser
adf4903003 docs: added ecommerce recipe (#5017)
* docs: added ecommerce recipe

* fix eslint errors
2023-09-11 18:51:03 +03:00
Shahed Nasser
b18b6167a7 docs: added troubleshooting for Next.js with NPX (#5016) 2023-09-11 18:09:26 +03:00
tekloon
03398f91f6 feat(admin): add ProductCollectionDetailsWidgetProps type (#5012)
Co-authored-by: Tek Loon <tekloon.1991@gmail.com>
2023-09-11 16:29:36 +02:00
Riqwan Thamir
d3ebb42cb8 fix(link-modules): fix link configuration for product shipping profile (#5014) 2023-09-11 14:36:45 +02:00
Philip Korsholm
2b078f06d9 fix(medusa): default sales channel for store variant endpoints (#4556)
* add changeset

* include default sales channel when querying variant endpoints

* make parameter optional

* update default values

* add integraiton tests
2023-09-11 14:05:47 +02:00
Juan Pablo Orsay
87e3a7d06a fix(admin-ui): disabling analytics when opted out (#4939)
* fixes #4423 by either using the `useAnalytics` hook or using an ErrorBoundary specific instance

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-11 12:40:15 +02:00
Adrien de Peretti
6273b4b160 feat(utils, module-sdk, medusa): Extract pg connection utils to utils package (#4961) 2023-09-11 12:10:40 +02:00
Shahed Nasser
fbae7f9654 docs: fix steps in create entity documentation (#5011) 2023-09-11 12:05:25 +03:00
Adrien de Peretti
a87d07655b fix(link-modules): Fix link module initialization (#4990)
**What**
Add a new configuration on the relationship to specify if the relation is consumed from an internal service (from medusa core). In that case do not check if the service is part of the loaded modules
2023-09-11 08:49:23 +00:00
Shahed Nasser
d971d5cf91 docs: added new recipes (#4964)
* docs: added new recipes

* added oms recipe

* address PR feedback
2023-09-11 11:31:57 +03:00
Shahed Nasser
5c9f8c7111 docs: add create-medusa-app option in Next.js starter (#5008) 2023-09-11 11:15:10 +03:00
Shahed Nasser
70701b3e8f docs: fix S3 plugin options section (#5007) 2023-09-11 10:52:43 +03:00
pepijn-vanvlaanderen
c78e7df502 fix(medusa): Type in AbstractFulfillmentService (#5003) 2023-09-10 16:23:06 +02:00
Carlos R. L. Rodrigues
d8649bacaa chore(modules-sdk,orchestration): to remote joiner query (#4974)
Helper function to transform js/json object into RemoteJoinerQuery format.

```typescript
toRemoteJoinerQuery({
  product: {
    fields: ["id", "title"],
    __args: {
      skip: 0,
    },
    variants: {
      fields: ["id", "title", "handle", "sku"],
      shipping_profile: {
        profile: {
          fields: ["id", "name"],
        },
      },
    },
    collections: {
      fields: ["id", "title"],
    },
  },
})
```

outputs:
```
{
  alias: "product",
  fields: ["id", "title"],
  expands: [
    {
      property: "product.variants",
      fields: ["id", "title", "handle", "sku"],
    },
    {
      property: "product.variants.shipping_profile",
    },
    {
      property: "product.variants.shipping_profile.profile",
      fields: ["id", "name"],
    },
    {
      property: "product.collections",
      fields: ["id", "title"],
    },
  ],
  args: [
    {
      name: "skip",
      value: 0,
    },
  ],
};
```
2023-09-10 13:26:50 +00:00
Shahed Nasser
7a12aa04ac docs,api-ref: fix kbd styling (#4995)
* docs: fix kbd styling

* additional fixes
2023-09-08 20:18:26 +03:00
Shahed Nasser
1a1fc6c968 docs: add documentation for remaining plugins (#4994)
* docs: add documentation for remaining plugins

* fix eslint errors
2023-09-08 19:18:48 +03:00
Carlos R. L. Rodrigues
4b0e3fb2a7 feat(medusa,orchestration): Decouple Product in Cart domain (#4945) 2023-09-08 17:24:46 +02:00
Shahed Nasser
1958809fa9 docs: update create-medusa-app to add details about Next.js option (#4991)
* docs: update create-medusa-app to add details about Next.js option

* fix enter
2023-09-08 15:26:39 +02:00
Shahed Nasser
c47b7aacbd docs: updated the add fulfillment provider docs (#4986)
* docs: updated the add fulfillment provider docs

* fix eslint errors

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2023-09-08 15:12:00 +02:00
github-actions[bot]
493a62775d chore(docs): Generated Docs Announcement Bar (automated) (#4989)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-09-08 14:58:30 +02:00
github-actions[bot]
2338dd111f chore(docs): Generated API Reference (#4988)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2023-09-08 15:48:22 +03:00
Oli Juhl
c2423cf715 docs: Add 1.2.0 upgrade guide for Product Module (#4981)
* docs: Add 1.2.0 upgrade guide for Product Module

* Update docs/content/upgrade-guides/modules/product/1-2-0.md

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

* Update docs/content/upgrade-guides/modules/product/1-2-0.md

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

* Address pr comments

* address pr comments

* fix lint issue

---------

Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2023-09-08 14:38:16 +02:00
olivermrbl
40d9c9479c chore: Release 2023-09-08 14:27:56 +02:00
github-actions[bot]
98b91d1137 chore: Version Packages (#4891)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-08 14:09:39 +02:00
Oli Juhl
d3d8f0bf58 chore(admin, medusa-payment-stripe): Fix deps (#4987) 2023-09-08 13:55:03 +02:00
Shahed Nasser
240b038006 feat(create-medusa-app): add install Next.js storefront option (#4968)
* feat(create-medusa-app): add install Next.js storefront option

* added config for yes option

* added more instructions to exit message

* handle duplicate directories and next errors

* use next.js branch

* add line break in storefront question

* pass next.js directory name as env variable

* change question message

* address PR feedback

* fix(medusa-cli): remove .git directory in `new` command

* fix deleting a directory error
2023-09-08 12:17:48 +02:00
olivermrbl
aecae5705d chore(changesets): Change minor bump to patch 2023-09-07 20:17:46 +02:00
mortenengel
11fb523051 feat(medusa, admin-ui): Improve gift card application (#4944)
Fix for the problems identified in issue #4892 

Bugfix: admin-ui order summary no longer uses gift card total from order when displaying how much has been withdrawn from each giftcard.

Bugfix(?): no longer keep applying gift cards (at 0 value) when sufficient balance has been reached

Feature: multiple giftcards are now applied in ordered fashion. First by end_date (supports null), then by remaining balance. In order to ensure that customers ends up with as long lasting and few remaining gift cards as possible after the transaction.
2023-09-07 16:56:36 +00:00