@djangocfg/api 2.1.87 → 2.1.89

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 (59) hide show
  1. package/dist/auth-server.cjs +1963 -4
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.d.cts +35 -1
  4. package/dist/auth-server.d.ts +35 -1
  5. package/dist/auth-server.mjs +1953 -4
  6. package/dist/auth-server.mjs.map +1 -1
  7. package/dist/auth.cjs +692 -497
  8. package/dist/auth.cjs.map +1 -1
  9. package/dist/auth.d.cts +18 -2
  10. package/dist/auth.d.ts +18 -2
  11. package/dist/auth.mjs +655 -460
  12. package/dist/auth.mjs.map +1 -1
  13. package/dist/clients.cjs +460 -383
  14. package/dist/clients.cjs.map +1 -1
  15. package/dist/clients.d.cts +26 -6
  16. package/dist/clients.d.ts +26 -6
  17. package/dist/clients.mjs +460 -383
  18. package/dist/clients.mjs.map +1 -1
  19. package/dist/hooks.cjs +130 -105
  20. package/dist/hooks.cjs.map +1 -1
  21. package/dist/hooks.d.cts +24 -4
  22. package/dist/hooks.d.ts +24 -4
  23. package/dist/hooks.mjs +130 -105
  24. package/dist/hooks.mjs.map +1 -1
  25. package/dist/index.cjs +373 -311
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +54 -8
  28. package/dist/index.d.ts +54 -8
  29. package/dist/index.mjs +373 -311
  30. package/dist/index.mjs.map +1 -1
  31. package/package.json +3 -3
  32. package/src/auth/context/AccountsContext.tsx +3 -3
  33. package/src/auth/context/AuthContext.tsx +56 -10
  34. package/src/auth/hooks/index.ts +3 -0
  35. package/src/auth/hooks/useProfileCache.ts +1 -1
  36. package/src/auth/hooks/useTokenRefresh.ts +161 -0
  37. package/src/auth/middlewares/index.ts +8 -1
  38. package/src/auth/middlewares/tokenRefresh.ts +158 -0
  39. package/src/generated/cfg_accounts/CLAUDE.md +2 -9
  40. package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +2 -1
  41. package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +2 -1
  42. package/src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +15 -0
  43. package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -0
  44. package/src/generated/cfg_accounts/accounts/models.ts +0 -1
  45. package/src/generated/cfg_accounts/accounts__user_profile/client.ts +4 -2
  46. package/src/generated/cfg_accounts/accounts__user_profile/models.ts +9 -1
  47. package/src/generated/cfg_accounts/client.ts +18 -0
  48. package/src/generated/cfg_accounts/index.ts +3 -1
  49. package/src/generated/cfg_accounts/schema.json +2 -2
  50. package/src/generated/cfg_centrifugo/CLAUDE.md +1 -8
  51. package/src/generated/cfg_centrifugo/client.ts +18 -0
  52. package/src/generated/cfg_centrifugo/index.ts +3 -1
  53. package/src/generated/cfg_totp/CLAUDE.md +1 -8
  54. package/src/generated/cfg_totp/client.ts +18 -0
  55. package/src/generated/cfg_totp/index.ts +3 -1
  56. package/src/generated/cfg_totp/totp/models.ts +2 -0
  57. package/src/generated/cfg_webpush/CLAUDE.md +1 -8
  58. package/src/generated/cfg_webpush/client.ts +18 -0
  59. package/src/generated/cfg_webpush/index.ts +3 -1
