@djangocfg/api 2.1.42 → 2.1.44

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.
Files changed (102) hide show
  1. package/dist/auth.cjs +42 -44
  2. package/dist/auth.cjs.map +1 -1
  3. package/dist/auth.mjs +50 -45
  4. package/dist/auth.mjs.map +1 -1
  5. package/dist/clients.cjs +1842 -1842
  6. package/dist/clients.cjs.map +1 -1
  7. package/dist/clients.d.cts +1627 -1837
  8. package/dist/clients.d.ts +1627 -1837
  9. package/dist/clients.mjs +1840 -1840
  10. package/dist/clients.mjs.map +1 -1
  11. package/dist/hooks.cjs.map +1 -1
  12. package/dist/hooks.d.cts +0 -66
  13. package/dist/hooks.d.ts +0 -66
  14. package/dist/hooks.mjs.map +1 -1
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +0 -210
  17. package/dist/index.d.ts +0 -210
  18. package/dist/index.mjs.map +1 -1
  19. package/package.json +3 -3
  20. package/src/auth/context/AccountsContext.tsx +15 -15
  21. package/src/auth/context/AuthContext.tsx +6 -5
  22. package/src/auth/hooks/useAuthForm.ts +1 -1
  23. package/src/auth/hooks/useAuthGuard.ts +2 -1
  24. package/src/auth/hooks/useAutoAuth.ts +4 -2
  25. package/src/auth/hooks/useGithubAuth.ts +3 -2
  26. package/src/auth/hooks/useLocalStorage.ts +1 -0
  27. package/src/auth/hooks/useProfileCache.ts +1 -1
  28. package/src/auth/hooks/useSessionStorage.ts +1 -0
  29. package/src/clients.ts +1 -1
  30. package/src/generated/cfg_accounts/CLAUDE.md +92 -0
  31. package/src/generated/cfg_accounts/_utils/fetchers/accounts.ts +1 -8
  32. package/src/generated/cfg_accounts/_utils/fetchers/accounts__auth.ts +1 -8
  33. package/src/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +1 -8
  34. package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +1 -8
  35. package/src/generated/cfg_accounts/_utils/fetchers/index.ts +1 -8
  36. package/src/generated/cfg_accounts/_utils/hooks/accounts.ts +1 -8
  37. package/src/generated/cfg_accounts/_utils/hooks/accounts__auth.ts +1 -8
  38. package/src/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +1 -8
  39. package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +1 -8
  40. package/src/generated/cfg_accounts/_utils/hooks/index.ts +1 -8
  41. package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -8
  42. package/src/generated/cfg_accounts/accounts/index.ts +1 -8
  43. package/src/generated/cfg_accounts/accounts/models.ts +1 -8
  44. package/src/generated/cfg_accounts/accounts__auth/index.ts +1 -8
  45. package/src/generated/cfg_accounts/accounts__auth/models.ts +1 -8
  46. package/src/generated/cfg_accounts/accounts__oauth/index.ts +1 -8
  47. package/src/generated/cfg_accounts/accounts__oauth/models.ts +1 -8
  48. package/src/generated/cfg_accounts/accounts__user_profile/index.ts +1 -8
  49. package/src/generated/cfg_accounts/accounts__user_profile/models.ts +1 -8
  50. package/src/generated/cfg_accounts/api-instance.ts +1 -8
  51. package/src/generated/cfg_accounts/enums.ts +1 -8
  52. package/src/generated/cfg_accounts/errors.ts +1 -8
  53. package/src/generated/cfg_accounts/http.ts +1 -8
  54. package/src/generated/cfg_accounts/index.ts +1 -8
  55. package/src/generated/cfg_accounts/logger.ts +1 -8
  56. package/src/generated/cfg_accounts/retry.ts +1 -8
  57. package/src/generated/cfg_accounts/storage.ts +1 -8
  58. package/src/generated/cfg_accounts/validation-events.ts +1 -8
  59. package/src/generated/cfg_centrifugo/CLAUDE.md +92 -0
  60. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +1 -8
  61. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +1 -8
  62. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +1 -8
  63. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +1 -8
  64. package/src/generated/cfg_centrifugo/_utils/fetchers/index.ts +1 -8
  65. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +1 -8
  66. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +1 -8
  67. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +1 -8
  68. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +1 -8
  69. package/src/generated/cfg_centrifugo/_utils/hooks/index.ts +1 -8
  70. package/src/generated/cfg_centrifugo/_utils/schemas/index.ts +1 -8
  71. package/src/generated/cfg_centrifugo/api-instance.ts +1 -8
  72. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +1 -8
  73. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +1 -8
  74. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +1 -8
  75. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +1 -8
  76. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +1 -8
  77. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +1 -8
  78. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +1 -8
  79. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +1 -8
  80. package/src/generated/cfg_centrifugo/errors.ts +1 -8
  81. package/src/generated/cfg_centrifugo/http.ts +1 -8
  82. package/src/generated/cfg_centrifugo/index.ts +1 -8
  83. package/src/generated/cfg_centrifugo/logger.ts +1 -8
  84. package/src/generated/cfg_centrifugo/retry.ts +1 -8
  85. package/src/generated/cfg_centrifugo/storage.ts +1 -8
  86. package/src/generated/cfg_centrifugo/validation-events.ts +1 -8
  87. package/src/generated/cfg_webpush/CLAUDE.md +70 -0
  88. package/src/generated/cfg_webpush/_utils/fetchers/index.ts +1 -8
  89. package/src/generated/cfg_webpush/_utils/fetchers/webpush__web_push.ts +1 -8
  90. package/src/generated/cfg_webpush/_utils/hooks/index.ts +1 -8
  91. package/src/generated/cfg_webpush/_utils/hooks/webpush__web_push.ts +1 -8
  92. package/src/generated/cfg_webpush/_utils/schemas/index.ts +1 -8
  93. package/src/generated/cfg_webpush/api-instance.ts +1 -8
  94. package/src/generated/cfg_webpush/errors.ts +1 -8
  95. package/src/generated/cfg_webpush/http.ts +1 -8
  96. package/src/generated/cfg_webpush/index.ts +1 -8
  97. package/src/generated/cfg_webpush/logger.ts +1 -8
  98. package/src/generated/cfg_webpush/retry.ts +1 -8
  99. package/src/generated/cfg_webpush/storage.ts +1 -8
  100. package/src/generated/cfg_webpush/validation-events.ts +1 -8
  101. package/src/generated/cfg_webpush/webpush__web_push/index.ts +1 -8
  102. 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
  *