@djangocfg/api 2.1.54 → 2.1.56

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 (93) hide show
  1. package/dist/auth.cjs +28 -15
  2. package/dist/auth.cjs.map +1 -1
  3. package/dist/auth.d.cts +6 -6
  4. package/dist/auth.d.ts +6 -6
  5. package/dist/auth.mjs +28 -15
  6. package/dist/auth.mjs.map +1 -1
  7. package/dist/clients.cjs +56 -17
  8. package/dist/clients.cjs.map +1 -1
  9. package/dist/clients.d.cts +17 -17
  10. package/dist/clients.d.ts +17 -17
  11. package/dist/clients.mjs +56 -17
  12. package/dist/clients.mjs.map +1 -1
  13. package/dist/hooks.cjs +763 -12
  14. package/dist/hooks.cjs.map +1 -1
  15. package/dist/hooks.d.cts +11 -11
  16. package/dist/hooks.d.ts +11 -11
  17. package/dist/hooks.mjs +763 -12
  18. package/dist/hooks.mjs.map +1 -1
  19. package/dist/index.cjs +893 -69
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +59 -41
  22. package/dist/index.d.ts +59 -41
  23. package/dist/index.mjs +893 -69
  24. package/dist/index.mjs.map +1 -1
  25. package/package.json +3 -3
  26. package/src/generated/cfg_accounts/_utils/schemas/CentrifugoToken.schema.ts +1 -1
  27. package/src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts +2 -2
  28. package/src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts +1 -1
  29. package/src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts +1 -1
  30. package/src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts +1 -1
  31. package/src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts +1 -1
  32. package/src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts +1 -1
  33. package/src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts +1 -1
  34. package/src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +1 -1
  35. package/src/generated/cfg_accounts/_utils/schemas/User.schema.ts +1 -1
  36. package/src/generated/cfg_accounts/api-instance.ts +61 -13
  37. package/src/generated/cfg_centrifugo/api-instance.ts +61 -13
  38. package/src/generated/cfg_totp/CLAUDE.md +90 -0
  39. package/src/generated/cfg_totp/_utils/fetchers/index.ts +33 -0
  40. package/src/generated/cfg_totp/_utils/fetchers/totp.ts +49 -0
  41. package/src/generated/cfg_totp/_utils/fetchers/totp__2fa_management.ts +108 -0
  42. package/src/generated/cfg_totp/_utils/fetchers/totp__2fa_setup.ts +153 -0
  43. package/src/generated/cfg_totp/_utils/fetchers/totp__2fa_verification.ts +152 -0
  44. package/src/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts +152 -0
  45. package/src/generated/cfg_totp/_utils/hooks/index.ts +33 -0
  46. package/src/generated/cfg_totp/_utils/hooks/totp.ts +42 -0
  47. package/src/generated/cfg_totp/_utils/hooks/totp__2fa_management.ts +58 -0
  48. package/src/generated/cfg_totp/_utils/hooks/totp__2fa_setup.ts +63 -0
  49. package/src/generated/cfg_totp/_utils/hooks/totp__2fa_verification.ts +62 -0
  50. package/src/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts +59 -0
  51. package/src/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts +19 -0
  52. package/src/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts +20 -0
  53. package/src/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts +21 -0
  54. package/src/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts +20 -0
  55. package/src/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts +21 -0
  56. package/src/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts +26 -0
  57. package/src/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts +19 -0
  58. package/src/generated/cfg_totp/_utils/schemas/PaginatedDeviceListList.schema.ts +24 -0
  59. package/src/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts +19 -0
  60. package/src/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts +23 -0
  61. package/src/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts +20 -0
  62. package/src/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts +20 -0
  63. package/src/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts +24 -0
  64. package/src/generated/cfg_totp/_utils/schemas/index.ts +32 -0
  65. package/src/generated/cfg_totp/api-instance.ts +180 -0
  66. package/src/generated/cfg_totp/client.ts +313 -0
  67. package/src/generated/cfg_totp/enums.ts +12 -0
  68. package/src/generated/cfg_totp/errors.ts +117 -0
  69. package/src/generated/cfg_totp/http.ts +104 -0
  70. package/src/generated/cfg_totp/index.ts +302 -0
  71. package/src/generated/cfg_totp/logger.ts +260 -0
  72. package/src/generated/cfg_totp/retry.ts +176 -0
  73. package/src/generated/cfg_totp/schema.json +859 -0
  74. package/src/generated/cfg_totp/storage.ts +162 -0
  75. package/src/generated/cfg_totp/totp/client.ts +23 -0
  76. package/src/generated/cfg_totp/totp/index.ts +3 -0
  77. package/src/generated/cfg_totp/totp/models.ts +1 -0
  78. package/src/generated/cfg_totp/totp__2fa_management/client.ts +41 -0
  79. package/src/generated/cfg_totp/totp__2fa_management/index.ts +3 -0
  80. package/src/generated/cfg_totp/totp__2fa_management/models.ts +60 -0
  81. package/src/generated/cfg_totp/totp__2fa_setup/client.ts +32 -0
  82. package/src/generated/cfg_totp/totp__2fa_setup/index.ts +3 -0
  83. package/src/generated/cfg_totp/totp__2fa_setup/models.ts +54 -0
  84. package/src/generated/cfg_totp/totp__2fa_verification/client.ts +32 -0
  85. package/src/generated/cfg_totp/totp__2fa_verification/index.ts +3 -0
  86. package/src/generated/cfg_totp/totp__2fa_verification/models.ts +44 -0
  87. package/src/generated/cfg_totp/totp__backup_codes/client.ts +31 -0
  88. package/src/generated/cfg_totp/totp__backup_codes/index.ts +3 -0
  89. package/src/generated/cfg_totp/totp__backup_codes/models.ts +37 -0
  90. package/src/generated/cfg_totp/validation-events.ts +134 -0
  91. package/src/generated/cfg_webpush/_utils/schemas/SendPushRequestRequest.schema.ts +2 -2
  92. package/src/generated/cfg_webpush/_utils/schemas/SubscribeRequestRequest.schema.ts +1 -1
  93. package/src/generated/cfg_webpush/api-instance.ts +61 -13
