Commit Graph

4415 Commits

Author SHA1 Message Date
Shahed Nasser
33ff2415ae fix: eslint configurations in the root (#6049)
When running `yarn lint` in the root of the monorepo, we get the following error:

```bash
Oops! Something went wrong! :(

ESLint: 8.44.0

Error: ESLint configuration in .eslintrc.js is invalid:
	- Unexpected top-level property "overrides[4].ignorePatterns".
```

Rmoving the `ignorePatterns` in configurations for `packages/admin-next/dashboard/**/*` and instead adding the path `packages/admin-next/dashboard/**/dist` fixes the issue.
2024-01-13 13:21:16 +00:00
invalid w
57e00e7803 docs: typo backendUrl default url (#6073)
`http://location:9000` should be `http://localhost:9000`
2024-01-12 14:11:29 +00: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
Oli Juhl
ef5024980d feat(cart): Public-facing DTOs + (partial) module interface (#6000) 2024-01-10 13:27:58 +01:00
github-actions[bot]
6721633478 chore(docs): Generated References (#6042)
Generated the following references:
- `entities`
- `fulfillment`
- `inventory`
- `js_client`
- `medusa`
- `medusa_react`
- `modules`
- `payment`
- `pricing`
- `product`
- `services`
- `stock_location`
- `types`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-01-10 09:25:11 +00:00
Shahed Nasser
0b0c25da11 docs: update dependencies (#6046) 2024-01-10 10:56:54 +02:00
github-actions[bot]
bc58bc8f47 chore(docs): Updated API Reference (#6041)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-01-10 08:14:30 +00:00
Adrien de Peretti
a9b4214503 chore(utils, product): Attempt to simplify module scripts export (#6021) 2024-01-09 20:20:05 +01:00
github-actions[bot]
90db656000 chore(docs): Generated Docs Announcement Bar (automated) (#6040)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2024-01-09 19:58:26 +01:00
Shahed Nasser
13f12e1953 docs: documentation updates for v1.20 (#6031)
* docs: documentation updates for v1.20

* fix stripe upgrade guide

* fixed vale error

* fix eslint errors

* change stripe environment variables to options
2024-01-09 19:07:24 +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
olivermrbl
aea85893e2 chore: Release 2024-01-09 18:46:24 +01:00
github-actions[bot]
47272bf2b9 chore: Version Packages (#5880) 2024-01-09 18:41:35 +01:00
Shahed Nasser
97fd67bdd3 docs: improvements of docs UI (#6038)
* docs: improvements of docs UI

* changed note about icon sizes
2024-01-09 19:21:12 +02:00
Shahed Nasser
18de90e603 docs: fix tsdocs following typedoc update + 1.20 release (#6033)
* docs: fix tsdocs following typedoc update + 1.20 release

* Fix OAS validation errors

* fixes to react-docs-generator

* fix content linting
2024-01-09 17:15:29 +02:00
Shahed Nasser
125879ada4 fix(medusa-payment-stripe): change webhook environment variables to plugin options (#6034)
* fix(medusa-payment-stripe): change webhook environment variables to plugin options

* access options through service
2024-01-09 13:21:05 +01:00
Shahed Nasser
3eee2bd5d6 chore(docs-util): update typedoc to v0.25.7 (#6032) 2024-01-09 11:27:17 +02:00
Philip Korsholm
f065581736 Feat(authentication): Load auth providers (#6023)
* initial providers loader implementation

* registerAdd providers

* remove comment

* remove comment
2024-01-09 10:02:02 +01:00
Yessica Bao
fe81a5e49a Update meilisearch.md (#6026)
update expire date since 2024-01-01 is past
2024-01-08 17:42:41 +00:00
Adrien de Peretti
fbee006e51 chore(medusa, orchestration, utils, workflows-sdk): add transaction options support and cleanup (#6020)
* chore(medusa, orchestration, utils, workflows-sdk): add transaction options support and cleanup
2024-01-08 10:07:12 -03:00
Kasper Fabricius Kristensen
0c858f7fd4 add vercel config (#6018) 2024-01-08 10:38:18 +01:00
Kasper Fabricius Kristensen
f868775861 chore: move next admin packages to core repo (#5983)
**What**
- Move packages for `next` version of admin to core repo

**Other**
- Since this PR introduces packages that depend on Vite 5, it also introduces @types/node@^20. We have never had a direct dependency on the types package for Node, and as far as I can see that has resulted in us using the types from Node.js@8, as those are a dependency of one of our dependencies. With the introduction of @types/node@^20, two of our packages had TS errors because they were using the NodeJS.Timer type, which was deprecated in Node.js@14. We should add specific @types/node packages to all our packages, but I haven't done so in this PR to keep it as clean as possible.
- Q: @olivermrbl I've added the new packages to the ignore list for changeset, is this enough to prevent them from being published?
2024-01-08 09:26:46 +00:00
Philip Korsholm
479a8b82a9 feat(authentication, types): Create authentication entities and services (#5979)
* create authentication entities

* ensure hashes are not returned

* re-add integration test argument

* update filterableprops

* update type

* pr feedback

* update serialization

* move finding existing entities and validation to service layer

* update types

* update models

* update user model

* pr feedback

* fix build

* pr feedback

* update integration test fixtures

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-01-08 09:50:12 +01:00
Sajarin M
6b0b3fed7a fix(medusa): Fix typo in discounts error message (#5853) 2024-01-07 14:37:32 +01:00
Mohamed Abusaid
46d610bc55 feat(admin): Add Libya admin region and set Libya to formal name (#6001) 2024-01-07 14:33:40 +01:00
Adrien de Peretti
47be2ad723 fix(medusa): Order by using joins and pagination (#5990) 2024-01-07 13:58:30 +01:00
Oli Juhl
b57ad67d2f feat(cart): Data models (#5986)
**What**
Adds Cart Module data models
2024-01-05 17:32:36 +00:00
Riqwan Thamir
dc46ee1189 feat(types): promotion delete / update / retrieve / add/remove-rules (#5988) 2024-01-05 16:17:22 +01:00
Shahed Nasser
7d650771d1 docs: generate medusa-react reference (#6004)
* add new plugin for better organization

* added handling in theme for mutations and query types

* added tsdoc to hooks

* added tsdocs to utility functions

* added tsdoc to providers

* generated reference

* general fixes for generated reference

* generated api reference specs + general fixes

* add missing import react

* split utilities into different directories

* added overview page

* added link to customer authentication section

* fix lint errors

* added changeset

* fix readme

* fixed build error

* added expand fields + other sections to overview

* updated what's new section

* general refactoring

* remove unnecessary query field

* fix links

* added ignoreApi option
2024-01-05 17:03:38 +02:00
Frane Polić
6fc6a9de6a feat(medusa, link-modules): sales channel <> pubkey link (#5820) 2024-01-05 14:51:57 +01:00
Adrien de Peretti
bf63c4e6a3 feat(orchestration, workflows-sdk): Add events management and implementation to manage async workflows (#5951)
* feat(orchestration, workflows-sdk): Add events management and implementation to manage async workflows

* Create fresh-boxes-scream.md

* cleanup

* fix: resolveValue input ref

* resolve value recursive

* chore: resolve result value only for new api

* chore: save checkpoint before scheduling

* features

* fix: beginTransaction checking existing transaction

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-01-05 14:40:58 +01:00
Oli Juhl
99a4f94db5 feat(medusa-payment-stripe): Add delay to Stripe webhook (#5838)
**What**
- Migrate Stripe plugin to use API Routes + Subscribers
- Change the behaviour of Stripe webhook
Instead of processing webhook events immediately, we fire an event to perform the work in the background. The primary reason for changing the webhook is that the previous implementation led to occasional conflicts due to a race condition between the client's and the webhook's request to complete a cart. Now, we emit an event with a configurable delay (defaults to 2s) to prevent this from happening

This approach was preferred over adding a timeout directly to the webhook execution, as it is generally best practice to respond to a webhook event immediately after receiving it.
2024-01-05 12:37:53 +00:00
Adrien de Peretti
37fba9a168 fix(medusa): cart completion payment sessions (#5995)
* fix(medusa): cart completion payment sessions

* Create seven-moose-scream.md

* fix unit tests
2024-01-04 20:40:08 +01:00
Oli Juhl
cd2855182e docs: Update minimum node version requirement (#5994) 2024-01-04 13:13:41 +01:00
Adrien de Peretti
7f62ab1b58 fix(medusa-payment-stripe): Fix error handling (#5991) 2024-01-04 09:04:43 +01:00
Philip Korsholm
3550750975 feat(pricing, types, utils): Soft delete pricing entities (#5858) 2024-01-04 09:02:49 +01:00
Oli Juhl
1468646b99 chore(workflows): Use Node 16.14 in CLI workflow (#5993)
* make packages private

* add changeset

* Update test-cli-with-database.yml

* revert
2024-01-04 08:40:45 +01:00
olivermrbl
d2ef0cff2b chore(changesets): Use correct medusa-react package 2024-01-03 15:34:30 +01:00
Frane Polić
fe007d01bd feat(medusa, link-modules): sales channel <> order link (#5810) 2024-01-03 14:07:54 +01:00
Adrien de Peretti
278b7fb203 fix(medusa): Update cart sales channel should not remove all line items (#5980) 2024-01-03 14:06:07 +01:00
Riqwan Thamir
42cc8ae3f8 feat(types,utils): added promotion create with rules and application target rules (#5957)
* feat(types,utils): added promotion create with rules

* chore: add rules to promotion and application method

* chore: use common code for rule and values

* chore: address pr reviews

* chore: fix test
2024-01-03 09:54:48 +01:00
Philip Korsholm
d16d10619d Feat(medusa-test-utils, utils, pricing, product, link-modules): upgrade mikro orm version to latest (#5985)
* update mikro-orm version

* add changeset

* update product tests

* add optional number serializer util

* upgrade cart mikro-orm versions

* clean up test
2024-01-02 17:11:55 +01:00
Oli Juhl
925feea04a feat(cart): Add cart module package (#5982)
* feat: Add CartModule foundation

* remove migration

* fix ts issue

* Create hot-dingos-pay.md
2024-01-02 15:59:23 +01:00
Oli Juhl
487067fb48 fix(medusa): Resolve babel executable with npx (#5952) 2024-01-02 10:13:54 +01:00