Commit Graph

23 Commits

Author SHA1 Message Date
Harminder Virk
864bb0df05 breaking: implement workflow hooks (first iteration) (#8346) 2024-07-31 15:36:38 +05:30
Carlos R. L. Rodrigues
24c105f288 feat(orchestration,workflows-sdk): Skip step (#8334) 2024-07-29 14:26:47 -03:00
Adrien de Peretti
35c3759ed8 fix: workflow 'when' should return T or undefined instead of Partial<T> (#8195)
* fix: workflow 'when' should return T or undefined instead of Partial<T>

* fix when usage
2024-07-19 10:46:55 +02:00
Adrien de Peretti
53ddea717c fix: workflow return type inf missing type (#8133) 2024-07-15 14:40:03 +03:00
Carlos R. L. Rodrigues
4321241553 feat(core-flows): request return on order exchanges and claims (#8107)
FIXES: CC-92, CC-87
2024-07-12 15:48:24 +00:00
Adrien de Peretti
b24c8503d5 feat: Add types to the workflow conditional (#7979)
**What**
Add typing to the when conditional workflow step

FIXES CORE-2494
2024-07-05 14:43:16 +00:00
Carlos R. L. Rodrigues
9badad24aa feat(workflows-sdk): conditional step (#7912)
* chore: move ModuleRegistrationName to utils

* chore(workflows-sdk): conditional step

* type

* when condition
2024-07-05 10:54:18 +02:00
Carlos R. L. Rodrigues
61758f374b chore(medusa): return endpoints (#7823) 2024-06-25 13:53:18 +00:00
Riqwan Thamir
03924a4ff6 chore: move to swc/jest (#7739)
* chore: move to swc

* chore: fix tax rate tests

* chore: undo failed test

* chore: fix unit tests script

* chore: use node 20

* Update scripts/run-workspace-unit-tests-in-chunks.sh
2024-06-20 12:59:33 +02:00
Adrien de Peretti
48963f55ef Chore/rm main entity concept (#7709)
**What**
Update the `MedusaService` class, factory and types to remove the concept of main modules. The idea being that all method will be explicitly named and suffixes to represent the object you are trying to manipulate.
This pr also includes various fixes in different modules

Co-authored-by: Stevche Radevski <4820812+sradevski@users.noreply.github.com>
Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-06-19 13:02:16 +00:00
Adrien de Peretti
dd0b9f0805 feat: workflows release events (#7664)
* feat: Release grouped events once a worfklow finish

* update common step

* update types

* tests

* optionality

* fies

* cancel flow on release failure

* clear events on fail

* more tests

* log errors

* log more errors

* update missing interface method declaration

* fix missing return

* update mock

* fix tests
2024-06-11 15:48:15 +02:00
Adrien de Peretti
afae395fea chore: ensure the event group id is kept for async workflow (#7668)
* chore: ensure the event group id is kept for async workflow

* revert test

* fix tests

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Riqwan Thamir <rmthamir@gmail.com>
2024-06-11 13:20:17 +02:00
Stevche Radevski
69410162f6 feat: Add support for scheduled workflows (#7651)
We still need to:
But wanted to open the PR for early feedback on the approach
2024-06-10 14:49:52 +00:00
Adrien de Peretti
c9c2b6c88f chore: Ensure the transactionId/eventGroupId are passed down the child workflows (#7648) 2024-06-07 12:38:04 +02:00
Adrien de Peretti
3cd2d60daa feat: Ensure the event group id is either generated or picked up from the context (#7646)
**What**
- Pick the context event group id or generate it to be accessible from the workflow and down the module calls

FIXES CORE-2273
2024-06-07 09:14:02 +00:00
Carlos R. L. Rodrigues
41df24e2dc chore(workflows-sdk): check exported workflow (#7592) 2024-06-04 07:18:40 -03:00
Harminder Virk
11528526fa feat: loosely typed container 2024-05-31 15:22:03 +05:30
Oli Juhl
ad21bd30b1 fix: errors thrown in transformer (#7480)
* chore: wup

* throw on error

* add back test

---------

Co-authored-by: Carlos R. L. Rodrigues <rodrigolr@gmail.com>
2024-05-28 08:44:33 +02:00
Adrien de Peretti
fff1b3ef9c chore(medusa, workflows-sdk): Workflow default to throw the first error (#7442)
**What**
Currently when a workflow fail it will throw an error which contains the messages of all error thrown durring the workflow lifetime. Therefore, in our cases we are always preventing workflow to throw and grab the first error that we then re throw.
This pr eliminate that need by throwing back the first error among the error thrown by a workflow as it is the main case. In case someone need a special handling they can still set the option throwOnError to false and handle the error the way they need
2024-05-24 12:55:05 +00:00
Carlos R. L. Rodrigues
f3d19f5394 fix(workflows-sdk): use loaded modules when container is empty (#7422) 2024-05-23 08:26:16 -03:00
Adrien de Peretti
a775d57255 feat(core-flows, types): Create return order (#7319)
**what**
- Create return workflow partial implementation
- Update some order domain types
- create order fulfillment link

**NOTE**
this PR is partially done but can still be merged as is, it will require some discussions around the flow and some unknowns or uncertainty in regards to some data and some behaviour
2024-05-16 14:10:54 +00:00
Carlos R. L. Rodrigues
aba194de9a chore: complete cart part 2 (#7227) 2024-05-05 10:35:09 -03:00
Adrien de Peretti
bbccd6481d chore(): start moving some packages to the core directory (#7215) 2024-05-03 13:37:41 +02:00