@djangocfg/api 2.1.192 → 2.1.193

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 (135) hide show
  1. package/dist/auth-server.cjs +37 -3
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +37 -3
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +102 -5
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +4 -0
  8. package/dist/auth.d.ts +4 -0
  9. package/dist/auth.mjs +102 -5
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +107 -10
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +47 -0
  14. package/dist/clients.d.ts +47 -0
  15. package/dist/clients.mjs +107 -10
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/hooks.cjs +37 -3
  18. package/dist/hooks.cjs.map +1 -1
  19. package/dist/hooks.d.cts +20 -0
  20. package/dist/hooks.d.ts +20 -0
  21. package/dist/hooks.mjs +37 -3
  22. package/dist/hooks.mjs.map +1 -1
  23. package/dist/index.cjs +69 -4
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +20 -0
  26. package/dist/index.d.ts +20 -0
  27. package/dist/index.mjs +69 -4
  28. package/dist/index.mjs.map +1 -1
  29. package/package.json +2 -2
  30. package/src/generated/cfg_accounts/_utils/fetchers/accounts.ts +1 -0
  31. package/src/generated/cfg_accounts/_utils/fetchers/accounts__auth.ts +1 -0
  32. package/src/generated/cfg_accounts/_utils/fetchers/accounts__oauth.ts +1 -0
  33. package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +1 -0
  34. package/src/generated/cfg_accounts/_utils/fetchers/index.ts +1 -0
  35. package/src/generated/cfg_accounts/_utils/hooks/accounts.ts +1 -0
  36. package/src/generated/cfg_accounts/_utils/hooks/accounts__auth.ts +1 -0
  37. package/src/generated/cfg_accounts/_utils/hooks/accounts__oauth.ts +1 -0
  38. package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +1 -0
  39. package/src/generated/cfg_accounts/_utils/hooks/index.ts +1 -0
  40. package/src/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts +1 -0
  41. package/src/generated/cfg_accounts/_utils/schemas/User.schema.ts +1 -0
  42. package/src/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts +1 -0
  43. package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -0
  44. package/src/generated/cfg_accounts/accounts/client.ts +1 -0
  45. package/src/generated/cfg_accounts/accounts/index.ts +1 -0
  46. package/src/generated/cfg_accounts/accounts/models.ts +2 -0
  47. package/src/generated/cfg_accounts/accounts__auth/client.ts +1 -0
  48. package/src/generated/cfg_accounts/accounts__auth/index.ts +1 -0
  49. package/src/generated/cfg_accounts/accounts__auth/models.ts +1 -0
  50. package/src/generated/cfg_accounts/accounts__oauth/client.ts +1 -0
  51. package/src/generated/cfg_accounts/accounts__oauth/index.ts +1 -0
  52. package/src/generated/cfg_accounts/accounts__oauth/models.ts +1 -0
  53. package/src/generated/cfg_accounts/accounts__user_profile/client.ts +1 -0
  54. package/src/generated/cfg_accounts/accounts__user_profile/index.ts +1 -0
  55. package/src/generated/cfg_accounts/accounts__user_profile/models.ts +4 -0
  56. package/src/generated/cfg_accounts/api-instance.ts +1 -0
  57. package/src/generated/cfg_accounts/enums.ts +1 -0
  58. package/src/generated/cfg_accounts/errors.ts +1 -0
  59. package/src/generated/cfg_accounts/http.ts +1 -0
  60. package/src/generated/cfg_accounts/index.ts +37 -0
  61. package/src/generated/cfg_accounts/logger.ts +1 -0
  62. package/src/generated/cfg_accounts/retry.ts +1 -0
  63. package/src/generated/cfg_accounts/schema.json +12 -0
  64. package/src/generated/cfg_accounts/storage.ts +1 -0
  65. package/src/generated/cfg_accounts/validation-events.ts +1 -0
  66. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts +1 -0
  67. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_auth.ts +1 -0
  68. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_monitoring.ts +1 -0
  69. package/src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_testing.ts +1 -0
  70. package/src/generated/cfg_centrifugo/_utils/fetchers/index.ts +1 -0
  71. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_admin_api.ts +1 -0
  72. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_auth.ts +1 -0
  73. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_monitoring.ts +5 -4
  74. package/src/generated/cfg_centrifugo/_utils/hooks/centrifugo__centrifugo_testing.ts +1 -0
  75. package/src/generated/cfg_centrifugo/_utils/hooks/index.ts +1 -0
  76. package/src/generated/cfg_centrifugo/_utils/schemas/index.ts +1 -0
  77. package/src/generated/cfg_centrifugo/api-instance.ts +1 -0
  78. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/client.ts +1 -0
  79. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/index.ts +1 -0
  80. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +1 -0
  81. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/client.ts +1 -0
  82. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/index.ts +1 -0
  83. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_auth/models.ts +1 -0
  84. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/client.ts +1 -0
  85. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/index.ts +1 -0
  86. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +1 -0
  87. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/client.ts +1 -0
  88. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/index.ts +1 -0
  89. package/src/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +1 -0
  90. package/src/generated/cfg_centrifugo/errors.ts +1 -0
  91. package/src/generated/cfg_centrifugo/http.ts +1 -0
  92. package/src/generated/cfg_centrifugo/index.ts +37 -0
  93. package/src/generated/cfg_centrifugo/logger.ts +1 -0
  94. package/src/generated/cfg_centrifugo/retry.ts +1 -0
  95. package/src/generated/cfg_centrifugo/storage.ts +1 -0
  96. package/src/generated/cfg_centrifugo/validation-events.ts +1 -0
  97. package/src/generated/cfg_totp/_utils/fetchers/index.ts +1 -0
  98. package/src/generated/cfg_totp/_utils/fetchers/totp.ts +1 -0
  99. package/src/generated/cfg_totp/_utils/fetchers/totp__backup_codes.ts +1 -0
  100. package/src/generated/cfg_totp/_utils/fetchers/totp__totp_management.ts +1 -0
  101. package/src/generated/cfg_totp/_utils/fetchers/totp__totp_setup.ts +1 -0
  102. package/src/generated/cfg_totp/_utils/fetchers/totp__totp_verification.ts +1 -0
  103. package/src/generated/cfg_totp/_utils/hooks/index.ts +1 -0
  104. package/src/generated/cfg_totp/_utils/hooks/totp.ts +1 -0
  105. package/src/generated/cfg_totp/_utils/hooks/totp__backup_codes.ts +1 -0
  106. package/src/generated/cfg_totp/_utils/hooks/totp__totp_management.ts +2 -1
  107. package/src/generated/cfg_totp/_utils/hooks/totp__totp_setup.ts +1 -0
  108. package/src/generated/cfg_totp/_utils/hooks/totp__totp_verification.ts +1 -0
  109. package/src/generated/cfg_totp/_utils/schemas/TotpVerifyUser.schema.ts +1 -0
  110. package/src/generated/cfg_totp/_utils/schemas/index.ts +1 -0
  111. package/src/generated/cfg_totp/api-instance.ts +1 -0
  112. package/src/generated/cfg_totp/enums.ts +1 -0
  113. package/src/generated/cfg_totp/errors.ts +1 -0
  114. package/src/generated/cfg_totp/http.ts +1 -0
  115. package/src/generated/cfg_totp/index.ts +37 -0
  116. package/src/generated/cfg_totp/logger.ts +1 -0
  117. package/src/generated/cfg_totp/retry.ts +1 -0
  118. package/src/generated/cfg_totp/schema.json +4 -0
  119. package/src/generated/cfg_totp/storage.ts +1 -0
  120. package/src/generated/cfg_totp/totp/client.ts +1 -0
  121. package/src/generated/cfg_totp/totp/index.ts +1 -0
  122. package/src/generated/cfg_totp/totp/models.ts +1 -0
  123. package/src/generated/cfg_totp/totp__backup_codes/client.ts +1 -0
  124. package/src/generated/cfg_totp/totp__backup_codes/index.ts +1 -0
  125. package/src/generated/cfg_totp/totp__backup_codes/models.ts +1 -0
  126. package/src/generated/cfg_totp/totp__totp_management/client.ts +1 -0
  127. package/src/generated/cfg_totp/totp__totp_management/index.ts +1 -0
  128. package/src/generated/cfg_totp/totp__totp_management/models.ts +1 -0
  129. package/src/generated/cfg_totp/totp__totp_setup/client.ts +1 -0
  130. package/src/generated/cfg_totp/totp__totp_setup/index.ts +1 -0
  131. package/src/generated/cfg_totp/totp__totp_setup/models.ts +1 -0
  132. package/src/generated/cfg_totp/totp__totp_verification/client.ts +1 -0
  133. package/src/generated/cfg_totp/totp__totp_verification/index.ts +1 -0
  134. package/src/generated/cfg_totp/totp__totp_verification/models.ts +2 -0
  135. package/src/generated/cfg_totp/validation-events.ts +1 -0
