Commit Graph

6646 Commits

Author SHA1 Message Date
Shahed Nasser
7ce9121095 chore(types, utils): update the TSDocs of AbstractFulfillmentProviderService (#9349)
Updates the `AbstractFulfillmentProviderService` with TSDocs for more useful information and examples

Closes DOCS-950
2024-10-02 09:01:01 +00:00
Stevche Radevski
86badc6804 fix: Export all classes and types from the SDK (#9422) 2024-10-02 10:40:26 +02:00
Shahed Nasser
9811da2960 docs: fix query option in instrumentation (#9395) 2024-10-02 10:29:11 +03:00
Shahed Nasser
a662c4b020 fix(medusa-oas-cli): Fix incorrect import (#9404)
* fix(medusa-oas-cli): Fix incorrect import

* update redocly config
2024-10-02 10:28:42 +03:00
Shahed Nasser
7bc7c50eef fix(types, medusa): http types fixes (#9334)
* fix(types, medusa): http types fixes

* fix build error

* remove return fields

* more fixes

* fix cart payload types
2024-10-02 10:28:22 +03:00
Shahed Nasser
8686ca9d12 docs: updates and fixes in utils + fulfillment provider changes (#9347)
* fix config + update deps

* rearrange sidebar + add to examples
2024-10-02 10:27:48 +03:00
Shahed Nasser
07afa8fba6 docs: fix how api reference shows any type (#9340) 2024-10-02 10:27:21 +03:00
Shahed Nasser
1e144e9c08 chore(oas): clean up oas (#9354)
* clean up generated oas

* fix issues in docs-util

* more fixes

* align max level

* validation fix

* add missing summaries

* fix validation

* fix exchanges route
2024-10-02 10:27:02 +03:00
Adrien de Peretti
13a3c1bd77 fix(utils): knex import (#9408) 2024-10-01 16:34:48 +02:00
Oli Juhl
732f64177d fix: Validate identifier payload for reset password (#9302)
Closes CC-526
2024-10-01 13:30:23 +00:00
Shahed Nasser
fb67d90b64 docs: improvements + additions to module docs (#9152)
- Split Module and Module Links to their own chapters
- Add new docs on db operations and transactions in modules, multiple services, links with custom columns, etc...
- Added a list of registered dependencies in a module container
2024-10-01 11:20:54 +00:00
Shahed Nasser
1ad7e7583f docs: fix imports from dist (#9401) 2024-10-01 09:49:37 +00:00
arun-prasath2005
9bd99df545 Update page.mdx (#9366)
Spelling issue with perform, Fixed it!
2024-10-01 09:46:45 +00:00
Shahed Nasser
20943902f9 chore: update imports in tsdocs (#9379) 2024-10-01 11:04:03 +02:00
Frane Polić
4587a69f3f fix(dashboard): allow to unset currency cell value (#9312)
**What**
- unset datagrid currency cell on delete press instead of setting it to 0
- consolidate pricing editors validations
- fix PL edit pricing schema

---

FIXES CC-529
2024-10-01 09:03:51 +00:00
Shahed Nasser
2e16949979 docs: update imports and package names across docs (#9375)
* docs: update imports and package names across docs
+ reference configs

* generate files

* fix import

* change preview to rc
2024-10-01 11:03:42 +02:00
Frane Polić
c726ed54f5 fix(pricing): price set update deletes price list prices (#9308)
**Why**
- price set update uses `upsertWithReplace` so price list prices are removed since we "ignore" them in regular price set operations and use price list methods to manage them

**What**
- preserve price list prices when updating price sets

---

FIXES CC-516
2024-10-01 08:37:56 +00:00
Frane Polić
0e35e312e5 fix(dashboard): use svg component instead of static png for logo (#9281) 2024-10-01 08:34:50 +00:00
Stevche Radevski
9e299cf130 fix: Correctly reference job hander in loader (#9396) 2024-10-01 10:04:32 +02:00
Frane Polić
7a08224b0c fix(dashboard): categories add products (#9380)
**What**
- fix listing/adding products in the add category products flow

---

FIXES CC-523
2024-10-01 07:09:51 +00:00
Frane Polić
cab629556f fix(dashboard): reservations quantity validations (#9393)
**What**
- validate quantity range when creating validation and handle form errors nicely

---

CLOSES CC-470
2024-10-01 07:01:44 +00:00
Adrien de Peretti
b9e772b530 chore: Add import from framework types at the top of ay generated types file (#9389) 2024-10-01 08:53:52 +02:00
Adrien de Peretti
9b6d0e9d56 fix(medusa): Replace default http tracer (#9390) 2024-09-30 16:17:30 -03:00
Frane Polić
570c1803f2 fix(dashboard): don't prefil invite email while onboarding (#9392) 2024-09-30 19:19:10 +02:00
Stevche Radevski
e7bde31bdb fix: Pass order object to create fulfillment (#9391) 2024-09-30 19:18:23 +02:00
Harminder Virk
37f4d03b7b fix: db:rollback and db:generate commands to cast module names to arrays (#9377)
FIXES: FRMW-2720
2024-09-30 12:17:04 +00:00
Stevche Radevski
d8c4e0de1d fix: Use correct propname for stroke opacity (#9331) 2024-09-30 11:57:38 +00:00
Oli Juhl
8851ae7b51 fix: Update tax lines on cart when region changes (#9367)
**What**
- Removes broken cart retrieval step `retrieveWithCartLinks` in favor of `useRemoteQueryStep` in `updateTaxLinesWorkflows`

**Why**
- Filters variables in the step were passed with an incorrect shape
  - I removed the step, since it's only used once and the behavior is identical to the generic remote query step

**Note**
- Because the filters were passed incorrectly, the, now-removed, step has always returned the first cart in the database. As a result all tax calculations so far have been based on whatever the shape of that cart has. It basically ignores all input to this workflow
2024-09-30 11:55:54 +00:00
Sebastian Rindom
852df3f764 fix(medusa,dashboard): don't send price updates for deleted regions/currencies (#9361)
**What**
- Fixes an issue where the admin dashboard would send region prices for deleted regions.
- Also, includes the implementation for `GET /admin/shipping-options/:id` and its corresponding SDK function.

**Why**
- When a region price for a deleted region was sent to the backend it would result in the insert hitting a not null constraint on the currency_code for prices. To avoid this the dashboard should not send region prices for deleted regions. 

**Additional context**
- Prices for deleted regions should ideally not be returned when fetching shipping option prices. However, we don't yet have a mechanism for cleaning up region prices after a region is deleted.

Fixes CC-540
2024-09-30 11:51:55 +00:00
Adrien de Peretti
7484cef0fa chore: Improve instrumentation loading (#9378)
* chore: Improve instrumentation loading

* fix build

* fix buildgst
2024-09-30 11:22:23 +02:00
Adrien de Peretti
7e73fe4794 chore: Improve jest config and deps (#9318) 2024-09-30 10:50:59 +02:00
Frane Polić
046e6e5533 fix(dashboard): product table colum widths (#9329)
**What**
- set product title and sales channels column widths to a reasonable value so the scroll is visible on mobile resolutions only

---

FIXES CC-527
2024-09-30 07:57:24 +00:00
J Kendal
6fbfbfab19 fix: invalid mutation (#9371) 2024-09-30 09:38:43 +02:00
Harminder Virk
a578313db9 feature: bundle all modules (#9324) 2024-09-30 09:04:03 +02:00
Adrien de Peretti
a4fc9d6e0b fix(medusa): Instrumentation resolution (#9368) 2024-09-30 08:55:46 +02:00
Sebastian Rindom
aef6b290b4 fix: force string compare (#9360)
fixes CC-536
2024-09-29 11:48:21 +00:00
Oli Juhl
1b4372ae71 fix: Tax region + rates clean up (#9279)
What
- Require `code` on Tax Rates
- Update dashboard to account for non-nullable code on Tax Rates

- Include `automatic_taxes` in API Route response

Closes CC-524 CC-525
2024-09-29 10:25:33 +00:00
Sebastian Rindom
0efbcd2344 fix: validate regions exist for shipping option price update (#9364)
**What**
- Adds a step to `updateShippingOptionsWorkflow` and `createShippingOptionsWorkflow` that validates if the region prices being updated have corresponding regions configured.

**Why**
- Previously, if you tried to send a region price update for a region that had been deleted the backend would throw an error when attempting to insert the region price. The error comes from a not-null constraint in the db, but it is better to validate that the regions we are trying to create prices for exist. 

Fixes CC-542
2024-09-29 09:52:16 +00:00
Sebastian Rindom
17b2868a50 feat(medusa,fulfillment): pass stock location data to fulfillment provider (#9322)
**What**
- Fetches the stock location's details when creating a fulfillment and return fulfillment.
- Passes the data to the fulfillment module, which in turn passes it to the fulfillment provider.

**Why**
- When creating a fulfillment in a multi-location setup the fulfillment provider will need to know where the package is being sent from (so the shipping service can pick it up). 
- Previously, we didn't pass anything but the location id to the fulfillment provider. Because the fulfillment provider can't have a dependency on the stock location module this was not sufficient. 
- This change ensures there is enough data passed to the fulfillment provider to build integrations properly.
2024-09-28 14:01:48 +00:00
Carlos R. L. Rodrigues
d00afb76a6 chore(types): is_return on shipping options (#9352) 2024-09-27 12:54:11 +00:00
Carlos R. L. Rodrigues
19bc8d7f61 fix(core-flows): shipping options for cart (#9343)
FIXES: CC-536

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
2024-09-27 12:32:32 +00:00
Shahed Nasser
74b3385a65 chore(oas): [21/21] improve oas schemas (#9339)
* improve oas

* more improvements

* add missing descriptions

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-09-27 12:40:24 +02:00
Adrien de Peretti
38778b37e2 fix: remove dist access for modules in integration tests (#9336) 2024-09-27 09:11:03 +02:00
Stevche Radevski
262aa4291a fix: Bind abort controller to abort in sdk (#9341) 2024-09-27 08:57:30 +02:00
Shahed Nasser
bd4d2fd554 docs-util: fixes following packages reorg (#9326)
- Typescript config aren't picked up properly anymore since they're moved to `_tsconfig.base.json` in the root. So, we now read the config from the config file.
- Update Typescript version in the `utils` monorepo to match that of the root monorepo
2024-09-26 17:22:08 +00:00
Shahed Nasser
229da19029 chore(oas): [20/n] improve oas schemas (#9337)
Improve oas schemas [20/n]
2024-09-26 17:21:07 +00:00
Carlos R. L. Rodrigues
ef15c60386 chore(modules-sdk): load modules in sequence (#9327)
What:
- The time taken to load in sequence is the same as in parallel, and it doesn't create multiple db queries simultaneously when starting each module.
- Rework modules bootstrap (now all dependencies are available from the constructor and cross deps are allowed without any topological sort needed. It also allow improvements in the future)
  - First load all modules
  - then resolve and register instances


Co-authored-by: Adrien de Peretti <25098370+adrien2p@users.noreply.github.com>
2024-09-26 16:33:35 +00:00
Adrien de Peretti
6854feaf50 chore(utils): Cleanup and improve message aggregator (#9300)
* chore(utils): Cleanup and improve message aggregator

* fix
2024-09-26 17:00:03 +02:00
Shahed Nasser
be1adac024 chore(oas): [18/n] improve oas schemas (#9311)
Improve OAS schemas [18/n]
2024-09-26 14:08:10 +00:00
Adrien de Peretti
c2f023c02f chore: Add support for module dependencies configuration (#9330)
**What**
Add support to specify which dependencies a module have during the tests and grab them from the injected dependencies
2024-09-26 14:00:42 +00:00