package/dist/clients.mjs CHANGED
@@ -103,7 +103,9 @@ var UserProfile = class {
103
103
  * multipart/form-data with 'avatar' field.
104
104
  */
105
105
  async accountsProfileAvatarCreate(data) {
106
- const response = await this.client.request("POST", "/cfg/accounts/profile/avatar/", { formData: data });
106
+ const formData = new FormData();
107
+ formData.append("avatar", data.avatar);
108
+ const response = await this.client.request("POST", "/cfg/accounts/profile/avatar/", { formData });
107
109
  return response;
108
110
  }
109
111
  /**
@@ -539,8 +541,10 @@ var APIClient = class {
539
541
  constructor(baseUrl, options) {
540
542
  this.logger = null;
541
543
  this.retryConfig = null;
544
+ this.tokenGetter = null;
542
545
  this.baseUrl = baseUrl.replace(/\/$/, "");
543
546
  this.httpClient = options?.httpClient || new FetchAdapter();
547
+ this.tokenGetter = options?.tokenGetter || null;
544
548
  if (options?.loggerConfig !== void 0) {
545
549
  this.logger = new APILogger(options.loggerConfig);
546
550
  }
@@ -569,6 +573,19 @@ var APIClient = class {
569
573
  }
570
574
  return null;
571
575
  }
576
+ /**
577
+ * Get the base URL for building streaming/download URLs.
578
+ */
579
+ getBaseUrl() {
580
+ return this.baseUrl;
581
+ }
582
+ /**
583
+ * Get JWT token for URL authentication (used in streaming endpoints).
584
+ * Returns null if no token getter is configured or no token is available.
585
+ */
586
+ getToken() {
587
+ return this.tokenGetter ? this.tokenGetter() : null;
588
+ }
572
589
  /**
573
590
  * Make HTTP request with Django CSRF and session handling.
574
591
  * Automatically retries on network errors and 5xx server errors.
@@ -816,168 +833,174 @@ var CentrifugoTokenSchema = z.object({
816
833
  channels: z.array(z.string())
817
834
  });
818
835
 
819
- // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
836
+ // src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts
820
837
  import { z as z2 } from "zod";
821
- var OAuthAuthorizeRequestRequestSchema = z2.object({
822
- redirect_uri: z2.union([z2.url(), z2.literal("")]).optional(),
823
- source_url: z2.union([z2.url(), z2.literal("")]).optional()
838
+ var CfgAccountsProfileAvatarCreateRequestSchema = z2.object({
839
+ avatar: z2.union([z2.instanceof(File), z2.instanceof(Blob)])
824
840
  });
825
841
 
826
- // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
842
+ // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
827
843
  import { z as z3 } from "zod";
828
- var OAuthAuthorizeResponseSchema = z3.object({
829
- authorization_url: z3.union([z3.url(), z3.literal("")]),
830
- state: z3.string()
844
+ var OAuthAuthorizeRequestRequestSchema = z3.object({
845
+ redirect_uri: z3.union([z3.url(), z3.literal("")]).optional(),
846
+ source_url: z3.union([z3.url(), z3.literal("")]).optional()
831
847
  });
832
848
 
833
- // src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
849
+ // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
834
850
  import { z as z4 } from "zod";
835
- var OAuthCallbackRequestRequestSchema = z4.object({
836
- code: z4.string().min(10).max(500),
837
- state: z4.string().min(20).max(100),
838
- redirect_uri: z4.union([z4.url(), z4.literal("")]).optional()
851
+ var OAuthAuthorizeResponseSchema = z4.object({
852
+ authorization_url: z4.union([z4.url(), z4.literal("")]),
853
+ state: z4.string()
839
854
  });
840
855
 
841
- // src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
856
+ // src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
842
857
  import { z as z5 } from "zod";
843
- var OAuthConnectionSchema = z5.object({
844
- id: z5.int(),
845
- provider: z5.nativeEnum(OAuthConnectionProvider),
846
- provider_display: z5.string(),
847
- provider_username: z5.string(),
848
- provider_email: z5.email(),
849
- provider_avatar_url: z5.union([z5.url(), z5.literal("")]),
850
- connected_at: z5.iso.datetime(),
851
- last_login_at: z5.iso.datetime()
858
+ var OAuthCallbackRequestRequestSchema = z5.object({
859
+ code: z5.string().min(10).max(500),
860
+ state: z5.string().min(20).max(100),
861
+ redirect_uri: z5.union([z5.url(), z5.literal("")]).optional()
852
862
  });
853
863
 
854
- // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
864
+ // src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
855
865
  import { z as z6 } from "zod";
856
- var OAuthDisconnectRequestRequestSchema = z6.object({
857
- provider: z6.nativeEnum(OAuthDisconnectRequestRequestProvider)
866
+ var OAuthConnectionSchema = z6.object({
867
+ id: z6.int(),
868
+ provider: z6.nativeEnum(OAuthConnectionProvider),
869
+ provider_display: z6.string(),
870
+ provider_username: z6.string(),
871
+ provider_email: z6.email(),
872
+ provider_avatar_url: z6.union([z6.url(), z6.literal("")]),
873
+ connected_at: z6.iso.datetime(),
874
+ last_login_at: z6.iso.datetime()
858
875
  });
859
876
 
860
- // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
877
+ // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
861
878
  import { z as z7 } from "zod";
862
- var OAuthErrorSchema = z7.object({
863
- error: z7.string(),
864
- error_description: z7.string().optional()
879
+ var OAuthDisconnectRequestRequestSchema = z7.object({
880
+ provider: z7.nativeEnum(OAuthDisconnectRequestRequestProvider)
865
881
  });
866
882
 
867
- // src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
883
+ // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
868
884
  import { z as z8 } from "zod";
869
- var OAuthProvidersResponseSchema = z8.object({
870
- providers: z8.array(z8.record(z8.string(), z8.any()))
885
+ var OAuthErrorSchema = z8.object({
886
+ error: z8.string(),
887
+ error_description: z8.string().optional()
871
888
  });
872
889
 
873
- // src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
890
+ // src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
874
891
  import { z as z9 } from "zod";
875
- var OAuthTokenResponseSchema = z9.object({
876
- requires_2fa: z9.boolean().optional(),
877
- session_id: z9.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(),
878
- access: z9.string().nullable().optional(),
879
- refresh: z9.string().nullable().optional(),
880
- user: z9.record(z9.string(), z9.any()).nullable().optional(),
881
- is_new_user: z9.boolean(),
882
- is_new_connection: z9.boolean(),
883
- should_prompt_2fa: z9.boolean().optional()
892
+ var OAuthProvidersResponseSchema = z9.object({
893
+ providers: z9.array(z9.record(z9.string(), z9.any()))
884
894
  });
885
895
 
886
- // src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
896
+ // src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
887
897
  import { z as z10 } from "zod";
888
- var OTPErrorResponseSchema = z10.object({
889
- error: z10.string()
898
+ var OAuthTokenResponseSchema = z10.object({
899
+ requires_2fa: z10.boolean().optional(),
900
+ session_id: z10.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(),
901
+ access: z10.string().nullable().optional(),
902
+ refresh: z10.string().nullable().optional(),
903
+ user: z10.record(z10.string(), z10.any()).nullable().optional(),
904
+ is_new_user: z10.boolean(),
905
+ is_new_connection: z10.boolean(),
906
+ should_prompt_2fa: z10.boolean().optional()
890
907
  });
891
908
 
892
- // src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
909
+ // src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
893
910
  import { z as z11 } from "zod";
894
- var OTPRequestRequestSchema = z11.object({
895
- identifier: z11.string().min(1),
896
- channel: z11.nativeEnum(OTPRequestRequestChannel).optional(),
897
- source_url: z11.union([z11.url(), z11.literal("")]).optional()
911
+ var OTPErrorResponseSchema = z11.object({
912
+ error: z11.string()
898
913
  });
899
914
 
900
- // src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
915
+ // src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
901
916
  import { z as z12 } from "zod";
902
- var OTPRequestResponseSchema = z12.object({
903
- message: z12.string()
917
+ var OTPRequestRequestSchema = z12.object({
918
+ identifier: z12.string().min(1),
919
+ channel: z12.nativeEnum(OTPRequestRequestChannel).optional(),
920
+ source_url: z12.union([z12.url(), z12.literal("")]).optional()
904
921
  });
905
922
 
906
- // src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
923
+ // src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
907
924
  import { z as z13 } from "zod";
908
- var OTPVerifyRequestSchema = z13.object({
909
- identifier: z13.string().min(1),
910
- otp: z13.string().min(6).max(6),
911
- channel: z13.nativeEnum(OTPVerifyRequestChannel).optional(),
912
- source_url: z13.union([z13.url(), z13.literal("")]).optional()
925
+ var OTPRequestResponseSchema = z13.object({
926
+ message: z13.string()
927
+ });
928
+
929
+ // src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
930
+ import { z as z14 } from "zod";
931
+ var OTPVerifyRequestSchema = z14.object({
932
+ identifier: z14.string().min(1),
933
+ otp: z14.string().min(6).max(6),
934
+ channel: z14.nativeEnum(OTPVerifyRequestChannel).optional(),
935
+ source_url: z14.union([z14.url(), z14.literal("")]).optional()
913
936
  });
914
937
 
915
938
  // src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
916
- import { z as z15 } from "zod";
939
+ import { z as z16 } from "zod";
917
940
 
918
941
  // src/generated/cfg_accounts/_utils/schemas/User.schema.ts
919
- import { z as z14 } from "zod";
920
- var UserSchema = z14.object({
921
- id: z14.int(),
922
- email: z14.email(),
923
- first_name: z14.string().max(50).optional(),
924
- last_name: z14.string().max(50).optional(),
925
- full_name: z14.string(),
926
- initials: z14.string(),
927
- display_username: z14.string(),
928
- company: z14.string().max(100).optional(),
929
- phone: z14.string().max(20).optional(),
930
- position: z14.string().max(100).optional(),
931
- avatar: z14.union([z14.url(), z14.literal("")]).nullable(),
932
- is_staff: z14.boolean(),
933
- is_superuser: z14.boolean(),
934
- date_joined: z14.iso.datetime(),
935
- last_login: z14.iso.datetime().nullable(),
936
- unanswered_messages_count: z14.int(),
942
+ import { z as z15 } from "zod";
943
+ var UserSchema = z15.object({
944
+ id: z15.int(),
945
+ email: z15.email(),
946
+ first_name: z15.string().max(50).optional(),
947
+ last_name: z15.string().max(50).optional(),
948
+ full_name: z15.string(),
949
+ initials: z15.string(),
950
+ display_username: z15.string(),
951
+ company: z15.string().max(100).optional(),
952
+ phone: z15.string().max(20).optional(),
953
+ position: z15.string().max(100).optional(),
954
+ avatar: z15.union([z15.url(), z15.literal("")]).nullable(),
955
+ is_staff: z15.boolean(),
956
+ is_superuser: z15.boolean(),
957
+ date_joined: z15.iso.datetime(),
958
+ last_login: z15.iso.datetime().nullable(),
959
+ unanswered_messages_count: z15.int(),
937
960
  centrifugo: CentrifugoTokenSchema.nullable()
938
961
  });
939
962
 
940
963
  // src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
941
- var OTPVerifyResponseSchema = z15.object({
942
- requires_2fa: z15.boolean().optional(),
943
- session_id: z15.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(),
944
- refresh: z15.string().nullable().optional(),
945
- access: z15.string().nullable().optional(),
964
+ var OTPVerifyResponseSchema = z16.object({
965
+ requires_2fa: z16.boolean().optional(),
966
+ session_id: z16.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(),
967
+ refresh: z16.string().nullable().optional(),
968
+ access: z16.string().nullable().optional(),
946
969
  user: UserSchema.nullable().optional(),
947
- should_prompt_2fa: z15.boolean().optional()
970
+ should_prompt_2fa: z16.boolean().optional()
948
971
  });
949
972
 
950
973
  // src/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts
951
- import { z as z16 } from "zod";
952
- var PatchedUserProfileUpdateRequestSchema = z16.object({
953
- first_name: z16.string().max(50).optional(),
954
- last_name: z16.string().max(50).optional(),
955
- company: z16.string().max(100).optional(),
956
- phone: z16.string().max(20).optional(),
957
- position: z16.string().max(100).optional()
974
+ import { z as z17 } from "zod";
975
+ var PatchedUserProfileUpdateRequestSchema = z17.object({
976
+ first_name: z17.string().max(50).optional(),
977
+ last_name: z17.string().max(50).optional(),
978
+ company: z17.string().max(100).optional(),
979
+ phone: z17.string().max(20).optional(),
980
+ position: z17.string().max(100).optional()
958
981
  });
959
982
 
960
983
  // src/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts
961
- import { z as z17 } from "zod";
962
- var TokenRefreshSchema = z17.object({
963
- access: z17.string(),
964
- refresh: z17.string()
984
+ import { z as z18 } from "zod";
985
+ var TokenRefreshSchema = z18.object({
986
+ access: z18.string(),
987
+ refresh: z18.string()
965
988
  });
966
989
 
967
990
  // src/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts
968
- import { z as z18 } from "zod";
969
- var TokenRefreshRequestSchema = z18.object({
970
- refresh: z18.string().min(1)
991
+ import { z as z19 } from "zod";
992
+ var TokenRefreshRequestSchema = z19.object({
993
+ refresh: z19.string().min(1)
971
994
  });
972
995
 
973
996
  // src/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts
974
- import { z as z19 } from "zod";
975
- var UserProfileUpdateRequestSchema = z19.object({
976
- first_name: z19.string().max(50).optional(),
977
- last_name: z19.string().max(50).optional(),
978
- company: z19.string().max(100).optional(),
979
- phone: z19.string().max(20).optional(),
980
- position: z19.string().max(100).optional()
997
+ import { z as z20 } from "zod";
998
+ var UserProfileUpdateRequestSchema = z20.object({
999
+ first_name: z20.string().max(50).optional(),
1000
+ last_name: z20.string().max(50).optional(),
1001
+ company: z20.string().max(100).optional(),
1002
+ phone: z20.string().max(20).optional(),
1003
+ position: z20.string().max(100).optional()
981
1004
  });
982
1005
 
983
1006
  // src/generated/cfg_accounts/_utils/fetchers/accounts.ts
@@ -1561,7 +1584,8 @@ var API = class {
1561
1584
  this._loadTokensFromStorage();
1562
1585
  this._client = new APIClient(this.baseUrl, {
1563
1586
  retryConfig: this.options?.retryConfig,
1564
- loggerConfig: this.options?.loggerConfig
1587
+ loggerConfig: this.options?.loggerConfig,
1588
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
1565
1589
  });
1566
1590
  this._injectAuthHeader();
1567
1591
  this.auth = this._client.auth;
@@ -1579,7 +1603,8 @@ var API = class {
1579
1603
  _reinitClients() {
1580
1604
  this._client = new APIClient(this.baseUrl, {
1581
1605
  retryConfig: this.options?.retryConfig,
1582
- loggerConfig: this.options?.loggerConfig
1606
+ loggerConfig: this.options?.loggerConfig,
1607
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
1583
1608
  });
1584
1609
  this._injectAuthHeader();
1585
1610
  this.auth = this._client.auth;
@@ -2250,8 +2275,10 @@ var APIClient2 = class {
2250
2275
  constructor(baseUrl, options) {
2251
2276
  this.logger = null;
2252
2277
  this.retryConfig = null;
2278
+ this.tokenGetter = null;
2253
2279
  this.baseUrl = baseUrl.replace(/\/$/, "");
2254
2280
  this.httpClient = options?.httpClient || new FetchAdapter2();
2281
+ this.tokenGetter = options?.tokenGetter || null;
2255
2282
  if (options?.loggerConfig !== void 0) {
2256
2283
  this.logger = new APILogger2(options.loggerConfig);
2257
2284
  }
@@ -2280,6 +2307,19 @@ var APIClient2 = class {
2280
2307
  }
2281
2308
  return null;
2282
2309
  }
2310
+ /**
2311
+ * Get the base URL for building streaming/download URLs.
2312
+ */
2313
+ getBaseUrl() {
2314
+ return this.baseUrl;
2315
+ }
2316
+ /**
2317
+ * Get JWT token for URL authentication (used in streaming endpoints).
2318
+ * Returns null if no token getter is configured or no token is available.
2319
+ */
2320
+ getToken() {
2321
+ return this.tokenGetter ? this.tokenGetter() : null;
2322
+ }
2283
2323
  /**
2284
2324
  * Make HTTP request with Django CSRF and session handling.
2285
2325
  * Automatically retries on network errors and 5xx server errors.
@@ -2532,320 +2572,320 @@ __export(schemas_exports2, {
2532
2572
  });
2533
2573
 
2534
2574
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts
2535
- import { z as z20 } from "zod";
2536
- var CentrifugoChannelInfoSchema = z20.object({
2537
- num_clients: z20.int()
2575
+ import { z as z21 } from "zod";
2576
+ var CentrifugoChannelInfoSchema = z21.object({
2577
+ num_clients: z21.int()
2538
2578
  });
2539
2579
 
2540
2580
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts
2541
- import { z as z21 } from "zod";
2542
- var CentrifugoChannelsRequestRequestSchema = z21.object({
2543
- pattern: z21.string().nullable().optional()
2581
+ import { z as z22 } from "zod";
2582
+ var CentrifugoChannelsRequestRequestSchema = z22.object({
2583
+ pattern: z22.string().nullable().optional()
2544
2584
  });
2545
2585
 
2546
2586
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2547
- import { z as z24 } from "zod";
2587
+ import { z as z25 } from "zod";
2548
2588
 
2549
2589
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
2550
- import { z as z22 } from "zod";
2551
- var CentrifugoChannelsResultSchema = z22.object({
2552
- channels: z22.record(z22.string(), CentrifugoChannelInfoSchema)
2590
+ import { z as z23 } from "zod";
2591
+ var CentrifugoChannelsResultSchema = z23.object({
2592
+ channels: z23.record(z23.string(), CentrifugoChannelInfoSchema)
2553
2593
  });
2554
2594
 
2555
2595
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts
2556
- import { z as z23 } from "zod";
2557
- var CentrifugoErrorSchema = z23.object({
2558
- code: z23.int().optional(),
2559
- message: z23.string().optional()
2596
+ import { z as z24 } from "zod";
2597
+ var CentrifugoErrorSchema = z24.object({
2598
+ code: z24.int().optional(),
2599
+ message: z24.string().optional()
2560
2600
  });
2561
2601
 
2562
2602
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
2563
- var CentrifugoChannelsResponseSchema = z24.object({
2603
+ var CentrifugoChannelsResponseSchema = z25.object({
2564
2604
  error: CentrifugoErrorSchema.optional(),
2565
2605
  result: CentrifugoChannelsResultSchema.optional()
2566
2606
  });
2567
2607
 
2568
2608
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts
2569
- import { z as z25 } from "zod";
2570
- var CentrifugoClientInfoSchema = z25.object({
2571
- user: z25.string(),
2572
- client: z25.string(),
2573
- conn_info: z25.record(z25.string(), z25.any()).nullable().optional(),
2574
- chan_info: z25.record(z25.string(), z25.any()).nullable().optional()
2609
+ import { z as z26 } from "zod";
2610
+ var CentrifugoClientInfoSchema = z26.object({
2611
+ user: z26.string(),
2612
+ client: z26.string(),
2613
+ conn_info: z26.record(z26.string(), z26.any()).nullable().optional(),
2614
+ chan_info: z26.record(z26.string(), z26.any()).nullable().optional()
2575
2615
  });
2576
2616
 
2577
2617
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts
2578
- import { z as z26 } from "zod";
2579
- var CentrifugoHealthCheckSchema = z26.object({
2580
- status: z26.string(),
2581
- wrapper_url: z26.string(),
2582
- has_api_key: z26.boolean(),
2583
- timestamp: z26.string()
2618
+ import { z as z27 } from "zod";
2619
+ var CentrifugoHealthCheckSchema = z27.object({
2620
+ status: z27.string(),
2621
+ wrapper_url: z27.string(),
2622
+ has_api_key: z27.boolean(),
2623
+ timestamp: z27.string()
2584
2624
  });
2585
2625
 
2586
2626
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2587
- import { z as z28 } from "zod";
2627
+ import { z as z29 } from "zod";
2588
2628
 
2589
2629
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
2590
- import { z as z27 } from "zod";
2591
- var CentrifugoStreamPositionSchema = z27.object({
2592
- offset: z27.int(),
2593
- epoch: z27.string()
2630
+ import { z as z28 } from "zod";
2631
+ var CentrifugoStreamPositionSchema = z28.object({
2632
+ offset: z28.int(),
2633
+ epoch: z28.string()
2594
2634
  });
2595
2635
 
2596
2636
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
2597
- var CentrifugoHistoryRequestRequestSchema = z28.object({
2598
- channel: z28.string(),
2599
- limit: z28.int().nullable().optional(),
2637
+ var CentrifugoHistoryRequestRequestSchema = z29.object({
2638
+ channel: z29.string(),
2639
+ limit: z29.int().nullable().optional(),
2600
2640
  since: CentrifugoStreamPositionSchema.optional(),
2601
- reverse: z28.boolean().nullable().optional()
2641
+ reverse: z29.boolean().nullable().optional()
2602
2642
  });
2603
2643
 
2604
2644
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
2605
- import { z as z31 } from "zod";
2645
+ import { z as z32 } from "zod";
2606
2646
 
2607
2647
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
2608
- import { z as z30 } from "zod";
2648
+ import { z as z31 } from "zod";
2609
2649
 
2610
2650
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
2611
- import { z as z29 } from "zod";
2612
- var CentrifugoPublicationSchema = z29.object({
2613
- data: z29.record(z29.string(), z29.any()),
2651
+ import { z as z30 } from "zod";
2652
+ var CentrifugoPublicationSchema = z30.object({
2653
+ data: z30.record(z30.string(), z30.any()),
2614
2654
  info: CentrifugoClientInfoSchema.optional(),
2615
- offset: z29.int(),
2616
- tags: z29.record(z29.string(), z29.any()).nullable().optional()
2655
+ offset: z30.int(),
2656
+ tags: z30.record(z30.string(), z30.any()).nullable().optional()
2617
2657
  });
2618
2658
 
2619
2659
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
2620
- var CentrifugoHistoryResultSchema = z30.object({
2621
- publications: z30.array(CentrifugoPublicationSchema),
2622
- epoch: z30.string(),
2623
- offset: z30.int()
2660
+ var CentrifugoHistoryResultSchema = z31.object({
2661
+ publications: z31.array(CentrifugoPublicationSchema),
2662
+ epoch: z31.string(),
2663
+ offset: z31.int()
2624
2664
  });
2625
2665
 
2626
2666
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
2627
- var CentrifugoHistoryResponseSchema = z31.object({
2667
+ var CentrifugoHistoryResponseSchema = z32.object({
2628
2668
  error: CentrifugoErrorSchema.optional(),
2629
2669
  result: CentrifugoHistoryResultSchema.optional()
2630
2670
  });
2631
2671
 
2632
2672
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
2633
- import { z as z36 } from "zod";
2673
+ import { z as z37 } from "zod";
2634
2674
 
2635
2675
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
2636
- import { z as z35 } from "zod";
2676
+ import { z as z36 } from "zod";
2637
2677
 
2638
2678
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
2639
- import { z as z34 } from "zod";
2679
+ import { z as z35 } from "zod";
2640
2680
 
2641
2681
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
2642
- import { z as z32 } from "zod";
2643
- var CentrifugoMetricsSchema = z32.object({
2644
- interval: z32.number(),
2645
- items: z32.record(z32.string(), z32.number())
2682
+ import { z as z33 } from "zod";
2683
+ var CentrifugoMetricsSchema = z33.object({
2684
+ interval: z33.number(),
2685
+ items: z33.record(z33.string(), z33.number())
2646
2686
  });
2647
2687
 
2648
2688
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts
2649
- import { z as z33 } from "zod";
2650
- var CentrifugoProcessSchema = z33.object({
2651
- cpu: z33.number(),
2652
- rss: z33.int()
2689
+ import { z as z34 } from "zod";
2690
+ var CentrifugoProcessSchema = z34.object({
2691
+ cpu: z34.number(),
2692
+ rss: z34.int()
2653
2693
  });
2654
2694
 
2655
2695
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
2656
- var CentrifugoNodeInfoSchema = z34.object({
2657
- uid: z34.string(),
2658
- name: z34.string(),
2659
- version: z34.string(),
2660
- num_clients: z34.int(),
2661
- num_users: z34.int(),
2662
- num_channels: z34.int(),
2663
- uptime: z34.int(),
2664
- num_subs: z34.int(),
2696
+ var CentrifugoNodeInfoSchema = z35.object({
2697
+ uid: z35.string(),
2698
+ name: z35.string(),
2699
+ version: z35.string(),
2700
+ num_clients: z35.int(),
2701
+ num_users: z35.int(),
2702
+ num_channels: z35.int(),
2703
+ uptime: z35.int(),
2704
+ num_subs: z35.int(),
2665
2705
  metrics: CentrifugoMetricsSchema.optional(),
2666
2706
  process: CentrifugoProcessSchema.optional()
2667
2707
  });
2668
2708
 
2669
2709
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
2670
- var CentrifugoInfoResultSchema = z35.object({
2671
- nodes: z35.array(CentrifugoNodeInfoSchema)
2710
+ var CentrifugoInfoResultSchema = z36.object({
2711
+ nodes: z36.array(CentrifugoNodeInfoSchema)
2672
2712
  });
2673
2713
 
2674
2714
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
2675
- var CentrifugoInfoResponseSchema = z36.object({
2715
+ var CentrifugoInfoResponseSchema = z37.object({
2676
2716
  error: CentrifugoErrorSchema.optional(),
2677
2717
  result: CentrifugoInfoResultSchema.optional()
2678
2718
  });
2679
2719
 
2680
2720
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts
2681
- import { z as z37 } from "zod";
2682
- var CentrifugoOverviewStatsSchema = z37.object({
2683
- total: z37.int(),
2684
- successful: z37.int(),
2685
- failed: z37.int(),
2686
- timeout: z37.int(),
2687
- success_rate: z37.number(),
2688
- avg_duration_ms: z37.number(),
2689
- avg_acks_received: z37.number(),
2690
- period_hours: z37.int()
2721
+ import { z as z38 } from "zod";
2722
+ var CentrifugoOverviewStatsSchema = z38.object({
2723
+ total: z38.int(),
2724
+ successful: z38.int(),
2725
+ failed: z38.int(),
2726
+ timeout: z38.int(),
2727
+ success_rate: z38.number(),
2728
+ avg_duration_ms: z38.number(),
2729
+ avg_acks_received: z38.number(),
2730
+ period_hours: z38.int()
2691
2731
  });
2692
2732
 
2693
2733
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts
2694
- import { z as z38 } from "zod";
2695
- var CentrifugoPresenceRequestRequestSchema = z38.object({
2696
- channel: z38.string()
2734
+ import { z as z39 } from "zod";
2735
+ var CentrifugoPresenceRequestRequestSchema = z39.object({
2736
+ channel: z39.string()
2697
2737
  });
2698
2738
 
2699
2739
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
2700
- import { z as z40 } from "zod";
2740
+ import { z as z41 } from "zod";
2701
2741
 
2702
2742
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
2703
- import { z as z39 } from "zod";
2704
- var CentrifugoPresenceResultSchema = z39.object({
2705
- presence: z39.record(z39.string(), CentrifugoClientInfoSchema)
2743
+ import { z as z40 } from "zod";
2744
+ var CentrifugoPresenceResultSchema = z40.object({
2745
+ presence: z40.record(z40.string(), CentrifugoClientInfoSchema)
2706
2746
  });
2707
2747
 
2708
2748
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
2709
- var CentrifugoPresenceResponseSchema = z40.object({
2749
+ var CentrifugoPresenceResponseSchema = z41.object({
2710
2750
  error: CentrifugoErrorSchema.optional(),
2711
2751
  result: CentrifugoPresenceResultSchema.optional()
2712
2752
  });
2713
2753
 
2714
2754
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts
2715
- import { z as z41 } from "zod";
2716
- var CentrifugoPresenceStatsRequestRequestSchema = z41.object({
2717
- channel: z41.string()
2755
+ import { z as z42 } from "zod";
2756
+ var CentrifugoPresenceStatsRequestRequestSchema = z42.object({
2757
+ channel: z42.string()
2718
2758
  });
2719
2759
 
2720
2760
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
2721
- import { z as z43 } from "zod";
2761
+ import { z as z44 } from "zod";
2722
2762
 
2723
2763
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
2724
- import { z as z42 } from "zod";
2725
- var CentrifugoPresenceStatsResultSchema = z42.object({
2726
- num_clients: z42.int(),
2727
- num_users: z42.int()
2764
+ import { z as z43 } from "zod";
2765
+ var CentrifugoPresenceStatsResultSchema = z43.object({
2766
+ num_clients: z43.int(),
2767
+ num_users: z43.int()
2728
2768
  });
2729
2769
 
2730
2770
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
2731
- var CentrifugoPresenceStatsResponseSchema = z43.object({
2771
+ var CentrifugoPresenceStatsResponseSchema = z44.object({
2732
2772
  error: CentrifugoErrorSchema.optional(),
2733
2773
  result: CentrifugoPresenceStatsResultSchema.optional()
2734
2774
  });
2735
2775
 
2736
2776
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
2737
- import { z as z45 } from "zod";
2777
+ import { z as z46 } from "zod";
2738
2778
 
2739
2779
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
2740
- import { z as z44 } from "zod";
2741
- var ChannelStatsSchema = z44.object({
2742
- channel: z44.string(),
2743
- total: z44.int(),
2744
- successful: z44.int(),
2745
- failed: z44.int(),
2746
- avg_duration_ms: z44.number(),
2747
- avg_acks: z44.number(),
2748
- last_activity_at: z44.string().nullable()
2780
+ import { z as z45 } from "zod";
2781
+ var ChannelStatsSchema = z45.object({
2782
+ channel: z45.string(),
2783
+ total: z45.int(),
2784
+ successful: z45.int(),
2785
+ failed: z45.int(),
2786
+ avg_duration_ms: z45.number(),
2787
+ avg_acks: z45.number(),
2788
+ last_activity_at: z45.string().nullable()
2749
2789
  });
2750
2790
 
2751
2791
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
2752
- var ChannelListSchema = z45.object({
2753
- channels: z45.array(ChannelStatsSchema),
2754
- total_channels: z45.int()
2792
+ var ChannelListSchema = z46.object({
2793
+ channels: z46.array(ChannelStatsSchema),
2794
+ total_channels: z46.int()
2755
2795
  });
2756
2796
 
2757
2797
  // src/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts
2758
- import { z as z46 } from "zod";
2759
- var ConnectionTokenResponseSchema = z46.object({
2760
- token: z46.string(),
2761
- centrifugo_url: z46.string(),
2762
- expires_at: z46.string(),
2763
- channels: z46.array(z46.string())
2798
+ import { z as z47 } from "zod";
2799
+ var ConnectionTokenResponseSchema = z47.object({
2800
+ token: z47.string(),
2801
+ centrifugo_url: z47.string(),
2802
+ expires_at: z47.string(),
2803
+ channels: z47.array(z47.string())
2764
2804
  });
2765
2805
 
2766
2806
  // src/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts
2767
- import { z as z47 } from "zod";
2768
- var ManualAckRequestRequestSchema = z47.object({
2769
- message_id: z47.string(),
2770
- client_id: z47.string()
2807
+ import { z as z48 } from "zod";
2808
+ var ManualAckRequestRequestSchema = z48.object({
2809
+ message_id: z48.string(),
2810
+ client_id: z48.string()
2771
2811
  });
2772
2812
 
2773
2813
  // src/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts
2774
- import { z as z48 } from "zod";
2775
- var ManualAckResponseSchema = z48.object({
2776
- success: z48.boolean(),
2777
- message_id: z48.string(),
2778
- error: z48.string().nullable().optional()
2814
+ import { z as z49 } from "zod";
2815
+ var ManualAckResponseSchema = z49.object({
2816
+ success: z49.boolean(),
2817
+ message_id: z49.string(),
2818
+ error: z49.string().nullable().optional()
2779
2819
  });
2780
2820
 
2781
2821
  // src/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
2782
- import { z as z50 } from "zod";
2822
+ import { z as z51 } from "zod";
2783
2823
 
2784
2824
  // src/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
2785
- import { z as z49 } from "zod";
2786
- var PublishSchema = z49.object({
2787
- message_id: z49.string(),
2788
- channel: z49.string(),
2789
- status: z49.string(),
2790
- wait_for_ack: z49.boolean(),
2791
- acks_received: z49.int(),
2792
- acks_expected: z49.int().nullable(),
2793
- duration_ms: z49.number().nullable(),
2794
- created_at: z49.iso.datetime(),
2795
- completed_at: z49.iso.datetime().nullable(),
2796
- error_code: z49.string().nullable(),
2797
- error_message: z49.string().nullable()
2825
+ import { z as z50 } from "zod";
2826
+ var PublishSchema = z50.object({
2827
+ message_id: z50.string(),
2828
+ channel: z50.string(),
2829
+ status: z50.string(),
2830
+ wait_for_ack: z50.boolean(),
2831
+ acks_received: z50.int(),
2832
+ acks_expected: z50.int().nullable(),
2833
+ duration_ms: z50.number().nullable(),
2834
+ created_at: z50.iso.datetime(),
2835
+ completed_at: z50.iso.datetime().nullable(),
2836
+ error_code: z50.string().nullable(),
2837
+ error_message: z50.string().nullable()
2798
2838
  });
2799
2839
 
2800
2840
  // src/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
2801
- var PaginatedPublishListSchema = z50.object({
2802
- count: z50.int(),
2803
- page: z50.int(),
2804
- pages: z50.int(),
2805
- page_size: z50.int(),
2806
- has_next: z50.boolean(),
2807
- has_previous: z50.boolean(),
2808
- next_page: z50.int().nullable().optional(),
2809
- previous_page: z50.int().nullable().optional(),
2810
- results: z50.array(PublishSchema)
2841
+ var PaginatedPublishListSchema = z51.object({
2842
+ count: z51.int(),
2843
+ page: z51.int(),
2844
+ pages: z51.int(),
2845
+ page_size: z51.int(),
2846
+ has_next: z51.boolean(),
2847
+ has_previous: z51.boolean(),
2848
+ next_page: z51.int().nullable().optional(),
2849
+ previous_page: z51.int().nullable().optional(),
2850
+ results: z51.array(PublishSchema)
2811
2851
  });
2812
2852
 
2813
2853
  // src/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts
2814
- import { z as z51 } from "zod";
2815
- var PublishTestRequestRequestSchema = z51.object({
2816
- channel: z51.string(),
2817
- data: z51.record(z51.string(), z51.any()),
2818
- wait_for_ack: z51.boolean().optional(),
2819
- ack_timeout: z51.int().min(1).max(60).optional()
2854
+ import { z as z52 } from "zod";
2855
+ var PublishTestRequestRequestSchema = z52.object({
2856
+ channel: z52.string(),
2857
+ data: z52.record(z52.string(), z52.any()),
2858
+ wait_for_ack: z52.boolean().optional(),
2859
+ ack_timeout: z52.int().min(1).max(60).optional()
2820
2860
  });
2821
2861
 
2822
2862
  // src/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts
2823
- import { z as z52 } from "zod";
2824
- var PublishTestResponseSchema = z52.object({
2825
- success: z52.boolean(),
2826
- message_id: z52.string(),
2827
- channel: z52.string(),
2828
- acks_received: z52.int().optional(),
2829
- delivered: z52.boolean().optional(),
2830
- error: z52.string().nullable().optional()
2863
+ import { z as z53 } from "zod";
2864
+ var PublishTestResponseSchema = z53.object({
2865
+ success: z53.boolean(),
2866
+ message_id: z53.string(),
2867
+ channel: z53.string(),
2868
+ acks_received: z53.int().optional(),
2869
+ delivered: z53.boolean().optional(),
2870
+ error: z53.string().nullable().optional()
2831
2871
  });
2832
2872
 
2833
2873
  // src/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts
2834
- import { z as z53 } from "zod";
2835
- var TimelineItemSchema = z53.object({
2836
- timestamp: z53.string(),
2837
- count: z53.int(),
2838
- successful: z53.int(),
2839
- failed: z53.int(),
2840
- timeout: z53.int()
2874
+ import { z as z54 } from "zod";
2875
+ var TimelineItemSchema = z54.object({
2876
+ timestamp: z54.string(),
2877
+ count: z54.int(),
2878
+ successful: z54.int(),
2879
+ failed: z54.int(),
2880
+ timeout: z54.int()
2841
2881
  });
2842
2882
 
2843
2883
  // src/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts
2844
- import { z as z54 } from "zod";
2845
- var TimelineResponseSchema = z54.object({
2846
- timeline: z54.array(TimelineItemSchema),
2847
- period_hours: z54.int(),
2848
- interval: z54.string()
2884
+ import { z as z55 } from "zod";
2885
+ var TimelineResponseSchema = z55.object({
2886
+ timeline: z55.array(TimelineItemSchema),
2887
+ period_hours: z55.int(),
2888
+ interval: z55.string()
2849
2889
  });
2850
2890
 
2851
2891
  // src/generated/cfg_centrifugo/_utils/fetchers/index.ts
@@ -3529,7 +3569,8 @@ var API2 = class {
3529
3569
  this._loadTokensFromStorage();
3530
3570
  this._client = new APIClient2(this.baseUrl, {
3531
3571
  retryConfig: this.options?.retryConfig,
3532
- loggerConfig: this.options?.loggerConfig
3572
+ loggerConfig: this.options?.loggerConfig,
3573
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
3533
3574
  });
3534
3575
  this._injectAuthHeader();
3535
3576
  this.centrifugo_admin_api = this._client.centrifugo_admin_api;
@@ -3547,7 +3588,8 @@ var API2 = class {
3547
3588
  _reinitClients() {
3548
3589
  this._client = new APIClient2(this.baseUrl, {
3549
3590
  retryConfig: this.options?.retryConfig,
3550
- loggerConfig: this.options?.loggerConfig
3591
+ loggerConfig: this.options?.loggerConfig,
3592
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
3551
3593
  });
3552
3594
  this._injectAuthHeader();
3553
3595
  this.centrifugo_admin_api = this._client.centrifugo_admin_api;
@@ -4134,8 +4176,10 @@ var APIClient3 = class {
4134
4176
  constructor(baseUrl, options) {
4135
4177
  this.logger = null;
4136
4178
  this.retryConfig = null;
4179
+ this.tokenGetter = null;
4137
4180
  this.baseUrl = baseUrl.replace(/\/$/, "");
4138
4181
  this.httpClient = options?.httpClient || new FetchAdapter3();
4182
+ this.tokenGetter = options?.tokenGetter || null;
4139
4183
  if (options?.loggerConfig !== void 0) {
4140
4184
  this.logger = new APILogger3(options.loggerConfig);
4141
4185
  }
@@ -4165,6 +4209,19 @@ var APIClient3 = class {
4165
4209
  }
4166
4210
  return null;
4167
4211
  }
4212
+ /**
4213
+ * Get the base URL for building streaming/download URLs.
4214
+ */
4215
+ getBaseUrl() {
4216
+ return this.baseUrl;
4217
+ }
4218
+ /**
4219
+ * Get JWT token for URL authentication (used in streaming endpoints).
4220
+ * Returns null if no token getter is configured or no token is available.
4221
+ */
4222
+ getToken() {
4223
+ return this.tokenGetter ? this.tokenGetter() : null;
4224
+ }
4168
4225
  /**
4169
4226
  * Make HTTP request with Django CSRF and session handling.
4170
4227
  * Automatically retries on network errors and 5xx server errors.
@@ -4403,112 +4460,112 @@ __export(schemas_exports3, {
4403
4460
  });
4404
4461
 
4405
4462
  // src/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateRequest.schema.ts
4406
- import { z as z55 } from "zod";
4407
- var BackupCodesRegenerateRequestSchema = z55.object({
4408
- code: z55.string().min(6).max(6)
4463
+ import { z as z56 } from "zod";
4464
+ var BackupCodesRegenerateRequestSchema = z56.object({
4465
+ code: z56.string().min(6).max(6)
4409
4466
  });
4410
4467
 
4411
4468
  // src/generated/cfg_totp/_utils/schemas/BackupCodesRegenerateResponse.schema.ts
4412
- import { z as z56 } from "zod";
4413
- var BackupCodesRegenerateResponseSchema = z56.object({
4414
- backup_codes: z56.array(z56.string()),
4415
- warning: z56.string()
4469
+ import { z as z57 } from "zod";
4470
+ var BackupCodesRegenerateResponseSchema = z57.object({
4471
+ backup_codes: z57.array(z57.string()),
4472
+ warning: z57.string()
4416
4473
  });
4417
4474
 
4418
4475
  // src/generated/cfg_totp/_utils/schemas/BackupCodesStatus.schema.ts
4419
- import { z as z57 } from "zod";
4420
- var BackupCodesStatusSchema = z57.object({
4421
- remaining_count: z57.int(),
4422
- total_generated: z57.int(),
4423
- warning: z57.string().nullable().optional()
4476
+ import { z as z58 } from "zod";
4477
+ var BackupCodesStatusSchema = z58.object({
4478
+ remaining_count: z58.int(),
4479
+ total_generated: z58.int(),
4480
+ warning: z58.string().nullable().optional()
4424
4481
  });
4425
4482
 
4426
4483
  // src/generated/cfg_totp/_utils/schemas/ConfirmSetupRequest.schema.ts
4427
- import { z as z58 } from "zod";
4428
- var ConfirmSetupRequestSchema = z58.object({
4429
- device_id: z58.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4430
- code: z58.string().min(6).max(6)
4484
+ import { z as z59 } from "zod";
4485
+ var ConfirmSetupRequestSchema = z59.object({
4486
+ device_id: z59.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4487
+ code: z59.string().min(6).max(6)
4431
4488
  });
4432
4489
 
4433
4490
  // src/generated/cfg_totp/_utils/schemas/ConfirmSetupResponse.schema.ts
4434
- import { z as z59 } from "zod";
4435
- var ConfirmSetupResponseSchema = z59.object({
4436
- message: z59.string(),
4437
- backup_codes: z59.array(z59.string()),
4438
- backup_codes_warning: z59.string()
4491
+ import { z as z60 } from "zod";
4492
+ var ConfirmSetupResponseSchema = z60.object({
4493
+ message: z60.string(),
4494
+ backup_codes: z60.array(z60.string()),
4495
+ backup_codes_warning: z60.string()
4439
4496
  });
4440
4497
 
4441
4498
  // src/generated/cfg_totp/_utils/schemas/DeviceList.schema.ts
4442
- import { z as z60 } from "zod";
4443
- var DeviceListSchema = z60.object({
4444
- id: z60.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4445
- name: z60.string(),
4446
- is_primary: z60.boolean(),
4447
- status: z60.nativeEnum(DeviceListStatus),
4448
- created_at: z60.iso.datetime(),
4449
- confirmed_at: z60.iso.datetime().nullable(),
4450
- last_used_at: z60.iso.datetime().nullable()
4499
+ import { z as z61 } from "zod";
4500
+ var DeviceListSchema = z61.object({
4501
+ id: z61.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4502
+ name: z61.string(),
4503
+ is_primary: z61.boolean(),
4504
+ status: z61.nativeEnum(DeviceListStatus),
4505
+ created_at: z61.iso.datetime(),
4506
+ confirmed_at: z61.iso.datetime().nullable(),
4507
+ last_used_at: z61.iso.datetime().nullable()
4451
4508
  });
4452
4509
 
4453
4510
  // src/generated/cfg_totp/_utils/schemas/DisableRequest.schema.ts
4454
- import { z as z61 } from "zod";
4455
- var DisableRequestSchema = z61.object({
4456
- code: z61.string().min(6).max(6)
4511
+ import { z as z62 } from "zod";
4512
+ var DisableRequestSchema = z62.object({
4513
+ code: z62.string().min(6).max(6)
4457
4514
  });
4458
4515
 
4459
4516
  // src/generated/cfg_totp/_utils/schemas/PaginatedDeviceListList.schema.ts
4460
- import { z as z62 } from "zod";
4461
- var PaginatedDeviceListListSchema = z62.object({
4462
- count: z62.int(),
4463
- page: z62.int(),
4464
- pages: z62.int(),
4465
- page_size: z62.int(),
4466
- has_next: z62.boolean(),
4467
- has_previous: z62.boolean(),
4468
- next_page: z62.int().nullable().optional(),
4469
- previous_page: z62.int().nullable().optional(),
4470
- results: z62.array(DeviceListSchema)
4517
+ import { z as z63 } from "zod";
4518
+ var PaginatedDeviceListListSchema = z63.object({
4519
+ count: z63.int(),
4520
+ page: z63.int(),
4521
+ pages: z63.int(),
4522
+ page_size: z63.int(),
4523
+ has_next: z63.boolean(),
4524
+ has_previous: z63.boolean(),
4525
+ next_page: z63.int().nullable().optional(),
4526
+ previous_page: z63.int().nullable().optional(),
4527
+ results: z63.array(DeviceListSchema)
4471
4528
  });
4472
4529
 
4473
4530
  // src/generated/cfg_totp/_utils/schemas/SetupRequest.schema.ts
4474
- import { z as z63 } from "zod";
4475
- var SetupRequestSchema = z63.object({
4476
- device_name: z63.string().min(1).max(100).optional()
4531
+ import { z as z64 } from "zod";
4532
+ var SetupRequestSchema = z64.object({
4533
+ device_name: z64.string().min(1).max(100).optional()
4477
4534
  });
4478
4535
 
4479
4536
  // src/generated/cfg_totp/_utils/schemas/SetupResponse.schema.ts
4480
- import { z as z64 } from "zod";
4481
- var SetupResponseSchema = z64.object({
4482
- device_id: z64.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4483
- secret: z64.string(),
4484
- provisioning_uri: z64.string(),
4485
- qr_code_base64: z64.string(),
4486
- expires_in: z64.int()
4537
+ import { z as z65 } from "zod";
4538
+ var SetupResponseSchema = z65.object({
4539
+ device_id: z65.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4540
+ secret: z65.string(),
4541
+ provisioning_uri: z65.string(),
4542
+ qr_code_base64: z65.string(),
4543
+ expires_in: z65.int()
4487
4544
  });
4488
4545
 
4489
4546
  // src/generated/cfg_totp/_utils/schemas/VerifyBackupRequest.schema.ts
4490
- import { z as z65 } from "zod";
4491
- var VerifyBackupRequestSchema = z65.object({
4492
- session_id: z65.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4493
- backup_code: z65.string().min(8).max(8)
4547
+ import { z as z66 } from "zod";
4548
+ var VerifyBackupRequestSchema = z66.object({
4549
+ session_id: z66.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4550
+ backup_code: z66.string().min(8).max(8)
4494
4551
  });
4495
4552
 
4496
4553
  // src/generated/cfg_totp/_utils/schemas/VerifyRequest.schema.ts
4497
- import { z as z66 } from "zod";
4498
- var VerifyRequestSchema = z66.object({
4499
- session_id: z66.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4500
- code: z66.string().min(6).max(6)
4554
+ import { z as z67 } from "zod";
4555
+ var VerifyRequestSchema = z67.object({
4556
+ session_id: z67.string().regex(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i),
4557
+ code: z67.string().min(6).max(6)
4501
4558
  });
4502
4559
 
4503
4560
  // src/generated/cfg_totp/_utils/schemas/VerifyResponse.schema.ts
4504
- import { z as z67 } from "zod";
4505
- var VerifyResponseSchema = z67.object({
4506
- message: z67.string(),
4507
- access_token: z67.string(),
4508
- refresh_token: z67.string(),
4509
- user: z67.record(z67.string(), z67.any()),
4510
- remaining_backup_codes: z67.int().optional(),
4511
- warning: z67.string().optional()
4561
+ import { z as z68 } from "zod";
4562
+ var VerifyResponseSchema = z68.object({
4563
+ message: z68.string(),
4564
+ access_token: z68.string(),
4565
+ refresh_token: z68.string(),
4566
+ user: z68.record(z68.string(), z68.any()),
4567
+ remaining_backup_codes: z68.int().optional(),
4568
+ warning: z68.string().optional()
4512
4569
  });
4513
4570
 
4514
4571
  // src/generated/cfg_totp/_utils/fetchers/index.ts
@@ -4891,7 +4948,8 @@ var API3 = class {
4891
4948
  this._loadTokensFromStorage();
4892
4949
  this._client = new APIClient3(this.baseUrl, {
4893
4950
  retryConfig: this.options?.retryConfig,
4894
- loggerConfig: this.options?.loggerConfig
4951
+ loggerConfig: this.options?.loggerConfig,
4952
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
4895
4953
  });
4896
4954
  this._injectAuthHeader();
4897
4955
  this.backup_codes = this._client.backup_codes;
@@ -4910,7 +4968,8 @@ var API3 = class {
4910
4968
  _reinitClients() {
4911
4969
  this._client = new APIClient3(this.baseUrl, {
4912
4970
  retryConfig: this.options?.retryConfig,
4913
- loggerConfig: this.options?.loggerConfig
4971
+ loggerConfig: this.options?.loggerConfig,
4972
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
4914
4973
  });
4915
4974
  this._injectAuthHeader();
4916
4975
  this.backup_codes = this._client.backup_codes;
@@ -5410,8 +5469,10 @@ var APIClient4 = class {
5410
5469
  constructor(baseUrl, options) {
5411
5470
  this.logger = null;
5412
5471
  this.retryConfig = null;
5472
+ this.tokenGetter = null;
5413
5473
  this.baseUrl = baseUrl.replace(/\/$/, "");
5414
5474
  this.httpClient = options?.httpClient || new FetchAdapter4();
5475
+ this.tokenGetter = options?.tokenGetter || null;
5415
5476
  if (options?.loggerConfig !== void 0) {
5416
5477
  this.logger = new APILogger4(options.loggerConfig);
5417
5478
  }
@@ -5437,6 +5498,19 @@ var APIClient4 = class {
5437
5498
  }
5438
5499
  return null;
5439
5500
  }
5501
+ /**
5502
+ * Get the base URL for building streaming/download URLs.
5503
+ */
5504
+ getBaseUrl() {
5505
+ return this.baseUrl;
5506
+ }
5507
+ /**
5508
+ * Get JWT token for URL authentication (used in streaming endpoints).
5509
+ * Returns null if no token getter is configured or no token is available.
5510
+ */
5511
+ getToken() {
5512
+ return this.tokenGetter ? this.tokenGetter() : null;
5513
+ }
5440
5514
  /**
5441
5515
  * Make HTTP request with Django CSRF and session handling.
5442
5516
  * Automatically retries on network errors and 5xx server errors.
@@ -5659,40 +5733,40 @@ __export(schemas_exports4, {
5659
5733
  });
5660
5734
 
5661
5735
  // src/generated/cfg_webpush/_utils/schemas/SendPushRequestRequest.schema.ts
5662
- import { z as z68 } from "zod";
5663
- var SendPushRequestRequestSchema = z68.object({
5664
- title: z68.string().min(1).max(255),
5665
- body: z68.string().min(1),
5666
- icon: z68.union([z68.url(), z68.literal("")]).nullable().optional(),
5667
- url: z68.union([z68.url(), z68.literal("")]).nullable().optional()
5736
+ import { z as z69 } from "zod";
5737
+ var SendPushRequestRequestSchema = z69.object({
5738
+ title: z69.string().min(1).max(255),
5739
+ body: z69.string().min(1),
5740
+ icon: z69.union([z69.url(), z69.literal("")]).nullable().optional(),
5741
+ url: z69.union([z69.url(), z69.literal("")]).nullable().optional()
5668
5742
  });
5669
5743
 
5670
5744
  // src/generated/cfg_webpush/_utils/schemas/SendPushResponse.schema.ts
5671
- import { z as z69 } from "zod";
5672
- var SendPushResponseSchema = z69.object({
5673
- success: z69.boolean(),
5674
- sent_to: z69.int()
5745
+ import { z as z70 } from "zod";
5746
+ var SendPushResponseSchema = z70.object({
5747
+ success: z70.boolean(),
5748
+ sent_to: z70.int()
5675
5749
  });
5676
5750
 
5677
5751
  // src/generated/cfg_webpush/_utils/schemas/SubscribeRequestRequest.schema.ts
5678
- import { z as z70 } from "zod";
5679
- var SubscribeRequestRequestSchema = z70.object({
5680
- endpoint: z70.union([z70.url(), z70.literal("")]),
5681
- keys: z70.record(z70.string(), z70.string().min(1))
5752
+ import { z as z71 } from "zod";
5753
+ var SubscribeRequestRequestSchema = z71.object({
5754
+ endpoint: z71.union([z71.url(), z71.literal("")]),
5755
+ keys: z71.record(z71.string(), z71.string().min(1))
5682
5756
  });
5683
5757
 
5684
5758
  // src/generated/cfg_webpush/_utils/schemas/SubscribeResponse.schema.ts
5685
- import { z as z71 } from "zod";
5686
- var SubscribeResponseSchema = z71.object({
5687
- success: z71.boolean(),
5688
- subscription_id: z71.int(),
5689
- created: z71.boolean()
5759
+ import { z as z72 } from "zod";
5760
+ var SubscribeResponseSchema = z72.object({
5761
+ success: z72.boolean(),
5762
+ subscription_id: z72.int(),
5763
+ created: z72.boolean()
5690
5764
  });
5691
5765
 
5692
5766
  // src/generated/cfg_webpush/_utils/schemas/VapidPublicKeyResponse.schema.ts
5693
- import { z as z72 } from "zod";
5694
- var VapidPublicKeyResponseSchema = z72.object({
5695
- publicKey: z72.string()
5767
+ import { z as z73 } from "zod";
5768
+ var VapidPublicKeyResponseSchema = z73.object({
5769
+ publicKey: z73.string()
5696
5770
  });
5697
5771
 
5698
5772
  // src/generated/cfg_webpush/_utils/fetchers/index.ts
@@ -5876,7 +5950,8 @@ var API4 = class {
5876
5950
  this._loadTokensFromStorage();
5877
5951
  this._client = new APIClient4(this.baseUrl, {
5878
5952
  retryConfig: this.options?.retryConfig,
5879
- loggerConfig: this.options?.loggerConfig
5953
+ loggerConfig: this.options?.loggerConfig,
5954
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
5880
5955
  });
5881
5956
  this._injectAuthHeader();
5882
5957
  this.web_push = this._client.web_push;
@@ -5891,7 +5966,8 @@ var API4 = class {
5891
5966
  _reinitClients() {
5892
5967
  this._client = new APIClient4(this.baseUrl, {
5893
5968
  retryConfig: this.options?.retryConfig,
5894
- loggerConfig: this.options?.loggerConfig
5969
+ loggerConfig: this.options?.loggerConfig,
5970
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
5895
5971
  });
5896
5972
  this._injectAuthHeader();
5897
5973
  this.web_push = this._client.web_push;
@@ -6433,6 +6509,7 @@ export {
6433
6509
  hooks_exports2 as CentrifugoHooks,
6434
6510
  CentrifugoTokenSchema,
6435
6511
  schemas_exports2 as CentrifugoTypes,
6512
+ CfgAccountsProfileAvatarCreateRequestSchema,
6436
6513
  enums_exports as Enums,
6437
6514
  OAuthAuthorizeRequestRequestSchema,
6438
6515
  OAuthAuthorizeResponseSchema,