Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ jobs:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
@semantic-release/npm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish package to NPM
working-directory: packages/server
env:
BUN_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
bun publish
94 changes: 76 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,98 @@
# @pulgueta/nequi-node
# Nequi Node.js SDK

SDK de la comunidad de Nequi para Node.js
A community-driven TypeScript SDK for integrating with Nequi Conecta API in Node.js applications.

## Características
## Features

- Soporte para Node.js
- Soporte para TypeScript
- Fácil de usar
- ✅ **TypeScript Support** - Full type safety and IntelliSense
- ✅ **QR Code Payments** - Generate and manage QR code payments
- ✅ **Push Payments** - Send payment notifications to Nequi app users
- ✅ **Subscriptions** - Create and manage automatic subscription payments
- ✅ **Dispersions** - Send payments from your business account to Nequi accounts
- ✅ **Reports** - Retrieve transaction reports and analytics
- ✅ **Error Handling** - Comprehensive error handling with typed errors
- ✅ **Validation** - Built-in request validation using Zod schemas

## Instalación

```sh
pnpm add @pulgueta/nequi-node
## Installation

```bash
npm install @pulgueta/nequi-node

yarn add @pulgueta/nequi-node
pnpm add @pulgueta/nequi-node
bun add @pulgueta/nequi-node
```

## Uso
## Quick Start

```ts
```typescript
import { Nequi } from "@pulgueta/nequi-node";

const nequi = new Nequi({
apiKey: "your-api-key",
clientId: "your-client-id",
clientSecret: "your-client-secret",
// env: "development" | "production" basado en process.env.NODE_ENV
env: "development", // or "production"
});

// Generate a QR code for payment
const [error, data] = await nequi.qr.createQR({
code: "NIT_1",
value: "1000",
reference1: "Order #123",
});

if (error) {
console.error("Error:", error.message);
return;
}

console.log("QR Code:", data);
```

## Documentation

For detailed API documentation, see the [SDK Documentation](./packages/server/README.md).

## Requirements

- Node.js >= 24
- Bun >= 1.3.5

## Development

This is a monorepo managed with Bun workspaces.

```bash
# Install dependencies
bun install

# Build the SDK
bun run build:server

# Run linting
bun run lint

# Format code
bun run format

# Run CI checks
bun run ci
```

## Contribuciones
## Contributing

Contributions are welcome! Please read the [CONTRIBUTING.md](./CONTRIBUTING.md) file for details on our code of conduct and the process for submitting pull requests.

## License

This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

## Attribution

Las contribuciones son bienvenidas. Por favor, lee el [CONTRIBUTING.md](./CONTRIBUTING.md) para más detalles.
This SDK was originally developed by Andrés Rodríguez and is now accepting contributions from the community. Any official work or release based on this project must give appropriate credit and should not be claimed as work done solely by any entity, institution, or person.

## Atribuciones
## Links

Este SDK está desarrollado original e inicialmente por Andrés Rodríguez y posteriormente aceptando contribuciones de la comunidad. Cualquier trabajo o release oficial basado en este proyecto debe dársele el crédito correspondiente y no debería reclamarse como trabajo únicamente hecho por la entidad, institución o persona.
- [GitHub Repository](https://github.com/pulgueta/nequi-node)
- [Issue Tracker](https://github.com/pulgueta/nequi-node/issues)
- [NPM Package](https://www.npmjs.com/package/@pulgueta/nequi-node)
173 changes: 171 additions & 2 deletions bun.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions docs/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NEQUI_CLIENT_ID=your_client_id_here
NEQUI_CLIENT_SECRET=your_client_secret_here
NEQUI_API_KEY=your_api_key_here
24 changes: 24 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# build output
dist/

# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# environment variables
.env
.env.production

# macOS-specific files
.DS_Store

# jetbrains setting folder
.idea/
46 changes: 46 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Astro Starter Kit: Basics

```sh
bun create astro@latest -- --template basics
```

> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!

## 🚀 Project Structure

Inside of your Astro project, you'll see the following folders and files:

```text
/
├── public/
│ └── favicon.svg
├── src
│   ├── assets
│   │   └── astro.svg
│   ├── components
│   │   └── Welcome.astro
│   ├── layouts
│   │   └── Layout.astro
│   └── pages
│   └── index.astro
└── package.json
```

To learn more about the folder structure of an Astro project, refer to [our guide on project structure](https://docs.astro.build/en/basics/project-structure/).

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `bun install` | Installs dependencies |
| `bun dev` | Starts local dev server at `localhost:4321` |
| `bun build` | Build your production site to `./dist/` |
| `bun preview` | Preview your build locally, before deploying |
| `bun astro ...` | Run CLI commands like `astro add`, `astro check` |
| `bun astro -- --help` | Get help using the Astro CLI |

## 👀 Want to learn more?

Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
12 changes: 12 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// @ts-check

import node from "@astrojs/node";
import { defineConfig } from "astro/config";

// https://astro.build/config
export default defineConfig({
output: "server",
adapter: node({
mode: "standalone",
}),
});
22 changes: 22 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "docs",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^9.2.3",
"@pulgueta/nequi-node": "workspace:*",
"astro": "^5.16.15",
"elysia": "^1.4.22",
"zod": "^4.3.5"
},
"devDependencies": {
"@types/bun": "^1.3.6",
"typescript": "^5.9.3"
}
}
Binary file added docs/public/favicon.ico
Binary file not shown.
9 changes: 9 additions & 0 deletions docs/public/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading