@djangocfg/api 2.1.230 → 2.1.232

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 (92) hide show
  1. package/README.md +19 -4
  2. package/dist/auth-server.cjs +45 -358
  3. package/dist/auth-server.cjs.map +1 -1
  4. package/dist/auth-server.mjs +43 -356
  5. package/dist/auth-server.mjs.map +1 -1
  6. package/dist/auth.cjs +223 -735
  7. package/dist/auth.cjs.map +1 -1
  8. package/dist/auth.mjs +218 -730
  9. package/dist/auth.mjs.map +1 -1
  10. package/dist/clients.cjs +313 -1568
  11. package/dist/clients.cjs.map +1 -1
  12. package/dist/clients.d.cts +211 -1932
  13. package/dist/clients.d.ts +211 -1932
  14. package/dist/clients.mjs +309 -1564
  15. package/dist/clients.mjs.map +1 -1
  16. package/dist/hooks.cjs +36 -32
  17. package/dist/hooks.cjs.map +1 -1
  18. package/dist/hooks.d.cts +76 -76
  19. package/dist/hooks.d.ts +76 -76
  20. package/dist/hooks.mjs +36 -32
  21. package/dist/hooks.mjs.map +1 -1
  22. package/dist/index.cjs +88 -593
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +88 -88
  25. package/dist/index.d.ts +88 -88
  26. package/dist/index.mjs +88 -593
  27. package/dist/index.mjs.map +1 -1
  28. package/package.json +2 -2
  29. package/src/_api/generated/cfg_accounts/accounts/models.ts +34 -34
  30. package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +41 -41
  31. package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +18 -18
  32. package/src/_api/generated/cfg_accounts/client.ts +39 -42
  33. package/src/_api/generated/cfg_centrifugo/CLAUDE.md +2 -27
  34. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/index.ts +0 -3
  35. package/src/_api/generated/cfg_centrifugo/_utils/hooks/index.ts +0 -3
  36. package/src/_api/generated/cfg_centrifugo/_utils/schemas/index.ts +0 -34
  37. package/src/_api/generated/cfg_centrifugo/client.ts +39 -51
  38. package/src/_api/generated/cfg_centrifugo/index.ts +0 -21
  39. package/src/_api/generated/cfg_centrifugo/schema.json +4 -2039
  40. package/src/_api/generated/cfg_totp/client.ts +39 -42
  41. package/src/_api/generated/cfg_totp/totp__totp_management/models.ts +10 -10
  42. package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +12 -12
  43. package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +8 -8
  44. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +0 -344
  45. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +0 -326
  46. package/src/_api/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +0 -211
  47. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +0 -141
  48. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +0 -99
  49. package/src/_api/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +0 -82
  50. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts +0 -19
  51. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts +0 -19
  52. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts +0 -22
  53. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts +0 -20
  54. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts +0 -22
  55. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts +0 -20
  56. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts +0 -22
  57. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts +0 -23
  58. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts +0 -22
  59. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts +0 -22
  60. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts +0 -22
  61. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts +0 -20
  62. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts +0 -20
  63. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts +0 -30
  64. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts +0 -26
  65. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts +0 -19
  66. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts +0 -22
  67. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts +0 -20
  68. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts +0 -19
  69. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts +0 -22
  70. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts +0 -20
  71. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts +0 -20
  72. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts +0 -23
  73. package/src/_api/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts +0 -20
  74. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts +0 -21
  75. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts +0 -25
  76. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts +0 -20
  77. package/src/_api/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts +0 -21
  78. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts +0 -24
  79. package/src/_api/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts +0 -29
  80. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts +0 -22
  81. package/src/_api/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts +0 -24
  82. package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts +0 -23
  83. package/src/_api/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts +0 -22
  84. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts +0 -76
  85. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +0 -4
  86. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +0 -268
  87. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +0 -110
  88. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +0 -4
  89. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +0 -144
  90. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts +0 -48
  91. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +0 -4
  92. package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +0 -64
