@djangocfg/api 1.2.6 → 1.2.7

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 (82) hide show
  1. package/dist/index.cjs +2577 -1573
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2141 -820
  4. package/dist/index.d.ts +2141 -820
  5. package/dist/index.mjs +2487 -1497
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +2 -2
  8. package/src/cfg/generated/_utils/fetchers/cfg__accounts.ts +2 -3
  9. package/src/cfg/generated/_utils/fetchers/cfg__accounts__auth.ts +1 -2
  10. package/src/cfg/generated/_utils/fetchers/cfg__accounts__user_profile.ts +6 -7
  11. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo.ts +2 -3
  12. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_admin_api.ts +12 -13
  13. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_monitoring.ts +8 -9
  14. package/src/cfg/generated/_utils/fetchers/cfg__centrifugo__centrifugo_testing.ts +8 -9
  15. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_activity.ts +61 -0
  16. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_api_zones.ts +62 -0
  17. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_charts.ts +90 -0
  18. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_commands.ts +62 -0
  19. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_overview.ts +48 -0
  20. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_statistics.ts +76 -0
  21. package/src/cfg/generated/_utils/fetchers/cfg__dashboard__dashboard_system.ts +63 -0
  22. package/src/cfg/generated/_utils/fetchers/cfg__endpoints.ts +3 -4
  23. package/src/cfg/generated/_utils/fetchers/cfg__health.ts +2 -3
  24. package/src/cfg/generated/_utils/fetchers/cfg__knowbase.ts +57 -58
  25. package/src/cfg/generated/_utils/fetchers/cfg__leads.ts +6 -7
  26. package/src/cfg/generated/_utils/fetchers/cfg__leads__lead_submission.ts +1 -2
  27. package/src/cfg/generated/_utils/fetchers/cfg__newsletter.ts +3 -4
  28. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__bulk_email.ts +1 -2
  29. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__campaigns.ts +6 -7
  30. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__logs.ts +1 -2
  31. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__newsletters.ts +2 -3
  32. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__subscriptions.ts +3 -4
  33. package/src/cfg/generated/_utils/fetchers/cfg__newsletter__testing.ts +1 -2
  34. package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +8 -9
  35. package/src/cfg/generated/_utils/fetchers/cfg__support.ts +12 -13
  36. package/src/cfg/generated/_utils/fetchers/cfg__tasks.ts +10 -11
  37. package/src/cfg/generated/_utils/fetchers/index.ts +7 -1
  38. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_activity.ts +49 -0
  39. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_api_zones.ts +50 -0
  40. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_charts.ts +78 -0
  41. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_commands.ts +50 -0
  42. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_overview.ts +36 -0
  43. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_statistics.ts +64 -0
  44. package/src/cfg/generated/_utils/hooks/cfg__dashboard__dashboard_system.ts +51 -0
  45. package/src/cfg/generated/_utils/hooks/index.ts +7 -1
  46. package/src/cfg/generated/_utils/schemas/APIZone.schema.ts +27 -0
  47. package/src/cfg/generated/_utils/schemas/APIZonesSummary.schema.ts +21 -0
  48. package/src/cfg/generated/_utils/schemas/ActivityTrackerDay.schema.ts +23 -0
  49. package/src/cfg/generated/_utils/schemas/ChartData.schema.ts +21 -0
  50. package/src/cfg/generated/_utils/schemas/ChartDataset.schema.ts +24 -0
  51. package/src/cfg/generated/_utils/schemas/Command.schema.ts +23 -0
  52. package/src/cfg/generated/_utils/schemas/CommandsSummary.schema.ts +25 -0
  53. package/src/cfg/generated/_utils/schemas/RecentUser.schema.ts +26 -0
  54. package/src/cfg/generated/_utils/schemas/index.ts +8 -0
  55. package/src/cfg/generated/cfg__dashboard__dashboard_activity/client.ts +45 -0
  56. package/src/cfg/generated/cfg__dashboard__dashboard_activity/models.ts +0 -0
  57. package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/client.ts +34 -0
  58. package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/index.ts +2 -0
  59. package/src/cfg/generated/cfg__dashboard__dashboard_api_zones/models.ts +27 -0
  60. package/src/cfg/generated/cfg__dashboard__dashboard_charts/client.ts +98 -0
  61. package/src/cfg/generated/cfg__dashboard__dashboard_charts/index.ts +2 -0
  62. package/src/cfg/generated/cfg__dashboard__dashboard_charts/models.ts +24 -0
  63. package/src/cfg/generated/cfg__dashboard__dashboard_commands/client.ts +34 -0
  64. package/src/cfg/generated/cfg__dashboard__dashboard_commands/index.ts +2 -0
  65. package/src/cfg/generated/cfg__dashboard__dashboard_commands/models.ts +27 -0
  66. package/src/cfg/generated/cfg__dashboard__dashboard_overview/client.ts +25 -0
  67. package/src/cfg/generated/cfg__dashboard__dashboard_overview/index.ts +2 -0
  68. package/src/cfg/generated/cfg__dashboard__dashboard_overview/models.ts +23 -0
  69. package/src/cfg/generated/cfg__dashboard__dashboard_statistics/client.ts +44 -0
  70. package/src/cfg/generated/cfg__dashboard__dashboard_statistics/index.ts +2 -0
  71. package/src/cfg/generated/cfg__dashboard__dashboard_statistics/models.ts +16 -0
  72. package/src/cfg/generated/cfg__dashboard__dashboard_system/client.ts +34 -0
  73. package/src/cfg/generated/cfg__dashboard__dashboard_system/index.ts +2 -0
  74. package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_system}/models.ts +0 -39
  75. package/src/cfg/generated/client.ts +32 -12
  76. package/src/cfg/generated/http.ts +8 -3
  77. package/src/cfg/generated/index.ts +35 -5
  78. package/src/cfg/generated/schema.ts +574 -8
  79. package/src/cfg/generated/_utils/fetchers/cfg__dashboard.ts +0 -150
  80. package/src/cfg/generated/_utils/hooks/cfg__dashboard.ts +0 -137
  81. package/src/cfg/generated/cfg__dashboard/client.ts +0 -106
  82. /package/src/cfg/generated/{cfg__dashboard → cfg__dashboard__dashboard_activity}/index.ts +0 -0
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Typed fetchers for Dashboard - Commands
3
+ *
4
+ * Universal functions that work in any environment:
5
+ * - Next.js (App Router / Pages Router / Server Components)
6
+ * - React Native
7
+ * - Node.js backend
8
+ *
9
+ * These fetchers use Zod schemas for runtime validation.
10
+ *
11
+ * Usage:
12
+ * ```typescript
13
+ * // Configure API once (in your app entry point)
14
+ * import { configureAPI } from '../../api-instance'
15
+ * configureAPI({ baseUrl: 'https://api.example.com' })
16
+ *
17
+ * // Then use fetchers anywhere
18
+ * const users = await getUsers({ page: 1 })
19
+ *
20
+ * // With SWR
21
+ * const { data } = useSWR(['users', params], () => getUsers(params))
22
+ *
23
+ * // With React Query
24
+ * const { data } = useQuery(['users', params], () => getUsers(params))
25
+ *
26
+ * // In Server Component or SSR (pass custom client)
27
+ * import { API } from '../../index'
28
+ * const api = new API('https://api.example.com')
29
+ * const users = await getUsers({ page: 1 }, api)
30
+ * ```
31
+ */
32
+ import { CommandsSummarySchema, type CommandsSummary } from '../schemas/CommandsSummary.schema'
33
+ import { getAPIInstance } from '../../api-instance'
34
+
35
+ /**
36
+ * Get all commands
37
+ *
38
+ * @method GET
39
+ * @path /cfg/dashboard/api/commands/
40
+ */
41
+ export async function getDashboardApiCommandsList( client?: any
42
+ ): Promise<any> {
43
+ const api = client || getAPIInstance()
44
+ const response = await api.cfg_dashboard_commands.dashboardApiCommandsList()
45
+ return response
46
+ }
47
+
48
+
49
+ /**
50
+ * Get commands summary
51
+ *
52
+ * @method GET
53
+ * @path /cfg/dashboard/api/commands/summary/
54
+ */
55
+ export async function getDashboardApiCommandsSummaryRetrieve( client?: any
56
+ ): Promise<CommandsSummary> {
57
+ const api = client || getAPIInstance()
58
+ const response = await api.cfg_dashboard_commands.dashboardApiCommandsSummaryRetrieve()
59
+ return CommandsSummarySchema.parse(response)
60
+ }
61
+
62
+
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Typed fetchers for Dashboard - Overview
3
+ *
4
+ * Universal functions that work in any environment:
5
+ * - Next.js (App Router / Pages Router / Server Components)
6
+ * - React Native
7
+ * - Node.js backend
8
+ *
9
+ * These fetchers use Zod schemas for runtime validation.
10
+ *
11
+ * Usage:
12
+ * ```typescript
13
+ * // Configure API once (in your app entry point)
14
+ * import { configureAPI } from '../../api-instance'
15
+ * configureAPI({ baseUrl: 'https://api.example.com' })
16
+ *
17
+ * // Then use fetchers anywhere
18
+ * const users = await getUsers({ page: 1 })
19
+ *
20
+ * // With SWR
21
+ * const { data } = useSWR(['users', params], () => getUsers(params))
22
+ *
23
+ * // With React Query
24
+ * const { data } = useQuery(['users', params], () => getUsers(params))
25
+ *
26
+ * // In Server Component or SSR (pass custom client)
27
+ * import { API } from '../../index'
28
+ * const api = new API('https://api.example.com')
29
+ * const users = await getUsers({ page: 1 }, api)
30
+ * ```
31
+ */
32
+ import { DashboardOverviewSchema, type DashboardOverview } from '../schemas/DashboardOverview.schema'
33
+ import { getAPIInstance } from '../../api-instance'
34
+
35
+ /**
36
+ * Get dashboard overview
37
+ *
38
+ * @method GET
39
+ * @path /cfg/dashboard/api/overview/overview/
40
+ */
41
+ export async function getDashboardApiOverviewOverviewRetrieve( client?: any
42
+ ): Promise<DashboardOverview> {
43
+ const api = client || getAPIInstance()
44
+ const response = await api.cfg_dashboard_overview.dashboardApiOverviewOverviewRetrieve()
45
+ return DashboardOverviewSchema.parse(response)
46
+ }
47
+
48
+
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Typed fetchers for Dashboard - Statistics
3
+ *
4
+ * Universal functions that work in any environment:
5
+ * - Next.js (App Router / Pages Router / Server Components)
6
+ * - React Native
7
+ * - Node.js backend
8
+ *
9
+ * These fetchers use Zod schemas for runtime validation.
10
+ *
11
+ * Usage:
12
+ * ```typescript
13
+ * // Configure API once (in your app entry point)
14
+ * import { configureAPI } from '../../api-instance'
15
+ * configureAPI({ baseUrl: 'https://api.example.com' })
16
+ *
17
+ * // Then use fetchers anywhere
18
+ * const users = await getUsers({ page: 1 })
19
+ *
20
+ * // With SWR
21
+ * const { data } = useSWR(['users', params], () => getUsers(params))
22
+ *
23
+ * // With React Query
24
+ * const { data } = useQuery(['users', params], () => getUsers(params))
25
+ *
26
+ * // In Server Component or SSR (pass custom client)
27
+ * import { API } from '../../index'
28
+ * const api = new API('https://api.example.com')
29
+ * const users = await getUsers({ page: 1 }, api)
30
+ * ```
31
+ */
32
+ import { UserStatisticsSchema, type UserStatistics } from '../schemas/UserStatistics.schema'
33
+ import { getAPIInstance } from '../../api-instance'
34
+
35
+ /**
36
+ * Get application statistics
37
+ *
38
+ * @method GET
39
+ * @path /cfg/dashboard/api/statistics/apps/
40
+ */
41
+ export async function getDashboardApiStatisticsAppsList( client?: any
42
+ ): Promise<any> {
43
+ const api = client || getAPIInstance()
44
+ const response = await api.cfg_dashboard_statistics.dashboardApiStatisticsAppsList()
45
+ return response
46
+ }
47
+
48
+
49
+ /**
50
+ * Get statistics cards
51
+ *
52
+ * @method GET
53
+ * @path /cfg/dashboard/api/statistics/cards/
54
+ */
55
+ export async function getDashboardApiStatisticsCardsList( client?: any
56
+ ): Promise<any> {
57
+ const api = client || getAPIInstance()
58
+ const response = await api.cfg_dashboard_statistics.dashboardApiStatisticsCardsList()
59
+ return response
60
+ }
61
+
62
+
63
+ /**
64
+ * Get user statistics
65
+ *
66
+ * @method GET
67
+ * @path /cfg/dashboard/api/statistics/users/
68
+ */
69
+ export async function getDashboardApiStatisticsUsersRetrieve( client?: any
70
+ ): Promise<UserStatistics> {
71
+ const api = client || getAPIInstance()
72
+ const response = await api.cfg_dashboard_statistics.dashboardApiStatisticsUsersRetrieve()
73
+ return UserStatisticsSchema.parse(response)
74
+ }
75
+
76
+
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Typed fetchers for Dashboard - System
3
+ *
4
+ * Universal functions that work in any environment:
5
+ * - Next.js (App Router / Pages Router / Server Components)
6
+ * - React Native
7
+ * - Node.js backend
8
+ *
9
+ * These fetchers use Zod schemas for runtime validation.
10
+ *
11
+ * Usage:
12
+ * ```typescript
13
+ * // Configure API once (in your app entry point)
14
+ * import { configureAPI } from '../../api-instance'
15
+ * configureAPI({ baseUrl: 'https://api.example.com' })
16
+ *
17
+ * // Then use fetchers anywhere
18
+ * const users = await getUsers({ page: 1 })
19
+ *
20
+ * // With SWR
21
+ * const { data } = useSWR(['users', params], () => getUsers(params))
22
+ *
23
+ * // With React Query
24
+ * const { data } = useQuery(['users', params], () => getUsers(params))
25
+ *
26
+ * // In Server Component or SSR (pass custom client)
27
+ * import { API } from '../../index'
28
+ * const api = new API('https://api.example.com')
29
+ * const users = await getUsers({ page: 1 }, api)
30
+ * ```
31
+ */
32
+ import { SystemHealthSchema, type SystemHealth } from '../schemas/SystemHealth.schema'
33
+ import { SystemMetricsSchema, type SystemMetrics } from '../schemas/SystemMetrics.schema'
34
+ import { getAPIInstance } from '../../api-instance'
35
+
36
+ /**
37
+ * Get system health status
38
+ *
39
+ * @method GET
40
+ * @path /cfg/dashboard/api/system/health/
41
+ */
42
+ export async function getDashboardApiSystemHealthRetrieve( client?: any
43
+ ): Promise<SystemHealth> {
44
+ const api = client || getAPIInstance()
45
+ const response = await api.cfg_dashboard_system.dashboardApiSystemHealthRetrieve()
46
+ return SystemHealthSchema.parse(response)
47
+ }
48
+
49
+
50
+ /**
51
+ * Get system metrics
52
+ *
53
+ * @method GET
54
+ * @path /cfg/dashboard/api/system/metrics/
55
+ */
56
+ export async function getDashboardApiSystemMetricsRetrieve( client?: any
57
+ ): Promise<SystemMetrics> {
58
+ const api = client || getAPIInstance()
59
+ const response = await api.cfg_dashboard_system.dashboardApiSystemMetricsRetrieve()
60
+ return SystemMetricsSchema.parse(response)
61
+ }
62
+
63
+
@@ -32,7 +32,6 @@
32
32
  import { EndpointsStatusSchema, type EndpointsStatus } from '../schemas/EndpointsStatus.schema'