@@ -534,7 +534,7 @@ interface StorageAdapter$2 {
534
534
  */
535
535
  declare const CentrifugoTokenSchema: z.ZodObject<{
536
536
  token: z.ZodString;
537
- centrifugo_url: z.ZodURL;
537
+ centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
538
538
  expires_at: z.ZodISODateTime;
539
539
  channels: z.ZodArray<z.ZodString>;
540
540
  }, z.core.$strip>;
@@ -554,8 +554,8 @@ type CentrifugoToken = z.infer<typeof CentrifugoTokenSchema>;
554
554
  * Request to start OAuth flow.
555
555
  */
556
556
  declare const OAuthAuthorizeRequestRequestSchema: z.ZodObject<{
557
- redirect_uri: z.ZodOptional<z.ZodURL>;
558
- source_url: z.ZodOptional<z.ZodURL>;
557
+ redirect_uri: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
558
+ source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
559
559
  }, z.core.$strip>;
560
560
  /**
561
561
  * Infer TypeScript type from Zod schema
@@ -573,7 +573,7 @@ type OAuthAuthorizeRequestRequest = z.infer<typeof OAuthAuthorizeRequestRequestS
573
573
  * Response with OAuth authorization URL.
574
574
  */
575
575
  declare const OAuthAuthorizeResponseSchema: z.ZodObject<{
576
- authorization_url: z.ZodURL;
576
+ authorization_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
577
577
  state: z.ZodString;
578
578
  }, z.core.$strip>;
579
579
  /**
@@ -594,7 +594,7 @@ type OAuthAuthorizeResponse = z.infer<typeof OAuthAuthorizeResponseSchema>;
594
594
  declare const OAuthCallbackRequestRequestSchema: z.ZodObject<{
595
595
  code: z.ZodString;
596
596
  state: z.ZodString;
597
- redirect_uri: z.ZodOptional<z.ZodURL>;
597
+ redirect_uri: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
598
598
  }, z.core.$strip>;
599
599
  /**
600
600
  * Infer TypeScript type from Zod schema
@@ -617,7 +617,7 @@ declare const OAuthConnectionSchema: z.ZodObject<{
617
617
  provider_display: z.ZodString;
618
618
  provider_username: z.ZodString;
619
619
  provider_email: z.ZodEmail;
620
- provider_avatar_url: z.ZodURL;
620
+ provider_avatar_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
621
621
  connected_at: z.ZodISODateTime;
622
622
  last_login_at: z.ZodISODateTime;
623
623
  }, z.core.$strip>;
@@ -674,7 +674,7 @@ type OAuthError = z.infer<typeof OAuthErrorSchema>;
674
674
  * Response with available OAuth providers.
675
675
  */
676
676
  declare const OAuthProvidersResponseSchema: z.ZodObject<{
677
- providers: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
677
+ providers: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
678
678
  }, z.core.$strip>;
679
679
  /**
680
680
  * Infer TypeScript type from Zod schema
@@ -694,7 +694,7 @@ type OAuthProvidersResponse = z.infer<typeof OAuthProvidersResponseSchema>;
694
694
  declare const OAuthTokenResponseSchema: z.ZodObject<{
695
695
  access: z.ZodString;
696
696
  refresh: z.ZodString;
697
- user: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
697
+ user: z.ZodRecord<z.ZodString, z.ZodAny>;
698
698
  is_new_user: z.ZodBoolean;
699
699
  is_new_connection: z.ZodBoolean;
700
700
  }, z.core.$strip>;
@@ -734,7 +734,7 @@ type OTPErrorResponse = z.infer<typeof OTPErrorResponseSchema>;
734
734
  declare const OTPRequestRequestSchema: z.ZodObject<{
735
735
  identifier: z.ZodString;
736
736
  channel: z.ZodOptional<z.ZodEnum<typeof OTPRequestRequestChannel>>;
737
- source_url: z.ZodOptional<z.ZodURL>;
737
+ source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
738
738
  }, z.core.$strip>;
739
739
  /**
740
740
  * Infer TypeScript type from Zod schema
@@ -773,7 +773,7 @@ declare const OTPVerifyRequestSchema: z.ZodObject<{
773
773
  identifier: z.ZodString;
774
774
  otp: z.ZodString;
775
775
  channel: z.ZodOptional<z.ZodEnum<typeof OTPVerifyRequestChannel>>;
776
- source_url: z.ZodOptional<z.ZodURL>;
776
+ source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
777
777
  }, z.core.$strip>;
778
778
  /**
779
779
  * Infer TypeScript type from Zod schema
@@ -804,7 +804,7 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
804
804
  company: z.ZodOptional<z.ZodString>;
805
805
  phone: z.ZodOptional<z.ZodString>;
806
806
  position: z.ZodOptional<z.ZodString>;
807
- avatar: z.ZodNullable<z.ZodURL>;
807
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
808
808
  is_staff: z.ZodBoolean;
809
809
  is_superuser: z.ZodBoolean;
810
810
  date_joined: z.ZodISODateTime;
@@ -812,7 +812,7 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
812
812
  unanswered_messages_count: z.ZodInt;
813
813
  centrifugo: z.ZodNullable<z.ZodObject<{
814
814
  token: z.ZodString;
815
- centrifugo_url: z.ZodURL;
815
+ centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
816
816
  expires_at: z.ZodISODateTime;
817
817
  channels: z.ZodArray<z.ZodString>;
818
818
  }, z.core.$strip>>;
@@ -895,7 +895,7 @@ declare const UserSchema: z.ZodObject<{
895
895
  company: z.ZodOptional<z.ZodString>;
896
896
  phone: z.ZodOptional<z.ZodString>;
897
897
  position: z.ZodOptional<z.ZodString>;
898
- avatar: z.ZodNullable<z.ZodURL>;
898
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
899
899
  is_staff: z.ZodBoolean;
900
900
  is_superuser: z.ZodBoolean;
901
901
  date_joined: z.ZodISODateTime;
@@ -903,7 +903,7 @@ declare const UserSchema: z.ZodObject<{
903
903
  unanswered_messages_count: z.ZodInt;
904
904
  centrifugo: z.ZodNullable<z.ZodObject<{
905
905
  token: z.ZodString;
906
- centrifugo_url: z.ZodURL;
906
+ centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
907
907
  expires_at: z.ZodISODateTime;
908
908
  channels: z.ZodArray<z.ZodString>;
909
909
  }, z.core.$strip>>;
@@ -3230,8 +3230,8 @@ interface StorageAdapter {
3230
3230
  declare const SendPushRequestRequestSchema: z.ZodObject<{
3231
3231
  title: z.ZodString;
3232
3232
  body: z.ZodString;
3233
- icon: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
3234
- url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
3233
+ icon: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
3234
+ url: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
3235
3235
  }, z.core.$strip>;
3236
3236
  /**
3237
3237
  * Infer TypeScript type from Zod schema
@@ -3268,7 +3268,7 @@ type SendPushResponse = z.infer<typeof SendPushResponseSchema>;
3268
3268
  * Request serializer for subscribing to push notifications.
3269
3269
  */
3270
3270
  declare const SubscribeRequestRequestSchema: z.ZodObject<{
3271
- endpoint: z.ZodURL;
3271
+ endpoint: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
3272
3272
  keys: z.ZodRecord<z.ZodString, z.ZodString>;
3273
3273
  }, z.core.$strip>;
3274
3274
  /**
package/dist/clients.d.ts CHANGED
@@ -534,7 +534,7 @@ interface StorageAdapter$2 {
534
534
  */
535
535
  declare const CentrifugoTokenSchema: z.ZodObject<{
536
536
  token: z.ZodString;
537
- centrifugo_url: z.ZodURL;
537
+ centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
538
538
  expires_at: z.ZodISODateTime;
539
539
  channels: z.ZodArray<z.ZodString>;
540
540
  }, z.core.$strip>;
@@ -554,8 +554,8 @@ type CentrifugoToken = z.infer<typeof CentrifugoTokenSchema>;
554
554
  * Request to start OAuth flow.
555
555
  */
556
556
  declare const OAuthAuthorizeRequestRequestSchema: z.ZodObject<{
557
- redirect_uri: z.ZodOptional<z.ZodURL>;
558
- source_url: z.ZodOptional<z.ZodURL>;
557
+ redirect_uri: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
558
+ source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
559
559
  }, z.core.$strip>;
560
560
  /**
561
561
  * Infer TypeScript type from Zod schema
@@ -573,7 +573,7 @@ type OAuthAuthorizeRequestRequest = z.infer<typeof OAuthAuthorizeRequestRequestS
573
573
  * Response with OAuth authorization URL.
574
574
  */
575
575
  declare const OAuthAuthorizeResponseSchema: z.ZodObject<{
576
- authorization_url: z.ZodURL;
576
+ authorization_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
577
577
  state: z.ZodString;
578
578
  }, z.core.$strip>;
579
579
  /**
@@ -594,7 +594,7 @@ type OAuthAuthorizeResponse = z.infer<typeof OAuthAuthorizeResponseSchema>;
594
594
  declare const OAuthCallbackRequestRequestSchema: z.ZodObject<{
595
595
  code: z.ZodString;
596
596
  state: z.ZodString;
597
- redirect_uri: z.ZodOptional<z.ZodURL>;
597
+ redirect_uri: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
598
598
  }, z.core.$strip>;
599
599
  /**
600
600
  * Infer TypeScript type from Zod schema
@@ -617,7 +617,7 @@ declare const OAuthConnectionSchema: z.ZodObject<{
617
617
  provider_display: z.ZodString;
618
618
  provider_username: z.ZodString;
619
619
  provider_email: z.ZodEmail;
620
- provider_avatar_url: z.ZodURL;
620
+ provider_avatar_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
621
621
  connected_at: z.ZodISODateTime;
622
622
  last_login_at: z.ZodISODateTime;
623
623
  }, z.core.$strip>;
@@ -674,7 +674,7 @@ type OAuthError = z.infer<typeof OAuthErrorSchema>;
674
674
  * Response with available OAuth providers.
675
675
  */
676
676
  declare const OAuthProvidersResponseSchema: z.ZodObject<{
677
- providers: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>>;
677
+ providers: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>>;
678
678
  }, z.core.$strip>;
679
679
  /**
680
680
  * Infer TypeScript type from Zod schema
@@ -694,7 +694,7 @@ type OAuthProvidersResponse = z.infer<typeof OAuthProvidersResponseSchema>;
694
694
  declare const OAuthTokenResponseSchema: z.ZodObject<{
695
695
  access: z.ZodString;
696
696
  refresh: z.ZodString;
697
- user: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>>;
697
+ user: z.ZodRecord<z.ZodString, z.ZodAny>;
698
698
  is_new_user: z.ZodBoolean;
699
699
  is_new_connection: z.ZodBoolean;
700
700
  }, z.core.$strip>;
@@ -734,7 +734,7 @@ type OTPErrorResponse = z.infer<typeof OTPErrorResponseSchema>;
734
734
  declare const OTPRequestRequestSchema: z.ZodObject<{
735
735
  identifier: z.ZodString;
736
736
  channel: z.ZodOptional<z.ZodEnum<typeof OTPRequestRequestChannel>>;
737
- source_url: z.ZodOptional<z.ZodURL>;
737
+ source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
738
738
  }, z.core.$strip>;
739
739
  /**
740
740
  * Infer TypeScript type from Zod schema
@@ -773,7 +773,7 @@ declare const OTPVerifyRequestSchema: z.ZodObject<{
773
773
  identifier: z.ZodString;
774
774
  otp: z.ZodString;
775
775
  channel: z.ZodOptional<z.ZodEnum<typeof OTPVerifyRequestChannel>>;
776
- source_url: z.ZodOptional<z.ZodURL>;
776
+ source_url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
777
777
  }, z.core.$strip>;
778
778
  /**
779
779
  * Infer TypeScript type from Zod schema
@@ -804,7 +804,7 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
804
804
  company: z.ZodOptional<z.ZodString>;
805
805
  phone: z.ZodOptional<z.ZodString>;
806
806
  position: z.ZodOptional<z.ZodString>;
807
- avatar: z.ZodNullable<z.ZodURL>;
807
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
808
808
  is_staff: z.ZodBoolean;
809
809
  is_superuser: z.ZodBoolean;
810
810
  date_joined: z.ZodISODateTime;
@@ -812,7 +812,7 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
812
812
  unanswered_messages_count: z.ZodInt;
813
813
  centrifugo: z.ZodNullable<z.ZodObject<{
814
814
  token: z.ZodString;
815
- centrifugo_url: z.ZodURL;
815
+ centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
816
816
  expires_at: z.ZodISODateTime;
817
817
  channels: z.ZodArray<z.ZodString>;
818
818
  }, z.core.$strip>>;
@@ -895,7 +895,7 @@ declare const UserSchema: z.ZodObject<{
895
895
  company: z.ZodOptional<z.ZodString>;
896
896
  phone: z.ZodOptional<z.ZodString>;
897
897
  position: z.ZodOptional<z.ZodString>;
898
- avatar: z.ZodNullable<z.ZodURL>;
898
+ avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
899
899
  is_staff: z.ZodBoolean;
900
900
  is_superuser: z.ZodBoolean;
901
901
  date_joined: z.ZodISODateTime;
@@ -903,7 +903,7 @@ declare const UserSchema: z.ZodObject<{
903
903
  unanswered_messages_count: z.ZodInt;
904
904
  centrifugo: z.ZodNullable<z.ZodObject<{
905
905
  token: z.ZodString;
906
- centrifugo_url: z.ZodURL;
906
+ centrifugo_url: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
907
907
  expires_at: z.ZodISODateTime;
908
908
  channels: z.ZodArray<z.ZodString>;
909
909
  }, z.core.$strip>>;
@@ -3230,8 +3230,8 @@ interface StorageAdapter {
3230
3230
  declare const SendPushRequestRequestSchema: z.ZodObject<{
3231
3231
  title: z.ZodString;
3232
3232
  body: z.ZodString;
3233
- icon: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
3234
- url: z.ZodOptional<z.ZodNullable<z.ZodURL>>;
3233
+ icon: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
3234
+ url: z.ZodOptional<z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>>;
3235
3235
  }, z.core.$strip>;
3236
3236
  /**
3237
3237
  * Infer TypeScript type from Zod schema
@@ -3268,7 +3268,7 @@ type SendPushResponse = z.infer<typeof SendPushResponseSchema>;
3268
3268
  * Request serializer for subscribing to push notifications.
3269
3269
  */
3270
3270
  declare const SubscribeRequestRequestSchema: z.ZodObject<{
3271
- endpoint: z.ZodURL;
3271
+ endpoint: z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>;
3272
3272
  keys: z.ZodRecord<z.ZodString, z.ZodString>;
3273
3273
  }, z.core.$strip>;
3274
3274
  /**
package/dist/clients.mjs CHANGED
@@ -804,7 +804,7 @@ var OTPVerifyRequestChannel = /* @__PURE__ */ ((OTPVerifyRequestChannel2) => {
804
804
  import { z } from "zod";
805
805
  var CentrifugoTokenSchema = z.object({
806
806
  token: z.string(),
807
- centrifugo_url: z.url(),
807
+ centrifugo_url: z.union([z.url(), z.literal("")]),
808
808
  expires_at: z.iso.datetime(),
809
809
  channels: z.array(z.string())
810
810
  });
@@ -812,14 +812,14 @@ var CentrifugoTokenSchema = z.object({
812
812
  // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
813
813
  import { z as z2 } from "zod";
814
814
  var OAuthAuthorizeRequestRequestSchema = z2.object({
815
- redirect_uri: z2.url().optional(),
816
- source_url: z2.url().optional()
815
+ redirect_uri: z2.union([z2.url(), z2.literal("")]).optional(),
816
+ source_url: z2.union([z2.url(), z2.literal("")]).optional()
817
817
  });
818
818
 
819
819
  // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
820
820
  import { z as z3 } from "zod";
821
821
  var OAuthAuthorizeResponseSchema = z3.object({
822
- authorization_url: z3.url(),
822
+ authorization_url: z3.union([z3.url(), z3.literal("")]),
823
823
  state: z3.string()
824
824
  });
825
825
 
@@ -828,7 +828,7 @@ import { z as z4 } from "zod";
828
828
  var OAuthCallbackRequestRequestSchema = z4.object({
829
829
  code: z4.string().min(10).max(500),
830
830
  state: z4.string().min(20).max(100),
831
- redirect_uri: z4.url().optional()
831
+ redirect_uri: z4.union([z4.url(), z4.literal("")]).optional()
832
832
  });
833
833
 
834
834
  // src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
@@ -839,7 +839,7 @@ var OAuthConnectionSchema = z5.object({
839
839
  provider_display: z5.string(),
840
840
  provider_username: z5.string(),
841
841
  provider_email: z5.email(),
842
- provider_avatar_url: z5.url(),
842
+ provider_avatar_url: z5.union([z5.url(), z5.literal("")]),
843
843
  connected_at: z5.iso.datetime(),
844
844
  last_login_at: z5.iso.datetime()
845
845
  });
@@ -860,7 +860,7 @@ var OAuthErrorSchema = z7.object({
860
860
  // src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
861
861
  import { z as z8 } from "zod";
862
862
  var OAuthProvidersResponseSchema = z8.object({
863
- providers: z8.array(z8.record(z8.string(), z8.record(z8.string(), z8.any())))
863
+ providers: z8.array(z8.record(z8.string(), z8.any()))
864
864
  });
865
865
 
866
866
  // src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
@@ -868,7 +868,7 @@ import { z as z9 } from "zod";
868
868
  var OAuthTokenResponseSchema = z9.object({
869
869
  access: z9.string(),
870
870
  refresh: z9.string(),
871
- user: z9.record(z9.string(), z9.record(z9.string(), z9.any())),
871
+ user: z9.record(z9.string(), z9.any()),
872
872
  is_new_user: z9.boolean(),
873
873
  is_new_connection: z9.boolean()
874
874
  });
@@ -884,7 +884,7 @@ import { z as z11 } from "zod";
884
884
  var OTPRequestRequestSchema = z11.object({
885
885
  identifier: z11.string().min(1),
886
886
  channel: z11.nativeEnum(OTPRequestRequestChannel).optional(),
887
- source_url: z11.url().optional()
887
+ source_url: z11.union([z11.url(), z11.literal("")]).optional()
888
888
  });
889
889
 
890
890
  // src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
@@ -899,7 +899,7 @@ var OTPVerifyRequestSchema = z13.object({
899
899
  identifier: z13.string().min(1),
900
900
  otp: z13.string().min(6).max(6),
901
901
  channel: z13.nativeEnum(OTPVerifyRequestChannel).optional(),
902
- source_url: z13.url().optional()
902
+ source_url: z13.union([z13.url(), z13.literal("")]).optional()
903
903
  });
904
904
 
905
905
  // src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
@@ -918,7 +918,7 @@ var UserSchema = z14.object({
918
918
  company: z14.string().max(100).optional(),
919
919
  phone: z14.string().max(20).optional(),
920
920
  position: z14.string().max(100).optional(),
921
- avatar: z14.url().nullable(),
921
+ avatar: z14.union([z14.url(), z14.literal("")]).nullable(),
922
922
  is_staff: z14.boolean(),
923
923
  is_superuser: z14.boolean(),
924
924
  date_joined: z14.iso.datetime(),
@@ -972,10 +972,23 @@ import { consola } from "consola";
972
972
 
973
973
  // src/generated/cfg_accounts/api-instance.ts
974
974
  var globalAPI = null;
975
+ var autoConfigAttempted = false;
976
+ function tryAutoConfigureFromEnv() {
977
+ if (autoConfigAttempted) return;
978
+ autoConfigAttempted = true;
979
+ if (globalAPI) return;
980
+ if (typeof process === "undefined" || !process.env) return;
981
+ const baseUrl = process.env.NEXT_PUBLIC_API_URL || process.env.VITE_API_URL || process.env.REACT_APP_API_URL || process.env.API_URL;
982
+ if (baseUrl) {
983
+ globalAPI = new API(baseUrl);
984
+ }
985
+ }
986
+ __name(tryAutoConfigureFromEnv, "tryAutoConfigureFromEnv");
975
987
  function getAPIInstance() {
988
+ tryAutoConfigureFromEnv();
976
989
  if (!globalAPI) {
977
990
  throw new Error(
978
- 'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })'
991
+ 'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })\n\nOr set environment variable: NEXT_PUBLIC_API_URL, VITE_API_URL, or REACT_APP_API_URL'
979
992
  );
980
993
  }
981
994
  return globalAPI;
@@ -2843,10 +2856,23 @@ import { consola as consola5 } from "consola";
2843
2856
 
2844
2857
  // src/generated/cfg_centrifugo/api-instance.ts
2845
2858
  var globalAPI2 = null;
2859
+ var autoConfigAttempted2 = false;
2860
+ function tryAutoConfigureFromEnv2() {
2861
+ if (autoConfigAttempted2) return;
2862
+ autoConfigAttempted2 = true;
2863
+ if (globalAPI2) return;
2864
+ if (typeof process === "undefined" || !process.env) return;
2865
+ const baseUrl = process.env.NEXT_PUBLIC_API_URL || process.env.VITE_API_URL || process.env.REACT_APP_API_URL || process.env.API_URL;
2866
+ if (baseUrl) {
2867
+ globalAPI2 = new API2(baseUrl);
2868
+ }
2869
+ }
2870
+ __name(tryAutoConfigureFromEnv2, "tryAutoConfigureFromEnv");
2846
2871
  function getAPIInstance2() {
2872
+ tryAutoConfigureFromEnv2();
2847
2873
  if (!globalAPI2) {
2848
2874
  throw new Error(
2849
- 'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })'
2875
+ 'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })\n\nOr set environment variable: NEXT_PUBLIC_API_URL, VITE_API_URL, or REACT_APP_API_URL'
2850
2876
  );
2851
2877
  }
2852
2878
  return globalAPI2;
@@ -4252,8 +4278,8 @@ import { z as z55 } from "zod";
4252
4278
  var SendPushRequestRequestSchema = z55.object({
4253
4279
  title: z55.string().min(1).max(255),
4254
4280
  body: z55.string().min(1),
4255
- icon: z55.url().nullable().optional(),
4256
- url: z55.url().nullable().optional()
4281
+ icon: z55.union([z55.url(), z55.literal("")]).nullable().optional(),
4282
+ url: z55.union([z55.url(), z55.literal("")]).nullable().optional()
4257
4283
  });
4258
4284
 
4259
4285
  // src/generated/cfg_webpush/_utils/schemas/SendPushResponse.schema.ts
@@ -4266,7 +4292,7 @@ var SendPushResponseSchema = z56.object({
4266
4292
  // src/generated/cfg_webpush/_utils/schemas/SubscribeRequestRequest.schema.ts
4267
4293
  import { z as z57 } from "zod";
4268
4294
  var SubscribeRequestRequestSchema = z57.object({
4269
- endpoint: z57.url(),
4295
+ endpoint: z57.union([z57.url(), z57.literal("")]),
4270
4296
  keys: z57.record(z57.string(), z57.string().min(1))
4271
4297
  });
4272
4298
 
@@ -4297,10 +4323,23 @@ import { consola as consola9 } from "consola";
4297
4323
 
4298
4324
  // src/generated/cfg_webpush/api-instance.ts
4299
4325
  var globalAPI3 = null;
4326
+ var autoConfigAttempted3 = false;
4327
+ function tryAutoConfigureFromEnv3() {
4328
+ if (autoConfigAttempted3) return;
4329
+ autoConfigAttempted3 = true;
4330
+ if (globalAPI3) return;
4331
+ if (typeof process === "undefined" || !process.env) return;
4332
+ const baseUrl = process.env.NEXT_PUBLIC_API_URL || process.env.VITE_API_URL || process.env.REACT_APP_API_URL || process.env.API_URL;
4333
+ if (baseUrl) {
4334
+ globalAPI3 = new API3(baseUrl);
4335
+ }
4336
+ }
4337
+ __name(tryAutoConfigureFromEnv3, "tryAutoConfigureFromEnv");
4300
4338
  function getAPIInstance3() {
4339
+ tryAutoConfigureFromEnv3();
4301
4340
  if (!globalAPI3) {
4302
4341
  throw new Error(
4303
- 'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })'
4342
+ 'API not configured. Call configureAPI() with your base URL before using fetchers or hooks.\n\nExample:\n import { configureAPI } from "./api-instance"\n configureAPI({ baseUrl: "https://api.example.com" })\n\nOr set environment variable: NEXT_PUBLIC_API_URL, VITE_API_URL, or REACT_APP_API_URL'
4304
4343
  );
4305
4344
  }
4306
4345
  return globalAPI3;