Commit Graph

1195 Commits

Author SHA1 Message Date
Vraj Patel
7dbef9bedd fix(docs): update workflow API example to include query parameter (#9640)
### Fix Missing Query Parameter in Documentation Example

#### Summary
This pull request addresses a missing query parameter in the Medusa documentation's example for making a request to the workflow endpoint.

#### Issue
The example in the documentation incorrectly shows:
```
curl http://localhost:9000/workflow
```
This causes an issue when running the workflow in code, specifically in `step-2`, where the `name` parameter is `undefined`. 

#### Expected Behavior
The correct curl command should include the `name` query parameter, like so:
```
curl http://localhost:9000/workflow?name=john
```

#### Code Example
Here is the code that demonstrates the issue:

```ts
const step2 = createStep("step-2", async ({ name }: WorkflowInput) => {
  return new StepResponse(`Hello ${name} from step two!`)
})
```

When running the incorrect curl command, the output for `step-2` returns:
```
"Hello undefined from step two!"
```

#### Fix
The pull request proposes updating the example curl command in the documentation to:
```
curl http://localhost:9000/workflow?name=john
```

This ensures that the `name` parameter is correctly passed and resolves the issue of `undefined` values in `step-2`.

#### Steps to Reproduce
1. Implement the workflow and API code as described in the [documentation](https://docs.medusajs.com/v2/basics/workflows#4-test-workflow).
2. Run the curl command:
   ```
   curl http://localhost:9000/workflow
   ```
3. The console will output `Hello undefined from step two!` due to the missing `name` parameter.

#### Suggested Resolution
Update the curl command in the [documentation](https://docs.medusajs.com/v2/basics/workflows#4-test-workflow) to:
```
curl http://localhost:9000/workflow?name=john
```

### Related Issue
Link to the issue: [Medusa Issue #9628](https://github.com/medusajs/medusa/issues/9628)

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-10-17 14:51:43 +00:00
erickirt
89b9fd24b2 Switch the headings to match the content (#9619)
HEading and content was switched for payment and file modules
2024-10-17 06:49:17 +00:00
Shahed Nasser
ea5bff9034 docs: update providers to use ModuleProvider (#9579)
Document change introduced by #9544

> Note: fine to merge now as it requires generating references, which will only happen after the next release.
2024-10-16 11:37:14 +00:00
Shahed Nasser
3610d58f49 docs: fix heroku typo (#9382)
Closes #9356
2024-10-16 10:44:50 +00:00
Shahed Nasser
eed88c95ec docs: improved commerce modules [5/5] (#9592)
- Improve remaining commerce modules
- Other: add a note about using methods of the modules' main services.
2024-10-16 10:25:21 +00:00
Shahed Nasser
6e856d3156 docs: added examples page (#9587)
- Added an examples page with examples of all different concepts in Medusa. We'll probably add more examples with time as we see the need for them.
- Small fixes in different pages.

Preview: https://resources-docs-ocb5uyp0o-medusajs.vercel.app/v2/resources/examples
2024-10-16 10:07:39 +00:00
Shahed Nasser
ddcb749bc4 docs: added documentation for build command (#9604)
- Added documentation for `medusa build` command
- Update deployment documentation for admin to use `--admin-only` option
2024-10-16 09:37:40 +00:00
Shahed Nasser
f6d3453e6d docs: improved commerce modules [4/n] (#9517)
Improve pricing, product, and promotion modules docs

[4/n]
2024-10-16 09:34:36 +00:00
Shahed Nasser
2b77bd85a6 docs-util: fixes for OAS docs generator + framework typedoc config (#9603)
* fix order replaced in OAS response + framework tsdoc config

* fix for some types
2024-10-16 12:17:28 +03:00
Shahed Nasser
714b9e6c98 docs: update resolve path to use src (#9605)
Update path used in `resolve` of modules to start with `src`
2024-10-16 09:10:30 +00:00
Shahed Nasser
6efb5897dc docs: fix package names in module registration (#9590)
* docs: fix package names in module registration

* update references
2024-10-16 09:05:07 +02:00
github-actions[bot]
f2d662efca chore(docs): Generated References (automated) (#9567)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2024-10-14 19:59:14 +02:00
github-actions[bot]
b40fa6353e chore(docs): Updated API Reference (v2) (#9552)
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-10-14 11:00:04 +00:00
Shahed Nasser
b6df24463d docs: updates for breaking changes (#9558)
- Update modules registration
- Update `medusa-config.js` to `medusa-config.ts`
- Update the out directory in the admin deployment guide
- Update logger imports
- Other fixes

Note: will need to re-generate references afterwards

Closes #9548
2024-10-14 10:40:30 +00:00
github-actions[bot]
224e530453 chore(docs): Generated References (#9551)
Generated the following references:
- `api_key`
- `auth`
- `cart`
- `core_flows`
- `currency`
- `customer`
- `fulfillment`
- `inventory_next`
- `modules`
- `modules_sdk`
- `order`
- `order_models`
- `payment`
- `payment_provider`
- `pricing`
- `product`
- `promotion`
- `region`
- `sales_channel`
- `search`
- `stock_location_next`
- `store`
- `tax`
- `types`
- `user`
- `utils`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
2024-10-14 10:33:21 +00:00
Shahed Nasser
11120a8b7e docs: improve commerce modules [3/n] (#9510)
Improve and add docs for Order and Payment modules

[3/n]

Closes DOCS-966
Closes #9485
2024-10-14 07:20:35 +00:00
Shahed Nasser
74b286b701 docs: added documentation for admin components (#9491)
- Documented common admin components with design that matches the admin.
- Updated existing admin customization snippets to match the admin's design.

Closes DOCS-964
2024-10-14 07:18:38 +00:00
Shahed Nasser
e3dc9eaf0c docs: add guide on how to seed data (#9449)
Add a guide on how to seed data using a custom CLI script, with an example to seed products

Closes DOCS-953
2024-10-14 07:08:05 +00:00
Shahed Nasser
c9ce918982 docs: small structure fixed to db command reference (#9446) 2024-10-14 08:58:39 +02:00
Shahed Nasser
69b9e73be7 docs: improve commerce modules [1/n] (#9498)
Improve and add docs for API Key, Auth, and Cart Modules

[1/n]
2024-10-11 15:19:13 +00:00
Shahed Nasser
dd162d69be docs-util: fix import in generated workflow hook snippet (#9499) 2024-10-11 17:17:02 +02:00
Shahed Nasser
49a91fd40e docs: redesigned navigation (#9525)
Redesign navigation bar to reflect new design and allow for dropdowns

Closes DX-943
2024-10-11 07:10:00 +00:00
Zaid Rashid
0058338d40 docs: Fix link to the correct AuthIdentity model's page (#9519)
I think there is a bug on the link to the `AuthIdentity ` model's page. The page containing the issue can be found [here](https://docs.medusajs.com/v2/resources/commerce-modules/auth/auth-identity-and-actor-types#what-is-an-auth-identity)
2024-10-10 14:41:19 +00:00
Shahed Nasser
7f1f075222 docs: improvements and fixes to components in API reference (#9410)
- Change layout of parameters for clearer display
- Fix schema code blocks being longer than container
- switch between showing required to showing optional indicator
- Fixed code tabs not having copy / report buttons

Closes DOCS-936

Preview: https://api-reference-v2-git-docs-api-ref-comp-improv-medusajs.vercel.app/v2/api/store
2024-10-09 17:51:27 +00:00
Shahed Nasser
3298cd3fd2 docs: improved commerce module docs [2/n] (#9501)
Improve + add docs for commerce modules from currency to inventory

[2/n]
2024-10-09 09:53:17 +00:00
Shahed Nasser
e23d2b9ed7 docs: updates in recipes (#9472)
Updates in recipes following release changes
2024-10-07 17:53:53 +00:00
Shahed Nasser
f3c8f5efef docs: document using conditional operators in workflows (#9464) 2024-10-07 17:52:30 +00:00
Shahed Nasser
781d0ca624 docs: added docs for reset password (#9306)
- Added to docs on implementing auth flows using the module and API routes how to update a user's password
- Added guide on how to send a notification when a password token is generated
- Added a guide on implementing reset password flow in storefront
- Added OAS for the `/update` and `/reset-password` routes + generated specs for the API reference
2024-10-07 08:04:01 +00:00
Damien Thiesson
adb3a8246a docs: fix import path in the workflow basic documentation (#9481)
The import is three levels up, but, the `src/api/workflow/route.ts` file is only two levels down from `src/workflow`.

![Screenshot 2024-10-06 at 6 09 38 PM](https://github.com/user-attachments/assets/0d94338f-a8db-406b-80fe-a64ffe500ca3)
2024-10-07 07:22:15 +00:00
Shahed Nasser
522d3ce764 docs: improvements to API reference intro sections (#9397)
- Improve intro sections of API reference to utilize divided columns
- Improve the content of the intro sections
- Add a new Workflows section to explain the workflows badge and how to use it
- Fixes to headings and add anchor for copying the link to a section
- Fixes responsiveness of intro sections on mobile devices
- Other: fix loading not showing when a sidebar category is opened.

Closes DOCS-932, DOCS-934, DOCS-937

Preview: https://api-reference-v2-git-docs-api-ref-intro-fixes-medusajs.vercel.app/v2/api/store
2024-10-06 16:51:08 +00:00
Shahed Nasser
ed174826a4 docs: update modules chapter in basics (#9452)
* docs: update modules chapter in basics

* address PR feedback
2024-10-04 14:15:41 +03:00
Shahed Nasser
bc8de8e5b1 docs: add section on testing providers (#9453) 2024-10-04 10:29:45 +03:00
Shahed Nasser
00a51b59b1 docs: update imports of middlewares and http types (#9440) 2024-10-03 15:56:58 +00:00
Shahed Nasser
1bb3f8b5b1 docs: add a troubleshooting guide for dist imports (#9442) 2024-10-03 14:17:48 +03:00
Shahed Nasser
ab5a7ca691 docs: fix infinite scroll, update next.js, other fixes (#9441)
* update nextjs

* badge + scroll fixes
2024-10-03 14:17:33 +03:00
github-actions[bot]
c536f7caf5 chore(docs): Generated References (automated) (#9436)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
2024-10-03 11:03:35 +03:00
github-actions[bot]
21badd069d chore(docs): Updated API Reference (v2) (#9437)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-10-03 07:48:54 +00:00
Shahed Nasser
a94f30ba97 chore(oas): add more details link to pagination and select fields (#9414)
find-and-replace to add a link to the pagination and field selection sections in parameters.

Closes DOCS-940
2024-10-02 18:41:51 +00:00
Zaid Rashid
c4f26120b0 docs: Fix typo. Use instead yuse (#9431)
Fix typo. Use instead of use. I found this while reading through the documents here https://docs.medusajs.com/v2/resources/references/auth/provider#validatecallback
2024-10-02 16:01:14 +00:00
Shahed Nasser
0f6f56e764 docs: DX and performance improvements in API reference (#9430)
- Improve scroll behavior between active sections
- Improve lag when clicking on a sidebar item
- Refactor internal working of the `SidebarProvider` to find active items faster.
- Use Next.js's `useRouter` hook for changing the hash (since they added the option to disable scroll)
- Change `isBrowser` from a hook to a provider since it's widely used across applications.
- Other general improvements and fixes.

Closes DOCS-952
2024-10-02 15:51:02 +00:00
Shahed Nasser
5fb9c1f82e chore(oas): general fixes to OAS (#9413)
General fixes to OAS
2024-10-02 15:21:40 +00:00
github-actions[bot]
34eebb61eb chore(docs): Generated References (automated) (#9419)
Co-authored-by: kodiakhq <kodiakhq@users.noreply.github.com>
2024-10-02 17:13:09 +02:00
Shahed Nasser
9811da2960 docs: fix query option in instrumentation (#9395) 2024-10-02 10:29:11 +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
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
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