* 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
* feat(workflows-sdk): Allow primitive values to be passed as well as WorkflowDataProperties
* feat(workflows-sdk): improve playground tests
* Create nine-shrimps-reply.md
## What
The underlying endpoint `/admin/inventory-items/{id}/location-levels/{location_id}` that the JS Client's `AdminInventoryItemsResource.deleteLocationLevel` method sends a request to doesn't accept query parameters. So, the `query` argument of the `deleteLocationLevel` is unnecessary.
Fixes CORE-1550
**What**
Allow a step to not define an expected input, previously even if no input was expected, an object was always expected to be passed to the stepFunction inside the workflow composition. Now
```ts
const stepWithoutArgs = createStep("step1", () => {
return new StepResponse("string")
})
const stepWithoutExepectedInput = createStep("step2", (_: {}, context) => {
console.log("input", _) // {}
return new StepResponse("string")
})
const workflow = createWorkflow("workflow1", () => {
stepWithoutArgs()
return stepWithoutExepectedInput()
})
workflow()
.run()
.then((res) => {
console.log(res.result) // string
})
```
What:
- Promotions can be created with its bare attributes
- Promotions one to one relationship with ApplicationMethod can be created with its attributes + validation
RESOLVES CORE-1592
RESOLVES CORE-1595
* init
* remove date string validator;
* add transformOptionalDate transformer to api
* move type conversion to the datalayer
* fix final module integration test
* update arrow-function
* make string optional
* move work to utils
* make check for value exists
* move util back to pricng
* change utils
* refactor get-iso-string
* fix build
* flip transform condition
* add null check for isDate
* feat(pricing): Separate Pricing Module internal types from `@medusajs/types` (#5777)
* create types for pricing repositories
* create RepositoryTypes input
* add service types
* use models for repository types
* fix build
* update types to match interface types
* add aliases
* types instead of moduletypes
* move repository to types for pricing module
* add changeset
* fix merge error
* fix conflict
* fix build
* re-add validation of dates in updatePriceLists_
**What**
One problem with local development can be the dependencies management. To mitigate that, transform checks from an instance of to value check as well as harmonize utils function to be part of the class as a static method instead of separate utilities. By using this approach we are not dependent of the origin of the class and therefore it should ease the user experience.
**NOTE**
As a next step to discuss, we should probably move the interfaces from the interfaces/medusa package to the utils package. Then we can deprecate the interfaces package and remove it at a later time
**What**
- Allow to create step that can be configured to have a max retry
- Step end retry mechanism on permanent failure
Also added an API to override a step configuration from within the createWorkflow
```ts
const step = createStep({ name: "step", maxRetries: 3 }, async (_, context) => {
return new StepResponse({ output: "output" })
})
const workflow = createWorkflow("workflow", function () {
const res = step().config({ maxRetries: 5 }) // This will override the original maxRetries of 3
})
```
**NOTE**
We can maybe find another name than config on the step workflow data to override the step config.
The general guide for hosting the server tells users to set `ssl.rejectUnauthorized` to false for production environments. However, the provided code snippet doesn't check the environment while setting the value. Directly pasting it into `medusa-config.js` will cause database connection attempts made from a development environment to be rejected and you can't even login to the admin account.
The change only sets the ssl property to false if the environment is a non-development one. ~I got this code suggestion from the Kapa bot on discord so not sure if this is the best way to do this.~ This code is taken from the [configuration docs](https://docs.medusajs.com/development/backend/configurations#database_extra) themselves.
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
* feat(admin): Added Simplified Chinese support
* feat(admin): Update zh translation.json
* docs: Add Simplified Chinese to Admin language support list
* Revert "docs: Add Simplified Chinese to Admin language support list"
This reverts commit 51cca40211ac7e01ac7f78429107ace44785878a.