Customer module API examples

Overview
- Controller: [src/controllers/customerController.ts](src/controllers/customerController.ts#L1-L200)

Endpoints

1) List customers (GET)

curl example:

```bash
curl -X GET "http://localhost:3000/api/customers?page=1&limit=10&search=alice"
```

Response: JSON with `data` array and `pagination` object.

2) Get customer details (GET)

curl example:

```bash
curl -X GET "http://localhost:3000/api/customers/<CUSTOMER_ID>"
```

3) Admin reset password (PUT)

- If you supply `newPassword` it will be used (must be >=6 chars).
- If you omit `newPassword`, the API generates a random password and returns it in `generatedPassword`.

curl example (provide new password):

```bash
curl -X PUT "http://localhost:3000/api/customers" \
  -H "Content-Type: application/json" \
  -d '{"action":"resetPassword","id":"<CUSTOMER_ID>","newPassword":"newSecret123"}'
```

curl example (generate password):

```bash
curl -X PUT "http://localhost:3000/api/customers" \
  -H "Content-Type: application/json" \
  -d '{"action":"resetPassword","id":"<CUSTOMER_ID>"}'
```

4) Admin set status (PUT)

curl example (set inactive):

```bash
curl -X PUT "http://localhost:3000/api/customers" \
  -H "Content-Type: application/json" \
  -d '{"action":"setStatus","id":"<CUSTOMER_ID>","status":"inactive"}'
```

JS fetch examples

```js
// reset with generated password
fetch('/api/customers', {
  method: 'PUT',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ action: 'resetPassword', id: '<CUSTOMER_ID>' })
}).then(r=>r.json()).then(console.log)

// set status active
fetch('/api/customers', {
  method: 'PUT',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ action: 'setStatus', id: '<CUSTOMER_ID>', status: 'active' })
}).then(r=>r.json()).then(console.log)
```

Notes
- These endpoints expect the Next.js app to be running; protect admin routes with your authentication middleware.
- Replace `http://localhost:3000` with your deployment URL if needed.