33
33
  import { URLsListSchema, type URLsList } from '../schemas/URLsList.schema'
34
34
  import { getAPIInstance } from '../../api-instance'
35
- import type { API } from '../../index'
36
35
 
37
36
  /**
38
37
  * API operation
@@ -40,7 +39,7 @@ import type { API } from '../../index'
40
39
  * @method GET
41
40
  * @path /cfg/endpoints/drf/
42
41
  */
43
- export async function getEndpointsDrfRetrieve( client?: API
42
+ export async function getEndpointsDrfRetrieve( client?: any
44
43
  ): Promise<EndpointsStatus> {
45
44
  const api = client || getAPIInstance()
46
45
  const response = await api.cfg_endpoints.drfRetrieve()
@@ -54,7 +53,7 @@ export async function getEndpointsDrfRetrieve( client?: API
54
53
  * @method GET
55
54
  * @path /cfg/endpoints/urls/
56
55
  */
57
- export async function getEndpointsUrlsRetrieve( client?: API
56
+ export async function getEndpointsUrlsRetrieve( client?: any
58
57
  ): Promise<URLsList> {
59
58
  const api = client || getAPIInstance()
60
59
  const response = await api.cfg_endpoints.urlsRetrieve()
@@ -68,7 +67,7 @@ export async function getEndpointsUrlsRetrieve( client?: API
68
67
  * @method GET
69
68
  * @path /cfg/endpoints/urls/compact/
70
69
  */
71
- export async function getEndpointsUrlsCompactRetrieve( client?: API
70
+ export async function getEndpointsUrlsCompactRetrieve( client?: any
72
71
  ): Promise<any> {
73
72
  const api = client || getAPIInstance()
74
73
  const response = await api.cfg_endpoints.urlsCompactRetrieve()
@@ -32,7 +32,6 @@
32
32
  import { HealthCheckSchema, type HealthCheck } from '../schemas/HealthCheck.schema'
33
33
  import { QuickHealthSchema, type QuickHealth } from '../schemas/QuickHealth.schema'
34
34
  import { getAPIInstance } from '../../api-instance'
35
- import type { API } from '../../index'
36
35
 
37
36
  /**
38
37
  * API operation
@@ -40,7 +39,7 @@ import type { API } from '../../index'
40
39
  * @method GET
41
40
  * @path /cfg/health/drf/
42
41
  */
43
- export async function getHealthDrfRetrieve( client?: API
42
+ export async function getHealthDrfRetrieve( client?: any
44
43
  ): Promise<HealthCheck> {
45
44
  const api = client || getAPIInstance()
46
45
  const response = await api.cfg_health.drfRetrieve()
@@ -54,7 +53,7 @@ export async function getHealthDrfRetrieve( client?: API
54
53
  * @method GET
55
54
  * @path /cfg/health/drf/quick/
56
55
  */
57
- export async function getHealthDrfQuickRetrieve( client?: API
56
+ export async function getHealthDrfQuickRetrieve( client?: any
58
57
  ): Promise<QuickHealth> {
59
58
  const api = client || getAPIInstance()
60
59
  const response = await api.cfg_health.drfQuickRetrieve()