@djangocfg/api 2.1.540 → 2.1.542

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 (53) hide show
  1. package/README.md +1 -2
  2. package/dist/auth.cjs +99 -111
  3. package/dist/auth.cjs.map +1 -1
  4. package/dist/auth.d.cts +0 -22
  5. package/dist/auth.d.ts +0 -22
  6. package/dist/auth.mjs +99 -111
  7. package/dist/auth.mjs.map +1 -1
  8. package/dist/clients.cjs +3 -99
  9. package/dist/clients.cjs.map +1 -1
  10. package/dist/clients.d.cts +4 -136
  11. package/dist/clients.d.ts +4 -136
  12. package/dist/clients.mjs +3 -99
  13. package/dist/clients.mjs.map +1 -1
  14. package/dist/hooks.cjs.map +1 -1
  15. package/dist/hooks.d.cts +2 -4
  16. package/dist/hooks.d.ts +2 -4
  17. package/dist/hooks.mjs.map +1 -1
  18. package/dist/index.cjs +3 -100
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +8 -338
  21. package/dist/index.d.ts +8 -338
  22. package/dist/index.mjs +3 -100
  23. package/dist/index.mjs.map +1 -1
  24. package/package.json +4 -4
  25. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRetrieve.ts +8 -2
  26. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +8 -2
  27. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +8 -2
  28. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpConsentPolicyRetrieve.ts +8 -2
  29. package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +8 -2
  30. package/src/_api/generated/_cfg_accounts/openapi.json +0 -45
  31. package/src/_api/generated/_cfg_accounts/schemas/User.ts +0 -2
  32. package/src/_api/generated/_cfg_accounts/schemas/index.ts +0 -1
  33. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +8 -2
  34. package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +8 -2
  35. package/src/_api/generated/index.ts +1 -5
  36. package/src/_api/generated/openapi.json +0 -135
  37. package/src/_api/generated/sdk.gen.ts +1 -20
  38. package/src/_api/generated/types.gen.ts +0 -79
  39. package/src/_api/index.ts +1 -1
  40. package/src/clients.ts +2 -4
  41. package/src/index.ts +0 -2
  42. package/src/log-control.ts +1 -1
  43. package/src/server.ts +0 -4
  44. package/src/_api/generated/_cfg_accounts/schemas/CentrifugoToken.ts +0 -14
  45. package/src/_api/generated/_cfg_centrifugo/api.ts +0 -87
  46. package/src/_api/generated/_cfg_centrifugo/hooks/index.ts +0 -4
  47. package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +0 -74
  48. package/src/_api/generated/_cfg_centrifugo/index.ts +0 -29
  49. package/src/_api/generated/_cfg_centrifugo/openapi.json +0 -136
  50. package/src/_api/generated/_cfg_centrifugo/schemas/ConnectionTokenResponse.ts +0 -14
  51. package/src/_api/generated/_cfg_centrifugo/schemas/index.ts +0 -4
  52. package/src/_api/generated/_cfg_centrifugo/sdk.gen.ts +0 -5
  53. package/src/_api/generated/_cfg_centrifugo/types.gen.ts +0 -5
package/dist/auth.d.cts CHANGED
@@ -24,27 +24,6 @@ type SessionSnapshot = {
24
24
  accessExpiresAt: number | null;
25
25
  };
26
26
 
27
- /**
28
- * Nested serializer for Centrifugo WebSocket connection token.
29
- */
30
- type CentrifugoToken = {
31
- /**
32
- * JWT token for Centrifugo WebSocket connection
33
- */
34
- token: string;
35
- /**
36
- * Centrifugo WebSocket URL
37
- */
38
- centrifugo_url: string;
39
- /**
40
- * Token expiration time (ISO 8601)
41
- */
42
- expires_at: string;
43
- /**
44
- * List of allowed channels for this user
45
- */
46
- channels: Array<string>;
47
- };
48
27
  /**
49
28
  * Serializer for updating user profile.
50
29
  */
@@ -211,7 +190,6 @@ type User = {
211
190
  readonly date_joined: string;
212
191
  readonly last_login: string | null;
213
192
  readonly unanswered_messages_count: number;
214
- readonly centrifugo: CentrifugoToken | null;
215
193
  readonly api_key: string | null;
216
194
  };