@@ -196,6 +196,7 @@ interface User$2 {
196
196
  company?: string;
197
197
  phone?: string;
198
198
  position?: string;
199
+ language?: string;
199
200
  avatar?: string | null;
200
201
  /** Designates whether the user can log into this admin site. */
201
202
  is_staff: boolean;
@@ -236,6 +237,7 @@ interface UserProfileUpdateRequest$1 {
236
237
  company?: string;
237
238
  phone?: string;
238
239
  position?: string;
240
+ language?: string;
239
241
  }
240
242
  /**
241
243
  * Serializer for updating user profile.
@@ -248,6 +250,7 @@ interface PatchedUserProfileUpdateRequest$1 {
248
250
  company?: string;
249
251
  phone?: string;
250
252
  position?: string;
253
+ language?: string;
251
254
  }
252
255
  /**
253
256
  * Nested serializer for Centrifugo WebSocket connection token.
@@ -404,6 +407,7 @@ interface User$1 {
404
407
  company?: string;
405
408
  phone?: string;
406
409
  position?: string;
410
+ language?: string;
407
411
  avatar?: string | null;
408
412
  /** Designates whether the user can log into this admin site. */
409
413
  is_staff: boolean;
@@ -910,6 +914,7 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
910
914
  company: z.ZodOptional<z.ZodString>;
911
915
  phone: z.ZodOptional<z.ZodString>;
912
916
  position: z.ZodOptional<z.ZodString>;
917
+ language: z.ZodOptional<z.ZodString>;
913
918
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
914
919
  is_staff: z.ZodBoolean;
915
920
  is_superuser: z.ZodBoolean;
@@ -946,6 +951,7 @@ declare const PatchedUserProfileUpdateRequestSchema: z.ZodObject<{
946
951
  company: z.ZodOptional<z.ZodString>;
947
952
  phone: z.ZodOptional<z.ZodString>;
948
953
  position: z.ZodOptional<z.ZodString>;
954
+ language: z.ZodOptional<z.ZodString>;
949
955
  }, z.core.$strip>;
950
956
  /**
951
957
  * Infer TypeScript type from Zod schema
@@ -1002,6 +1008,7 @@ declare const UserSchema: z.ZodObject<{
1002
1008
  company: z.ZodOptional<z.ZodString>;
1003
1009
  phone: z.ZodOptional<z.ZodString>;
1004
1010
  position: z.ZodOptional<z.ZodString>;
1011
+ language: z.ZodOptional<z.ZodString>;
1005
1012
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
1006
1013
  is_staff: z.ZodBoolean;
1007
1014
  is_superuser: z.ZodBoolean;
@@ -1036,6 +1043,7 @@ declare const UserProfileUpdateRequestSchema: z.ZodObject<{
1036
1043
  company: z.ZodOptional<z.ZodString>;
1037
1044
  phone: z.ZodOptional<z.ZodString>;
1038
1045
  position: z.ZodOptional<z.ZodString>;
1046
+ language: z.ZodOptional<z.ZodString>;
1039
1047
  }, z.core.$strip>;
1040
1048
  /**
1041
1049
  * Infer TypeScript type from Zod schema
@@ -1192,12 +1200,15 @@ interface APIOptions$2 {
1192
1200
  retryConfig?: RetryConfig$2;
1193
1201
  /** Logger configuration */
1194
1202
  loggerConfig?: Partial<LoggerConfig$2>;
1203
+ /** Locale for Accept-Language header (e.g. 'en', 'ko', 'ru') */
1204
+ locale?: string;
1195
1205
  }
