docs: add line highlight validation (#14380)

* docs: add line highlight validation

* add to all projects

* fixes

* fixes

* fix

* fixes
This commit is contained in:
Shahed Nasser
2025-12-22 14:10:39 +02:00
committed by GitHub
parent 6380c1fdf4
commit cb33388202
59 changed files with 514 additions and 243 deletions
@@ -971,9 +971,9 @@ In `src/modules/avalara/service.ts`, add the following methods to the `AvalaraTa
export const avalaraItemMethodsHighlights = [
["3", "createItems", "Create multiple items in Avalara using the Create Items API."],
["36", "getItem", "Retrieve an item from Avalara using the Get Item API."],
["53", "updateItem", "Update an item in Avalara using the Update Item API."],
["82", "deleteItem", "Delete an item in Avalara using the Delete Item API."]
["35", "getItem", "Retrieve an item from Avalara using the Get Item API."],
["51", "updateItem", "Update an item in Avalara using the Update Item API."],
["79", "deleteItem", "Delete an item in Avalara using the Delete Item API."]
]
```ts title="src/modules/avalara/service.ts" highlights={avalaraItemMethodsHighlights}
@@ -2380,7 +2380,7 @@ So, create the file `src/api/store/products/[id]/[locale]/route.ts` with the fol
export const getProductLocaleDetailsRouteHighlights = [
["11", "locale", "Retrieve the locale from the request's path parameters."],
["12", "id", "Retrieve the product's ID from the request's path parameters."],
["11", "id", "Retrieve the product's ID from the request's path parameters."],
["13", "query", "Resolve Query from the Medusa container."],
["15", "data", "Retrieve the product's details from Contentful."],
["19", `"contentful_product.*"`, "Retrieve the product's details from Contentful."],
@@ -31,7 +31,7 @@ This guide was built with Payload v3.54.0. If you're using a different version a
## Summary
By following this tutorial, you'll learn how to:
By following this tutorial, you'll learn how t"o:
- Install and set up Medusa.
- Set up Payload in the Next.js Starter Storefront.
@@ -357,13 +357,13 @@ Finally, you'll add the `Product` collection, which will be synced with Medusa's
Create the file `src/collections/Products.ts` with the following content:
export const productCollectionHighlights = [
["21", "update", "Only allow updating from Medusa"],
["20", "update", "Only allow updating from Medusa"],
["144", "update", "Only allow updating from Medusa"],
["173", "update", "Only allow updating from Medusa"],
["190", "update", "Only allow updating from Medusa"],
["203", "update", "Only allow updating from Medusa"],
["224", "create", "Only allow creating from Medusa"],
["225", "delete", "Only allow deleting from Medusa"]
["172", "update", "Only allow updating from Medusa"],
["189", "update", "Only allow updating from Medusa"],
["202", "update", "Only allow updating from Medusa"],
["223", "create", "Only allow creating from Medusa"],
["224", "delete", "Only allow deleting from Medusa"]
]
```ts title="src/collections/Products.ts" badgeLabel="Storefront" badgeColor="blue" highlights={productCollectionHighlights}
@@ -681,9 +681,9 @@ If you get a type error on resolving the Sanity Module, run the Medusa applicati
</Note>
export const syncStepHighlights = [
["13", "createStep", "Create a step."],
["15", "container", "The Medusa container to resolve resources."],
["36", "graph", "Retrieve a paginated list of products with their sanity document."]
["14", "createStep", "Create a step."],
["16", "container", "The Medusa container to resolve resources."],
["37", "graph", "Retrieve a paginated list of products with their sanity document."]
]
```ts title="src/workflows/sanity-sync-products/steps/sync.ts" highlights={syncStepHighlights}
@@ -1205,7 +1205,7 @@ Now that you're managing a product's content in Sanity, you want to show that co
A product's details are retrieved in the file `src/app/[countryCode]/(main)/products/[handle]/page.tsx`. So, replace the `ProductPage` function with the following:
export const sanityContentHighlights = [
["19", "sanity", "Get the product's content from Sanity."]
["24", "sanity", "Get the product's content from Sanity."]
]
```tsx title="src/app/[countryCode]/(main)/products/[handle]/page.tsx" badgeLabel="Storefront" badgeColor="blue" highlights={sanityContentHighlights}
@@ -800,10 +800,10 @@ Finally, add the `calculatePrice` method to `ShipStationProviderService`:
export const serviceHighlights5 = [
["14", "shipment_id", "Retrieve the shipping method's shipment ID."],
["20", "createShipment", "If a shipment isn't already created, create the shipment and get its rates."],
["23", "getShipmentRates", "If a shipment is already created, retrieve its rates."],
["27", "calculatedPrice", "Calculate the price from the specified rate."],
["34", "is_calculated_price_tax_inclusive", "Return whether the price includes taxes."]
["24", "createShipment", "If a shipment isn't already created, create the shipment and get its rates."],
["37", "getShipmentRates", "If a shipment is already created, retrieve its rates."],
["41", "calculatedPrice", "Calculate the price from the specified rate."],
["47", "is_calculated_price_tax_inclusive", "Return whether the price includes taxes."]
]
```ts title="src/modules/shipstation/service.ts" highlights={serviceHighlights5}
@@ -892,8 +892,8 @@ Add the `validateFulfillmentData` method to `ShipStationProviderService`:
export const serviceHighlights4 = [
["8", "shipment_id", "Get the ID of an already created shipment, if available."],
["14", "createShipment", "Create a shipment if it doesn't already exist."],
["20", "shipment_id", "Store the shipment ID in the shipping method's `data`."]
["17", "createShipment", "Create a shipment if it doesn't already exist."],
["38", "shipment_id", "Store the shipment ID in the shipping method's `data`."]
]
```ts title="src/modules/shipstation/service.ts" highlights={serviceHighlights4}