217
195
  /**
package/dist/auth.d.ts CHANGED
@@ -24,27 +24,6 @@ type SessionSnapshot = {
24
24
  accessExpiresAt: number | null;
25
25
  };
26
26
 
27
- /**
28
- * Nested serializer for Centrifugo WebSocket connection token.
29
- */
30
- type CentrifugoToken = {
31
- /**
32
- * JWT token for Centrifugo WebSocket connection
33
- */
34
- token: string;
35
- /**
36
- * Centrifugo WebSocket URL
37
- */
38
- centrifugo_url: string;
39
- /**
40
- * Token expiration time (ISO 8601)
41
- */
42
- expires_at: string;
43
- /**
44
- * List of allowed channels for this user
45
- */
46
- channels: Array<string>;
47
- };
48
27
  /**
49
28
  * Serializer for updating user profile.
50
29
  */
@@ -211,7 +190,6 @@ type User = {
211
190
  readonly date_joined: string;
212
191
  readonly last_login: string | null;
213
192
  readonly unanswered_messages_count: number;
214
- readonly centrifugo: CentrifugoToken | null;
215
193
  readonly api_key: string | null;
216
194
  };
217
195
  /**
package/dist/auth.mjs CHANGED
@@ -3982,53 +3982,41 @@ __name(useCfgAccountsOtpRequestCreate, "useCfgAccountsOtpRequestCreate");
3982
3982
  import useSWRMutation8 from "swr/mutation";
3983
3983
 
3984
3984
  // src/_api/generated/_cfg_accounts/schemas/OTPVerifyResponse.ts
3985
- import { z as z19 } from "zod";
3986
-
3987
- // src/_api/generated/_cfg_accounts/schemas/User.ts
3988
3985
  import { z as z18 } from "zod";
3989
3986
 
3990
- // src/_api/generated/_cfg_accounts/schemas/CentrifugoToken.ts
3991
- import { z as z17 } from "zod";
3992
- var CentrifugoTokenSchema = z17.object({
3993
- token: z17.string(),
3994
- centrifugo_url: z17.string(),
3995
- expires_at: z17.string().datetime({ offset: true }),
3996
- channels: z17.array(z17.string())
3997
- });
3998
-
3999
3987
  // src/_api/generated/_cfg_accounts/schemas/User.ts
4000
- var UserSchema = z18.object({
4001
- id: z18.number().int(),
4002
- email: z18.email(),
4003
- first_name: z18.string().max(50).nullable().optional(),
4004
- last_name: z18.string().max(50).nullable().optional(),
4005
- full_name: z18.string(),
4006
- initials: z18.string(),
4007
- display_username: z18.string(),
4008
- company: z18.string().max(100).nullable().optional(),
4009
- phone: z18.string().max(20).nullable().optional(),
4010
- position: z18.string().max(100).nullable().optional(),
4011
- language: z18.string().max(10).nullable().optional(),
4012
- timezone: z18.string().max(64).nullable().optional(),
4013
- avatar: z18.string().nullable(),
4014
- is_staff: z18.boolean(),
4015
- is_superuser: z18.boolean(),
4016
- date_joined: z18.string().datetime({ offset: true }),
4017
- last_login: z18.string().datetime({ offset: true }).nullable(),
4018
- unanswered_messages_count: z18.number().int().default(0),
4019
- centrifugo: CentrifugoTokenSchema.nullable(),
4020
- api_key: z18.string().nullable()
3988
+ import { z as z17 } from "zod";
3989
+ var UserSchema = z17.object({
3990
+ id: z17.number().int(),
3991
+ email: z17.email(),
3992
+ first_name: z17.string().max(50).nullable().optional(),
3993
+ last_name: z17.string().max(50).nullable().optional(),
3994
+ full_name: z17.string(),
3995
+ initials: z17.string(),
3996
+ display_username: z17.string(),
3997
+ company: z17.string().max(100).nullable().optional(),
3998
+ phone: z17.string().max(20).nullable().optional(),
3999
+ position: z17.string().max(100).nullable().optional(),
4000
+ language: z17.string().max(10).nullable().optional(),
4001
+ timezone: z17.string().max(64).nullable().optional(),
4002
+ avatar: z17.string().nullable(),
4003
+ is_staff: z17.boolean(),
4004
+ is_superuser: z17.boolean(),
4005
+ date_joined: z17.string().datetime({ offset: true }),
4006
+ last_login: z17.string().datetime({ offset: true }).nullable(),
4007
+ unanswered_messages_count: z17.number().int().default(0),
4008
+ api_key: z17.string().nullable()
4021
4009
  });
4022
4010
 
4023
4011
  // src/_api/generated/_cfg_accounts/schemas/OTPVerifyResponse.ts
4024
- var OTPVerifyResponseSchema = z19.object({
4025
- requires_2fa: z19.boolean().default(false).optional(),
4026
- session_id: z19.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i).nullable().optional(),
4027
- refresh: z19.string().nullable().optional(),
4028
- access: z19.string().nullable().optional(),
4012
+ var OTPVerifyResponseSchema = z18.object({
4013
+ requires_2fa: z18.boolean().default(false).optional(),
4014
+ session_id: z18.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i).nullable().optional(),
4015
+ refresh: z18.string().nullable().optional(),
4016
+ access: z18.string().nullable().optional(),
4029
4017
  user: UserSchema.nullable().optional(),
4030
- should_prompt_2fa: z19.boolean().optional(),
4031
- persistent_session: z19.boolean().optional()
4018
+ should_prompt_2fa: z18.boolean().optional(),
4019
+ persistent_session: z18.boolean().optional()
4032
4020
  });
4033
4021
 
4034
4022
  // src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts
@@ -4130,10 +4118,10 @@ __name(useCfgAccountsProfileAvatarCreate, "useCfgAccountsProfileAvatarCreate");
4130
4118
  import useSWRMutation10 from "swr/mutation";
4131
4119
 
4132
4120
  // src/_api/generated/_cfg_accounts/schemas/AccountDeleteResponse.ts
4133
- import { z as z20 } from "zod";
4134
- var AccountDeleteResponseSchema = z20.object({
4135
- success: z20.boolean(),
4136
- message: z20.string()
4121
+ import { z as z19 } from "zod";
4122
+ var AccountDeleteResponseSchema = z19.object({
4123
+ success: z19.boolean(),
4124
+ message: z19.string()
4137
4125
  });
4138
4126
 
4139
4127
  // src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts
@@ -4248,117 +4236,117 @@ import useSWRMutation15 from "swr/mutation";
4248
4236
  import useSWRMutation16 from "swr/mutation";
4249
4237
 
4250
4238
  // src/_api/generated/_cfg_accounts/schemas/TokenRefresh.ts
4251
- import { z as z21 } from "zod";
4252
- var TokenRefreshSchema = z21.object({
4253
- access: z21.string(),
4254
- refresh: z21.string()
4239
+ import { z as z20 } from "zod";
4240
+ var TokenRefreshSchema = z20.object({
4241
+ access: z20.string(),
4242
+ refresh: z20.string()
4255
4243
  });
4256
4244
 
4257
4245
  // src/_api/generated/_cfg_accounts/schemas/APIKeyRequest.ts
4258
- import { z as z22 } from "zod";
4259
- var APIKeyRequestSchema = z22.object({
4260
- key: z22.string().min(1),
4261
- reissued_at: z22.string().datetime({ offset: true }).nullable(),
4262
- created_at: z22.string().datetime({ offset: true })
4246
+ import { z as z21 } from "zod";
4247
+ var APIKeyRequestSchema = z21.object({
4248
+ key: z21.string().min(1),
4249
+ reissued_at: z21.string().datetime({ offset: true }).nullable(),
4250
+ created_at: z21.string().datetime({ offset: true })
4263
4251
  });
4264
4252
 
4265
4253
  // src/_api/generated/_cfg_accounts/schemas/APIKeyTestRequest.ts
4266
- import { z as z23 } from "zod";
4267
- var APIKeyTestRequestSchema = z23.object({
4268
- key: z23.string().min(1)
4254
+ import { z as z22 } from "zod";
4255
+ var APIKeyTestRequestSchema = z22.object({
4256
+ key: z22.string().min(1)
4269
4257
  });
4270
4258
 
4271
4259
  // src/_api/generated/_cfg_accounts/schemas/CfgUserUpdateRequest.ts
4272
- import { z as z24 } from "zod";
4273
- var CfgUserUpdateRequestSchema = z24.object({
4274
- first_name: z24.string().max(50).optional(),
4275
- last_name: z24.string().max(50).optional(),
4276
- company: z24.string().max(100).optional(),
4277
- phone: z24.string().max(20).optional(),
4278
- position: z24.string().max(100).optional(),
4279
- language: z24.string().max(10).optional(),
4280
- timezone: z24.string().max(64).optional()
4260
+ import { z as z23 } from "zod";
4261
+ var CfgUserUpdateRequestSchema = z23.object({
4262
+ first_name: z23.string().max(50).optional(),
4263
+ last_name: z23.string().max(50).optional(),
4264
+ company: z23.string().max(100).optional(),
4265
+ phone: z23.string().max(20).optional(),
4266
+ position: z23.string().max(100).optional(),
4267
+ language: z23.string().max(10).optional(),
4268
+ timezone: z23.string().max(64).optional()
4281
4269
  });
4282
4270
 
4283
4271
  // src/_api/generated/_cfg_accounts/schemas/OAuthAuthorizeRequestRequest.ts
4284
- import { z as z25 } from "zod";
4285
- var OAuthAuthorizeRequestRequestSchema = z25.object({
4286
- redirect_uri: z25.string().optional(),
4287
- source_url: z25.string().optional()
4272
+ import { z as z24 } from "zod";
4273
+ var OAuthAuthorizeRequestRequestSchema = z24.object({
4274
+ redirect_uri: z24.string().optional(),
4275
+ source_url: z24.string().optional()
4288
4276
  });
4289
4277
 
4290
4278
  // src/_api/generated/_cfg_accounts/schemas/OAuthCallbackRequestRequest.ts
4291
- import { z as z26 } from "zod";
4292
- var OAuthCallbackRequestRequestSchema = z26.object({
4293
- code: z26.string().min(10).max(500),
4294
- state: z26.string().min(20).max(100),
4295
- redirect_uri: z26.string().optional(),
4296
- remember_me: z26.boolean().default(false).optional()
4279
+ import { z as z25 } from "zod";
4280
+ var OAuthCallbackRequestRequestSchema = z25.object({
4281
+ code: z25.string().min(10).max(500),
4282
+ state: z25.string().min(20).max(100),
4283
+ redirect_uri: z25.string().optional(),
4284
+ remember_me: z25.boolean().default(false).optional()
4297
4285
  });
4298
4286
 
4299
4287
  // src/_api/generated/_cfg_accounts/schemas/OAuthDisconnectRequestRequest.ts
4300
- import { z as z27 } from "zod";
4301
- var OAuthDisconnectRequestRequestSchema = z27.object({
4288
+ import { z as z26 } from "zod";
4289
+ var OAuthDisconnectRequestRequestSchema = z26.object({
4302
4290
  provider: OAuthProviderEnumSchema
4303
4291
  });
4304
4292
 
4305
4293
  // src/_api/generated/_cfg_accounts/schemas/OAuthError.ts
4294
+ import { z as z27 } from "zod";
4295
+ var OAuthErrorSchema = z27.object({
4296
+ error: z27.string(),
4297
+ error_description: z27.string().optional()
4298
+ });
4299
+
4300
+ // src/_api/generated/_cfg_accounts/schemas/OTPErrorResponse.ts
4306
4301
  import { z as z28 } from "zod";
4307
- var OAuthErrorSchema = z28.object({
4302
+ var OTPErrorResponseSchema = z28.object({
4308
4303
  error: z28.string(),
4309
- error_description: z28.string().optional()
4304
+ error_code: z28.string().nullable().optional(),
4305
+ retry_after: z28.number().int().nullable().optional()
4310
4306
  });
4311
4307
 
4312
- // src/_api/generated/_cfg_accounts/schemas/OTPErrorResponse.ts
4308
+ // src/_api/generated/_cfg_accounts/schemas/OTPRequestRequest.ts
4313
4309
  import { z as z29 } from "zod";
4314
- var OTPErrorResponseSchema = z29.object({
4315
- error: z29.string(),
4316
- error_code: z29.string().nullable().optional(),
4317
- retry_after: z29.number().int().nullable().optional()
4310
+ var OTPRequestRequestSchema = z29.object({
4311
+ identifier: z29.string().min(1),
4312
+ source_url: z29.string().optional(),
4313
+ marketing_consent: z29.boolean().nullable().optional(),
4314
+ consent_disclosure_version: z29.string().max(64).optional()
4318
4315
  });
4319
4316
 
4320
- // src/_api/generated/_cfg_accounts/schemas/OTPRequestRequest.ts
4317
+ // src/_api/generated/_cfg_accounts/schemas/OTPVerifyRequest.ts
4321
4318
  import { z as z30 } from "zod";
4322
- var OTPRequestRequestSchema = z30.object({
4319
+ var OTPVerifyRequestSchema = z30.object({
4323
4320
  identifier: z30.string().min(1),
4321
+ otp: z30.string().min(4).max(4),
4324
4322
  source_url: z30.string().optional(),
4325
- marketing_consent: z30.boolean().nullable().optional(),
4326
- consent_disclosure_version: z30.string().max(64).optional()
4323
+ remember_me: z30.boolean().default(false).optional()
4327
4324
  });
4328
4325
 
4329
- // src/_api/generated/_cfg_accounts/schemas/OTPVerifyRequest.ts
4326
+ // src/_api/generated/_cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts
4330
4327
  import { z as z31 } from "zod";
4331
- var OTPVerifyRequestSchema = z31.object({
4332
- identifier: z31.string().min(1),
4333
- otp: z31.string().min(4).max(4),
4334
- source_url: z31.string().optional(),
4335
- remember_me: z31.boolean().default(false).optional()
4328
+ var PatchedCfgUserUpdateRequestSchema = z31.object({
4329
+ first_name: z31.string().max(50).optional(),
4330
+ last_name: z31.string().max(50).optional(),
4331
+ company: z31.string().max(100).optional(),
4332
+ phone: z31.string().max(20).optional(),
4333
+ position: z31.string().max(100).optional(),
4334
+ language: z31.string().max(10).optional(),
4335
+ timezone: z31.string().max(64).optional()
4336
4336
  });
4337
4337
 
4338
- // src/_api/generated/_cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts
4338
+ // src/_api/generated/_cfg_accounts/schemas/TokenBlacklistRequest.ts
4339
4339
  import { z as z32 } from "zod";
4340
- var PatchedCfgUserUpdateRequestSchema = z32.object({
4341
- first_name: z32.string().max(50).optional(),
4342
- last_name: z32.string().max(50).optional(),
4343
- company: z32.string().max(100).optional(),
4344
- phone: z32.string().max(20).optional(),
4345
- position: z32.string().max(100).optional(),
4346
- language: z32.string().max(10).optional(),
4347
- timezone: z32.string().max(64).optional()
4340
+ var TokenBlacklistRequestSchema = z32.object({
4341
+ refresh: z32.string().min(1)
4348
4342
  });
4349
4343
 
4350
- // src/_api/generated/_cfg_accounts/schemas/TokenBlacklistRequest.ts
4344
+ // src/_api/generated/_cfg_accounts/schemas/TokenRefreshRequest.ts
4351
4345
  import { z as z33 } from "zod";
4352
- var TokenBlacklistRequestSchema = z33.object({
4346
+ var TokenRefreshRequestSchema = z33.object({
4353
4347
  refresh: z33.string().min(1)
4354
4348
  });
4355
4349
 
4356
- // src/_api/generated/_cfg_accounts/schemas/TokenRefreshRequest.ts
4357
- import { z as z34 } from "zod";
4358
- var TokenRefreshRequestSchema = z34.object({
4359
- refresh: z34.string().min(1)
4360
- });
4361
-
4362
4350
  // src/auth/context/AccountsContext.tsx
4363
4351
  import { jsx } from "react/jsx-runtime";
4364
4352
  function hasApiOrigin() {