chore(docs): Generated References (automated) (#10276)
Generated the following references: - `api_key` - `auth` - `cart` - `core_flows` - `currency` - `customer` - `dml` - `fulfillment` - `helper_steps` - `inventory_next` - `js_sdk` - `medusa` - `medusa_config` - `modules` - `modules_sdk` - `order` - `payment` - `payment_provider` - `pricing` - `product` - `product_models` - `promotion` - `region` - `sales_channel` - `search` - `stock_location_next` - `store` - `tax` - `tax_provider` - `types` - `user` - `utils` - `workflows` Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
1 parent
67e2e718e9
commit
d5ee0070b4
928 files changed
+182409
-172163
No files matched your search
+8
-6
@@ -15,14 +15,16 @@ This method is used to retrieve a registration JWT token for a user, customer, o
|
||||
## Example
|
||||
|
||||
```ts
|
||||
sdk.auth
|
||||
.register("customer", "emailpass", {
|
||||
sdk.auth.register(
|
||||
"customer",
|
||||
"emailpass",
|
||||
{
|
||||
email: "customer@gmail.com",
|
||||
password: "supersecret",
|
||||
password: "supersecret"
|
||||
}
|
||||
.then((token) => {
|
||||
console.log(token)
|
||||
})
|
||||
).then((token) => {
|
||||
console.log(token)
|
||||
})
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
+5
-5
@@ -11,7 +11,7 @@ This documentation provides a reference to the `sdk.auth.updateProvider` method
|
||||
|
||||
This method is used to update user-related data authentication data.
|
||||
|
||||
More specifically, use this method when updating the password of an admin user, customer, or
|
||||
More specifically, use this method when updating the password of an admin user, customer, or
|
||||
custom actor type after requesting to reset their password with [resetPassword](../js_sdk.auth.Auth.resetPassword/page.mdx).
|
||||
|
||||
This method sends a request to [this API route](https://docs.medusajs.com/api/admin#auth\_postactor\_typeauth\_providerupdate).
|
||||
@@ -25,9 +25,9 @@ sdk.auth.updateProvider(
|
||||
"customer",
|
||||
"emailpass",
|
||||
{
|
||||
email: "customer@gmail.com",
|
||||
password: "supersecret"
|
||||
}
|
||||
},
|
||||
token
|
||||
)
|
||||
.then(() => {
|
||||
// password updated
|
||||
@@ -36,8 +36,8 @@ sdk.auth.updateProvider(
|
||||
|
||||
## Parameters
|
||||
|
||||
<TypeList types={[{"name":"actor","type":"`string`","description":"The actor type. For example, `user` for admin user, or `customer` for customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The authentication provider to use. For example, `emailpass`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, unknown>`","description":"The data necessary to update the user's authentication data. When resetting the user's password, \nsend the `email` and `password` properties.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProvider"/>
|
||||
<TypeList types={[{"name":"actor","type":"`string`","description":"The actor type. For example, `user` for admin user, or `customer` for customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`string`","description":"The authentication provider to use. For example, `emailpass`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"`Record<string, unknown>`","description":"The data necessary to update the user's authentication data. When resetting the user's password,\nsend the `password` property.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"token","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProvider"/>
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"This method is used to update user-related data authentication data.\n\nMore specifically, use this method when updating the password of an admin user, customer, or \ncustom actor type after requesting to reset their password with [resetPassword](../js_sdk.auth.Auth.resetPassword/page.mdx).\n\nThis method sends a request to [this API route](https://docs.medusajs.com/api/admin#auth\\_postactor\\_typeauth\\_providerupdate).\n\nRelated guide: [How to allow customers to reset their passwords in a storefront](https://docs.medusajs.com/resources/storefront-development/customers/reset-password).","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProvider"/>
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<void>","optional":false,"defaultValue":"","description":"This method is used to update user-related data authentication data.\n\nMore specifically, use this method when updating the password of an admin user, customer, or\ncustom actor type after requesting to reset their password with [resetPassword](../js_sdk.auth.Auth.resetPassword/page.mdx).\n\nThis method sends a request to [this API route](https://docs.medusajs.com/api/admin#auth\\_postactor\\_typeauth\\_providerupdate).\n\nRelated guide: [How to allow customers to reset their passwords in a storefront](https://docs.medusajs.com/resources/storefront-development/customers/reset-password).","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProvider"/>
|
||||
@@ -10,10 +10,10 @@ The `sdk.auth` class provides methods to send requests to manage a user or custo
|
||||
|
||||
## Methods
|
||||
|
||||
- [register](../../Auth/methods/js_sdk.auth.Auth.register/page.mdx)
|
||||
- [login](../../Auth/methods/js_sdk.auth.Auth.login/page.mdx)
|
||||
- [callback](../../Auth/methods/js_sdk.auth.Auth.callback/page.mdx)
|
||||
- [refresh](../../Auth/methods/js_sdk.auth.Auth.refresh/page.mdx)
|
||||
- [login](../../Auth/methods/js_sdk.auth.Auth.login/page.mdx)
|
||||
- [logout](../../Auth/methods/js_sdk.auth.Auth.logout/page.mdx)
|
||||
- [refresh](../../Auth/methods/js_sdk.auth.Auth.refresh/page.mdx)
|
||||
- [register](../../Auth/methods/js_sdk.auth.Auth.register/page.mdx)
|
||||
- [resetPassword](../../Auth/methods/js_sdk.auth.Auth.resetPassword/page.mdx)
|
||||
- [updateProvider](../../Auth/methods/js_sdk.auth.Auth.updateProvider/page.mdx)
|
||||
Reference in new issue
Block a user