@djangocfg/api 2.1.42 → 2.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth.cjs +42 -44
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.mjs +50 -45
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +1842 -1842
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +1627 -1837
- package/dist/clients.d.ts +1627 -1837
- package/dist/clients.mjs +1840 -1840
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +0 -66
- package/dist/hooks.d.ts +0 -66
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -210
- package/dist/index.d.ts +0 -210
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/auth/context/AccountsContext.tsx +15 -15
- package/src/auth/context/AuthContext.tsx +6 -5
- package/src/auth/hooks/useAuthForm.ts +1 -1
- package/src/auth/hooks/useAuthGuard.ts +2 -1
- package/src/auth/hooks/useAutoAuth.ts +4 -2
- package/src/auth/hooks/useGithubAuth.ts +3 -2
- package/src/auth/hooks/useLocalStorage.ts +1 -0
- package/src/auth/hooks/useProfileCache.ts +1 -1
- package/src/auth/hooks/useSessionStorage.ts +1 -0
- package/src/clients.ts +1 -1
- package/src/generated/cfg_accounts/CLAUDE.md +92 -0
- package/src/generated/cfg_accounts/_utils/fetchers/accounts.ts +1 -8
- package/src/generated/cfg_accounts/_utils/fetchers/accounts__auth.ts +1 -8
- package/src/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +1 -8
- package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +1 -8
- package/src/generated/cfg_accounts/_utils/fetchers/index.ts +1 -8
- package/src/generated/cfg_accounts/_utils/hooks/accounts.ts +1 -8
- package/src/generated/cfg_accounts/_utils/hooks/accounts__auth.ts +1 -8
- package/src/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +1 -8
- package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +1 -8
- package/src/generated/cfg_accounts/_utils/hooks/index.ts +1 -8
- package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -8
- package/src/generated/cfg_accounts/accounts/index.ts +1 -8
- package/src/generated/cfg_accounts/accounts/models.ts +1 -8
- package/src/generated/cfg_accounts/accounts__auth/index.ts +1 -8
- package/src/generated/cfg_accounts/accounts__auth/models.ts +1 -8
- package/src/generated/cfg_accounts/accounts__oauth/index.ts +1 -8
- package/src/generated/cfg_accounts/accounts__oauth/models.ts +1 -8
- package/src/generated/cfg_accounts/accounts__user_profile/index.ts +1 -8
- package/src/generated/cfg_accounts/accounts__user_profile/models.ts +1 -8
- package/src/generated/cfg_accounts/api-instance.ts +1 -8
- package/src/generated/cfg_accounts/enums.ts +1 -8
- package/src/generated/cfg_accounts/errors.ts +1 -8
- package/src/generated/cfg_accounts/http.ts +1 -8
- package/src/generated/cfg_accounts/index.ts +1 -8
- package/src/generated/cfg_accounts/logger.ts +1 -8
- package/src/generated/cfg_accounts/retry.ts +1 -8
- package/src/generated/cfg_accounts/storage.ts +1 -8
- package/src/generated/cfg_accounts/validation-events.ts +1 -8
- package/src/generated/cfg_centrifugo/CLAUDE.md +92 -0
- package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/fetchers/index.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/hooks/index.ts +1 -8
- package/src/generated/cfg_centrifugo/_utils/schemas/index.ts +1 -8
- package/src/generated/cfg_centrifugo/api-instance.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +1 -8
- package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +1 -8
- package/src/generated/cfg_centrifugo/errors.ts +1 -8
- package/src/generated/cfg_centrifugo/http.ts +1 -8
- package/src/generated/cfg_centrifugo/index.ts +1 -8
- package/src/generated/cfg_centrifugo/logger.ts +1 -8
- package/src/generated/cfg_centrifugo/retry.ts +1 -8
- package/src/generated/cfg_centrifugo/storage.ts +1 -8
- package/src/generated/cfg_centrifugo/validation-events.ts +1 -8
- package/src/generated/cfg_webpush/CLAUDE.md +70 -0
- package/src/generated/cfg_webpush/_utils/fetchers/index.ts +1 -8
- package/src/generated/cfg_webpush/_utils/fetchers/webpush__web_push.ts +1 -8
- package/src/generated/cfg_webpush/_utils/hooks/index.ts +1 -8
- package/src/generated/cfg_webpush/_utils/hooks/webpush__web_push.ts +1 -8
- package/src/generated/cfg_webpush/_utils/schemas/index.ts +1 -8
- package/src/generated/cfg_webpush/api-instance.ts +1 -8
- package/src/generated/cfg_webpush/errors.ts +1 -8
- package/src/generated/cfg_webpush/http.ts +1 -8
- package/src/generated/cfg_webpush/index.ts +1 -8
- package/src/generated/cfg_webpush/logger.ts +1 -8
- package/src/generated/cfg_webpush/retry.ts +1 -8
- package/src/generated/cfg_webpush/storage.ts +1 -8
- package/src/generated/cfg_webpush/validation-events.ts +1 -8
- package/src/generated/cfg_webpush/webpush__web_push/index.ts +1 -8
- package/src/generated/cfg_webpush/webpush__web_push/models.ts +1 -8
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Zod Validation Events - Browser CustomEvent integration
|
|
11
4
|
*
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Django CFG API - Typescript Client
|
|
2
|
+
|
|
3
|
+
Auto-generated. **Do not edit manually.**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python manage.py generate_client --groups cfg_centrifugo --typescript
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Stats
|
|
10
|
+
|
|
11
|
+
| | |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Version | 3.0.3 |
|
|
14
|
+
| Operations | 15 |
|
|
15
|
+
| Schemas | 35 |
|
|
16
|
+
|
|
17
|
+
## Resources
|
|
18
|
+
|
|
19
|
+
- **Centrifugo Admin API** (6 ops)
|
|
20
|
+
- **Centrifugo Auth** (1 ops)
|
|
21
|
+
- **Centrifugo Monitoring** (5 ops)
|
|
22
|
+
- **Centrifugo Testing** (3 ops)
|
|
23
|
+
|
|
24
|
+
## Operations
|
|
25
|
+
|
|
26
|
+
**Centrifugo Admin API:**
|
|
27
|
+
- `POST` /cfg/centrifugo/server/auth/token/ → `cfg_centrifugo_server_auth_token_create`
|
|
28
|
+
- `POST` /cfg/centrifugo/server/channels/ → `cfg_centrifugo_server_channels_create`
|
|
29
|
+
- `POST` /cfg/centrifugo/server/history/ → `cfg_centrifugo_server_history_create`
|
|
30
|
+
- `POST` /cfg/centrifugo/server/info/ → `cfg_centrifugo_server_info_create`
|
|
31
|
+
- `POST` /cfg/centrifugo/server/presence/ → `cfg_centrifugo_server_presence_create`
|
|
32
|
+
- `POST` /cfg/centrifugo/server/presence-stats/ → `cfg_centrifugo_server_presence_stats_create`
|
|
33
|
+
|
|
34
|
+
**Centrifugo Auth:**
|
|
35
|
+
- `GET` /cfg/centrifugo/auth/token/ → `cfg_centrifugo_auth_token_retrieve`
|
|
36
|
+
|
|
37
|
+
**Centrifugo Monitoring:**
|
|
38
|
+
- `GET` /cfg/centrifugo/monitor/channels/ → `cfg_centrifugo_monitor_channels_retrieve`
|
|
39
|
+
- `GET` /cfg/centrifugo/monitor/health/ → `cfg_centrifugo_monitor_health_retrieve`
|
|
40
|
+
- `GET` /cfg/centrifugo/monitor/overview/ → `cfg_centrifugo_monitor_overview_retrieve`
|
|
41
|
+
- `GET` /cfg/centrifugo/monitor/publishes/ → `cfg_centrifugo_monitor_publishes_list`
|
|
42
|
+
- `GET` /cfg/centrifugo/monitor/timeline/ → `cfg_centrifugo_monitor_timeline_retrieve`
|
|
43
|
+
|
|
44
|
+
**Centrifugo Testing:**
|
|
45
|
+
- `POST` /cfg/centrifugo/testing/publish-test/ → `cfg_centrifugo_testing_publish_test_create`
|
|
46
|
+
- `POST` /cfg/centrifugo/testing/publish-with-logging/ → `cfg_centrifugo_testing_publish_with_logging_create`
|
|
47
|
+
- `POST` /cfg/centrifugo/testing/send-ack/ → `cfg_centrifugo_testing_send_ack_create`
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { APIClient } from './';
|
|
53
|
+
|
|
54
|
+
const client = new APIClient({ baseUrl, token });
|
|
55
|
+
|
|
56
|
+
await client.centrifugo auth.retrieve({ id: 1 });
|
|
57
|
+
await client.centrifugo monitoring.list();
|
|
58
|
+
await client.centrifugo monitoring.retrieve({ id: 1 });
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**SWR Hooks:**
|
|
62
|
+
```typescript
|
|
63
|
+
import { useCentrifugo authList } from './hooks';
|
|
64
|
+
const { data, isLoading } = useCentrifugo authList();
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## How It Works
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
DRF ViewSets → drf-spectacular → OpenAPI → IR Parser → Generator → This Client
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Configuration** (`api/config.py`):
|
|
74
|
+
```python
|
|
75
|
+
openapi_client = OpenAPIClientConfig(
|
|
76
|
+
enabled=True,
|
|
77
|
+
groups=[OpenAPIGroupConfig(name="cfg_centrifugo", apps=["..."])],
|
|
78
|
+
generate_zod_schemas=True, # → schemas.ts
|
|
79
|
+
generate_fetchers=True, # → fetchers.ts
|
|
80
|
+
generate_swr_hooks=True, # → hooks.ts
|
|
81
|
+
)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Copy to Next.js** (if `nextjs_admin` configured):
|
|
85
|
+
```python
|
|
86
|
+
nextjs_admin = NextJsAdminConfig(
|
|
87
|
+
project_path="../frontend/apps/...",
|
|
88
|
+
api_output_path="app/_lib/api/generated",
|
|
89
|
+
)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
@see https://djangocfg.com/docs/features/api-generation
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Typed fetchers for Centrifugo Admin API
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Typed fetchers for Centrifugo Auth
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Typed fetchers for Centrifugo Monitoring
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Typed fetchers for Centrifugo Testing
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Typed Fetchers - Universal API functions
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
'use client';
|
|
10
3
|
|
|
11
4
|
/**
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
'use client';
|
|
10
3
|
|
|
11
4
|
/**
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
'use client';
|
|
10
3
|
|
|
11
4
|
/**
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
'use client';
|
|
10
3
|
|
|
11
4
|
/**
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
'use client';
|
|
10
3
|
|
|
11
4
|
/**
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Zod Schemas - Runtime validation and type inference
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Global API Instance - Singleton configuration
|
|
11
4
|
*
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
export * from "./client";
|
|
10
3
|
export * as Models from "./models";
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Request to list active channels.
|
|
11
4
|
*
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
export * from "./client";
|
|
10
3
|
export * as Models from "./models";
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Response model for Centrifugo connection token.
|
|
11
4
|
*
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
export * from "./client";
|
|
10
3
|
export * as Models from "./models";
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* List of channel statistics.
|
|
11
4
|
*
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
export * from "./client";
|
|
10
3
|
export * as Models from "./models";
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Request model for test message publishing.
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* API Error Classes
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* HTTP Client Adapter Pattern
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Django CFG API - API Client with JWT Management
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* API Logger with Consola
|
|
11
4
|
* Beautiful console logging for API requests and responses
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Retry Configuration and Utilities
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Storage adapters for cross-platform token storage.
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Zod Validation Events - Browser CustomEvent integration
|
|
11
4
|
*
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Django CFG API - Typescript Client
|
|
2
|
+
|
|
3
|
+
Auto-generated. **Do not edit manually.**
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
python manage.py generate_client --groups cfg_webpush --typescript
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Stats
|
|
10
|
+
|
|
11
|
+
| | |
|
|
12
|
+
|---|---|
|
|
13
|
+
| Version | 3.0.3 |
|
|
14
|
+
| Operations | 3 |
|
|
15
|
+
| Schemas | 5 |
|
|
16
|
+
|
|
17
|
+
## Resources
|
|
18
|
+
|
|
19
|
+
- **Web Push** (3 ops)
|
|
20
|
+
|
|
21
|
+
## Operations
|
|
22
|
+
|
|
23
|
+
**Web Push:**
|
|
24
|
+
- `POST` /cfg/webpush/send/ → `cfg_webpush_send_create`
|
|
25
|
+
- `POST` /cfg/webpush/subscribe/ → `cfg_webpush_subscribe_create`
|
|
26
|
+
- `GET` /cfg/webpush/vapid/ → `cfg_webpush_vapid_retrieve`
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import { APIClient } from './';
|
|
32
|
+
|
|
33
|
+
const client = new APIClient({ baseUrl, token });
|
|
34
|
+
|
|
35
|
+
await client.web push.retrieve({ id: 1 });
|
|
36
|
+
await client.web push.create({ ... });
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**SWR Hooks:**
|
|
40
|
+
```typescript
|
|
41
|
+
import { useWeb pushList } from './hooks';
|
|
42
|
+
const { data, isLoading } = useWeb pushList();
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## How It Works
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
DRF ViewSets → drf-spectacular → OpenAPI → IR Parser → Generator → This Client
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Configuration** (`api/config.py`):
|
|
52
|
+
```python
|
|
53
|
+
openapi_client = OpenAPIClientConfig(
|
|
54
|
+
enabled=True,
|
|
55
|
+
groups=[OpenAPIGroupConfig(name="cfg_webpush", apps=["..."])],
|
|
56
|
+
generate_zod_schemas=True, # → schemas.ts
|
|
57
|
+
generate_fetchers=True, # → fetchers.ts
|
|
58
|
+
generate_swr_hooks=True, # → hooks.ts
|
|
59
|
+
)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Copy to Next.js** (if `nextjs_admin` configured):
|
|
63
|
+
```python
|
|
64
|
+
nextjs_admin = NextJsAdminConfig(
|
|
65
|
+
project_path="../frontend/apps/...",
|
|
66
|
+
api_output_path="app/_lib/api/generated",
|
|
67
|
+
)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
@see https://djangocfg.com/docs/features/api-generation
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Typed Fetchers - Universal API functions
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Typed fetchers for Web Push
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
'use client';
|
|
10
3
|
|
|
11
4
|
/**
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
'use client';
|
|
10
3
|
|
|
11
4
|
/**
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Zod Schemas - Runtime validation and type inference
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* Global API Instance - Singleton configuration
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* API Error Classes
|
|
11
4
|
*
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by DjangoCFG.
|
|
5
|
-
* Any manual changes will be lost when the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @see https://djangocfg.com/docs/features/modules/django-client/overview/
|
|
8
|
-
*/
|
|
1
|
+
// Auto-generated by DjangoCFG - see CLAUDE.md
|
|
9
2
|
/**
|
|
10
3
|
* HTTP Client Adapter Pattern
|
|
11
4
|
*
|