@djangocfg/api 2.1.228 → 2.1.229

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/index.d.cts CHANGED
@@ -3,17 +3,17 @@ import { z, ZodError } from 'zod';
3
3
 
4
4
  /**
5
5
  *
6
- * Request model (no read-only fields).
6
+ * Response model (includes read-only fields).
7
7
  */
8
- interface TokenRefreshRequest$1 {
8
+ interface TokenRefresh$1 {
9
+ access: string;
9
10
  refresh: string;
10
11
  }
11
12
  /**
12
13
  *
13
- * Response model (includes read-only fields).
14
+ * Request model (no read-only fields).
14
15
  */
15
- interface TokenRefresh$1 {
16
- access: string;
16
+ interface TokenRefreshRequest$1 {
17
17
  refresh: string;
18
18
  }
19
19
 
@@ -48,24 +48,15 @@ declare namespace enums {
48
48
  }
49
49
 
50
50
  /**
51
- * Response with available OAuth providers.
51
+ * Response with OAuth authorization URL.
52
52
  *
53
53
  * Response model (includes read-only fields).
54
54
  */
55
- interface OAuthProvidersResponse$1 {
56
- /** List of available OAuth providers */
57
- providers: Array<Record<string, any>>;
58
- }
59
- /**
60
- * Request to disconnect OAuth provider.
61
- *
62
- * Request model (no read-only fields).
63
- */
64
- interface OAuthDisconnectRequestRequest$1 {
65
- /** OAuth provider to disconnect
66
-
67
- * `github` - GitHub */
68
- provider: OAuthConnectionProvider;
55
+ interface OAuthAuthorizeResponse$1 {
56
+ /** Full URL to redirect user to OAuth provider */
57
+ authorization_url: string;
58
+ /** State token for CSRF protection. Store this and verify on callback. */
59
+ state: string;
69
60
  }
70
61
  /**
71
62
  * Error response for OAuth endpoints.
@@ -78,6 +69,32 @@ interface OAuthError$1 {
78
69
  /** Human-readable error description */
79
70
  error_description?: string;
80
71
  }
72
+ /**
73
+ * Response with JWT tokens after OAuth authentication. When 2FA is required: -
74
+ * requires_2fa: True - session_id: UUID of 2FA verification session -
75
+ * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
76
+ * session_id: null - access/refresh/user: populated
77
+ *
78
+ * Response model (includes read-only fields).
79
+ */
80
+ interface OAuthTokenResponse$1 {
81
+ /** True if 2FA verification is required */
82
+ requires_2fa?: boolean;
83
+ /** 2FA session ID (only when requires_2fa=True) */
84
+ session_id?: string | null;
85
+ /** JWT access token (null when requires_2fa=True) */
86
+ access?: string | null;
87
+ /** JWT refresh token (null when requires_2fa=True) */
88
+ refresh?: string | null;
89
+ /** Authenticated user info (null when requires_2fa=True) */
90
+ user?: Record<string, any> | null;
91
+ /** True if a new user was created during this OAuth flow */
92
+ is_new_user: boolean;
93
+ /** True if a new OAuth connection was created */
94
+ is_new_connection: boolean;
95
+ /** True if user should be prompted to enable 2FA */
96
+ should_prompt_2fa?: boolean;
97
+ }
81
98
  /**
82
99
  * Request to start OAuth flow.
83
100
  *
@@ -103,41 +120,24 @@ interface OAuthCallbackRequestRequest$1 {
103
120
  redirect_uri?: string;
104
121
  }
105
122
  /**
106
- * Response with OAuth authorization URL.
123
+ * Request to disconnect OAuth provider.
107
124
  *
108
- * Response model (includes read-only fields).
125
+ * Request model (no read-only fields).
109
126
  */
110
- interface OAuthAuthorizeResponse$1 {
111
- /** Full URL to redirect user to OAuth provider */
112
- authorization_url: string;
113
- /** State token for CSRF protection. Store this and verify on callback. */
114
- state: string;
127
+ interface OAuthDisconnectRequestRequest$1 {
128
+ /** OAuth provider to disconnect
129
+
130
+ * `github` - GitHub */
131
+ provider: OAuthConnectionProvider;
115
132
  }
116
133
  /**
117
- * Response with JWT tokens after OAuth authentication. When 2FA is required: -
118
- * requires_2fa: True - session_id: UUID of 2FA verification session -
119
- * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
120
- * session_id: null - access/refresh/user: populated
134
+ * Response with available OAuth providers.
121
135
  *
122
136
  * Response model (includes read-only fields).
123
137
  */
124
- interface OAuthTokenResponse$1 {
125
- /** True if 2FA verification is required */
126
- requires_2fa?: boolean;
127
- /** 2FA session ID (only when requires_2fa=True) */
128
- session_id?: string | null;
129
- /** JWT access token (null when requires_2fa=True) */
130
- access?: string | null;
131
- /** JWT refresh token (null when requires_2fa=True) */
132
- refresh?: string | null;
133
- /** Authenticated user info (null when requires_2fa=True) */
134
- user?: Record<string, any> | null;
135
- /** True if a new user was created during this OAuth flow */
136
- is_new_user: boolean;
137
- /** True if a new OAuth connection was created */
138
- is_new_connection: boolean;
139
- /** True if user should be prompted to enable 2FA */
140
- should_prompt_2fa?: boolean;
138
+ interface OAuthProvidersResponse$1 {
139
+ /** List of available OAuth providers */
140
+ providers: Array<Record<string, any>>;
141
141
  }
142
142
  /**
143
143
  * Serializer for OAuth connection info (user-facing).
@@ -207,23 +207,12 @@ declare class Oauth {
207
207
  accountsOauthProvidersRetrieve(): Promise<OAuthProvidersResponse$1>;
208
208
  }
209
209
 
210
- /**
211
- * Response serializer for account deletion.
212
- *
213
- * Response model (includes read-only fields).
214
- */
215
- interface AccountDeleteResponse$1 {
216
- /** Whether the account was successfully deleted */
217
- success: boolean;
218
- /** Human-readable message about the deletion */
219
- message: string;
220
- }
221
210
  /**
222
211
  * Serializer for updating user profile.
223
212
  *
224
213
  * Request model (no read-only fields).
225
214
  */
226
- interface UserProfileUpdateRequest$1 {
215
+ interface PatchedUserProfileUpdateRequest$1 {
227
216
  first_name?: string;
228
217
  last_name?: string;
229
218
  company?: string;
@@ -231,12 +220,20 @@ interface UserProfileUpdateRequest$1 {
231
220
  position?: string;
232
221
  language?: string;
233
222
  }
223
+ /**
224
+ *
225
+ * Request model (no read-only fields).
226
+ */
227
+ interface CfgAccountsProfileAvatarCreateRequest$1 {
228
+ /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
229
+ avatar: File | Blob;
230
+ }
234
231
  /**
235
232
  * Serializer for updating user profile.
236
233
  *
237
234
  * Request model (no read-only fields).
238
235
  */
239
- interface PatchedUserProfileUpdateRequest$1 {
236
+ interface UserProfileUpdateRequest$1 {
240
237
  first_name?: string;
241
238
  last_name?: string;
242
239
  company?: string;
@@ -275,12 +272,15 @@ interface User$2 {
275
272
  centrifugo: CentrifugoToken$2 | null;
276
273
  }
277
274
  /**
275
+ * Response serializer for account deletion.
278
276
  *
279
- * Request model (no read-only fields).
277
+ * Response model (includes read-only fields).
280
278
  */
281
- interface CfgAccountsProfileAvatarCreateRequest$1 {
282
- /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
283
- avatar: File | Blob;
279
+ interface AccountDeleteResponse$1 {
280
+ /** Whether the account was successfully deleted */
281
+ success: boolean;
282
+ /** Human-readable message about the deletion */
283
+ message: string;
284
284
  }
285
285
  /**
286
286
  * Nested serializer for Centrifugo WebSocket connection token.
@@ -370,6 +370,27 @@ interface OTPRequestRequest$1 {
370
370
  /** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
371
371
  source_url?: string;
372
372
  }
373
+ /**
374
+ * Serializer for OTP verification.
375
+ *
376
+ * Request model (no read-only fields).
377
+ */
378
+ interface OTPVerifyRequest$1 {
379
+ /** Email address used for OTP request */
380
+ identifier: string;
381
+ otp: string;
382
+ /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
383
+ source_url?: string;
384
+ }
385
+ /**
386
+ * OTP request response.
387
+ *
388
+ * Response model (includes read-only fields).
389
+ */
390
+ interface OTPRequestResponse$1 {
391
+ /** Success message */
392
+ message: string;
393
+ }
373
394
  /**
374
395
  * Typed error response for OTP operations. error_code values: -
375
396
  * invalid_identifier — malformed email - cooldown — too soon after last
@@ -390,15 +411,6 @@ interface OTPErrorResponse$1 {
390
411
  /** Seconds until the client may retry (present only for rate-limit errors) */
391
412
  retry_after?: number | null;
392
413
  }
393
- /**
394
- * OTP request response.
395
- *
396
- * Response model (includes read-only fields).
397
- */
398
- interface OTPRequestResponse$1 {
399
- /** Success message */
400
- message: string;
401
- }
402
414
  /**
403
415
  * OTP verification response. When 2FA is required: - requires_2fa: True -
404
416
  * session_id: UUID of 2FA verification session - refresh/access/user: null
@@ -420,18 +432,6 @@ interface OTPVerifyResponse$1 {
420
432
  /** Whether user should be prompted to enable 2FA */
421
433
  should_prompt_2fa?: boolean;
422
434
  }
423
- /**
424
- * Serializer for OTP verification.
425
- *
426
- * Request model (no read-only fields).
427
- */
428
- interface OTPVerifyRequest$1 {
429
- /** Email address used for OTP request */
430
- identifier: string;
431
- otp: string;
432
- /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
433
- source_url?: string;
434
- }
435
435
  /**
436
436
  * Serializer for user details.
437
437
  *
package/dist/index.d.ts CHANGED
@@ -3,17 +3,17 @@ import { z, ZodError } from 'zod';
3
3
 
4
4
  /**
5
5
  *
6
- * Request model (no read-only fields).
6
+ * Response model (includes read-only fields).
7
7
  */
8
- interface TokenRefreshRequest$1 {
8
+ interface TokenRefresh$1 {
9
+ access: string;
9
10
  refresh: string;
10
11
  }
11
12
  /**
12
13
  *
13
- * Response model (includes read-only fields).
14
+ * Request model (no read-only fields).
14
15
  */
15
- interface TokenRefresh$1 {
16
- access: string;
16
+ interface TokenRefreshRequest$1 {
17
17
  refresh: string;
18
18
  }
19
19
 
@@ -48,24 +48,15 @@ declare namespace enums {
48
48
  }
49
49
 
50
50
  /**
51
- * Response with available OAuth providers.
51
+ * Response with OAuth authorization URL.
52
52
  *
53
53
  * Response model (includes read-only fields).
54
54
  */
55
- interface OAuthProvidersResponse$1 {
56
- /** List of available OAuth providers */
57
- providers: Array<Record<string, any>>;
58
- }
59
- /**
60
- * Request to disconnect OAuth provider.
61
- *
62
- * Request model (no read-only fields).
63
- */
64
- interface OAuthDisconnectRequestRequest$1 {
65
- /** OAuth provider to disconnect
66
-
67
- * `github` - GitHub */
68
- provider: OAuthConnectionProvider;
55
+ interface OAuthAuthorizeResponse$1 {
56
+ /** Full URL to redirect user to OAuth provider */
57
+ authorization_url: string;
58
+ /** State token for CSRF protection. Store this and verify on callback. */
59
+ state: string;
69
60
  }
70
61
  /**
71
62
  * Error response for OAuth endpoints.
@@ -78,6 +69,32 @@ interface OAuthError$1 {
78
69
  /** Human-readable error description */
79
70
  error_description?: string;
80
71
  }
72
+ /**
73
+ * Response with JWT tokens after OAuth authentication. When 2FA is required: -
74
+ * requires_2fa: True - session_id: UUID of 2FA verification session -
75
+ * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
76
+ * session_id: null - access/refresh/user: populated
77
+ *
78
+ * Response model (includes read-only fields).
79
+ */
80
+ interface OAuthTokenResponse$1 {
81
+ /** True if 2FA verification is required */
82
+ requires_2fa?: boolean;
83
+ /** 2FA session ID (only when requires_2fa=True) */
84
+ session_id?: string | null;
85
+ /** JWT access token (null when requires_2fa=True) */
86
+ access?: string | null;
87
+ /** JWT refresh token (null when requires_2fa=True) */
88
+ refresh?: string | null;
89
+ /** Authenticated user info (null when requires_2fa=True) */
90
+ user?: Record<string, any> | null;
91
+ /** True if a new user was created during this OAuth flow */
92
+ is_new_user: boolean;
93
+ /** True if a new OAuth connection was created */
94
+ is_new_connection: boolean;
95
+ /** True if user should be prompted to enable 2FA */
96
+ should_prompt_2fa?: boolean;
97
+ }
81
98
  /**
82
99
  * Request to start OAuth flow.
83
100
  *
@@ -103,41 +120,24 @@ interface OAuthCallbackRequestRequest$1 {
103
120
  redirect_uri?: string;
104
121
  }
105
122
  /**
106
- * Response with OAuth authorization URL.
123
+ * Request to disconnect OAuth provider.
107
124
  *
108
- * Response model (includes read-only fields).
125
+ * Request model (no read-only fields).
109
126
  */
110
- interface OAuthAuthorizeResponse$1 {
111
- /** Full URL to redirect user to OAuth provider */
112
- authorization_url: string;
113
- /** State token for CSRF protection. Store this and verify on callback. */
114
- state: string;
127
+ interface OAuthDisconnectRequestRequest$1 {
128
+ /** OAuth provider to disconnect
129
+
130
+ * `github` - GitHub */
131
+ provider: OAuthConnectionProvider;
115
132
  }
116
133
  /**
117
- * Response with JWT tokens after OAuth authentication. When 2FA is required: -
118
- * requires_2fa: True - session_id: UUID of 2FA verification session -
119
- * access/refresh/user: null When 2FA is not required: - requires_2fa: False -
120
- * session_id: null - access/refresh/user: populated
134
+ * Response with available OAuth providers.
121
135
  *
122
136
  * Response model (includes read-only fields).
123
137
  */
124
- interface OAuthTokenResponse$1 {
125
- /** True if 2FA verification is required */
126
- requires_2fa?: boolean;
127
- /** 2FA session ID (only when requires_2fa=True) */
128
- session_id?: string | null;
129
- /** JWT access token (null when requires_2fa=True) */
130
- access?: string | null;
131
- /** JWT refresh token (null when requires_2fa=True) */
132
- refresh?: string | null;
133
- /** Authenticated user info (null when requires_2fa=True) */
134
- user?: Record<string, any> | null;
135
- /** True if a new user was created during this OAuth flow */
136
- is_new_user: boolean;
137
- /** True if a new OAuth connection was created */
138
- is_new_connection: boolean;
139
- /** True if user should be prompted to enable 2FA */
140
- should_prompt_2fa?: boolean;
138
+ interface OAuthProvidersResponse$1 {
139
+ /** List of available OAuth providers */
140
+ providers: Array<Record<string, any>>;
141
141
  }
142
142
  /**
143
143
  * Serializer for OAuth connection info (user-facing).
@@ -207,23 +207,12 @@ declare class Oauth {
207
207
  accountsOauthProvidersRetrieve(): Promise<OAuthProvidersResponse$1>;
208
208
  }
209
209
 
210
- /**
211
- * Response serializer for account deletion.
212
- *
213
- * Response model (includes read-only fields).
214
- */
215
- interface AccountDeleteResponse$1 {
216
- /** Whether the account was successfully deleted */
217
- success: boolean;
218
- /** Human-readable message about the deletion */
219
- message: string;
220
- }
221
210
  /**
222
211
  * Serializer for updating user profile.
223
212
  *
224
213
  * Request model (no read-only fields).
225
214
  */
226
- interface UserProfileUpdateRequest$1 {
215
+ interface PatchedUserProfileUpdateRequest$1 {
227
216
  first_name?: string;
228
217
  last_name?: string;
229
218
  company?: string;
@@ -231,12 +220,20 @@ interface UserProfileUpdateRequest$1 {
231
220
  position?: string;
232
221
  language?: string;
233
222
  }
223
+ /**
224
+ *
225
+ * Request model (no read-only fields).
226
+ */
227
+ interface CfgAccountsProfileAvatarCreateRequest$1 {
228
+ /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
229
+ avatar: File | Blob;
230
+ }
234
231
  /**
235
232
  * Serializer for updating user profile.
236
233
  *
237
234
  * Request model (no read-only fields).
238
235
  */
239
- interface PatchedUserProfileUpdateRequest$1 {
236
+ interface UserProfileUpdateRequest$1 {
240
237
  first_name?: string;
241
238
  last_name?: string;
242
239
  company?: string;
@@ -275,12 +272,15 @@ interface User$2 {
275
272
  centrifugo: CentrifugoToken$2 | null;
276
273
  }
277
274
  /**
275
+ * Response serializer for account deletion.
278
276
  *
279
- * Request model (no read-only fields).
277
+ * Response model (includes read-only fields).
280
278
  */
281
- interface CfgAccountsProfileAvatarCreateRequest$1 {
282
- /** Avatar image file (JPEG, PNG, GIF, WebP, max 5MB) */
283
- avatar: File | Blob;
279
+ interface AccountDeleteResponse$1 {
280
+ /** Whether the account was successfully deleted */
281
+ success: boolean;
282
+ /** Human-readable message about the deletion */
283
+ message: string;
284
284
  }
285
285
  /**
286
286
  * Nested serializer for Centrifugo WebSocket connection token.
@@ -370,6 +370,27 @@ interface OTPRequestRequest$1 {
370
370
  /** Source URL for tracking registration (e.g., https://my.djangocfg.com) */
371
371
  source_url?: string;
372
372
  }
373
+ /**
374
+ * Serializer for OTP verification.
375
+ *
376
+ * Request model (no read-only fields).
377
+ */
378
+ interface OTPVerifyRequest$1 {
379
+ /** Email address used for OTP request */
380
+ identifier: string;
381
+ otp: string;
382
+ /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
383
+ source_url?: string;
384
+ }
385
+ /**
386
+ * OTP request response.
387
+ *
388
+ * Response model (includes read-only fields).
389
+ */
390
+ interface OTPRequestResponse$1 {
391
+ /** Success message */
392
+ message: string;
393
+ }
373
394
  /**
374
395
  * Typed error response for OTP operations. error_code values: -
375
396
  * invalid_identifier — malformed email - cooldown — too soon after last
@@ -390,15 +411,6 @@ interface OTPErrorResponse$1 {
390
411
  /** Seconds until the client may retry (present only for rate-limit errors) */
391
412
  retry_after?: number | null;
392
413
  }
393
- /**
394
- * OTP request response.
395
- *
396
- * Response model (includes read-only fields).
397
- */
398
- interface OTPRequestResponse$1 {
399
- /** Success message */
400
- message: string;
401
- }
402
414
  /**
403
415
  * OTP verification response. When 2FA is required: - requires_2fa: True -
404
416
  * session_id: UUID of 2FA verification session - refresh/access/user: null
@@ -420,18 +432,6 @@ interface OTPVerifyResponse$1 {
420
432
  /** Whether user should be prompted to enable 2FA */
421
433
  should_prompt_2fa?: boolean;
422
434
  }
423
- /**
424
- * Serializer for OTP verification.
425
- *
426
- * Request model (no read-only fields).
427
- */
428
- interface OTPVerifyRequest$1 {
429
- /** Email address used for OTP request */
430
- identifier: string;
431
- otp: string;
432
- /** Source URL for tracking login (e.g., https://my.djangocfg.com) */
433
- source_url?: string;
434
- }
435
435
  /**
436
436
  * Serializer for user details.
437
437
  *