@@ -1,110 +0,0 @@
1
- // @ts-nocheck
2
- import * as Models from "./models";
3
-
4
-
5
- /**
6
- * API endpoints for Centrifugo Monitoring.
7
- */
8
- export class CentrifugoMonitoring {
9
- private client: any;
10
-
11
- constructor(client: any) {
12
- this.client = client;
13
- }
14
-
15
- async centrifugoMonitorChannelsRetrieve(hours?: number): Promise<Models.ChannelList>;
16
- async centrifugoMonitorChannelsRetrieve(params?: { hours?: number }): Promise<Models.ChannelList>;
17
-
18
- /**
19
- * Get channel statistics
20
- *
21
- * Returns statistics grouped by channel.
22
- */
23
- async centrifugoMonitorChannelsRetrieve(...args: any[]): Promise<Models.ChannelList> {
24
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
25
-
26
- let params;
27
- if (isParamsObject) {
28
- params = args[0];
29
- } else {
30
- params = { hours: args[0] };
31
- }
32
- const response = await this.client.request('GET', "/cfg/centrifugo/monitor/channels/", { params });
33
- return response;
34
- }
35
-
36
- /**
37
- * Get Centrifugo health status
38
- *
39
- * Returns the current health status of the Centrifugo client.
40
- */
41
- async centrifugoMonitorHealthRetrieve(): Promise<Models.CentrifugoHealthCheck> {
42
- const response = await this.client.request('GET', "/cfg/centrifugo/monitor/health/");
43
- return response;
44
- }
45
-
46
- async centrifugoMonitorOverviewRetrieve(hours?: number): Promise<Models.CentrifugoOverviewStats>;
47
- async centrifugoMonitorOverviewRetrieve(params?: { hours?: number }): Promise<Models.CentrifugoOverviewStats>;
48
-
49
- /**
50
- * Get overview statistics
51
- *
52
- * Returns overview statistics for Centrifugo publishes.
53
- */
54
- async centrifugoMonitorOverviewRetrieve(...args: any[]): Promise<Models.CentrifugoOverviewStats> {
55
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
56
-
57
- let params;
58
- if (isParamsObject) {
59
- params = args[0];
60
- } else {
61
- params = { hours: args[0] };
62
- }
63
- const response = await this.client.request('GET', "/cfg/centrifugo/monitor/overview/", { params });
64
- return response;
65
- }
66
-
67
- async centrifugoMonitorPublishesList(channel?: string, ordering?: string, page?: number, page_size?: number, search?: string, status?: string): Promise<Models.PaginatedPublishList>;
68
- async centrifugoMonitorPublishesList(params?: { channel?: string; ordering?: string; page?: number; page_size?: number; search?: string; status?: string }): Promise<Models.PaginatedPublishList>;
69
-
70
- /**
71
- * Get recent publishes
72
- *
73
- * Returns a paginated list of recent Centrifugo publishes with their
74
- * details. Uses standard DRF pagination.
75
- */
76
- async centrifugoMonitorPublishesList(...args: any[]): Promise<Models.PaginatedPublishList> {
77
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
78
-
79
- let params;
80
- if (isParamsObject) {
81
- params = args[0];
82
- } else {
83
- params = { channel: args[0], ordering: args[1], page: args[2], page_size: args[3], search: args[4], status: args[5] };
84
- }
85
- const response = await this.client.request('GET', "/cfg/centrifugo/monitor/publishes/", { params });
86
- return response;
87
- }
88
-
89
- async centrifugoMonitorTimelineRetrieve(hours?: number, interval?: string): Promise<Models.TimelineResponse>;
90
- async centrifugoMonitorTimelineRetrieve(params?: { hours?: number; interval?: string }): Promise<Models.TimelineResponse>;
91
-
92
- /**
93
- * Get publish timeline
94
- *
95
- * Returns hourly or daily breakdown of publish counts for charts.
96
- */
97
- async centrifugoMonitorTimelineRetrieve(...args: any[]): Promise<Models.TimelineResponse> {
98
- const isParamsObject = args.length === 1 && typeof args[0] === 'object' && args[0] !== null && !Array.isArray(args[0]);
99
-
100
- let params;
101
- if (isParamsObject) {
102
- params = args[0];
103
- } else {
104
- params = { hours: args[0], interval: args[1] };
105
- }
106
- const response = await this.client.request('GET', "/cfg/centrifugo/monitor/timeline/", { params });
107
- return response;
108
- }
109
-
110
- }
@@ -1,4 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- export * from "./client";
4
- export * as Models from "./models";
@@ -1,144 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- /**
4
- * Timeline response with hourly/daily breakdown for DRF.
5
- *
6
- * Response model (includes read-only fields).
7
- */
8
- export interface TimelineResponse {
9
- timeline: Array<TimelineItem>;
10
- period_hours: number;
11
- interval: string;
12
- }
13
-
14
- /**
15
- * Health check response.
16
- *
17
- * Response model (includes read-only fields).
18
- */
19
- export interface CentrifugoHealthCheck {
20
- /** Health status: healthy or unhealthy */
21
- status: string;
22
- /** Configured wrapper URL */
23
- wrapper_url: string;
24
- /** Whether API key is configured */
25
- has_api_key: boolean;
26
- /** Current timestamp */
27
- timestamp: string;
28
- }
29
-
30
- /**
31
- *
32
- * Response model (includes read-only fields).
33
- */
34
- export interface PaginatedPublishList {
35
- /** Total number of items across all pages */
36
- count: number;
37
- /** Current page number (1-based) */
38
- page: number;
39
- /** Total number of pages */
40
- pages: number;
41
- /** Number of items per page */
42
- page_size: number;
43
- /** Whether there is a next page */
44
- has_next: boolean;
45
- /** Whether there is a previous page */
46
- has_previous: boolean;
47
- /** Next page number (null if no next page) */
48
- next_page?: number | null;
49
- /** Previous page number (null if no previous page) */
50
- previous_page?: number | null;
51
- /** Array of items for current page */
52
- results: Array<Publish>;
53
- }
54
-
55
- /**
56
- * List of channel statistics.
57
- *
58
- * Response model (includes read-only fields).
59
- */
60
- export interface ChannelList {
61
- /** Channel statistics */
62
- channels: Array<ChannelStats>;
63
- /** Total number of channels */
64
- total_channels: number;
65
- }
66
-
67
- /**
68
- * Overview statistics for Centrifugo publishes.
69
- *
70
- * Response model (includes read-only fields).
71
- */
72
- export interface CentrifugoOverviewStats {
73
- /** Total publishes in period */
74
- total: number;
75
- /** Successful publishes */
76
- successful: number;
77
- /** Failed publishes */
78
- failed: number;
79
- /** Timeout publishes */
80
- timeout: number;
81
- /** Success rate percentage */
82
- success_rate: number;
83
- /** Average duration in milliseconds */
84
- avg_duration_ms: number;
85
- /** Average ACKs received */
86
- avg_acks_received: number;
87
- /** Statistics period in hours */
88
- period_hours: number;
89
- }
90
-
91
- /**
92
- * Single timeline data point for DRF.
93
- *
94
- * Response model (includes read-only fields).
95
- */
96
- export interface TimelineItem {
97
- timestamp: string;
98
- count: number;
99
- successful: number;
100
- failed: number;
101
- timeout: number;
102
- }
103
-
104
- /**
105
- * Single publish item for DRF pagination.
106
- *
107
- * Response model (includes read-only fields).
108
- */
109
- export interface Publish {
110
- message_id: string;
111
- channel: string;
112
- status: string;
113
- wait_for_ack: boolean;
114
- acks_received: number;
115
- acks_expected: number | null;
116
- duration_ms: number | null;
117
- created_at: string;
118
- completed_at: string | null;
119
- error_code: string | null;
120
- error_message: string | null;
121
- }
122
-
123
- /**
124
- * Statistics per channel.
125
- *
126
- * Response model (includes read-only fields).
127
- */
128
- export interface ChannelStats {
129
- /** Channel name */
130
- channel: string;
131
- /** Total publishes to this channel */
132
- total: number;
133
- /** Successful publishes */
134
- successful: number;
135
- /** Failed publishes */
136
- failed: number;
137
- /** Average duration */
138
- avg_duration_ms: number;
139
- /** Average ACKs received */
140
- avg_acks: number;
141
- /** Last activity timestamp (ISO format) */
142
- last_activity_at: string | null;
143
- }
144
-
@@ -1,48 +0,0 @@
1
- // @ts-nocheck
2
- import * as Models from "./models";
3
-
4
-
5
- /**
6
- * API endpoints for Centrifugo Testing.
7
- */
8
- export class CentrifugoTesting {
9
- private client: any;
10
-
11
- constructor(client: any) {
12
- this.client = client;
13
- }
14
-
15
- /**
16
- * Publish test message
17
- *
18
- * Publish test message to Centrifugo via wrapper with optional ACK
19
- * tracking.
20
- */
21
- async publishTestCreate(data: Models.PublishTestRequestRequest): Promise<Models.PublishTestResponse> {
22
- const response = await this.client.request('POST', "/cfg/centrifugo/testing/publish-test/", { body: data });
23
- return response;
24
- }
25
-
26
- /**
27
- * Publish with database logging
28
- *
29
- * Publish message using CentrifugoClient with database logging. This will
30
- * create CentrifugoLog records.
31
- */
32
- async publishWithLoggingCreate(data: Models.PublishTestRequestRequest): Promise<Models.PublishTestResponse> {
33
- const response = await this.client.request('POST', "/cfg/centrifugo/testing/publish-with-logging/", { body: data });
34
- return response;
35
- }
36
-
37
- /**
38
- * Send manual ACK
39
- *
40
- * Manually send ACK for a message to the wrapper. Pass message_id in
41
- * request body.
42
- */
43
- async sendAckCreate(data: Models.ManualAckRequestRequest): Promise<Models.ManualAckResponse> {
44
- const response = await this.client.request('POST', "/cfg/centrifugo/testing/send-ack/", { body: data });
45
- return response;
46
- }
47
-
48
- }
@@ -1,4 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- export * from "./client";
4
- export * as Models from "./models";
@@ -1,64 +0,0 @@
1
- // @ts-nocheck
2
- // Auto-generated by DjangoCFG - see CLAUDE.md
3
- /**
4
- * Response model for test message publishing.
5
- *
6
- * Response model (includes read-only fields).
7
- */
8
- export interface PublishTestResponse {
9
- /** Whether publish succeeded */
10
- success: boolean;
11
- /** Unique message ID */
12
- message_id: string;
13
- /** Target channel */
14
- channel: string;
15
- /** Number of ACKs received */
16
- acks_received?: number;
17
- /** Whether message was delivered */
18
- delivered?: boolean;
19
- /** Error message if failed */
20
- error?: string | null;
21
- }
22
-
23
- /**
24
- * Response model for manual ACK.
25
- *
26
- * Response model (includes read-only fields).
27
- */
28
- export interface ManualAckResponse {
29
- /** Whether ACK was sent successfully */
30
- success: boolean;
31
- /** Message ID that was acknowledged */
32
- message_id: string;
33
- /** Error message if failed */
34
- error?: string | null;
35
- }
36
-
37
- /**
38
- * Request model for manual ACK sending.
39
- *
40
- * Request model (no read-only fields).
41
- */
42
- export interface ManualAckRequestRequest {
43
- /** Message ID to acknowledge */
44
- message_id: string;
45
- /** Client ID sending the ACK */
46
- client_id: string;
47
- }
48
-
49
- /**
50
- * Request model for test message publishing.
51
- *
52
- * Request model (no read-only fields).
53
- */
54
- export interface PublishTestRequestRequest {
55
- /** Target channel name */
56
- channel: string;
57
- /** Message data (any JSON object) */
58
- data: Record<string, any>;
59
- /** Wait for client acknowledgment */
60
- wait_for_ack?: boolean;
61
- /** ACK timeout in seconds */
62
- ack_timeout?: number;
63
- }
64
-