Commit Graph

4544 Commits

Author SHA1 Message Date
Shahed Nasser
96629f1916 docs: change process for generating docblocks through actions (#6237)
This PR changes the original process of generating docblocks through actions. The process now is:

1. When a PR is merged for the branch `changeset-release/develop`, the docblock generator tool us used to generate docblocks for the changed files. The changed files are determined by retrieving all comments since the last release and the files in each of those commits.
2. If there are changes after using the docblock generator tool, a PR is opened in the branch `chore/generate-tsdocs`.
3. Once the `chore/generate-tsdocs` is merged, it triggers an action that generates the references for the docs. This changes the previous behaviour of generating references on a new release.

Both actions (that runs the docblock generator tool and that generates references for the docs) can also be triggered manually.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-29 08:05:14 +00:00
Oli Juhl
8f9a12c895 chore: PR team labeler (#6249) 2024-01-29 08:11:39 +01:00
Oli Juhl
5c4a5a1454 feat(cart): JoinerConfig (#6157) 2024-01-28 11:10:40 +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
Sebastian Rindom
8c6cc82c5d feat(customer): add customer addresses (#6224)
**What**
- adds methods to create update list customer addresses
- removes default_shipping_id and billing id from customer record and moves them to address (better normalization)
2024-01-26 15:35:23 +00:00
Philip Korsholm
638b47ff70 feat(authentication, types): split authenticate method into two (#6184)
* init

* fetch providers using updated string

* update loaders

* add more tests

* add authenticationresponse type

* update types for authentication method

* add entity_id and update provider

* update pr with return type

* create loaders onApplicationStart

* cleanup provider class

* run application start hook before each

* fix pr feedback

* create private onApplicationStart method

* assign repository

* init

* add entity_id and update provider

* initial implementation

* update lockfile

* fix conflicts

* add config variables

* update types

* refactor google provider

* re-order methods

* fix pr feedback p. 1

* add initial type and update callback authorization

* add google provider to integration test

* fix feedback

* initial implementation (#6171)

* initial implementation

* remove oauth lib

* move abstract authentication provider

* shuffle files around

* init

* add entity_id and update provider

* initial implementation

* update lockfile

* fix conflicts

* add config variables

* update types

* refactor google provider

* re-order methods

* fix pr feedback p. 1

* add initial type and update callback authorization

* add google provider to integration test

* fix feedback

* initial implementation (#6171)

* initial implementation

* remove oauth lib

* move abstract authentication provider

* shuffle files around

* Update packages/authentication/src/migrations/Migration20240122041959.ts

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* split authentication methods

* call verify with token

* update integration tests

* feedback

* rename split methods

* fix provider integration test

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-01-26 11:37:23 +08:00
github-actions[bot]
5a550e73b4 chore(docs): Generated References (#6222)
Generated the following references:
- `entities`
- `file`
- `fulfillment`
- `inventory`
- `js_client`
- `medusa`
- `medusa_config`
- `medusa_react`
- `modules`
- `notification`
- `payment`
- `price_selection`
- `pricing`
- `product`
- `search`
- `services`
- `stock_location`
- `tax`
- `tax_calculation`
- `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-25 18:12:27 +00:00
github-actions[bot]
bbf79169a9 chore(docs): Updated API Reference (#6220)
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>
2024-01-25 17:58:17 +00:00
Sebastian Rindom
21c1c5ce6c feat(customer): add migration file (#6205) 2024-01-25 16:52:30 +00:00
github-actions[bot]
e38aa29708 chore(docs): Generated Docs Announcement Bar (automated) (#6219)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
2024-01-25 16:47:24 +01:00
Shahed Nasser
b78ffedafb docs: add a section on custom templates in SendGrid guide (#6215) 2024-01-25 16:47:08 +01:00
olivermrbl
c27bb2a61d chore: Release 2024-01-25 16:27:55 +01: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
Sebastian Rindom
4ad761788b chore: move v2 api behind ff (#6213) 2024-01-25 14:39:22 +00:00
olivermrbl
4c4c0f655b chore: Add changeset for @medusajs/medusa-js 2024-01-25 15:24:03 +01:00
Rodney
bf1125209a feat(medusa-js): add axios adapter to config (#6214)
**What**

- Adds the ability to pass an Axios adapter through the client's config.

**Why**

- When using NextJS with the edge runtime for deployment on Cloudflare Pages, for example, Axios does not work. Therefore, it is necessary to pass an adapter like [@vespaiach/axios-fetch-adapter](https://github.com/vespaiach/axios-fetch-adapter).

**How**

- Receives the **axiosAdapter** in the config and implements it when creating the **axiosClient**.

Closes #6133
2024-01-25 14:15:22 +00:00
olivermrbl
7b30512a65 chore: Remove workspace range in deps 2024-01-25 14:08:25 +01:00
Sebastian Rindom
e9435a8680 feat(customer): add softdelete/restore (#6203) 2024-01-25 12:38:02 +00: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
Shahed Nasser
a1b561e4a6 docs(docblock-generator): fix action Node version (#6207) 2024-01-25 08:38:15 +01:00
Philip Korsholm
efd9204e26 Feat(medusa-test-utils, authentication, customer, cart, payment, pricing, product, promotion): Add initModule util (#6200)
* use initModules instead of initialize when runnning auth module integration tests

* rm unused module-config

* correct db schema fix

* update authentication integration tests w/ initModule

* update cart integration tests w/ initModule

* update customer integration tests w/ initModule

* update payment integration tests w/ initModule

* update pricing integration tests w/ initModule

* update product integration tests w/ initModule

* update promotion integration tests w/ initModule

* add initModule to more product tests and return medusaApp from initModule

* align moduleOptions naming

* update dependencies
2024-01-25 10:37:38 +08: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
Oli Juhl
2b35700dbc feat(cart): Item tax lines + shipping method tax lines (#6136) 2024-01-24 11:42:27 +00:00
olivermrbl
43205914cb chore: Add missing sendgrid changeset 2024-01-24 11:41:56 +01:00
Shahed Nasser
f29948a6a8 docs-util: created docblock-generator tool (#6096) 2024-01-24 11:13:40 +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
Govind
eb498c500e fix(medusa-plugin-sendgrid): Support custom templates (#5833) 2024-01-24 10:17:22 +01:00
Shahed Nasser
ddc0c9dfff docs: add anchor link to reference parameters (#6194)
- Added anchor links to items in parameter components
- Added sectionTitle prop in markdown theme

Note: Due to the second point, the change requires generating references to see the anchor links, which would result in a big diff in this PR. Instead, next time the references are generated for a release, this feature will available for use.
2024-01-24 08:42:55 +00:00
Shahed Nasser
75fd6b0c83 docs: improvements to deployment guides (#6183)
- Add a new deployment overview page giving a general overview of how a Medusa project is deployed
- Add a new section in all backend deployment guides related to the Medusa admin.
- Add a general deployment guide for the medusa admin.
- Add a general deployment guide for the Next.js starter
2024-01-24 08:22:50 +00:00
Philip Korsholm
b3d013940f feat(authentication): Google authentication provider (#6104)
* init

* add entity_id and update provider

* initial implementation

* update lockfile

* fix conflicts

* add config variables

* update types

* refactor google provider

* re-order methods

* fix pr feedback p. 1

* add initial type and update callback authorization

* add google provider to integration test

* fix feedback

* initial implementation (#6171)

* initial implementation

* remove oauth lib

* move abstract authentication provider

* shuffle files around

* Update packages/authentication/src/migrations/Migration20240122041959.ts

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>

* call verify with token

---------

Co-authored-by: Carlos R. L. Rodrigues <37986729+carlos-r-l-rodrigues@users.noreply.github.com>
2024-01-24 09:57:58 +08: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
Shahed Nasser
bc79edfa67 docs: update strapi guide (#6163)
Update the Strapi guide to use [this community plugin](https://github.com/SGFGOV/medusa-strapi-repo)

Fixes #5152 and #5030
2024-01-23 09:31:09 +00:00
Philip Korsholm
24bb26b81a Feat(authentication): username password provider (#6052) 2024-01-23 09:04:22 +00:00
Shahed Nasser
9d7ed9dbaf docs: rearrange sections in SendGrid guide (#6165)
Rearrange sections in the sendgrid plugin guide to show installation steps before templates reference.
2024-01-23 08:36:34 +00:00
Shahed Nasser
9a3326a56e docs: fix production build error (#6170)
Fix build error in production due to incorrect link
2024-01-23 08:19:25 +00: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
peyronoscar
85efa9b910 docs: Update environment variables to match Railway variable references format (#6145) 2024-01-22 20:29:51 +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
Shahed Nasser
85dad169bb chore(docs-util): change freshness check threshold (#6122) 2024-01-22 18:02:08 +01:00
Shahed Nasser
8c67e32d41 docs: improve admin documentation (#6117)
- Move the admin plugin's options to the Admin Configuration documentation.
- Add a section on how to change the backend URL for both development and production.
- Fix the troubleshooting section related to port forwarding.
- General fixes.
2024-01-22 15:48:33 +00:00
Vinh Nguyen
b61acf9312 fix(docs): update extend repository (#6140)
- Issue ticket https://github.com/medusajs/medusa/issues/6139
- Update document how to extend repository
2024-01-22 15:21:30 +00:00
Sebastian Rindom
f72340ad87 feat(customer): add remove from group, update group (#6158)
Open #6149 again - was merged to wrong base branch.
2024-01-22 13:49:13 +00:00