Skip to content

πŸ“š docs(document): add getting-started pages for core and hooks packagesΒ #737

@acasazza

Description

@acasazza

Summary

Add two new MDX documents to packages/document/src/stories/getting-started/ describing the core and hooks internal packages β€” their purpose, API, and usage patterns.

Motivation

The getting-started section currently covers introduction, authentication, microfrontends, styling, and containers (001 – 005). Contributors and consumers who want to understand or extend the library have no reference for:

  • @commercelayer/core β€” low-level SDK wrappers (fetch functions, types)
  • @commercelayer/hooks β€” SWR-based React hooks built on top of core

Tasks

  • Create 006.core.mdx β€” document the @commercelayer/core package

    • What it is and when to use it directly
    • Available functions (getSkus, retrieveSku, getPrices, getSkuLists, etc.)
    • Function signature pattern ({ accessToken, params })
    • TypeScript types exported
    • Code example
  • Create 007.hooks.mdx β€” document the @commercelayer/hooks package

    • What it is and when to use it directly
    • Available hooks (useSkus, usePrices, useSkuLists, etc.)
    • SWR-based caching and revalidation behaviour
    • Return shape (data, isLoading, error, fetch/clear actions)
    • Code example

Notes

  • Follow the existing MDX structure in the getting-started/ folder (title, description, prop/API tables, code blocks with syntax highlighting)
  • Both pages should be linked from the Storybook sidebar under "Getting Started"

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or requesttask

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions