Commit Graph

1015 Commits

Author SHA1 Message Date
Philip Korsholm d1c18a3090 feat(medusa, stock-location, types): Add q and order params to list-stock-locations (#6197)
**What**
- add `q` and `order` params to list-stock-location endpoint

closes #6189
2024-01-29 09:14:39 +00:00
Frane Polić 3db2f95e65 feat: sales channel module (#5923) 2024-01-29 09:47:28 +01:00
Sebastian Rindom 360c71e39a fix: improve error message on incorrect service export (#6240)
**What**
- Provide a more helpful error message if a user adds a file in `src/services` that doesn't export a service class.

**Why**
If you forget to `export default MyClass` in a custom service you can end up with this error:
![CleanShot 2024-01-27 at 6  24 19](https://github.com/medusajs/medusa/assets/7554214/d3700487-33e0-4629-b2c4-a2a37cb86b3e)

It's almost impossible to know how to recover from this which can be an issue for new users. The new error message informs the user that there is a missing class export and shows which file the error is related to.
2024-01-27 23:28:11 +00:00
github-actions[bot] 3d0ae72887 chore: Version Packages (#6039)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-25 16:23:53 +01:00
olivermrbl 4c4c0f655b chore: Add changeset for @medusajs/medusa-js 2024-01-25 15:24:03 +01:00
Shahed Nasser e84847be36 feat(medusa-oas-cli): updated redocly-cli to v1.7 (#6211)
## What

Updates `@redocly/cli` to v1.7. This resolves the bug of TypeScript and tsx code samples in the OAS being generated as undefined files (see files under `www/apps/api-reference/specs/admin/code_samples/tsx` and `www/apps/api-reference/specs/store/code_samples/tsx`

I avoided re-generating OAS so that this PR doesn't have a huge diff. When the next release is out, an automated PR will be opened to update the OAS files, replacing the undefined files with `.tsx` files.

### Other Changes

- Small fixes to `medusa-oas-cli` README for clarity
2024-01-25 07:53:58 +00:00
Kasper Fabricius Kristensen 134af77667 fix(medusa): GET /admin/shipping-options params (#6208) 2024-01-24 19:16:57 +01:00
Kasper Fabricius Kristensen 6404b9abd1 fix(medusa): List Users return type (#6204) 2024-01-24 13:57:05 +01:00
Oli Juhl 489b7effb0 fix(medusa): Support q search in currencies (#6201)
Closes #6175
2024-01-24 12:31:17 +00:00
Oli Juhl 8ad7539ebc fix(medusa): Support q search and order in list regions (#6202) 2024-01-24 12:52:39 +01:00
olivermrbl 43205914cb chore: Add missing sendgrid changeset 2024-01-24 11:41:56 +01:00
Kasper Fabricius Kristensen d68089b2aa fix(medusa): Implement listAndCount for UserService and update list endpoint (#6190) 2024-01-24 10:41:35 +01:00
Kasper Fabricius Kristensen c37c82c5b5 feat(dashboard): Pub Api Key domain (#6162)
**What**
- Adds Pub. Api Key domain

**Note**
- Pagination for sales channels associated with the pubkey is not implemented correctly as it is not supported by the API. Will open a separate issue on this, and revisit the impl. once fixed.

CLOSES CORE-1656
2024-01-23 20:15:16 +00:00
Riqwan Thamir 68d8daccd2 feat(medusa,types): added buyget support for modules (#6159) 2024-01-23 21:01:44 +01:00
Carlos R. L. Rodrigues 302323916b feat: Workflow engine modules (#6128) 2024-01-23 10:08:08 -03:00
Carlos R. L. Rodrigues d85fee42ee chore: use loaded module reference (#5763) 2024-01-23 08:31:02 -03:00
lukebui db4da56023 fix(medusa-js): correct invites resend path in js client (#6155)
Co-authored-by: Sebastian Rindom <7554214+srindom@users.noreply.github.com>
2024-01-22 20:31:30 +00:00
Riqwan Thamir daecd82a7c feat(utils): update joiner config for campaigns (#6161) 2024-01-22 20:39:26 +01:00
Adrien de Peretti 738e9115ec feat(workflows-sdk): run, registerStepSuccess and registerStepFailure shortcut (#6164)
**What**

Currently, when exporting a workflow using the workflowExport util, it is mandatory to first call the resulted function passing the container before being able to call run, registerStepSuccess or failure on it. Now, it is possible to either continue that way, or to directly call the run, registerStepSuccess or failure on the exported workflow and at that moment it is possible to pass a container if needed

e.g
```ts
const workflow = exportWorkflow("id" as any, "result_step", prepare)
const wfRunner = workflow(container)
wfRunner.run(...) // Here the container is not expected
```
or
```ts
const workflow = exportWorkflow("id" as any, "result_step", prepare)
workflow.run(...) // Here we can now pass an optional container 
```
2024-01-22 19:14:18 +00:00
Shahed Nasser 4792c55226 docs: migrate guides to TSDoc references (#6100) 2024-01-22 18:38:35 +01:00
Riqwan Thamir 99045848fd feat(medusa,types,core-flows,utils): added delete endpoints for campaigns and promotions (#6152)
what:

adds delete endpoints for:
- campaigns (RESOLVES CORE-1686)
- promotions (RESOLVES CORE-1680)
2024-01-22 13:06:49 +00:00
Riqwan Thamir da5cc4cf7f feat(core-flows,medusa,utils): promotion and campaign create/update endpoint (#6130)
what:

- adds create endpoint for promotions including workflows and endpoint (RESOLVES CORE-1678)
- adds update endpoint for promotions including workflows and endpoint (RESOLVES CORE-1679)
- adds create endpoint for campaigns including workflows and endpoint (RESOLVES CORE-1684)
- adds update endpoint for campaigns including workflows and endpoint (RESOLVES CORE-1685)
2024-01-22 11:54:17 +00:00
Oli Juhl fd78f5e242 feat(cart): Shipping method adjustments (#6119) 2024-01-22 11:29:20 +01:00
Oli Juhl 06b33a9b45 feat(cart): Line item adjustments (#6112) 2024-01-22 09:55:47 +01:00
Riqwan Thamir af7af73745 feat(medusa,utils): added campaign get endpoints (#6125)
what:

adds endpoints for the following:

- list endpoint (RESOLVES CORE-1682)
- retrieve endpoint (RESOLVES CORE-1683)
2024-01-19 14:54:40 +00:00
Adrien de Peretti 5e655dd59b chore: Hide repository creation if they are not custom + add upsert support by default (#6127) 2024-01-19 15:09:38 +01:00
Riqwan Thamir a12c28b7d5 feat(medusa,types): add promotion list/get endpoint (#6110)
what:

- adds get promotion endpoint (RESOLVES CORE-1677)
- adds list promotions endpoint (RESOLVES CORE-1676)
- uses new API routes
2024-01-18 16:01:19 +00:00
fPolic 16945f4fd2 Merge branch 'develop' into feat/payment-module-interfaces 2024-01-18 16:04:00 +01:00
fPolic 8e4e6b043d Merge branch 'feat/payment-module-models' into feat/payment-module-interfaces 2024-01-18 16:01:51 +01:00
Kasper Fabricius Kristensen e49b6944e3 feat(dashboard): 3.0 product collection (#6120) 2024-01-18 15:01:34 +01:00
Oli Juhl b132ff7669 feat(cart): Add line items in cart-creation (#6114) 2024-01-18 14:39:40 +01:00
Oli Juhl 7f7cb2a263 feat(cart): Shipping methods (#6101) 2024-01-18 12:16:15 +01:00
Adrien de Peretti 130c641e5c chore: Abstract module services (#6087)
**What**
Create a service abstraction for the modules internal service layer. The objective is to reduce the effort of building new modules when the logic is the same or otherwise allow to override the default behavior.

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-01-18 09:20:08 +00:00
Carlos R. L. Rodrigues 19bbae61f8 fix(modules-sdk): create workflow returning step transformer (#6102) 2024-01-17 09:17:37 -03:00
Philip Korsholm 2b9f98895e Feat(modules-sdk): Run hooks on application start (#6111)
**What**
- run `onApplicationStart` hook when starting modules
2024-01-17 10:46:44 +00:00
Riqwan Thamir 68ddd866a5 feat(utils,types): add registerUsages for promotions + computeActions consider usage (#6094)
RESOLVES CORE-1639
RESOLVES CORE-1640
RESOLVES CORE-1634
2024-01-16 20:06:06 +00:00
fPolic fc6b1772a7 chore: changeset 2024-01-16 10:02:58 +01:00
Riqwan Thamir e28fa7fbdf feat(utils): add campaign + promotion create / update (#6077)
* chore: add campaign + promotion operations

* chore: update type

* chore: added validation for campaign_id and campaign

* chore: added update promotions for campaigns

* chore: update campaign on promotion

* chore: fix lint

* chore: add test to remove promotions
2024-01-16 09:37:57 +01:00
Kasper Fabricius Kristensen a2c149e7e5 feat(dashboard,ui): Streamline spacing and sizing (#6061) 2024-01-15 11:43:16 +01:00
Adrien de Peretti 72bc52231c chore(utils): Update base repository to infer primary keys and support composite (#6062) 2024-01-14 17:13:25 +01:00
Riqwan Thamir fade8ea7bf feat(utils,types): campaigns and campaign budgets + services CRUD (#6063)
* chore: added item/shipping adjustments for order/items/shipping_methods

* chore: add validation for order type and target rules

* chore: add comment for applied promotions

* chore: add shipping method and item adjustments

* chore: include applied promotions to items/shipping_method for each case

* chore: handle case for items across and order to consider existing applications

* chore: handle case for applied promo values to shipping => across

* chore: added changeset

* chore: update return of function

* chore: campaigns and campaign budgets + services CRUD

* Apply suggestions from code review

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

* chore: minor refactor

* chore: added single/bulk interfaces

* Apply suggestions from code review

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

* chore: use DAL date entity

* chore: align nullable

* Update packages/promotion/src/models/promotion-rule.ts

* chore: fix types

* chore: review changes

* Update packages/promotion/src/utils/compute-actions/shipping-methods.ts

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

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com>
2024-01-12 14:14:34 +01:00
Riqwan Thamir b782d3bcb7 feat(utils,types): added item/shipping adjustments for order/items/shipping_methods (#6050)
what:

- adds compute actions for the following cases:
  - items => each & across
  - shipping_method => each & across
  - order
- adds a remove compute actions when code is no longer present in adjustments array

RESOLVES CORE-1625
RESOLVES CORE-1626
RESOLVES CORE-1627
RESOLVES CORE-1628
RESOLVES CORE-1585
2024-01-12 13:00:06 +00:00
Oli Juhl 192bc336cc feat(cart): Partial module service implementation (#6012)
Awaiting #6000 #6008  

**What**
- CRUD for Address in Cart Module service
- Tests for CRUD Carts + Address

**Not**
- Line items, shipping methods, tax lines, adjustment lines
2024-01-12 10:30:57 +00:00
Frane Polić 8472460f53 feat: Payment module package setup (#6059) 2024-01-11 16:41:40 +01:00
Oli Juhl ce81cade88 feat(cart): Cart + Address services (#6055)
Duplicate of #6008, but I messed up my git history big time :'(

**What**
- CartService and CartRepository + tests
- AddressService and AddressRepository + tests
- CartModuleService skeleton. Full implementation + tests will be added in a separate PR
2024-01-11 14:40:13 +00:00
Adrien de Peretti b6ac768698 chore: abstract the modules repository (#6035)
**What**
Reduce the work effort to create repositories when building new modules by abstracting the most common cases into the base class default implementation returned by a factory

- [x] Migrate all modules

Co-authored-by: Riqwan Thamir <5105988+riqwan@users.noreply.github.com>
2024-01-10 13:12:02 +00:00
Adrien de Peretti a9b4214503 chore(utils, product): Attempt to simplify module scripts export (#6021) 2024-01-09 20:20:05 +01:00
olivermrbl 9fda1e63c1 chore: Version @medusajs/medusa 2024-01-09 18:48:34 +01:00
olivermrbl f4734a7ac6 chore: Add missing minor bump 2024-01-09 18:47:36 +01:00
github-actions[bot] 47272bf2b9 chore: Version Packages (#5880) 2024-01-09 18:41:35 +01:00