You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: www/apps/book/app/learn/fundamentals/workflows/multiple-step-usage/page.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
exportconst metadata = {
2
-
title: `${pageNumber} Multiple Step Usage in Workflow`,
2
+
title: `${pageNumber} Multiple Step Usage in Workflows`,
3
3
}
4
4
5
5
# {metadata.title}
@@ -12,7 +12,7 @@ In some cases, you may need to use a step multiple times in the same workflow.
12
12
13
13
The most common example is using the `useQueryGraphStep` multiple times in a workflow to retrieve multiple unrelated data, such as customers and products.
14
14
15
-
Each workflow step must have a unique ID, which is the ID passed as a first parameter when creating the step:
15
+
Steps must have a unique ID, which you pass as the first parameter of the `createStep` function.
Copy file name to clipboardExpand all lines: www/apps/book/public/llms-full.txt
+58-13Lines changed: 58 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -19385,7 +19385,7 @@ To find a full example of a long-running workflow, refer to the [restaurant-deli
19385
19385
In the recipe, you use a long-running workflow that moves an order from placed to completed. The workflow waits for the restaurant to accept the order, the driver to pick up the order, and other external actions.
19386
19386
19387
19387
19388
-
# Multiple Step Usage in Workflow
19388
+
# Multiple Step Usage in Workflows
19389
19389
19390
19390
In this chapter, you'll learn how to use a step multiple times in a workflow.
19391
19391
@@ -19395,7 +19395,7 @@ In some cases, you may need to use a step multiple times in the same workflow.
19395
19395
19396
19396
The most common example is using the `useQueryGraphStep` multiple times in a workflow to retrieve multiple unrelated data, such as customers and products.
19397
19397
19398
-
Each workflow step must have a unique ID, which is the ID passed as a first parameter when creating the step:
19398
+
Steps must have a unique ID, which you pass as the first parameter of the `createStep` function.
The `config` method accepts an object with a `name` property. Its value is a new ID of the step to use for this execution only.
19457
+
The `config` method accepts an object with a `name` property. Its value is the new ID for the step to use for this execution only.
19458
19458
19459
19459
The first `useQueryGraphStep` usage has the ID `use-query-graph`, and the second `useQueryGraphStep` usage has the ID `fetch-customers`.
19460
19460
@@ -23262,22 +23262,51 @@ npm install
23262
23262
23263
23263
# API Key Concepts
23264
23264
23265
-
In this document, you’ll learn about the different types of API keys, their expiration and verification.
23265
+
In this guide, you’ll learn about the different types of API keys, their expiration and verification.
23266
23266
23267
23267
## API Key Types
23268
23268
23269
23269
There are two types of API keys:
23270
23270
23271
23271
- `publishable`: A public key used in client applications, such as a storefront.
23272
+
- This API key is useful for operations that do not require authentication, such as fetching product data or categories.
23272
23273
- `secret`: A secret key used for authentication and verification purposes, such as an admin user’s authentication token or a password reset token.
23274
+
- This API key is useful for operations that require authentication, such as creating orders or managing products as an admin user.
23273
23275
23274
23276
The API key’s type is stored in the `type` property of the [ApiKey data model](https://docs.medusajs.com/references/api-key/models/ApiKey/index.html.md).
23275
23277
23278
+
### Default Scopes and Permissions
23279
+
23280
+
In your Medusa application, a `publishable` API key is only useful to send requests to the [Store API routes](https://docs.medusajs.com/api/store). Learn more about it in the [Publishable API Keys](https://docs.medusajs.com/Users/shahednasser/medusa/www/apps/resources/app/commerce-modules/sales-channel/publishable-api-keys/index.html.md) guide.
23281
+
23282
+
In addition, a `secret` API key allows you to access the [Admin API routes](https://docs.medusajs.com/api/admin) and perform actions as the admin user that the key was created for. The `created_by` property of the [ApiKey data model](https://docs.medusajs.com/references/api-key/models/ApiKey/index.html.md) indicates the ID of the associated admin user.
23283
+
23284
+
***
23285
+
23286
+
## API Key Creation
23287
+
23288
+
When using the [Medusa Admin](https://docs.medusajs.com/user-guide/settings/developer/index.html.md) or [API routes](https://docs.medusajs.com/api/admin#api-keys), only admin users can create API keys.
23289
+
23290
+
You can also create API keys in your customizations using the [createApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/createApiKeysWorkflow/index.html.md).
23291
+
23292
+
***
23293
+
23294
+
## API Key Tokens
23295
+
23296
+
The API key data model has a `token` property that contains the actual key used for authentication.
23297
+
23298
+
This token is created using the `salt` property in the data model, which is a random string generated when the API key is created. The salt is a `64`-character hexadecimal string generated randomly using the `crypto` module in Node.js.
23299
+
23300
+
For display purposes, the API key data model also has a `redacted` property that contains the first six characters of the token, followed by `...`, then the last three characters of the token. You can use this property to show the API key in the UI without revealing the full token.
23301
+
23276
23302
***
23277
23303
23278
23304
## API Key Expiration
23279
23305
23280
-
An API key expires when it’s revoked using the [revoke method of the module’s main service](https://docs.medusajs.com/references/api-key/revoke/index.html.md).
23306
+
An API key expires when it’s revoked using the [revokeApiKeysWorkflow](https://docs.medusajs.com/references/medusa-workflows/revokeApiKeysWorkflow/index.html.md). This method will set the following properties in the API key:
23307
+
23308
+
- `revoked_at`: The date and time when the API key was revoked.
23309
+
- `revoked_by`: The ID of the user who revoked the API key.
23281
23310
23282
23311
The associated token is no longer usable or verifiable.
23283
23312
@@ -79330,6 +79359,8 @@ To learn more about the commerce features that Medusa provides, check out Medusa
79330
79359
79331
79360
# Action Menu - Admin Components
79332
79361
79362
+
In this guide, you'll learn how to add an action menu to your Medusa Admin customizations.
79363
+
79333
79364
The Medusa Admin often provides additional actions in a dropdown shown when users click a three-dot icon.
79334
79365
79335
79366

Unlike other components in this documentation, this form component isn't reusable. You have to create one for every resource that has a create form in the admin.
80220
80255
80221
-
Start by creating the file `src/admin/components/create-form.tsx` that you'll create the form in.
80256
+
Start by creating the file `src/admin/components/create-form.tsx` in which you'll create the form.
Unlike other components in this documentation, this form component isn't reusable. You have to create one for every resource that has an edit form in the admin.
80497
80532
80498
-
Start by creating the file `src/admin/components/edit-form.tsx` that you'll create the form in.
80533
+
Start by creating the file `src/admin/components/edit-form.tsx` in which you'll create the form.
const handleSubmit = form.handleSubmit(({ name }) => {
80534
-
// TODO submit to backend
80569
+
// TODO: submit to backend
80535
80570
console.log(name)
80536
80571
})
80537
80572
@@ -80674,6 +80709,8 @@ It will add at the top of a product's details page a new section, and in its hea
80674
80709
80675
80710
# Header - Admin Components
80676
80711
80712
+
In this guide, you'll learn how to create a header component that matches the Medusa Admin's design conventions.
80713
+
80677
80714
Each section in the Medusa Admin has a header with a title, and optionally a subtitle with buttons to perform an action.
80678
80715
80679
80716

@@ -80820,6 +80857,8 @@ This widget also uses a [Container](https://docs.medusajs.com/Users/shahednasser
80820
80857
80821
80858
# JSON View - Admin Components
80822
80859
80860
+
In this guide, you'll learn how to create a JSON view section that matches the Medusa Admin's design conventions.
80861
+
80823
80862
Detail pages in the Medusa Admin show a JSON section to view the current page's details in JSON format.
80824
80863
80825
80864

@@ -81048,6 +81087,8 @@ This shows the JSON section at the top of the product page, passing it the objec
81048
81087
81049
81088
# Section Row - Admin Components
81050
81089
81090
+
In this guide, you'll learn how to create a section row component that matches the Medusa Admin's design conventions.
81091
+
81051
81092
The Medusa Admin often shows information in rows of label-values, such as when showing a product's details.
81052
81093
81053
81094

@@ -81430,6 +81471,8 @@ To test it out, log into the Medusa Admin and open `http://localhost:9000/app/cu
81430
81471
81431
81472
# Single Column Layout - Admin Components
81432
81473
81474
+
In this guide, you'll learn how to create a layout component that matches the Medusa Admin's design conventions for pages with a single column of content.
81475
+
81433
81476
The Medusa Admin has pages with a single column of content.
81434
81477
81435
81478
This doesn't include the sidebar, only the main content.
@@ -81490,6 +81533,8 @@ This UI route also uses a [Container](https://docs.medusajs.com/Users/shahednass
81490
81533
81491
81534
# Two Column Layout - Admin Components
81492
81535
81536
+
In this guide, you'll learn how to create a layout component that matches the Medusa Admin's design conventions for pages with two columns of content.
81537
+
81493
81538
The Medusa Admin has pages with two columns of content.
81494
81539
81495
81540
This doesn't include the sidebar, only the main content.
Copy file name to clipboardExpand all lines: www/apps/resources/app/admin-components/components/action-menu/page.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ export const metadata = {
10
10
11
11
# {metadata.title}
12
12
13
+
In this guide, you'll learn how to add an action menu to your Medusa Admin customizations.
14
+
13
15
The Medusa Admin often provides additional actions in a dropdown shown when users click a three-dot icon.
14
16
15
17

Unlike other components in this documentation, this form component isn't reusable. You have to create one for every resource that has a create form in the admin.
129
131
130
-
Start by creating the file `src/admin/components/create-form.tsx`that you'll create the form in.
132
+
Start by creating the file `src/admin/components/create-form.tsx`in which you'll create the form.
Unlike other components in this documentation, this form component isn't reusable. You have to create one for every resource that has an edit form in the admin.
408
410
409
-
Start by creating the file `src/admin/components/edit-form.tsx`that you'll create the form in.
411
+
Start by creating the file `src/admin/components/edit-form.tsx`in which you'll create the form.
Copy file name to clipboardExpand all lines: www/apps/resources/app/admin-components/components/section-row/page.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ export const metadata = {
10
10
11
11
# {metadata.title}
12
12
13
+
In this guide, you'll learn how to create a section row component that matches the Medusa Admin's design conventions.
14
+
13
15
The Medusa Admin often shows information in rows of label-values, such as when showing a product's details.
14
16
15
17

Copy file name to clipboardExpand all lines: www/apps/resources/app/admin-components/layouts/single-column/page.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ export const metadata = {
8
8
9
9
# {metadata.title}
10
10
11
+
In this guide, you'll learn how to create a layout component that matches the Medusa Admin's design conventions for pages with a single column of content.
12
+
11
13
The Medusa Admin has pages with a single column of content.
0 commit comments