open-index/open-npm huggingface dataset:
npm package: @mai_xiyu/koishi-plugin-group-manager
Description: Koishi 插件：群管理与QQ群管（仅 OneBot 适配）
Author: Mai_xiyu
Latest version: 0.1.0

# koishi-plugin-group-manager

Koishi 群管理插件（仅 OneBot 适配），合并入群管理与群内治理功能。

## 功能

- **入群邀请管理**：用户申请、管理员审批、自动同意邀请
- **群内治理**：违禁词、多级处罚、刷屏禁言、自动撤回
- **进群验证**：题库随机验证、超时踢出
- **通知与公告**：进退群通知、关键词公告、定时公告
- **欢迎引导**：欢迎卡片与提示
- **名单管理**：白名单、黑名单、灰名单
- **记录与申诉**：踢人/禁言记录、申诉流程
- **简易网页控制**：登录后按群读写配置

## 配置项

| 配置项 | 类型 | 说明 |
|--------|------|------|
| admins | string[] | 机器人管理员QQ号列表（可填多个） |
| configFile | string | 群配置存储 JSON 路径 |
| recordsFile | string | 处罚/申诉记录存储路径 |
| groups | object[] | 群配置列表（面板展开式） |
| imageModeration | object | 敏感图检测配置（需外部API） |

## 主要指令

### 普通用户

- `邀请入群 <群号>` 申请让机器人加入指定群聊
- `qqgm.appeal <内容>` 提交申诉

### 管理员

- `同意 <请求ID>` / `拒绝 <请求ID>` 审核入群请求
- `查看邀请` 查看待处理请求
- `退群 <群号>` 让机器人退出指定群聊
- `qqgm.announce <内容>` 设置并发送群公告
- `qqgm.atall <内容>` 群艾特全体
- `qqgm.records` 查看本群处罚记录

## 注意事项

- 需要 OneBot 适配器
- 群管理网站由插件提供（/qqgm）
- 敏感图检测需要配置第三方免费API
npm package: @maia-id/n8n-nodes-maia-router
Description: n8n community node for Maia Router API
Author: MAIA Team
Latest version: 2.3.2

# MAIA Router - n8n Integration (Self Hosted)

