@djangocfg/api 2.1.224 → 2.1.226

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/api",
3
- "version": "2.1.224",
3
+ "version": "2.1.226",
4
4
  "description": "Auto-generated TypeScript API client with React hooks, SWR integration, and Zod validation for Django REST Framework backends",
5
5
  "keywords": [
6
6
  "django",
@@ -84,7 +84,7 @@
84
84
  "devDependencies": {
85
85
  "@types/node": "^24.7.2",
86
86
  "@types/react": "^19.1.0",
87
- "@djangocfg/typescript-config": "^2.1.224",
87
+ "@djangocfg/typescript-config": "^2.1.226",
88
88
  "next": "^16.0.10",
89
89
  "react": "^19.1.0",
90
90
  "tsup": "^8.5.0",
@@ -20,13 +20,13 @@ export interface OTPRequestRequest {
20
20
  }
21
21
 
22
22
  /**
23
- * OTP request response.
23
+ * Error response for OTP operations.
24
24
  *
25
25
  * Response model (includes read-only fields).
26
26
  */
27
- export interface OTPRequestResponse {
28
- /** Success message */
29
- message: string;
27
+ export interface OTPErrorResponse {
28
+ /** Error message */
29
+ error: string;
30
30
  }
31
31
 
32
32
  /**
@@ -51,6 +51,16 @@ export interface OTPVerifyResponse {
51
51
  should_prompt_2fa?: boolean;
52
52
  }
53
53
 
54
+ /**
55
+ * OTP request response.
56
+ *
57
+ * Response model (includes read-only fields).
58
+ */
59
+ export interface OTPRequestResponse {
60
+ /** Success message */
61
+ message: string;
62
+ }
63
+
54
64
  /**
55
65
  * Serializer for OTP verification.
56
66
  *
@@ -69,16 +79,6 @@ export interface OTPVerifyRequest {
69
79
  source_url?: string;
70
80
  }
71
81
 
72
- /**
73
- * Error response for OTP operations.
74
- *
75
- * Response model (includes read-only fields).
76
- */
77
- export interface OTPErrorResponse {
78
- /** Error message */
79
- error: string;
80
- }
81
-
82
82
  /**
83
83
  * Serializer for user details.
84
84
  *
@@ -3,41 +3,15 @@
3
3
  import * as Enums from "../enums";
4
4
 
5
5
  /**
6
- * Error response for OAuth endpoints.
7
- *
8
- * Response model (includes read-only fields).
9
- */
10
- export interface OAuthError {
11
- /** Error code */
12
- error: string;
13
- /** Human-readable error description */
14
- error_description?: string;
15
- }
16
-
17
- /**
18
- * Request to complete OAuth flow (callback handler).
6
+ * Request to disconnect OAuth provider.
19
7
  *
20
8
  * Request model (no read-only fields).
21
9
  */
22
- export interface OAuthCallbackRequestRequest {
23
- /** Authorization code from OAuth provider callback */
24
- code: string;
25
- /** State token for CSRF verification (from authorize response) */
26
- state: string;
27
- /** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
28
- redirect_uri?: string;
29
- }
10
+ export interface OAuthDisconnectRequestRequest {
11
+ /** OAuth provider to disconnect
30
12
 
31
- /**
32
- * Request to start OAuth flow.
33
- *
34
- * Request model (no read-only fields).
35
- */
36
- export interface OAuthAuthorizeRequestRequest {
37
- /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
38
- redirect_uri?: string;
39
- /** Optional source URL for registration tracking */
40
- source_url?: string;
13
+ * `github` - GitHub */
14
+ provider: Enums.OAuthConnectionProvider;
41
15
  }
42
16
 
43
17
  /**
@@ -53,13 +27,15 @@ export interface OAuthAuthorizeResponse {
53
27
  }
54
28
 
55
29
  /**
56
- * Response with available OAuth providers.
30
+ * Request to start OAuth flow.
57
31
  *
58
- * Response model (includes read-only fields).
32
+ * Request model (no read-only fields).
59
33
  */
60
- export interface OAuthProvidersResponse {
61
- /** List of available OAuth providers */
62
- providers: Array<Record<string, any>>;
34
+ export interface OAuthAuthorizeRequestRequest {
35
+ /** URL to redirect after OAuth authorization. If not provided, uses config's site_url + callback_path */
36
+ redirect_uri?: string;
37
+ /** Optional source URL for registration tracking */
38
+ source_url?: string;
63
39
  }
64
40
 
65
41
  /**
@@ -90,15 +66,27 @@ export interface OAuthTokenResponse {
90
66
  }
91
67
 
92
68
  /**
93
- * Request to disconnect OAuth provider.
69
+ * Response with available OAuth providers.
94
70
  *
95
- * Request model (no read-only fields).
71
+ * Response model (includes read-only fields).
96
72
  */
97
- export interface OAuthDisconnectRequestRequest {
98
- /** OAuth provider to disconnect
73
+ export interface OAuthProvidersResponse {
74
+ /** List of available OAuth providers */
75
+ providers: Array<Record<string, any>>;
76
+ }
99
77
 
100
- * `github` - GitHub */
101
- provider: Enums.OAuthConnectionProvider;
78
+ /**
79
+ * Request to complete OAuth flow (callback handler).
80
+ *
81
+ * Request model (no read-only fields).
82
+ */
83
+ export interface OAuthCallbackRequestRequest {
84
+ /** Authorization code from OAuth provider callback */
85
+ code: string;
86
+ /** State token for CSRF verification (from authorize response) */
87
+ state: string;
88
+ /** Same redirect_uri used in authorize request. If not provided, uses config's site_url + callback_path */
89
+ redirect_uri?: string;
102
90
  }
103
91
 
104
92
  /**
@@ -125,3 +113,15 @@ export interface OAuthConnection {
125
113
  last_login_at: string;
126
114
  }
127
115
 
116
+ /**
117
+ * Error response for OAuth endpoints.
118
+ *
119
+ * Response model (includes read-only fields).
120
+ */
121
+ export interface OAuthError {
122
+ /** Error code */
123
+ error: string;
124
+ /** Human-readable error description */
125
+ error_description?: string;
126
+ }
127
+
@@ -1,5 +1,28 @@
1
1
  // @ts-nocheck
2
2
  // Auto-generated by DjangoCFG - see CLAUDE.md
3
+ /**
4
+ * Serializer for updating user profile.
5
+ *
6
+ * Request model (no read-only fields).
7
+ */
8
+ export interface UserProfileUpdateRequest {
9
+ first_name?: string;
10
+ last_name?: string;
11
+ company?: string;
12
+ phone?: string;
13
+ position?: string;
14
+ language?: string;
15
+ }
16
+
17
+ /**
18
+ *
19
+ * Request model (no read-only fields).
20
+ */
21
+ export interface CfgAccountsProfileAvatarCreateRequest {
22
+ /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
23
+ avatar: File | Blob;
24
+ }
25
+
3
26
  /**
4
27
  * Serializer for user details.
5
28
  *
@@ -36,7 +59,7 @@ export interface User {
36
59
  *
37
60
  * Request model (no read-only fields).
38
61
  */
39
- export interface UserProfileUpdateRequest {
62
+ export interface PatchedUserProfileUpdateRequest {
40
63
  first_name?: string;
41
64
  last_name?: string;
42
65
  company?: string;
@@ -57,29 +80,6 @@ export interface AccountDeleteResponse {
57
80
  message: string;
58
81
  }
59
82
 
60
- /**
61
- * Serializer for updating user profile.
62
- *
63
- * Request model (no read-only fields).
64
- */
65
- export interface PatchedUserProfileUpdateRequest {
66
- first_name?: string;
67
- last_name?: string;
68
- company?: string;
69
- phone?: string;
70
- position?: string;
71
- language?: string;
72
- }
73
-
74
- /**
75
- *
76
- * Request model (no read-only fields).
77
- */
78
- export interface CfgAccountsProfileAvatarCreateRequest {
79
- /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
80
- avatar: File | Blob;
81
- }
82
-
83
83
  /**
84
84
  * Nested serializer for Centrifugo WebSocket connection token.
85
85
  *
@@ -1,13 +1,23 @@
1
1
  // @ts-nocheck
2
2
  // Auto-generated by DjangoCFG - see CLAUDE.md
3
3
  /**
4
- * Request to get channel presence statistics.
4
+ * Channel history response.
5
5
  *
6
- * Request model (no read-only fields).
6
+ * Response model (includes read-only fields).
7
7
  */
8
- export interface CentrifugoPresenceStatsRequestRequest {
9
- /** Channel name */
10
- channel: string;
8
+ export interface CentrifugoHistoryResponse {
9
+ error?: CentrifugoError | null;
10
+ result?: CentrifugoHistoryResult | null;
11
+ }
12
+
13
+ /**
14
+ * Channel presence response.
15
+ *
16
+ * Response model (includes read-only fields).
17
+ */
18
+ export interface CentrifugoPresenceResponse {
19
+ error?: CentrifugoError | null;
20
+ result?: CentrifugoPresenceResult | null;
11
21
  }
12
22
 
13
23
  /**
@@ -20,6 +30,36 @@ export interface CentrifugoInfoResponse {
20
30
  result?: CentrifugoInfoResult | null;
21
31
  }
22
32
 
33
+ /**
34
+ * Request to get channel presence.
35
+ *
36
+ * Request model (no read-only fields).
37
+ */
38
+ export interface CentrifugoPresenceRequestRequest {
39
+ /** Channel name */
40
+ channel: string;
41
+ }
42
+
43
+ /**
44
+ * List of active channels response.
45
+ *
46
+ * Response model (includes read-only fields).
47
+ */
48
+ export interface CentrifugoChannelsResponse {
49
+ error?: CentrifugoError | null;
50
+ result?: CentrifugoChannelsResult | null;
51
+ }
52
+
53
+ /**
54
+ * Request to get channel presence statistics.
55
+ *
56
+ * Request model (no read-only fields).
57
+ */
58
+ export interface CentrifugoPresenceStatsRequestRequest {
59
+ /** Channel name */
60
+ channel: string;
61
+ }
62
+
23
63
  /**
24
64
  * Request to get channel history.
25
65
  *
@@ -45,16 +85,6 @@ export interface CentrifugoChannelsRequestRequest {
45
85
  pattern?: string | null;
46
86
  }
47
87
 
48
- /**
49
- * Channel presence response.
50
- *
51
- * Response model (includes read-only fields).
52
- */
53
- export interface CentrifugoPresenceResponse {
54
- error?: CentrifugoError | null;
55
- result?: CentrifugoPresenceResult | null;
56
- }
57
-
58
88
  /**
59
89
  * Channel presence stats response.
60
90
  *
@@ -66,33 +96,39 @@ export interface CentrifugoPresenceStatsResponse {
66
96
  }
67
97
 
68
98
  /**
69
- * Channel history response.
99
+ * History result wrapper.
70
100
  *
71
101
  * Response model (includes read-only fields).
72
102
  */
73
- export interface CentrifugoHistoryResponse {
74
- error?: CentrifugoError | null;
75
- result?: CentrifugoHistoryResult | null;
103
+ export interface CentrifugoHistoryResult {
104
+ /** List of publications */
105
+ publications: Array<CentrifugoPublication>;
106
+ /** Current stream epoch */
107
+ epoch: string;
108
+ /** Latest stream offset */
109
+ offset: number;
76
110
  }
77
111
 
78
112
  /**
79
- * List of active channels response.
113
+ * Centrifugo API error structure.
80
114
  *
81
115
  * Response model (includes read-only fields).
82
116
  */
83
- export interface CentrifugoChannelsResponse {
84
- error?: CentrifugoError | null;
85
- result?: CentrifugoChannelsResult | null;
117
+ export interface CentrifugoError {
118
+ /** Error code (0 = no error) */
119
+ code?: number;
120
+ /** Error message */
121
+ message?: string;
86
122
  }
87
123
 
88
124
  /**
89
- * Request to get channel presence.
125
+ * Presence result wrapper.
90
126
  *
91
- * Request model (no read-only fields).
127
+ * Response model (includes read-only fields).
92
128
  */
93
- export interface CentrifugoPresenceRequestRequest {
94
- /** Channel name */
95
- channel: string;
129
+ export interface CentrifugoPresenceResult {
130
+ /** Map of client IDs to client info */
131
+ presence: Record<string, CentrifugoClientInfo>;
96
132
  }
97
133
 
98
134
  /**
@@ -106,15 +142,13 @@ export interface CentrifugoInfoResult {
106
142
  }
107
143
 
108
144
  /**
109
- * Centrifugo API error structure.
145
+ * Channels result wrapper.
110
146
  *
111
147
  * Response model (includes read-only fields).
112
148
  */
113
- export interface CentrifugoError {
114
- /** Error code (0 = no error) */
115
- code?: number;
116
- /** Error message */
117
- message?: string;
149
+ export interface CentrifugoChannelsResult {
150
+ /** Map of channel names to channel info */
151
+ channels: Record<string, CentrifugoChannelInfo>;
118
152
  }
119
153
 
120
154
  /**
@@ -129,16 +163,6 @@ export interface CentrifugoStreamPosition {
129
163
  epoch: string;
130
164
  }
131
165
 
132
- /**
133
- * Presence result wrapper.
134
- *
135
- * Response model (includes read-only fields).
136
- */
137
- export interface CentrifugoPresenceResult {
138
- /** Map of client IDs to client info */
139
- presence: Record<string, CentrifugoClientInfo>;
140
- }
141
-
142
166
  /**
143
167
  * Presence stats result.
144
168
  *
@@ -152,27 +176,34 @@ export interface CentrifugoPresenceStatsResult {
152
176
  }
153
177
 
154
178
  /**
155
- * History result wrapper.
179
+ * Single publication (message) in channel history.
156
180
  *
157
181
  * Response model (includes read-only fields).
158
182
  */
159
- export interface CentrifugoHistoryResult {
160
- /** List of publications */
161
- publications: Array<CentrifugoPublication>;
162
- /** Current stream epoch */
163
- epoch: string;
164
- /** Latest stream offset */
183
+ export interface CentrifugoPublication {
184
+ /** Message payload */
185
+ data: Record<string, any>;
186
+ info?: CentrifugoClientInfo | null;
187
+ /** Message offset in channel stream */
165
188
  offset: number;
189
+ /** Optional message tags */
190
+ tags?: Record<string, any> | null;
166
191
  }
167
192
 
168
193
  /**
169
- * Channels result wrapper.
194
+ * Information about connected client.
170
195
  *
171
196
  * Response model (includes read-only fields).
172
197
  */
173
- export interface CentrifugoChannelsResult {
174
- /** Map of channel names to channel info */
175
- channels: Record<string, CentrifugoChannelInfo>;
198
+ export interface CentrifugoClientInfo {
199
+ /** User ID */
200
+ user: string;
201
+ /** Client UUID */
202
+ client: string;
203
+ /** Connection metadata */
204
+ conn_info?: Record<string, any> | null;
205
+ /** Channel-specific metadata */
206
+ chan_info?: Record<string, any> | null;
176
207
  }
177
208
 
178
209
  /**
@@ -201,37 +232,6 @@ export interface CentrifugoNodeInfo {
201
232
  process?: CentrifugoProcess | null;
202
233
  }
203
234
 
204
- /**
205
- * Information about connected client.
206
- *
207
- * Response model (includes read-only fields).
208
- */
209
- export interface CentrifugoClientInfo {
210
- /** User ID */
211
- user: string;
212
- /** Client UUID */
213
- client: string;
214
- /** Connection metadata */
215
- conn_info?: Record<string, any> | null;
216
- /** Channel-specific metadata */
217
- chan_info?: Record<string, any> | null;
218
- }
219
-
220
- /**
221
- * Single publication (message) in channel history.
222
- *
223
- * Response model (includes read-only fields).
224
- */
225
- export interface CentrifugoPublication {
226
- /** Message payload */
227
- data: Record<string, any>;
228
- info?: CentrifugoClientInfo | null;
229
- /** Message offset in channel stream */
230
- offset: number;
231
- /** Optional message tags */
232
- tags?: Record<string, any> | null;
233
- }
234
-
235
235
  /**
236
236
  * Information about a single channel.
237
237
  *
@@ -1,5 +1,16 @@
1
1
  // @ts-nocheck
2
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
+
3
14
  /**
4
15
  *
5
16
  * Response model (includes read-only fields).
@@ -26,14 +37,15 @@ export interface PaginatedPublishList {
26
37
  }
27
38
 
28
39
  /**
29
- * Timeline response with hourly/daily breakdown for DRF.
40
+ * List of channel statistics.
30
41
  *
31
42
  * Response model (includes read-only fields).
32
43
  */
33
- export interface TimelineResponse {
34
- timeline: Array<TimelineItem>;
35
- period_hours: number;
36
- interval: string;
44
+ export interface ChannelList {
45
+ /** Channel statistics */
46
+ channels: Array<ChannelStats>;
47
+ /** Total number of channels */
48
+ total_channels: number;
37
49
  }
38
50
 
39
51
  /**
@@ -52,18 +64,6 @@ export interface CentrifugoHealthCheck {
52
64
  timestamp: string;
53
65
  }
54
66
 
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
67
  /**
68
68
  * Overview statistics for Centrifugo publishes.
69
69
  *
@@ -88,6 +88,19 @@ export interface CentrifugoOverviewStats {
88
88
  period_hours: number;
89
89
  }
90
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
+
91
104
  /**
92
105
  * Single publish item for DRF pagination.
93
106
  *
@@ -107,19 +120,6 @@ export interface Publish {
107
120
  error_message: string | null;
108
121
  }
109
122
 
110
- /**
111
- * Single timeline data point for DRF.
112
- *
113
- * Response model (includes read-only fields).
114
- */
115
- export interface TimelineItem {
116
- timestamp: string;
117
- count: number;
118
- successful: number;
119
- failed: number;
120
- timeout: number;
121
- }
122
-
123
123
  /**
124
124
  * Statistics per channel.
125
125
  *
@@ -1,35 +1,51 @@
1
1
  // @ts-nocheck
2
2
  // Auto-generated by DjangoCFG - see CLAUDE.md
3
3
  /**
4
- * Response model for test message publishing.
4
+ * Response model for manual ACK.
5
5
  *
6
6
  * Response model (includes read-only fields).
7
7
  */
8
- export interface PublishTestResponse {
9
- /** Whether publish succeeded */
8
+ export interface ManualAckResponse {
9
+ /** Whether ACK was sent successfully */
10
10
  success: boolean;
11
- /** Unique message ID */
11
+ /** Message ID that was acknowledged */
12
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
13
  /** Error message if failed */
20
14
  error?: string | null;
21
15
  }
22
16
 
23
17
  /**
24
- * Response model for manual ACK.
18
+ * Request model for test message publishing.
19
+ *
20
+ * Request model (no read-only fields).
21
+ */
22
+ export interface PublishTestRequestRequest {
23
+ /** Target channel name */
24
+ channel: string;
25
+ /** Message data (any JSON object) */
26
+ data: Record<string, any>;
27
+ /** Wait for client acknowledgment */
28
+ wait_for_ack?: boolean;
29
+ /** ACK timeout in seconds */
30
+ ack_timeout?: number;
31
+ }
32
+
33
+ /**
34
+ * Response model for test message publishing.
25
35
  *
26
36
  * Response model (includes read-only fields).
27
37
  */
28
- export interface ManualAckResponse {
29
- /** Whether ACK was sent successfully */
38
+ export interface PublishTestResponse {
39
+ /** Whether publish succeeded */
30
40
  success: boolean;
31
- /** Message ID that was acknowledged */
41
+ /** Unique message ID */
32
42
  message_id: string;
43
+ /** Target channel */
44
+ channel: string;
45
+ /** Number of ACKs received */
46
+ acks_received?: number;
47
+ /** Whether message was delivered */
48
+ delivered?: boolean;
33
49
  /** Error message if failed */
34
50
  error?: string | null;
35
51
  }
@@ -46,19 +62,3 @@ export interface ManualAckRequestRequest {
46
62
  client_id: string;
47
63
  }
48
64
 
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
-