diff --git a/AGENTS.md b/AGENTS.md index 94611048c..0488495c8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -26,3 +26,7 @@ or a review comment alone as proof of API behavior. - Keep the Spanish and English OpenAPI contracts structurally aligned. - Run the relevant repository checks for specification changes. + +## SDK guide style + +- Describe the current SDK as the available version. Keep release announcements out of general guides; version references may explain verified compatibility or when a capability became available. Document import options in the existing installation guide rather than adding a separate SDK article. diff --git a/website/docs/getting-started/install.mdx b/website/docs/getting-started/install.mdx index 007acfe65..b60999d5b 100644 --- a/website/docs/getting-started/install.mdx +++ b/website/docs/getting-started/install.mdx @@ -24,7 +24,7 @@ Empieza por incluir el cliente de Facturapi en las dependencias de tu proyecto. Instala el paquete de [NPM](https://www.npmjs.com/package/facturapi). ```bash -$> npm install --save facturapi +$> npm install facturapi ``` @@ -77,16 +77,20 @@ Importa la librería antes de usarla. -```javascript -const Facturapi = require('facturapi'); +Elige el import que corresponda a tu proyecto. Con ESM o TypeScript: + +```typescript +import Facturapi from 'facturapi'; ``` -ESM / TypeScript +Con CommonJS: ```javascript -import Facturapi from 'facturapi'; +const Facturapi = require('facturapi'); ``` +El paquete incluye tipos para TypeScript y requiere Node.js 18 o superior. Importa el constructor, los tipos y los enums desde `facturapi`. + diff --git a/website/i18n/en/docusaurus-plugin-content-docs/current/getting-started/install.mdx b/website/i18n/en/docusaurus-plugin-content-docs/current/getting-started/install.mdx index 1a9207f99..0ae3148a2 100644 --- a/website/i18n/en/docusaurus-plugin-content-docs/current/getting-started/install.mdx +++ b/website/i18n/en/docusaurus-plugin-content-docs/current/getting-started/install.mdx @@ -24,7 +24,7 @@ Start by including the Facturapi client in your project dependencies. Install the package from [NPM](https://www.npmjs.com/package/facturapi). ```bash -$> npm install --save facturapi +$> npm install facturapi ``` @@ -77,16 +77,20 @@ Import the library before using it in your code. -```javascript -const Facturapi = require('facturapi'); +Choose the import that matches your project. With ESM or TypeScript: + +```typescript +import Facturapi from 'facturapi'; ``` -ESM / TypeScript +With CommonJS: ```javascript -import Facturapi from 'facturapi'; +const Facturapi = require('facturapi'); ``` +The package includes TypeScript types and requires Node.js 18 or later. Import the constructor, types, and enums from `facturapi`. +