1196
1206
  declare class API$2 {
1197
1207
  private baseUrl;
1198
1208
  private _client;
1199
1209
  private _token;
1200
1210
  private _refreshToken;
1211
+ private _locale;
1201
1212
  private storage;
1202
1213
  private options?;
1203
1214
  auth: Auth;
@@ -1239,6 +1250,15 @@ declare class API$2 {
1239
1250
  * Get current base URL
1240
1251
  */
1241
1252
  getBaseUrl(): string;
1253
+ /**
1254
+ * Set locale for Accept-Language header
1255
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
1256
+ */
1257
+ setLocale(locale: string | null): void;
1258
+ /**
1259
+ * Get current locale
1260
+ */
1261
+ getLocale(): string | null;
1242
1262
  /**
1243
1263
  * Get OpenAPI schema path
1244
1264
  * @returns Path to the OpenAPI schema JSON file
@@ -3085,12 +3105,15 @@ interface APIOptions$1 {
3085
3105
  retryConfig?: RetryConfig$1;
3086
3106
  /** Logger configuration */
3087
3107
  loggerConfig?: Partial<LoggerConfig$1>;
3108
+ /** Locale for Accept-Language header (e.g. 'en', 'ko', 'ru') */
3109
+ locale?: string;
3088
3110
  }
3089
3111
  declare class API$1 {
3090
3112
  private baseUrl;
3091
3113
  private _client;
3092
3114
  private _token;
3093
3115
  private _refreshToken;
3116
+ private _locale;
3094
3117
  private storage;
3095
3118
  private options?;
3096
3119
  centrifugo_admin_api: CentrifugoAdminApi;
@@ -3132,6 +3155,15 @@ declare class API$1 {
3132
3155
  * Get current base URL
3133
3156
  */
3134
3157
  getBaseUrl(): string;
3158
+ /**
3159
+ * Set locale for Accept-Language header
3160
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
3161
+ */
3162
+ setLocale(locale: string | null): void;
3163
+ /**
3164
+ * Get current locale
3165
+ */
3166
+ getLocale(): string | null;
3135
3167
  /**
3136
3168
  * Get OpenAPI schema path
3137
3169
  * @returns Path to the OpenAPI schema JSON file
@@ -3418,6 +3450,7 @@ interface TotpVerifyUser$1 {
3418
3450
  company?: string;
3419
3451
  phone?: string;
3420
3452
  position?: string;
3453
+ language?: string;
3421
3454
  avatar?: string | null;
3422
3455
  /** Designates whether the user can log into this admin site. */
3423
3456
  is_staff: boolean;
@@ -3806,6 +3839,7 @@ declare const TotpVerifyUserSchema: z.ZodObject<{
3806
3839
  company: z.ZodOptional<z.ZodString>;
3807
3840
  phone: z.ZodOptional<z.ZodString>;
3808
3841
  position: z.ZodOptional<z.ZodString>;
3842
+ language: z.ZodOptional<z.ZodString>;
3809
3843
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3810
3844
  is_staff: z.ZodBoolean;
3811
3845
  is_superuser: z.ZodBoolean;
@@ -3881,6 +3915,7 @@ declare const VerifyResponseSchema: z.ZodObject<{
3881
3915
  company: z.ZodOptional<z.ZodString>;
3882
3916
  phone: z.ZodOptional<z.ZodString>;
3883
3917
  position: z.ZodOptional<z.ZodString>;
3918
+ language: z.ZodOptional<z.ZodString>;
3884
3919
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3885
3920
  is_staff: z.ZodBoolean;
3886
3921
  is_superuser: z.ZodBoolean;
@@ -4102,12 +4137,15 @@ interface APIOptions {
4102
4137
  retryConfig?: RetryConfig;
4103
4138
  /** Logger configuration */
4104
4139
  loggerConfig?: Partial<LoggerConfig>;
4140
+ /** Locale for Accept-Language header (e.g. 'en', 'ko', 'ru') */
4141
+ locale?: string;
4105
4142
  }
4106
4143
  declare class API {
4107
4144
  private baseUrl;
4108
4145
  private _client;
4109
4146
  private _token;
4110
4147
  private _refreshToken;
4148
+ private _locale;
4111
4149
  private storage;
4112
4150
  private options?;
4113
4151
  backup_codes: BackupCodes;
@@ -4150,6 +4188,15 @@ declare class API {
4150
4188
  * Get current base URL
4151
4189
  */
4152
4190
  getBaseUrl(): string;
4191
+ /**
4192
+ * Set locale for Accept-Language header
4193
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
4194
+ */
4195
+ setLocale(locale: string | null): void;
4196
+ /**
4197
+ * Get current locale
4198
+ */
4199
+ getLocale(): string | null;
4153
4200
  /**
4154
4201
  * Get OpenAPI schema path
4155
4202
  * @returns Path to the OpenAPI schema JSON file
package/dist/clients.d.ts CHANGED
@@ -196,6 +196,7 @@ interface User$2 {
196
196
  company?: string;
197
197
  phone?: string;
198
198
  position?: string;
199
+ language?: string;
199
200
  avatar?: string | null;
200
201
  /** Designates whether the user can log into this admin site. */
201
202
  is_staff: boolean;
@@ -236,6 +237,7 @@ interface UserProfileUpdateRequest$1 {
236
237
  company?: string;
237
238
  phone?: string;
238
239
  position?: string;
240
+ language?: string;
239
241
  }
240
242
  /**
241
243
  * Serializer for updating user profile.
@@ -248,6 +250,7 @@ interface PatchedUserProfileUpdateRequest$1 {
248
250
  company?: string;
249
251
  phone?: string;
250
252
  position?: string;
253
+ language?: string;
251
254
  }
252
255
  /**
253
256
  * Nested serializer for Centrifugo WebSocket connection token.
@@ -404,6 +407,7 @@ interface User$1 {
404
407
  company?: string;
405
408
  phone?: string;
406
409
  position?: string;
410
+ language?: string;
407
411
  avatar?: string | null;
408
412
  /** Designates whether the user can log into this admin site. */
409
413
  is_staff: boolean;
@@ -910,6 +914,7 @@ declare const OTPVerifyResponseSchema: z.ZodObject<{
910
914
  company: z.ZodOptional<z.ZodString>;
911
915
  phone: z.ZodOptional<z.ZodString>;
912
916
  position: z.ZodOptional<z.ZodString>;
917
+ language: z.ZodOptional<z.ZodString>;
913
918
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
914
919
  is_staff: z.ZodBoolean;
915
920
  is_superuser: z.ZodBoolean;
@@ -946,6 +951,7 @@ declare const PatchedUserProfileUpdateRequestSchema: z.ZodObject<{
946
951
  company: z.ZodOptional<z.ZodString>;
947
952
  phone: z.ZodOptional<z.ZodString>;
948
953
  position: z.ZodOptional<z.ZodString>;
954
+ language: z.ZodOptional<z.ZodString>;
949
955
  }, z.core.$strip>;
950
956
  /**
951
957
  * Infer TypeScript type from Zod schema
@@ -1002,6 +1008,7 @@ declare const UserSchema: z.ZodObject<{
1002
1008
  company: z.ZodOptional<z.ZodString>;
1003
1009
  phone: z.ZodOptional<z.ZodString>;
1004
1010
  position: z.ZodOptional<z.ZodString>;
1011
+ language: z.ZodOptional<z.ZodString>;
1005
1012
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
1006
1013
  is_staff: z.ZodBoolean;
1007
1014
  is_superuser: z.ZodBoolean;
@@ -1036,6 +1043,7 @@ declare const UserProfileUpdateRequestSchema: z.ZodObject<{
1036
1043
  company: z.ZodOptional<z.ZodString>;
1037
1044
  phone: z.ZodOptional<z.ZodString>;
1038
1045
  position: z.ZodOptional<z.ZodString>;
1046
+ language: z.ZodOptional<z.ZodString>;
1039
1047
  }, z.core.$strip>;
1040
1048
  /**
1041
1049
  * Infer TypeScript type from Zod schema
@@ -1192,12 +1200,15 @@ interface APIOptions$2 {
1192
1200
  retryConfig?: RetryConfig$2;
1193
1201
  /** Logger configuration */
1194
1202
  loggerConfig?: Partial<LoggerConfig$2>;
1203
+ /** Locale for Accept-Language header (e.g. 'en', 'ko', 'ru') */
1204
+ locale?: string;
1195
1205
  }
1196
1206
  declare class API$2 {
1197
1207
  private baseUrl;
1198
1208
  private _client;
1199
1209
  private _token;
1200
1210
  private _refreshToken;
1211
+ private _locale;
1201
1212
  private storage;
1202
1213
  private options?;
1203
1214
  auth: Auth;
@@ -1239,6 +1250,15 @@ declare class API$2 {
1239
1250
  * Get current base URL
1240
1251
  */
1241
1252
  getBaseUrl(): string;
1253
+ /**
1254
+ * Set locale for Accept-Language header
1255
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
1256
+ */
1257
+ setLocale(locale: string | null): void;
1258
+ /**
1259
+ * Get current locale
1260
+ */
1261
+ getLocale(): string | null;
1242
1262
  /**
1243
1263
  * Get OpenAPI schema path
1244
1264
  * @returns Path to the OpenAPI schema JSON file
@@ -3085,12 +3105,15 @@ interface APIOptions$1 {
3085
3105
  retryConfig?: RetryConfig$1;
3086
3106
  /** Logger configuration */
3087
3107
  loggerConfig?: Partial<LoggerConfig$1>;
3108
+ /** Locale for Accept-Language header (e.g. 'en', 'ko', 'ru') */
3109
+ locale?: string;
3088
3110
  }
3089
3111
  declare class API$1 {
3090
3112
  private baseUrl;
3091
3113
  private _client;
3092
3114
  private _token;
3093
3115
  private _refreshToken;
3116
+ private _locale;
3094
3117
  private storage;
3095
3118
  private options?;
3096
3119
  centrifugo_admin_api: CentrifugoAdminApi;
@@ -3132,6 +3155,15 @@ declare class API$1 {
3132
3155
  * Get current base URL
3133
3156
  */
3134
3157
  getBaseUrl(): string;
3158
+ /**
3159
+ * Set locale for Accept-Language header
3160
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
3161
+ */
3162
+ setLocale(locale: string | null): void;
3163
+ /**
3164
+ * Get current locale
3165
+ */
3166
+ getLocale(): string | null;
3135
3167
  /**
3136
3168
  * Get OpenAPI schema path
3137
3169
  * @returns Path to the OpenAPI schema JSON file
@@ -3418,6 +3450,7 @@ interface TotpVerifyUser$1 {
3418
3450
  company?: string;
3419
3451
  phone?: string;
3420
3452
  position?: string;
3453
+ language?: string;
3421
3454
  avatar?: string | null;
3422
3455
  /** Designates whether the user can log into this admin site. */
3423
3456
  is_staff: boolean;
@@ -3806,6 +3839,7 @@ declare const TotpVerifyUserSchema: z.ZodObject<{
3806
3839
  company: z.ZodOptional<z.ZodString>;
3807
3840
  phone: z.ZodOptional<z.ZodString>;
3808
3841
  position: z.ZodOptional<z.ZodString>;
3842
+ language: z.ZodOptional<z.ZodString>;
3809
3843
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3810
3844
  is_staff: z.ZodBoolean;
3811
3845
  is_superuser: z.ZodBoolean;
@@ -3881,6 +3915,7 @@ declare const VerifyResponseSchema: z.ZodObject<{
3881
3915
  company: z.ZodOptional<z.ZodString>;
3882
3916
  phone: z.ZodOptional<z.ZodString>;
3883
3917
  position: z.ZodOptional<z.ZodString>;
3918
+ language: z.ZodOptional<z.ZodString>;
3884
3919
  avatar: z.ZodNullable<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
3885
3920
  is_staff: z.ZodBoolean;
3886
3921
  is_superuser: z.ZodBoolean;
@@ -4102,12 +4137,15 @@ interface APIOptions {
4102
4137
  retryConfig?: RetryConfig;
4103
4138
  /** Logger configuration */
4104
4139
  loggerConfig?: Partial<LoggerConfig>;
4140
+ /** Locale for Accept-Language header (e.g. 'en', 'ko', 'ru') */
4141
+ locale?: string;
4105
4142
  }
4106
4143
  declare class API {
4107
4144
  private baseUrl;
4108
4145
  private _client;
4109
4146
  private _token;
4110
4147
  private _refreshToken;
4148
+ private _locale;
4111
4149
  private storage;
4112
4150
  private options?;
4113
4151
  backup_codes: BackupCodes;
@@ -4150,6 +4188,15 @@ declare class API {
4150
4188
  * Get current base URL
4151
4189
  */
4152
4190
  getBaseUrl(): string;
4191
+ /**
4192
+ * Set locale for Accept-Language header
4193
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
4194
+ */
4195
+ setLocale(locale: string | null): void;
4196
+ /**
4197
+ * Get current locale
4198
+ */
4199
+ getLocale(): string | null;
4153
4200
  /**
4154
4201
  * Get OpenAPI schema path
4155
4202
  * @returns Path to the OpenAPI schema JSON file
package/dist/clients.mjs CHANGED
@@ -961,6 +961,7 @@ var UserSchema = z16.object({
961
961
  company: z16.string().max(100).optional(),
962
962
  phone: z16.string().max(20).optional(),
963
963
  position: z16.string().max(100).optional(),
964
+ language: z16.string().max(10).optional(),
964
965
  avatar: z16.union([z16.url(), z16.literal("")]).nullable(),
965
966
  is_staff: z16.boolean(),
966
967
  is_superuser: z16.boolean(),
@@ -987,7 +988,8 @@ var PatchedUserProfileUpdateRequestSchema = z18.object({
987
988
  last_name: z18.string().max(50).optional(),
988
989
  company: z18.string().max(100).optional(),
989
990
  phone: z18.string().max(20).optional(),
990
- position: z18.string().max(100).optional()
991
+ position: z18.string().max(100).optional(),
992
+ language: z18.string().max(10).optional()
991
993
  });
992
994
 
993
995
  // src/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts
@@ -1010,7 +1012,8 @@ var UserProfileUpdateRequestSchema = z21.object({
1010
1012
  last_name: z21.string().max(50).optional(),
1011
1013
  company: z21.string().max(100).optional(),
1012
1014
  phone: z21.string().max(20).optional(),
1013
- position: z21.string().max(100).optional()
1015
+ position: z21.string().max(100).optional(),
1016
+ language: z21.string().max(10).optional()
1014
1017
  });
1015
1018
 
1016
1019
  // src/generated/cfg_accounts/_utils/fetchers/accounts.ts
@@ -1626,14 +1629,30 @@ __name(partialUpdateAccountsProfileUpdatePartialUpdate, "partialUpdateAccountsPr
1626
1629
  // src/generated/cfg_accounts/index.ts
1627
1630
  var TOKEN_KEY = "auth_token";
1628
1631
  var REFRESH_TOKEN_KEY = "refresh_token";
1632
+ function detectLocale() {
1633
+ try {
1634
+ if (typeof document !== "undefined") {
1635
+ const match = document.cookie.match(/(?:^|;\s*)NEXT_LOCALE=([^;]*)/);
1636
+ if (match) return match[1];
1637
+ }
1638
+ if (typeof navigator !== "undefined" && navigator.language) {
1639
+ return navigator.language;
1640
+ }
1641
+ } catch {
1642
+ }
1643
+ return null;
1644
+ }
1645
+ __name(detectLocale, "detectLocale");
1629
1646
  var API = class {
1630
1647
  constructor(baseUrl, options) {
1631
1648
  this._token = null;
1632
1649
  this._refreshToken = null;
1650
+ this._locale = null;
1633
1651
  this.baseUrl = baseUrl;
1634
1652
  this.options = options;
1635
1653
  const logger = options?.loggerConfig ? new APILogger(options.loggerConfig) : void 0;
1636
1654
  this.storage = options?.storage || new LocalStorageAdapter(logger);
1655
+ this._locale = options?.locale || null;
1637
1656
  this._loadTokensFromStorage();
1638
1657
  this._client = new APIClient(this.baseUrl, {
1639
1658
  retryConfig: this.options?.retryConfig,
@@ -1669,11 +1688,13 @@ var API = class {
1669
1688
  const originalRequest = this._client.request.bind(this._client);
1670
1689
  this._client.request = async (method, path, options) => {
1671
1690
  const token = this.getToken();
1691
+ const locale = this._locale || detectLocale();
1672
1692
  const mergedOptions = {
1673
1693
  ...options,
1674
1694
  headers: {
1675
1695
  ...options?.headers || {},
1676
- ...token ? { "Authorization": `Bearer ${token}` } : {}
1696
+ ...token ? { "Authorization": `Bearer ${token}` } : {},
1697
+ ...locale ? { "Accept-Language": locale } : {}
1677
1698
  }
1678
1699
  };
1679
1700
  return originalRequest(method, path, mergedOptions);
@@ -1735,6 +1756,19 @@ var API = class {
1735
1756
  getBaseUrl() {
1736
1757
  return this.baseUrl;
1737
1758
  }
1759
+ /**
1760
+ * Set locale for Accept-Language header
1761
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
1762
+ */
1763
+ setLocale(locale) {
1764
+ this._locale = locale;
1765
+ }
1766
+ /**
1767
+ * Get current locale
1768
+ */
1769
+ getLocale() {
1770
+ return this._locale;
1771
+ }
1738
1772
  /**
1739
1773
  * Get OpenAPI schema path
1740
1774
  * @returns Path to the OpenAPI schema JSON file
@@ -3611,14 +3645,30 @@ __name(createCentrifugoTestingSendAckCreate, "createCentrifugoTestingSendAckCrea
3611
3645
  // src/generated/cfg_centrifugo/index.ts
3612
3646
  var TOKEN_KEY2 = "auth_token";
3613
3647
  var REFRESH_TOKEN_KEY2 = "refresh_token";
3648
+ function detectLocale2() {
3649
+ try {
3650
+ if (typeof document !== "undefined") {
3651
+ const match = document.cookie.match(/(?:^|;\s*)NEXT_LOCALE=([^;]*)/);
3652
+ if (match) return match[1];
3653
+ }
3654
+ if (typeof navigator !== "undefined" && navigator.language) {
3655
+ return navigator.language;
3656
+ }
3657
+ } catch {
3658
+ }
3659
+ return null;
3660
+ }
3661
+ __name(detectLocale2, "detectLocale");
3614
3662
  var API2 = class {
3615
3663
  constructor(baseUrl, options) {
3616
3664
  this._token = null;
3617
3665
  this._refreshToken = null;
3666
+ this._locale = null;
3618
3667
  this.baseUrl = baseUrl;
3619
3668
  this.options = options;
3620
3669
  const logger = options?.loggerConfig ? new APILogger2(options.loggerConfig) : void 0;
3621
3670
  this.storage = options?.storage || new LocalStorageAdapter2(logger);
3671
+ this._locale = options?.locale || null;
3622
3672
  this._loadTokensFromStorage();
3623
3673
  this._client = new APIClient2(this.baseUrl, {
3624
3674
  retryConfig: this.options?.retryConfig,
@@ -3654,11 +3704,13 @@ var API2 = class {
3654
3704
  const originalRequest = this._client.request.bind(this._client);
3655
3705
  this._client.request = async (method, path, options) => {
3656
3706
  const token = this.getToken();
3707
+ const locale = this._locale || detectLocale2();
3657
3708
  const mergedOptions = {
3658
3709
  ...options,
3659
3710
  headers: {
3660
3711
  ...options?.headers || {},
3661
- ...token ? { "Authorization": `Bearer ${token}` } : {}
3712
+ ...token ? { "Authorization": `Bearer ${token}` } : {},
3713
+ ...locale ? { "Accept-Language": locale } : {}
3662
3714
  }
3663
3715
  };
3664
3716
  return originalRequest(method, path, mergedOptions);
@@ -3720,6 +3772,19 @@ var API2 = class {
3720
3772
  getBaseUrl() {
3721
3773
  return this.baseUrl;
3722
3774
  }
3775
+ /**
3776
+ * Set locale for Accept-Language header
3777
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
3778
+ */
3779
+ setLocale(locale) {
3780
+ this._locale = locale;
3781
+ }
3782
+ /**
3783
+ * Get current locale
3784
+ */
3785
+ getLocale() {
3786
+ return this._locale;
3787
+ }
3723
3788
  /**
3724
3789
  * Get OpenAPI schema path
3725
3790
  * @returns Path to the OpenAPI schema JSON file
@@ -4618,6 +4683,7 @@ var TotpVerifyUserSchema = z68.object({
4618
4683
  company: z68.string().max(100).optional(),
4619
4684
  phone: z68.string().max(20).optional(),
4620
4685
  position: z68.string().max(100).optional(),
4686
+ language: z68.string().max(10).optional(),
4621
4687
  avatar: z68.union([z68.url(), z68.literal("")]).nullable(),
4622
4688
  is_staff: z68.boolean(),
4623
4689
  is_superuser: z68.boolean(),
@@ -5020,14 +5086,30 @@ __name(createTotpVerifyBackupCreate, "createTotpVerifyBackupCreate");
5020
5086
  // src/generated/cfg_totp/index.ts
5021
5087
  var TOKEN_KEY3 = "auth_token";
5022
5088
  var REFRESH_TOKEN_KEY3 = "refresh_token";
5089
+ function detectLocale3() {
5090
+ try {
5091
+ if (typeof document !== "undefined") {
5092
+ const match = document.cookie.match(/(?:^|;\s*)NEXT_LOCALE=([^;]*)/);
5093
+ if (match) return match[1];
5094
+ }
5095
+ if (typeof navigator !== "undefined" && navigator.language) {
5096
+ return navigator.language;
5097
+ }
5098
+ } catch {
5099
+ }
5100
+ return null;
5101
+ }
5102
+ __name(detectLocale3, "detectLocale");
5023
5103
  var API3 = class {
5024
5104
  constructor(baseUrl, options) {
5025
5105
  this._token = null;
5026
5106
  this._refreshToken = null;
5107
+ this._locale = null;
5027
5108
  this.baseUrl = baseUrl;
5028
5109
  this.options = options;
5029
5110
  const logger = options?.loggerConfig ? new APILogger3(options.loggerConfig) : void 0;
5030
5111
  this.storage = options?.storage || new LocalStorageAdapter3(logger);
5112
+ this._locale = options?.locale || null;
5031
5113
  this._loadTokensFromStorage();
5032
5114
  this._client = new APIClient3(this.baseUrl, {
5033
5115
  retryConfig: this.options?.retryConfig,
@@ -5065,11 +5147,13 @@ var API3 = class {
5065
5147
  const originalRequest = this._client.request.bind(this._client);
5066
5148
  this._client.request = async (method, path, options) => {
5067
5149
  const token = this.getToken();
5150
+ const locale = this._locale || detectLocale3();
5068
5151
  const mergedOptions = {
5069
5152
  ...options,
5070
5153
  headers: {
5071
5154
  ...options?.headers || {},
5072
- ...token ? { "Authorization": `Bearer ${token}` } : {}
5155
+ ...token ? { "Authorization": `Bearer ${token}` } : {},
5156
+ ...locale ? { "Accept-Language": locale } : {}
5073
5157
  }
5074
5158
  };
5075
5159
  return originalRequest(method, path, mergedOptions);
@@ -5131,6 +5215,19 @@ var API3 = class {
5131
5215
  getBaseUrl() {
5132
5216
  return this.baseUrl;
5133
5217
  }
5218
+ /**
5219
+ * Set locale for Accept-Language header
5220
+ * @param locale - Locale string (e.g. 'en', 'ko', 'ru') or null to clear
5221
+ */
5222
+ setLocale(locale) {
5223
+ this._locale = locale;
5224
+ }
5225
+ /**
5226
+ * Get current locale
5227
+ */
5228
+ getLocale() {
5229
+ return this._locale;
5230
+ }
5134
5231
  /**
5135
5232
  * Get OpenAPI schema path
5136
5233
  * @returns Path to the OpenAPI schema JSON file
@@ -5382,7 +5479,7 @@ __name(useCentrifugoAuthTokenRetrieve, "useCentrifugoAuthTokenRetrieve");
5382
5479
  import useSWR4 from "swr";
5383
5480
  function useCentrifugoMonitorChannelsRetrieve(params, client) {
5384
5481
  return useSWR4(
5385
- params ? ["cfg-centrifugo-monitor-channel", params] : "cfg-centrifugo-monitor-channel",
5482
+ ["cfg-centrifugo-monitor-channel", params],
5386
5483
  () => getCentrifugoMonitorChannelsRetrieve(params, client)
5387
5484
  );
5388
5485
  }
@@ -5396,21 +5493,21 @@ function useCentrifugoMonitorHealthRetrieve(client) {
5396
5493
  __name(useCentrifugoMonitorHealthRetrieve, "useCentrifugoMonitorHealthRetrieve");
5397
5494
  function useCentrifugoMonitorOverviewRetrieve(params, client) {
5398
5495
  return useSWR4(
5399
- params ? ["cfg-centrifugo-monitor-overview", params] : "cfg-centrifugo-monitor-overview",
5496
+ ["cfg-centrifugo-monitor-overview", params],
5400
5497
  () => getCentrifugoMonitorOverviewRetrieve(params, client)
5401
5498
  );
5402
5499
  }
5403
5500
  __name(useCentrifugoMonitorOverviewRetrieve, "useCentrifugoMonitorOverviewRetrieve");
5404
5501
  function useCentrifugoMonitorPublishesList(params, client) {
5405
5502
  return useSWR4(
5406
- params ? ["cfg-centrifugo-monitor-publishes", params] : "cfg-centrifugo-monitor-publishes",
5503
+ ["cfg-centrifugo-monitor-publishes", params],
5407
5504
  () => getCentrifugoMonitorPublishesList(params, client)
5408
5505
  );
5409
5506
  }
5410
5507
  __name(useCentrifugoMonitorPublishesList, "useCentrifugoMonitorPublishesList");
5411
5508
  function useCentrifugoMonitorTimelineRetrieve(params, client) {
5412
5509
  return useSWR4(
5413
- params ? ["cfg-centrifugo-monitor-timeline", params] : "cfg-centrifugo-monitor-timeline",
5510
+ ["cfg-centrifugo-monitor-timeline", params],
5414
5511
  () => getCentrifugoMonitorTimelineRetrieve(params, client)
5415
5512
  );
5416
5513
  }
@@ -5485,7 +5582,7 @@ import useSWR6 from "swr";
5485
5582
  import { useSWRConfig as useSWRConfig8 } from "swr";
5486
5583
  function useTotpDevicesList(params, client) {
5487
5584
  return useSWR6(
5488
- params ? ["cfg-totp-devices", params] : "cfg-totp-devices",
5585
+ ["cfg-totp-devices", params],
5489
5586
  () => getTotpDevicesList(params, client)
5490
5587
  );
5491
5588
  }