# Django CFG API - Typescript Client

Auto-generated. **Do not edit manually.**

```bash
python manage.py generate_client --groups cfg_webpush --typescript
```

## Stats

| | |
|---|---|
| Version | 3.0.3 |
| Operations | 3 |
| Schemas | 5 |

## Resources

- **Web Push** (3 ops)

## Operations

**Web Push:**
- `POST` /cfg/webpush/send/ → `cfg_webpush_send_create`
- `POST` /cfg/webpush/subscribe/ → `cfg_webpush_subscribe_create`
- `GET` /cfg/webpush/vapid/ → `cfg_webpush_vapid_retrieve`

## Usage

```typescript
import { APIClient } from './';

const client = new APIClient({ baseUrl, token });

await client.web push.retrieve({ id: 1 });
await client.web push.create({ ... });
```

**SWR Hooks:**
```typescript
import { useWeb pushList } from './hooks';
const { data, isLoading } = useWeb pushList();
```

## How It Works

```
DRF ViewSets → drf-spectacular → OpenAPI → IR Parser → Generator → This Client
```

**Configuration** (`api/config.py`):
```python
openapi_client = OpenAPIClientConfig(
    enabled=True,
    groups=[OpenAPIGroupConfig(name="cfg_webpush", apps=["..."])],
    generate_zod_schemas=True,  # → schemas.ts
    generate_fetchers=True,     # → fetchers.ts
    generate_swr_hooks=True,    # → hooks.ts
)
```

@see https://djangocfg.com/docs/features/api-generation

