# payyd-js-sdk

Node.js SDK for Payyd Enterprise GraphQL APIs.

## Build

```bash
npm install
npm run sync
npm run build
```

## Test

```bash
npm test
```

## Demo

```bash
npm run demo
```

The sample Express demo mirrors the PHP and Python browser testers.

## Small Auth Test

```bash
npm run demo:auth
```

Edit `demo_scripts/auth_demo.ts` if you want to switch `SANDBOX`, `PREPROD`, or `PROD`.

## One-Command Local Test

```bash
sh ./start_testing.sh
```

This runs install, sync, tests, starts the demo, and opens `http://127.0.0.1:8000`.

## Sync Generated Assets

```bash
./sync_sdk_assets.sh
```

This refreshes:
- operation definitions from `payyd-dotnet-sdk`
- payin country rules from `payyd-php-sdk`