[![npm version](https://badge.fury.io/js/%40maia-id%2Fn8n-nodes-maia-router-chat-model.svg)](https://www.npmjs.com/package/@maia-id/n8n-nodes-maia-router-chat-model)

## Features

### MAIA Router Node

Direct API operations with full control:
- **Chat Completion** - Generate AI responses
- **Text to Speech** - Convert text to audio
- **Transcribe** - Convert audio to text
- **Text to Video** - Generate video from text

### MAIA Router Chat Model

Full LangChain integration for advanced AI workflows:
- ✅ **AI Agent Support** - Works with n8n's AI Agent nodes
- ✅ **Tool Calling** - Supports function calling and tools
- ✅ **LangChain Chains** - Compatible with all LangChain features
- ✅ **Memory Support** - Context and conversation history
- ✅ **Multi-step Reasoning** - Complex AI workflows

## Installation

### Community Node (Recommended)

To install this node as a community node in n8n, follow these steps:

1. Open your n8n instance
2. Go to "Settings" > "Community Nodes"
3. Select "Install"
4. Enter `@maia-id/n8n-nodes-maia-router` in the "Enter npm package name" field
5. Agree to the risks of using community nodes (if prompted)
6. Click "Install"
7. After installation, the node will be available in the "OpenRouter" category in the node palette.

### Manual Installation (Advanced)
If you prefer manual installation or are using a custom n8n setup:

1. Open your n8n installation directory
2. Navigate to the nodes subdirectory
3. Run the following command:

```
npm install @maia-id/n8n-nodes-maia-router
```
4. Restart your n8n instance
npm package: @maia-id/n8n-nodes-maia-router-chat-action
Description: MAIA Router action nodes - Chat, Audio, Video, etc. (Cloud Compatible)
Author: MAIA Team
Latest version: 2.3.2

# MAIA Router Chat Action - n8n Node

[![npm version](https://badge.fury.io/js/%40maia-id%2Fn8n-nodes-maia-router-chat-action.svg)](https://www.npmjs.com/package/@maia-id/n8n-nodes-maia-router-chat-action)

**Cloud Compatible** ✅ | Works on both n8n Cloud and Self-hosted

This package provides action-based operations for [MAIA Router](https://maiarouter.ai) in n8n.

## Features

### MAIA Router Node

Direct API operations with full control:
- **Chat Completion** - Generate chat responses
- **Generate Audio** - Convert text to audio
- **Transcribe Audio** - Convert audio to text
- **Generate Video** - Generate video from text
- **Generate Image** - Generate image from text
- **Edit Image** - Edit existing image

## Installation

### n8n Cloud (Recommended)

1. Go to **Settings** > **Community Nodes**
2. Select **Install**
3. Enter `@maia-id/n8n-nodes-maia-router-chat-action`
4. Click Install

### Self-Hosted n8n

```bash
npm install @maia-id/n8n-nodes-maia-router-chat-action
```

## Configuration

### Credentials

1. Create a new credential of type **Maia Router API**
2. Enter your API key from [MAIA Router](https://maiarouter.ai)

## Example Usage

### Chat Completion

1. Add **MAIA Router** node
2. Select resource: **Chat**
3. Select operation: **Message a model**
4. Set model: `maia/gemini-2.5-flash`
5. Add messages with role (system/user/assistant) and content

### Text to Speech

1. Add **MAIA Router** node
2. Select resource: **Audio**
3. Select operation: **Text to Speech**
4. Set model: `openai/gpt-4o-mini-tts`
5. Enter text and select voice

### Transcribe

1. Add **MAIA Router** node
2. Select resource: **Audio**
3. Select operation: **Transcribe**
4. Set model: `openai/gpt-4o-mini-transcribe`
5. Choose audio source (binary data or URL)

### Text To Video
1. Add **MAIA Router** node
2. Select resource: **Video**
3. Select operation: **Generate Video**
4. Set model: `sora-2`
5. Enter prompt

## Need AI Agent Support?

For LangChain AI Agent support (self-hosted only), install:
```bash
@maia-id/n8n-nodes-maia-router
```

## Resources

- [MAIA Router Documentation](https://maiarouter.ai)
- [n8n Community Nodes](https://docs.n8n.io/integrations/community-nodes/)
- [GitHub Repository](https://github.com/maia-id/n8n-nodes-maia-router)

## Support

For issues and feature requests, please visit the [GitHub Issues](https://github.com/maia-id/n8n-nodes-maia-router/issues).

## License

MIT
npm package: @maiar-ai/memory-filesystem
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 0.23.0

# @maiar-ai/memory-filesystem

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/memory-postgres
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/memory-postgres

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/memory-sqlite
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/memory-sqlite

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/model-ollama
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/model-ollama

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/model-openai
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/model-openai

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/plugin-character
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-character

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/plugin-chat
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-chat

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/plugin-image
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-image

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/plugin-mcp
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-mcp

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/plugin-multimodal
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-multimodal

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/plugin-search
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-search

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiar-ai/plugin-telegram
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-telegram

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs

## Configuration

The Telegram plugin requires the following configuration:

```typescript
interface TelegramPluginConfig {
  token: string; // Telegram bot token
  composer: Composer<TelegramContext>; // Handlers to register
  // Optional configuration
  pollingTimeout?: number; // Polling timeout in seconds
  dropPendingUpdates?: boolean; // Whether pending updates are dropped on start/restart
}
```

### Required Configuration

- `token`: Your telegram bot token issued by BotFather
- `composer`: A telegraf composer middleware

### Optional Configuration

- `pollingTimeout`: How often the bot will check for updates (default: 30)
- `dropPendingUpdates`: Whether or not the bot will drop pending updates (default: false)

## Plugin Information

### Actions

- `send_response`: Send a response to a telegram chat using the `responseHandler` provided on `context.platformContext.responseHandler`

For more detailed examples and advanced usage, visit our [documentation](https://maiar.dev/docs).
npm package: @maiar-ai/plugin-terminal
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-terminal

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs

## Configuration

The Terminal plugin requires the following configuration:

```typescript
interface TerminalPluginConfig {
  user?: string; // Name of the terminal user (default: 'local')
  agentName?: string; // Name of the agent (default: 'Terminal')
  maxRetries?: number; // Number of connection retry attempts (default: 3)
  retryDelay?: number; // Delay between retries in milliseconds (default: 1000)
}
```

### Optional Configuration

- `user`: Username displayed in the terminal (default: 'local')
- `agentName`: Name of the agent displayed in responses (default: 'Terminal')
- `maxRetries`: Number of connection retry attempts if initial connection fails (default: 3)
- `retryDelay`: Delay between retry attempts in milliseconds (default: 1000)

## Plugin Information

### Actions

- `send_response`: Send a response to connected terminal clients. This action is used when the agent needs to respond to a user's message in the terminal.

### Triggers

- `terminal_server`: Starts and manages the terminal server that handles client connections. Automatically processes incoming messages and maintains client connections.

## Scripts

You can use the following scripts to launch terminal features. This is available as a CLI binary when this package is installed.

- `maiar-chat`: Start the terminal chat client.

## Usage

Add the `PluginTerminal` plugin to your agent configuration and provide the necessary configuration. Start the agent as usual.

Once agent startup is complete, you can connect to the terminal chat client using:

```bash
maiar-chat
```

For more detailed examples and advanced usage, visit our [documentation](https://maiar.dev/docs).
npm package: @maiar-ai/plugin-websocket
Description: Maiar: A Composable, Plugin-Based AI Agent Framework
Author: UraniumCorporation
Latest version: 1.0.0

# @maiar-ai/plugin-websocket

This package is part of the [Maiar](https://maiar.dev) ecosystem, designed to work seamlessly with `@maiar-ai/core`.

## Documentation

For detailed documentation, examples, and API reference, visit:
https://maiar.dev/docs
npm package: @maiat/mcp-server
Description: Maiat Trust Score MCP Server — query trust scores for any on-chain address from Claude, GPT, or any MCP-compatible AI
Latest version: 0.1.0

# @maiat/mcp-server

> The trust layer for AI agents — as an MCP server.

Query Maiat trust scores from Claude, GPT, or any MCP-compatible AI assistant. One tool call = one trust check.

## Quick Start

### Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "maiat": {
      "command": "npx",
      "args": ["@maiat/mcp-server"],
      "env": {
        "ALCHEMY_API_KEY": "your-alchemy-key",
        "MAIAT_API_KEY": "optional-for-higher-rate-limits"
      }
    }
  }
}
```

### From source

```bash
cd packages/mcp-server
npm install
npm run build
npm start
```

## Tools

| Tool | Description |
|------|-------------|
| `trust_score` | Get trust score (0-1000) for any address |
| `token_safety` | Token-specific safety check (honeypot, rug, liquidity) |
| `protocol_rating` | Protocol safety rating by name |
| `batch_score` | Score up to 10 addresses at once |
| `explain_score` | Human-readable score explanation |

## Example Usage (in Claude)

> "Check if 0x1234...abcd is safe to interact with"

The AI will call `trust_score` and return something like:

```json
{
  "address": "0x1234...abcd",
  "score": 720,
  "risk": "low",
  "source": "live_onchain",
  "breakdown": {
    "base": 100,
    "txHistory": 200,
    "balanceSignal": 100,
    "contractBonus": 50
  }
}
```

## Resources

| Resource | URI | Description |
|----------|-----|-------------|
| Scoring Methodology | `maiat://methodology` | How scores are calculated |

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `ALCHEMY_API_KEY` | Recommended | Enables live on-chain scoring |
| `MAIAT_API_KEY` | Optional | Higher rate limits on Maiat API |
| `MAIAT_API_URL` | Optional | Custom API endpoint (default: https://maiat.xyz/api/v1) |

## How It Works

1. **Maiat DB first** — checks indexed scores from Maiat's database
2. **Live fallback** — if no DB record, queries on-chain data via Alchemy
3. **Scoring algorithm** — transaction count, balance, contract status → 0-1000 score

## License

MIT
npm package: @maib/checkout
Description: TypeScript SDK for the maib hosted Checkout API — session management, payments, and refunds
Author: Zero-day
Latest version: 0.2.1

# @maib/checkout

TypeScript SDK for the [maib Checkout API](https://docs.maibmerchants.md/checkout) — hosted checkout sessions, payments, and refunds.

## Install

```bash
npm install @maib/checkout
```

Or use the umbrella package [`@maib/merchants`](https://www.npmjs.com/package/@maib/merchants):

```bash
npm install @maib/merchants
```

## Usage

```typescript
import { CheckoutClient, Currency } from "@maib/checkout";

const client = new CheckoutClient({
  clientId: process.env.MAIB_CLIENT_ID,
  clientSecret: process.env.MAIB_CLIENT_SECRET,
  signatureKey: process.env.MAIB_SIGNATURE_KEY!, // for callback verification
});
```

### Create a checkout session

```typescript
const session = await client.createSession({
  amount: 100,
  currency: Currency.MDL,
  callbackUrl: "https://example.com/callback",
  successUrl: "https://example.com/success",
  failUrl: "https://example.com/fail",
  orderInfo: {
    id: "order-123",
    description: "Test order",
  },
  payerInfo: {
    name: "John Doe",
    email: "john@example.com",
  },
});

// Redirect the user to session.checkoutUrl
```

### Get session details

```typescript
const details = await client.getSession(session.checkoutId);
```

### List sessions

```typescript
const { items, totalCount } = await client.listSessions({
  count: 20,
  offset: 0,
  status: CheckoutStatus.COMPLETED,
});
```

### Cancel a session

```typescript
await client.cancelSession(session.checkoutId);
```

### Payments

```typescript
// Get a single payment
const payment = await client.getPayment(paymentId);

// List payments with filters
const { items } = await client.listPayments({
  count: 20,
  offset: 0,
  currency: Currency.MDL,
});
```

### Refund a payment

```typescript
const refund = await client.refund(paymentId, {
  amount: 50,
  reason: "Customer request",
});

// Get refund details
const refundDetails = await client.getRefund(refund.refundId);
```

### Sandbox testing

```typescript
import { CheckoutClient, Environment } from "@maib/checkout";

const client = new CheckoutClient({
  clientId: process.env.MAIB_CLIENT_ID,
  clientSecret: process.env.MAIB_CLIENT_SECRET,
  environment: Environment.SANDBOX,
});
```

### Verify callback signature

```typescript
// In your webhook handler
const isValid = client.verifyCallback(rawBody, xSignatureHeader, xTimestampHeader);
```

## Enums

```typescript
import { CheckoutStatus, PaymentStatus, RefundStatus } from "@maib/checkout";

CheckoutStatus.COMPLETED    // "Completed"
CheckoutStatus.EXPIRED      // "Expired"
CheckoutStatus.CANCELLED    // "Cancelled"

PaymentStatus.EXECUTED       // "Executed"
PaymentStatus.REFUNDED       // "Refunded"

RefundStatus.ACCEPTED        // "Accepted"
RefundStatus.REJECTED        // "Rejected"
```

## License

[MIT](../../LICENSE)
npm package: @maib/core
Description: Shared HTTP client, authentication, signature verification, and error handling for maib API SDKs
Author: Zero-day
Latest version: 0.2.1

# @maib/core

Shared infrastructure for [maib](https://www.maib.md) merchant API SDKs — HTTP client, authentication, error handling, and signature verification.

> You probably want [`@maib/merchants`](https://www.npmjs.com/package/@maib/merchants) or one of the API-specific packages instead. This package is used internally by the merchant SDKs.

## Install

```bash
npm install @maib/core
```

## Signature verification

Verify callback signatures from maib APIs:

```typescript
import { verifySignature, verifyHmacSignature } from "@maib/core";

// E-Commerce, MIA QR, RTP — SHA-256 sorted-values signature
const isValid = verifySignature(callbackResult, signature, signatureKey);

// Checkout — HMAC-SHA256 signature
const isValid = verifyHmacSignature(rawBody, xSignature, xTimestamp, signatureKey);
```

## Error handling

```typescript
import { MaibError, MaibNetworkError } from "@maib/core";

try {
  await client.someMethod();
} catch (error) {
  if (error instanceof MaibError) {
    // API returned an error response
    console.log(error.statusCode); // HTTP status code
    console.log(error.errors);     // Array of { errorCode, errorMessage }
  }
  if (error instanceof MaibNetworkError) {
    // Network/fetch failure
    console.log(error.cause);
  }
}
```

## Exports

| Export                 | Description                              |
| ---------------------- | ---------------------------------------- |
| `BaseClient`           | Abstract HTTP client with token management |
| `MaibError`            | Error class for API error responses      |
| `MaibNetworkError`     | Error class for network failures         |
| `computeSignature`     | Compute SHA-256 callback signature       |
| `verifySignature`      | Verify SHA-256 callback signature        |
| `computeHmacSignature` | Compute HMAC-SHA256 callback signature   |
| `verifyHmacSignature`  | Verify HMAC-SHA256 callback signature    |
| `Currency`             | Enum: `MDL`, `EUR`, `USD`               |
| `Language`             | Enum: `RO`, `EN`, `RU`                  |
| `BaseClientConfig`     | Base config type (`baseUrl?`, `fetch?`)  |
| `DEFAULT_API_HOST`     | `https://api.maibmerchants.md`           |
| `SDK_VERSION`          | Current SDK version                      |

## License

[MIT](../../LICENSE)
npm package: @maib/http
Description: Shared HTTP primitives for maib SDK packages — network errors, query builder, token management
Author: Zero-day
Latest version: 0.2.1

# @maib/http

Shared HTTP primitives for [maib](https://www.maib.md) SDK packages — network errors, query string builder, and token management.

> This is an internal foundation package. You probably want [`@maib/merchants`](https://www.npmjs.com/package/@maib/merchants), [`@maib/ob`](https://www.npmjs.com/package/@maib/ob), or one of the API-specific packages instead.

## Install

```bash
npm install @maib/http
```

## Token management

`TokenManager` handles token caching, proactive refresh, and concurrent-request deduplication. Provide your own `acquire` callback for any auth flow (OAuth2, DirectLogin, etc.):

```typescript
import { TokenManager } from "@maib/http";

const tokens = new TokenManager(async () => {
  const res = await fetch("https://api.example.com/auth/token", {
    method: "POST",
    body: JSON.stringify({ clientId: "...", clientSecret: "..." }),
  });
  const { accessToken, expiresIn } = await res.json();
  return {
    accessToken,
    accessExpiresAt: Date.now() + expiresIn * 1000,
  };
});

// First call acquires a token; subsequent calls return the cached value.
// Concurrent calls share the same in-flight request.
const token = await tokens.getToken();
```

## Query string builder

```typescript
import { buildQueryString } from "@maib/http";

buildQueryString({ page: 1, limit: 20, filter: undefined });
// => "page=1&limit=20"  (undefined/null values are omitted)
```

## Error handling

```typescript
import { NetworkError } from "@maib/http";

try {
  await fetch(url);
} catch (error) {
  throw new NetworkError("Request failed", error);
}
```

## Exports

| Export             | Description                                              |
| ------------------ | -------------------------------------------------------- |
| `TokenManager`     | Token cache with deduplication and proactive refresh     |
| `NetworkError`     | Error class for network/fetch failures                   |
| `buildQueryString` | Build URL query string from a params object              |
| `SDK_VERSION`      | Current SDK version string                               |
| `BaseClientConfig` | Base config type (`baseUrl?`, `fetch?`)                  |
| `TokenState`       | Token state type (`accessToken`, `accessExpiresAt`, ...) |

## License

[MIT](../../LICENSE)
npm package: @maib/merchants
Description: Umbrella SDK for all maib merchant APIs — checkout, e-commerce, RTP, and MIA QR payments
Author: Zero-day
Latest version: 0.2.1

# @maib/merchants

Umbrella SDK for all [maib](https://www.maib.md) merchant APIs. Installs and re-exports everything from the individual packages in a single import.

## Install

```bash
npm install @maib/merchants
```

## Usage

```typescript
import {
  CheckoutClient,
  EcommerceClient,
  RtpClient,
  MiaClient,
  Currency,
  MaibError,
} from "@maib/merchants";
```

Everything from the individual packages is available:

| Package | What you get |
| --- | --- |
| [`@maib/checkout`](https://www.npmjs.com/package/@maib/checkout) | `CheckoutClient`, `CheckoutStatus`, `PaymentStatus`, `RefundStatus` |
| [`@maib/ecommerce`](https://www.npmjs.com/package/@maib/ecommerce) | `EcommerceClient`, `Currency`, `TransactionStatus`, `ThreeDsStatus` |
| [`@maib/rtp`](https://www.npmjs.com/package/@maib/rtp) | `RtpClient`, `RtpStatus` |
| [`@maib/mia`](https://www.npmjs.com/package/@maib/mia) | `MiaClient`, `QrType`, `AmountType`, `QrStatus`, `MiaPaymentStatus` |
| [`@maib/core`](https://www.npmjs.com/package/@maib/core) | `BaseClient`, `MaibError`, `MaibNetworkError`, `Language`, signature helpers |

Where type names collide between packages, they are aliased with a prefix:

```typescript
import type {
  CheckoutRefundRequest,   // from @maib/checkout
  EcommerceRefundRequest,  // from @maib/ecommerce
  CheckoutListPaymentsParams,
  MiaListPaymentsParams,
} from "@maib/merchants";
```

If you only need one API, install the individual package instead for a smaller dependency footprint.

> Looking for Open Banking? See [`@maib/ob`](https://www.npmjs.com/package/@maib/ob).

## License

[MIT](../../LICENSE)
npm package: @maib/rtp
Description: TypeScript SDK for the maib Request to Pay (RTP) API — bank-initiated payment requests
Author: Zero-day
Latest version: 0.2.1

# @maib/rtp

TypeScript SDK for the [maib Request to Pay (RTP) API](https://docs.maibmerchants.md/request-to-pay) — bank-initiated payment requests.

## Install

```bash
npm install @maib/rtp
```

Or use the umbrella package [`@maib/merchants`](https://www.npmjs.com/package/@maib/merchants):

```bash
npm install @maib/merchants
```

## Usage

```typescript
import { RtpClient, Currency } from "@maib/rtp";

const client = new RtpClient({
  clientId: process.env.MAIB_CLIENT_ID,
  clientSecret: process.env.MAIB_CLIENT_SECRET,
  signatureKey: process.env.MAIB_SIGNATURE_KEY!, // for callback verification
});
```

### Create a payment request

```typescript
const rtp = await client.create({
  alias: "+37360123456",
  amount: 100,
  currency: Currency.MDL,
  description: "Invoice #456",
  expiresAt: "2026-12-31T23:59:59Z",
  callbackUrl: "https://example.com/callback",
  redirectUrl: "https://example.com/redirect",
});

console.log(rtp.rtpId);
```

### Get status

```typescript
const status = await client.getStatus(rtp.rtpId);
```

### List payment requests

```typescript
const { items, totalCount } = await client.list({
  count: 20,
  offset: 0,
  status: RtpStatus.ACTIVE,
});
```

### Cancel a payment request

```typescript
await client.cancel(rtp.rtpId, { reason: "No longer needed" });
```

### Refund a completed payment

```typescript
const refund = await client.refund(payId, { reason: "Customer request" });
```

### Sandbox testing

```typescript
import { RtpClient, Environment } from "@maib/rtp";

const client = new RtpClient({
  clientId: process.env.MAIB_CLIENT_ID,
  clientSecret: process.env.MAIB_CLIENT_SECRET,
  environment: Environment.SANDBOX,
});

// Simulate customer accepting the payment
const accepted = await client.testAccept(rtp.rtpId, {
  amount: 100,
  currency: Currency.MDL,
});

// Simulate customer rejecting the payment
const rejected = await client.testReject(rtp.rtpId);
```

### Verify callback signature

```typescript
// In your webhook handler
const isValid = client.verifyCallback(callbackPayload);
// callbackPayload = { result: { ... }, signature: "..." }
```

## Enums

```typescript
import { RtpStatus } from "@maib/rtp";

RtpStatus.CREATED    // "Created"
RtpStatus.ACTIVE     // "Active"
RtpStatus.ACCEPTED   // "Accepted"
RtpStatus.REJECTED   // "Rejected"
RtpStatus.CANCELLED  // "Cancelled"
RtpStatus.EXPIRED    // "Expired"
```

## License

[MIT](../../LICENSE)
npm package: @maibachsystems/n8n-nodes-salessuite
Description: n8n community node for SalesSuite CRM API
Author: Maibach Systems
Latest version: 0.2.0

# n8n-nodes-salessuite

Community node for [n8n](https://n8n.io/) to interact with the [SalesSuite](https://salessuite.com) CRM API.

## Installation

### In n8n (recommended)

1. Go to **Settings → Community Nodes**
2. Click **Install a community node**
3. Enter `n8n-nodes-salessuite`
4. Click **Install**

### Manual

```bash
cd ~/.n8n
npm install n8n-nodes-salessuite
```

Restart n8n after installation.

## Nodes

### SalesSuite

The main node for interacting with SalesSuite resources.

| Resource | Operations |
|----------|-----------|
| **Contact** | Create, Update, Get, Get by Email, Get Many, Search |
| **Deal** | Create, Update, Get, Get by Email, Get by Contact, Get Many |
| **Form** | Get Many, Get Submissions |
| **Call** | Get Types, Get Activities |
| **Mail** | Get Activities |
| **Note** | Create |
| **Pipeline** | Get Many |

### SalesSuite Trigger

Webhook-based trigger that starts workflows when events occur in SalesSuite. Automatically manages webhook subscriptions when the workflow is activated/deactivated.

## Features

- **API Key Authentication** with built-in credential test
- **Dynamic Dropdowns** — Pipelines, Phases, Forms and Call Types are loaded live from the API
- **Phase depends on Pipeline** — selecting a pipeline automatically loads its phases
- **Return All / Limit** — auto-pagination on all list endpoints
- **Custom Fields** — set any field by its internal API name via key/value pairs on Contact & Deal
- **Multi-Select Append** — option to append values to multi-select fields instead of overwriting
- **Proper field types** — date/time pickers for date fields, boolean toggles where applicable

## Credentials

You need a SalesSuite API Key. Configure the following in n8n:

| Field | Description |
|-------|-------------|
| **API Key** | Your SalesSuite API key |
| **Base URL** | API base URL (default: `https://api.salessuite.com/api/v1`) |

## Development

```bash
# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev
```

### Link for local testing

```bash
# In this project
npm link

# In your n8n installation
npm link n8n-nodes-salessuite
```

## License

MIT