@djangocfg/api 2.1.88 → 2.1.90

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/auth-server.cjs +335 -320
  2. package/dist/auth-server.cjs.map +1 -1
  3. package/dist/auth-server.mjs +335 -320
  4. package/dist/auth-server.mjs.map +1 -1
  5. package/dist/auth.cjs +464 -394
  6. package/dist/auth.cjs.map +1 -1
  7. package/dist/auth.d.cts +1 -1
  8. package/dist/auth.d.ts +1 -1
  9. package/dist/auth.mjs +464 -394
  10. package/dist/auth.mjs.map +1 -1
  11. package/dist/clients.cjs +460 -383
  12. package/dist/clients.cjs.map +1 -1
  13. package/dist/clients.d.cts +26 -6
  14. package/dist/clients.d.ts +26 -6
  15. package/dist/clients.mjs +460 -383
  16. package/dist/clients.mjs.map +1 -1
  17. package/dist/hooks.cjs +130 -105
  18. package/dist/hooks.cjs.map +1 -1
  19. package/dist/hooks.d.cts +24 -4
  20. package/dist/hooks.d.ts +24 -4
  21. package/dist/hooks.mjs +130 -105
  22. package/dist/hooks.mjs.map +1 -1
  23. package/dist/index.cjs +373 -311
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +54 -8
  26. package/dist/index.d.ts +54 -8
  27. package/dist/index.mjs +373 -311
  28. package/dist/index.mjs.map +1 -1
  29. package/package.json +3 -3
  30. package/src/auth/context/AccountsContext.tsx +3 -3
  31. package/src/auth/hooks/useTokenRefresh.ts +4 -10
  32. package/src/auth/middlewares/tokenRefresh.ts +4 -15
  33. package/src/generated/cfg_accounts/CLAUDE.md +2 -9
  34. package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +2 -1
  35. package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +2 -1
  36. package/src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +15 -0
  37. package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -0
  38. package/src/generated/cfg_accounts/accounts/models.ts +0 -1
  39. package/src/generated/cfg_accounts/accounts__user_profile/client.ts +4 -2
  40. package/src/generated/cfg_accounts/accounts__user_profile/models.ts +9 -1
  41. package/src/generated/cfg_accounts/client.ts +18 -0
  42. package/src/generated/cfg_accounts/index.ts +3 -1
  43. package/src/generated/cfg_accounts/schema.json +2 -2
  44. package/src/generated/cfg_centrifugo/CLAUDE.md +1 -8
  45. package/src/generated/cfg_centrifugo/client.ts +18 -0
  46. package/src/generated/cfg_centrifugo/index.ts +3 -1
  47. package/src/generated/cfg_totp/CLAUDE.md +1 -8
  48. package/src/generated/cfg_totp/client.ts +18 -0
  49. package/src/generated/cfg_totp/index.ts +3 -1
  50. package/src/generated/cfg_totp/totp/models.ts +2 -0
  51. package/src/generated/cfg_webpush/CLAUDE.md +1 -8
  52. package/src/generated/cfg_webpush/client.ts +18 -0
  53. package/src/generated/cfg_webpush/index.ts +3 -1
@@ -119,7 +119,9 @@ var UserProfile = class {
119
119
  * multipart/form-data with 'avatar' field.
120
120
  */
121
121
  async accountsProfileAvatarCreate(data) {
122
- const response = await this.client.request("POST", "/cfg/accounts/profile/avatar/", { formData: data });
122
+ const formData = new FormData();
123
+ formData.append("avatar", data.avatar);
124
+ const response = await this.client.request("POST", "/cfg/accounts/profile/avatar/", { formData });
123
125
  return response;
124
126
  }
125
127
  /**
@@ -555,8 +557,10 @@ var APIClient = class {
555
557
  constructor(baseUrl, options) {
556
558
  this.logger = null;
557
559
  this.retryConfig = null;
560
+ this.tokenGetter = null;
558
561
  this.baseUrl = baseUrl.replace(/\/$/, "");
559
562
  this.httpClient = options?.httpClient || new FetchAdapter();
563
+ this.tokenGetter = options?.tokenGetter || null;
560
564
  if (options?.loggerConfig !== void 0) {
561
565
  this.logger = new APILogger(options.loggerConfig);
562
566
  }
@@ -585,6 +589,19 @@ var APIClient = class {
585
589
  }
586
590
  return null;
587
591
  }
592
+ /**
593
+ * Get the base URL for building streaming/download URLs.
594
+ */
595
+ getBaseUrl() {
596
+ return this.baseUrl;
597
+ }
598
+ /**
599
+ * Get JWT token for URL authentication (used in streaming endpoints).
600
+ * Returns null if no token getter is configured or no token is available.
601
+ */
602
+ getToken() {
603
+ return this.tokenGetter ? this.tokenGetter() : null;
604
+ }
588
605
  /**
589
606
  * Make HTTP request with Django CSRF and session handling.
590
607
  * Automatically retries on network errors and 5xx server errors.
@@ -825,168 +842,174 @@ var CentrifugoTokenSchema = z.object({
825
842
  channels: z.array(z.string())
826
843
  });
827
844
 
828
- // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
845
+ // src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts
829
846
  import { z as z2 } from "zod";
830
- var OAuthAuthorizeRequestRequestSchema = z2.object({
831
- redirect_uri: z2.union([z2.url(), z2.literal("")]).optional(),
832
- source_url: z2.union([z2.url(), z2.literal("")]).optional()
847
+ var CfgAccountsProfileAvatarCreateRequestSchema = z2.object({
848
+ avatar: z2.union([z2.instanceof(File), z2.instanceof(Blob)])
833
849
  });
834
850
 
835
- // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
851
+ // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
836
852
  import { z as z3 } from "zod";
837
- var OAuthAuthorizeResponseSchema = z3.object({
838
- authorization_url: z3.union([z3.url(), z3.literal("")]),
839
- state: z3.string()
853
+ var OAuthAuthorizeRequestRequestSchema = z3.object({
854
+ redirect_uri: z3.union([z3.url(), z3.literal("")]).optional(),
855
+ source_url: z3.union([z3.url(), z3.literal("")]).optional()
840
856
  });
841
857
 
842
- // src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
858
+ // src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
843
859
  import { z as z4 } from "zod";
844
- var OAuthCallbackRequestRequestSchema = z4.object({
845
- code: z4.string().min(10).max(500),
846
- state: z4.string().min(20).max(100),
847
- redirect_uri: z4.union([z4.url(), z4.literal("")]).optional()
860
+ var OAuthAuthorizeResponseSchema = z4.object({
861
+ authorization_url: z4.union([z4.url(), z4.literal("")]),
862
+ state: z4.string()
848
863
  });
849
864
 
850
- // src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
865
+ // src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
851
866
  import { z as z5 } from "zod";
852
- var OAuthConnectionSchema = z5.object({
853
- id: z5.int(),
854
- provider: z5.nativeEnum(OAuthConnectionProvider),
855
- provider_display: z5.string(),
856
- provider_username: z5.string(),
857
- provider_email: z5.email(),
858
- provider_avatar_url: z5.union([z5.url(), z5.literal("")]),
859
- connected_at: z5.iso.datetime(),
860
- last_login_at: z5.iso.datetime()
867
+ var OAuthCallbackRequestRequestSchema = z5.object({
868
+ code: z5.string().min(10).max(500),
869
+ state: z5.string().min(20).max(100),
870
+ redirect_uri: z5.union([z5.url(), z5.literal("")]).optional()
861
871
  });
862
872
 
863
- // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
873
+ // src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
864
874
  import { z as z6 } from "zod";
865
- var OAuthDisconnectRequestRequestSchema = z6.object({
866
- provider: z6.nativeEnum(OAuthDisconnectRequestRequestProvider)
875
+ var OAuthConnectionSchema = z6.object({
876
+ id: z6.int(),
877
+ provider: z6.nativeEnum(OAuthConnectionProvider),
878
+ provider_display: z6.string(),
879
+ provider_username: z6.string(),
880
+ provider_email: z6.email(),
881
+ provider_avatar_url: z6.union([z6.url(), z6.literal("")]),
882
+ connected_at: z6.iso.datetime(),
883
+ last_login_at: z6.iso.datetime()
867
884
  });
868
885
 
869
- // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
886
+ // src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
870
887
  import { z as z7 } from "zod";
871
- var OAuthErrorSchema = z7.object({
872
- error: z7.string(),
873
- error_description: z7.string().optional()
888
+ var OAuthDisconnectRequestRequestSchema = z7.object({
889
+ provider: z7.nativeEnum(OAuthDisconnectRequestRequestProvider)
874
890
  });
875
891
 
876
- // src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
892
+ // src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
877
893
  import { z as z8 } from "zod";
878
- var OAuthProvidersResponseSchema = z8.object({
879
- providers: z8.array(z8.record(z8.string(), z8.any()))
894
+ var OAuthErrorSchema = z8.object({
895
+ error: z8.string(),
896
+ error_description: z8.string().optional()
880
897
  });
881
898
 
882
- // src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
899
+ // src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
883
900
  import { z as z9 } from "zod";
884
- var OAuthTokenResponseSchema = z9.object({
885
- requires_2fa: z9.boolean().optional(),
886
- 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(),
887
- access: z9.string().nullable().optional(),
888
- refresh: z9.string().nullable().optional(),
889
- user: z9.record(z9.string(), z9.any()).nullable().optional(),
890
- is_new_user: z9.boolean(),
891
- is_new_connection: z9.boolean(),
892
- should_prompt_2fa: z9.boolean().optional()
901
+ var OAuthProvidersResponseSchema = z9.object({
902
+ providers: z9.array(z9.record(z9.string(), z9.any()))
893
903
  });
894
904
 
895
- // src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
905
+ // src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
896
906
  import { z as z10 } from "zod";
897
- var OTPErrorResponseSchema = z10.object({
898
- error: z10.string()
907
+ var OAuthTokenResponseSchema = z10.object({
908
+ requires_2fa: z10.boolean().optional(),
909
+ 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(),
910
+ access: z10.string().nullable().optional(),
911
+ refresh: z10.string().nullable().optional(),
912
+ user: z10.record(z10.string(), z10.any()).nullable().optional(),
913
+ is_new_user: z10.boolean(),
914
+ is_new_connection: z10.boolean(),
915
+ should_prompt_2fa: z10.boolean().optional()
899
916
  });
900
917
 
901
- // src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
918
+ // src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
902
919
  import { z as z11 } from "zod";
903
- var OTPRequestRequestSchema = z11.object({
904
- identifier: z11.string().min(1),
905
- channel: z11.nativeEnum(OTPRequestRequestChannel).optional(),
906
- source_url: z11.union([z11.url(), z11.literal("")]).optional()
920
+ var OTPErrorResponseSchema = z11.object({
921
+ error: z11.string()
907
922
  });
908
923
 
909
- // src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
924
+ // src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
910
925
  import { z as z12 } from "zod";
911
- var OTPRequestResponseSchema = z12.object({
912
- message: z12.string()
926
+ var OTPRequestRequestSchema = z12.object({
927
+ identifier: z12.string().min(1),
928
+ channel: z12.nativeEnum(OTPRequestRequestChannel).optional(),
929
+ source_url: z12.union([z12.url(), z12.literal("")]).optional()
913
930
  });
914
931
 
915
- // src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
932
+ // src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
916
933
  import { z as z13 } from "zod";
917
- var OTPVerifyRequestSchema = z13.object({
918
- identifier: z13.string().min(1),
919
- otp: z13.string().min(6).max(6),
920
- channel: z13.nativeEnum(OTPVerifyRequestChannel).optional(),
921
- source_url: z13.union([z13.url(), z13.literal("")]).optional()
934
+ var OTPRequestResponseSchema = z13.object({
935
+ message: z13.string()
936
+ });
937
+
938
+ // src/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts
939
+ import { z as z14 } from "zod";
940
+ var OTPVerifyRequestSchema = z14.object({
941
+ identifier: z14.string().min(1),
942
+ otp: z14.string().min(6).max(6),
943
+ channel: z14.nativeEnum(OTPVerifyRequestChannel).optional(),
944
+ source_url: z14.union([z14.url(), z14.literal("")]).optional()
922
945
  });
923
946
 
924
947
  // src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
925
- import { z as z15 } from "zod";
948
+ import { z as z16 } from "zod";
926
949
 
927
950
  // src/generated/cfg_accounts/_utils/schemas/User.schema.ts
928
- import { z as z14 } from "zod";
929
- var UserSchema = z14.object({
930
- id: z14.int(),
931
- email: z14.email(),
932
- first_name: z14.string().max(50).optional(),
933
- last_name: z14.string().max(50).optional(),
934
- full_name: z14.string(),
935
- initials: z14.string(),
936
- display_username: z14.string(),
937
- company: z14.string().max(100).optional(),
938
- phone: z14.string().max(20).optional(),
939
- position: z14.string().max(100).optional(),
940
- avatar: z14.union([z14.url(), z14.literal("")]).nullable(),
941
- is_staff: z14.boolean(),
942
- is_superuser: z14.boolean(),
943
- date_joined: z14.iso.datetime(),
944
- last_login: z14.iso.datetime().nullable(),
945
- unanswered_messages_count: z14.int(),
951
+ import { z as z15 } from "zod";
952
+ var UserSchema = z15.object({
953
+ id: z15.int(),
954
+ email: z15.email(),
955
+ first_name: z15.string().max(50).optional(),
956
+ last_name: z15.string().max(50).optional(),
957
+ full_name: z15.string(),
958
+ initials: z15.string(),
959
+ display_username: z15.string(),
960
+ company: z15.string().max(100).optional(),
961
+ phone: z15.string().max(20).optional(),
962
+ position: z15.string().max(100).optional(),
963
+ avatar: z15.union([z15.url(), z15.literal("")]).nullable(),
964
+ is_staff: z15.boolean(),
965
+ is_superuser: z15.boolean(),
966
+ date_joined: z15.iso.datetime(),
967
+ last_login: z15.iso.datetime().nullable(),
968
+ unanswered_messages_count: z15.int(),
946
969
  centrifugo: CentrifugoTokenSchema.nullable()
947
970
  });
948
971
 
949
972
  // src/generated/cfg_accounts/_utils/schemas/OTPVerifyResponse.schema.ts
950
- var OTPVerifyResponseSchema = z15.object({
951
- requires_2fa: z15.boolean().optional(),
952
- 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(),
953
- refresh: z15.string().nullable().optional(),
954
- access: z15.string().nullable().optional(),
973
+ var OTPVerifyResponseSchema = z16.object({
974
+ requires_2fa: z16.boolean().optional(),
975
+ 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(),
976
+ refresh: z16.string().nullable().optional(),
977
+ access: z16.string().nullable().optional(),
955
978
  user: UserSchema.nullable().optional(),
956
- should_prompt_2fa: z15.boolean().optional()
979
+ should_prompt_2fa: z16.boolean().optional()
957
980
  });
958
981
 
959
982
  // src/generated/cfg_accounts/_utils/schemas/PatchedUserProfileUpdateRequest.schema.ts
960
- import { z as z16 } from "zod";
961
- var PatchedUserProfileUpdateRequestSchema = z16.object({
962
- first_name: z16.string().max(50).optional(),
963
- last_name: z16.string().max(50).optional(),
964
- company: z16.string().max(100).optional(),
965
- phone: z16.string().max(20).optional(),
966
- position: z16.string().max(100).optional()
983
+ import { z as z17 } from "zod";
984
+ var PatchedUserProfileUpdateRequestSchema = z17.object({
985
+ first_name: z17.string().max(50).optional(),
986
+ last_name: z17.string().max(50).optional(),
987
+ company: z17.string().max(100).optional(),
988
+ phone: z17.string().max(20).optional(),
989
+ position: z17.string().max(100).optional()
967
990
  });
968
991
 
969
992
  // src/generated/cfg_accounts/_utils/schemas/TokenRefresh.schema.ts
970
- import { z as z17 } from "zod";
971
- var TokenRefreshSchema = z17.object({
972
- access: z17.string(),
973
- refresh: z17.string()
993
+ import { z as z18 } from "zod";
994
+ var TokenRefreshSchema = z18.object({
995
+ access: z18.string(),
996
+ refresh: z18.string()
974
997
  });
975
998
 
976
999
  // src/generated/cfg_accounts/_utils/schemas/TokenRefreshRequest.schema.ts
977
- import { z as z18 } from "zod";
978
- var TokenRefreshRequestSchema = z18.object({
979
- refresh: z18.string().min(1)
1000
+ import { z as z19 } from "zod";
1001
+ var TokenRefreshRequestSchema = z19.object({
1002
+ refresh: z19.string().min(1)
980
1003
  });
981
1004
 
982
1005
  // src/generated/cfg_accounts/_utils/schemas/UserProfileUpdateRequest.schema.ts
983
- import { z as z19 } from "zod";
984
- var UserProfileUpdateRequestSchema = z19.object({
985
- first_name: z19.string().max(50).optional(),
986
- last_name: z19.string().max(50).optional(),
987
- company: z19.string().max(100).optional(),
988
- phone: z19.string().max(20).optional(),
989
- position: z19.string().max(100).optional()
1006
+ import { z as z20 } from "zod";
1007
+ var UserProfileUpdateRequestSchema = z20.object({
1008
+ first_name: z20.string().max(50).optional(),
1009
+ last_name: z20.string().max(50).optional(),
1010
+ company: z20.string().max(100).optional(),
1011
+ phone: z20.string().max(20).optional(),
1012
+ position: z20.string().max(100).optional()
990
1013
  });
991
1014
 
992
1015
  // src/generated/cfg_accounts/_utils/fetchers/accounts.ts
@@ -1015,7 +1038,8 @@ var API = class {
1015
1038
  this._loadTokensFromStorage();
1016
1039
  this._client = new APIClient(this.baseUrl, {
1017
1040
  retryConfig: this.options?.retryConfig,
1018
- loggerConfig: this.options?.loggerConfig
1041
+ loggerConfig: this.options?.loggerConfig,
1042
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
1019
1043
  });
1020
1044
  this._injectAuthHeader();
1021
1045
  this.auth = this._client.auth;
@@ -1033,7 +1057,8 @@ var API = class {
1033
1057
  _reinitClients() {
1034
1058
  this._client = new APIClient(this.baseUrl, {
1035
1059
  retryConfig: this.options?.retryConfig,
1036
- loggerConfig: this.options?.loggerConfig
1060
+ loggerConfig: this.options?.loggerConfig,
1061
+ tokenGetter: /* @__PURE__ */ __name(() => this.getToken(), "tokenGetter")
1037
1062
  });
1038
1063
  this._injectAuthHeader();
1039
1064
  this.auth = this._client.auth;
@@ -1286,320 +1311,320 @@ var defaultLogger2 = new APILogger2();
1286
1311
  import pRetry2, { AbortError as AbortError2 } from "p-retry";
1287
1312
 
1288
1313
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelInfo.schema.ts
1289
- import { z as z20 } from "zod";
1290
- var CentrifugoChannelInfoSchema = z20.object({
1291
- num_clients: z20.int()
1314
+ import { z as z21 } from "zod";
1315
+ var CentrifugoChannelInfoSchema = z21.object({
1316
+ num_clients: z21.int()
1292
1317
  });
1293
1318
 
1294
1319
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsRequestRequest.schema.ts
1295
- import { z as z21 } from "zod";
1296
- var CentrifugoChannelsRequestRequestSchema = z21.object({
1297
- pattern: z21.string().nullable().optional()
1320
+ import { z as z22 } from "zod";
1321
+ var CentrifugoChannelsRequestRequestSchema = z22.object({
1322
+ pattern: z22.string().nullable().optional()
1298
1323
  });
1299
1324
 
1300
1325
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
1301
- import { z as z24 } from "zod";
1326
+ import { z as z25 } from "zod";
1302
1327
 
1303
1328
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
1304
- import { z as z22 } from "zod";
1305
- var CentrifugoChannelsResultSchema = z22.object({
1306
- channels: z22.record(z22.string(), CentrifugoChannelInfoSchema)
1329
+ import { z as z23 } from "zod";
1330
+ var CentrifugoChannelsResultSchema = z23.object({
1331
+ channels: z23.record(z23.string(), CentrifugoChannelInfoSchema)
1307
1332
  });
1308
1333
 
1309
1334
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoError.schema.ts
1310
- import { z as z23 } from "zod";
1311
- var CentrifugoErrorSchema = z23.object({
1312
- code: z23.int().optional(),
1313
- message: z23.string().optional()
1335
+ import { z as z24 } from "zod";
1336
+ var CentrifugoErrorSchema = z24.object({
1337
+ code: z24.int().optional(),
1338
+ message: z24.string().optional()
1314
1339
  });
1315
1340
 
1316
1341
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResponse.schema.ts
1317
- var CentrifugoChannelsResponseSchema = z24.object({
1342
+ var CentrifugoChannelsResponseSchema = z25.object({
1318
1343
  error: CentrifugoErrorSchema.optional(),
1319
1344
  result: CentrifugoChannelsResultSchema.optional()
1320
1345
  });
1321
1346
 
1322
1347
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoClientInfo.schema.ts
1323
- import { z as z25 } from "zod";
1324
- var CentrifugoClientInfoSchema = z25.object({
1325
- user: z25.string(),
1326
- client: z25.string(),
1327
- conn_info: z25.record(z25.string(), z25.any()).nullable().optional(),
1328
- chan_info: z25.record(z25.string(), z25.any()).nullable().optional()
1348
+ import { z as z26 } from "zod";
1349
+ var CentrifugoClientInfoSchema = z26.object({
1350
+ user: z26.string(),
1351
+ client: z26.string(),
1352
+ conn_info: z26.record(z26.string(), z26.any()).nullable().optional(),
1353
+ chan_info: z26.record(z26.string(), z26.any()).nullable().optional()
1329
1354
  });
1330
1355
 
1331
1356
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHealthCheck.schema.ts
1332
- import { z as z26 } from "zod";
1333
- var CentrifugoHealthCheckSchema = z26.object({
1334
- status: z26.string(),
1335
- wrapper_url: z26.string(),
1336
- has_api_key: z26.boolean(),
1337
- timestamp: z26.string()
1357
+ import { z as z27 } from "zod";
1358
+ var CentrifugoHealthCheckSchema = z27.object({
1359
+ status: z27.string(),
1360
+ wrapper_url: z27.string(),
1361
+ has_api_key: z27.boolean(),
1362
+ timestamp: z27.string()
1338
1363
  });
1339
1364
 
1340
1365
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
1341
- import { z as z28 } from "zod";
1366
+ import { z as z29 } from "zod";
1342
1367
 
1343
1368
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
1344
- import { z as z27 } from "zod";
1345
- var CentrifugoStreamPositionSchema = z27.object({
1346
- offset: z27.int(),
1347
- epoch: z27.string()
1369
+ import { z as z28 } from "zod";
1370
+ var CentrifugoStreamPositionSchema = z28.object({
1371
+ offset: z28.int(),
1372
+ epoch: z28.string()
1348
1373
  });
1349
1374
 
1350
1375
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryRequestRequest.schema.ts
1351
- var CentrifugoHistoryRequestRequestSchema = z28.object({
1352
- channel: z28.string(),
1353
- limit: z28.int().nullable().optional(),
1376
+ var CentrifugoHistoryRequestRequestSchema = z29.object({
1377
+ channel: z29.string(),
1378
+ limit: z29.int().nullable().optional(),
1354
1379
  since: CentrifugoStreamPositionSchema.optional(),
1355
- reverse: z28.boolean().nullable().optional()
1380
+ reverse: z29.boolean().nullable().optional()
1356
1381
  });
1357
1382
 
1358
1383
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
1359
- import { z as z31 } from "zod";
1384
+ import { z as z32 } from "zod";
1360
1385
 
1361
1386
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
1362
- import { z as z30 } from "zod";
1387
+ import { z as z31 } from "zod";
1363
1388
 
1364
1389
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
1365
- import { z as z29 } from "zod";
1366
- var CentrifugoPublicationSchema = z29.object({
1367
- data: z29.record(z29.string(), z29.any()),
1390
+ import { z as z30 } from "zod";
1391
+ var CentrifugoPublicationSchema = z30.object({
1392
+ data: z30.record(z30.string(), z30.any()),
1368
1393
  info: CentrifugoClientInfoSchema.optional(),
1369
- offset: z29.int(),
1370
- tags: z29.record(z29.string(), z29.any()).nullable().optional()
1394
+ offset: z30.int(),
1395
+ tags: z30.record(z30.string(), z30.any()).nullable().optional()
1371
1396
  });
1372
1397
 
1373
1398
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
1374
- var CentrifugoHistoryResultSchema = z30.object({
1375
- publications: z30.array(CentrifugoPublicationSchema),
1376
- epoch: z30.string(),
1377
- offset: z30.int()
1399
+ var CentrifugoHistoryResultSchema = z31.object({
1400
+ publications: z31.array(CentrifugoPublicationSchema),
1401
+ epoch: z31.string(),
1402
+ offset: z31.int()
1378
1403
  });
1379
1404
 
1380
1405
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResponse.schema.ts
1381
- var CentrifugoHistoryResponseSchema = z31.object({
1406
+ var CentrifugoHistoryResponseSchema = z32.object({
1382
1407
  error: CentrifugoErrorSchema.optional(),
1383
1408
  result: CentrifugoHistoryResultSchema.optional()
1384
1409
  });
1385
1410
 
1386
1411
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
1387
- import { z as z36 } from "zod";
1412
+ import { z as z37 } from "zod";
1388
1413
 
1389
1414
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
1390
- import { z as z35 } from "zod";
1415
+ import { z as z36 } from "zod";
1391
1416
 
1392
1417
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
1393
- import { z as z34 } from "zod";
1418
+ import { z as z35 } from "zod";
1394
1419
 
1395
1420
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
1396
- import { z as z32 } from "zod";
1397
- var CentrifugoMetricsSchema = z32.object({
1398
- interval: z32.number(),
1399
- items: z32.record(z32.string(), z32.number())
1421
+ import { z as z33 } from "zod";
1422
+ var CentrifugoMetricsSchema = z33.object({
1423
+ interval: z33.number(),
1424
+ items: z33.record(z33.string(), z33.number())
1400
1425
  });
1401
1426
 
1402
1427
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoProcess.schema.ts
1403
- import { z as z33 } from "zod";
1404
- var CentrifugoProcessSchema = z33.object({
1405
- cpu: z33.number(),
1406
- rss: z33.int()
1428
+ import { z as z34 } from "zod";
1429
+ var CentrifugoProcessSchema = z34.object({
1430
+ cpu: z34.number(),
1431
+ rss: z34.int()
1407
1432
  });
1408
1433
 
1409
1434
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
1410
- var CentrifugoNodeInfoSchema = z34.object({
1411
- uid: z34.string(),
1412
- name: z34.string(),
1413
- version: z34.string(),
1414
- num_clients: z34.int(),
1415
- num_users: z34.int(),
1416
- num_channels: z34.int(),
1417
- uptime: z34.int(),
1418
- num_subs: z34.int(),
1435
+ var CentrifugoNodeInfoSchema = z35.object({
1436
+ uid: z35.string(),
1437
+ name: z35.string(),
1438
+ version: z35.string(),
1439
+ num_clients: z35.int(),
1440
+ num_users: z35.int(),
1441
+ num_channels: z35.int(),
1442
+ uptime: z35.int(),
1443
+ num_subs: z35.int(),
1419
1444
  metrics: CentrifugoMetricsSchema.optional(),
1420
1445
  process: CentrifugoProcessSchema.optional()
1421
1446
  });
1422
1447
 
1423
1448
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
1424
- var CentrifugoInfoResultSchema = z35.object({
1425
- nodes: z35.array(CentrifugoNodeInfoSchema)
1449
+ var CentrifugoInfoResultSchema = z36.object({
1450
+ nodes: z36.array(CentrifugoNodeInfoSchema)
1426
1451
  });
1427
1452
 
1428
1453
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResponse.schema.ts
1429
- var CentrifugoInfoResponseSchema = z36.object({
1454
+ var CentrifugoInfoResponseSchema = z37.object({
1430
1455
  error: CentrifugoErrorSchema.optional(),
1431
1456
  result: CentrifugoInfoResultSchema.optional()
1432
1457
  });
1433
1458
 
1434
1459
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoOverviewStats.schema.ts
1435
- import { z as z37 } from "zod";
1436
- var CentrifugoOverviewStatsSchema = z37.object({
1437
- total: z37.int(),
1438
- successful: z37.int(),
1439
- failed: z37.int(),
1440
- timeout: z37.int(),
1441
- success_rate: z37.number(),
1442
- avg_duration_ms: z37.number(),
1443
- avg_acks_received: z37.number(),
1444
- period_hours: z37.int()
1460
+ import { z as z38 } from "zod";
1461
+ var CentrifugoOverviewStatsSchema = z38.object({
1462
+ total: z38.int(),
1463
+ successful: z38.int(),
1464
+ failed: z38.int(),
1465
+ timeout: z38.int(),
1466
+ success_rate: z38.number(),
1467
+ avg_duration_ms: z38.number(),
1468
+ avg_acks_received: z38.number(),
1469
+ period_hours: z38.int()
1445
1470
  });
1446
1471
 
1447
1472
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceRequestRequest.schema.ts
1448
- import { z as z38 } from "zod";
1449
- var CentrifugoPresenceRequestRequestSchema = z38.object({
1450
- channel: z38.string()
1473
+ import { z as z39 } from "zod";
1474
+ var CentrifugoPresenceRequestRequestSchema = z39.object({
1475
+ channel: z39.string()
1451
1476
  });
1452
1477
 
1453
1478
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
1454
- import { z as z40 } from "zod";
1479
+ import { z as z41 } from "zod";
1455
1480
 
1456
1481
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
1457
- import { z as z39 } from "zod";
1458
- var CentrifugoPresenceResultSchema = z39.object({
1459
- presence: z39.record(z39.string(), CentrifugoClientInfoSchema)
1482
+ import { z as z40 } from "zod";
1483
+ var CentrifugoPresenceResultSchema = z40.object({
1484
+ presence: z40.record(z40.string(), CentrifugoClientInfoSchema)
1460
1485
  });
1461
1486
 
1462
1487
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResponse.schema.ts
1463
- var CentrifugoPresenceResponseSchema = z40.object({
1488
+ var CentrifugoPresenceResponseSchema = z41.object({
1464
1489
  error: CentrifugoErrorSchema.optional(),
1465
1490
  result: CentrifugoPresenceResultSchema.optional()
1466
1491
  });
1467
1492
 
1468
1493
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsRequestRequest.schema.ts
1469
- import { z as z41 } from "zod";
1470
- var CentrifugoPresenceStatsRequestRequestSchema = z41.object({
1471
- channel: z41.string()
1494
+ import { z as z42 } from "zod";
1495
+ var CentrifugoPresenceStatsRequestRequestSchema = z42.object({
1496
+ channel: z42.string()
1472
1497
  });
1473
1498
 
1474
1499
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
1475
- import { z as z43 } from "zod";
1500
+ import { z as z44 } from "zod";
1476
1501
 
1477
1502
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
1478
- import { z as z42 } from "zod";
1479
- var CentrifugoPresenceStatsResultSchema = z42.object({
1480
- num_clients: z42.int(),
1481
- num_users: z42.int()
1503
+ import { z as z43 } from "zod";
1504
+ var CentrifugoPresenceStatsResultSchema = z43.object({
1505
+ num_clients: z43.int(),
1506
+ num_users: z43.int()
1482
1507
  });
1483
1508
 
1484
1509
  // src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResponse.schema.ts
1485
- var CentrifugoPresenceStatsResponseSchema = z43.object({
1510
+ var CentrifugoPresenceStatsResponseSchema = z44.object({
1486
1511
  error: CentrifugoErrorSchema.optional(),
1487
1512
  result: CentrifugoPresenceStatsResultSchema.optional()
1488
1513
  });
1489
1514
 
1490
1515
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
1491
- import { z as z45 } from "zod";
1516
+ import { z as z46 } from "zod";
1492
1517
 
1493
1518
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
1494
- import { z as z44 } from "zod";
1495
- var ChannelStatsSchema = z44.object({
1496
- channel: z44.string(),
1497
- total: z44.int(),
1498
- successful: z44.int(),
1499
- failed: z44.int(),
1500
- avg_duration_ms: z44.number(),
1501
- avg_acks: z44.number(),
1502
- last_activity_at: z44.string().nullable()
1519
+ import { z as z45 } from "zod";
1520
+ var ChannelStatsSchema = z45.object({
1521
+ channel: z45.string(),
1522
+ total: z45.int(),
1523
+ successful: z45.int(),
1524
+ failed: z45.int(),
1525
+ avg_duration_ms: z45.number(),
1526
+ avg_acks: z45.number(),
1527
+ last_activity_at: z45.string().nullable()
1503
1528
  });
1504
1529
 
1505
1530
  // src/generated/cfg_centrifugo/_utils/schemas/ChannelList.schema.ts
1506
- var ChannelListSchema = z45.object({
1507
- channels: z45.array(ChannelStatsSchema),
1508
- total_channels: z45.int()
1531
+ var ChannelListSchema = z46.object({
1532
+ channels: z46.array(ChannelStatsSchema),
1533
+ total_channels: z46.int()
1509
1534
  });
1510
1535
 
1511
1536
  // src/generated/cfg_centrifugo/_utils/schemas/ConnectionTokenResponse.schema.ts
1512
- import { z as z46 } from "zod";
1513
- var ConnectionTokenResponseSchema = z46.object({
1514
- token: z46.string(),
1515
- centrifugo_url: z46.string(),
1516
- expires_at: z46.string(),
1517
- channels: z46.array(z46.string())
1537
+ import { z as z47 } from "zod";
1538
+ var ConnectionTokenResponseSchema = z47.object({
1539
+ token: z47.string(),
1540
+ centrifugo_url: z47.string(),
1541
+ expires_at: z47.string(),
1542
+ channels: z47.array(z47.string())
1518
1543
  });
1519
1544
 
1520
1545
  // src/generated/cfg_centrifugo/_utils/schemas/ManualAckRequestRequest.schema.ts
1521
- import { z as z47 } from "zod";
1522
- var ManualAckRequestRequestSchema = z47.object({
1523
- message_id: z47.string(),
1524
- client_id: z47.string()
1546
+ import { z as z48 } from "zod";
1547
+ var ManualAckRequestRequestSchema = z48.object({
1548
+ message_id: z48.string(),
1549
+ client_id: z48.string()
1525
1550
  });
1526
1551
 
1527
1552
  // src/generated/cfg_centrifugo/_utils/schemas/ManualAckResponse.schema.ts
1528
- import { z as z48 } from "zod";
1529
- var ManualAckResponseSchema = z48.object({
1530
- success: z48.boolean(),
1531
- message_id: z48.string(),
1532
- error: z48.string().nullable().optional()
1553
+ import { z as z49 } from "zod";
1554
+ var ManualAckResponseSchema = z49.object({
1555
+ success: z49.boolean(),
1556
+ message_id: z49.string(),
1557
+ error: z49.string().nullable().optional()
1533
1558
  });
1534
1559
 
1535
1560
  // src/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
1536
- import { z as z50 } from "zod";
1561
+ import { z as z51 } from "zod";
1537
1562
 
1538
1563
  // src/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
1539
- import { z as z49 } from "zod";
1540
- var PublishSchema = z49.object({
1541
- message_id: z49.string(),
1542
- channel: z49.string(),
1543
- status: z49.string(),
1544
- wait_for_ack: z49.boolean(),
1545
- acks_received: z49.int(),
1546
- acks_expected: z49.int().nullable(),
1547
- duration_ms: z49.number().nullable(),
1548
- created_at: z49.iso.datetime(),
1549
- completed_at: z49.iso.datetime().nullable(),
1550
- error_code: z49.string().nullable(),
1551
- error_message: z49.string().nullable()
1564
+ import { z as z50 } from "zod";
1565
+ var PublishSchema = z50.object({
1566
+ message_id: z50.string(),
1567
+ channel: z50.string(),
1568
+ status: z50.string(),
1569
+ wait_for_ack: z50.boolean(),
1570
+ acks_received: z50.int(),
1571
+ acks_expected: z50.int().nullable(),
1572
+ duration_ms: z50.number().nullable(),
1573
+ created_at: z50.iso.datetime(),
1574
+ completed_at: z50.iso.datetime().nullable(),
1575
+ error_code: z50.string().nullable(),
1576
+ error_message: z50.string().nullable()
1552
1577
  });
1553
1578
 
1554
1579
  // src/generated/cfg_centrifugo/_utils/schemas/PaginatedPublishList.schema.ts
1555
- var PaginatedPublishListSchema = z50.object({
1556
- count: z50.int(),
1557
- page: z50.int(),
1558
- pages: z50.int(),
1559
- page_size: z50.int(),
1560
- has_next: z50.boolean(),
1561
- has_previous: z50.boolean(),
1562
- next_page: z50.int().nullable().optional(),
1563
- previous_page: z50.int().nullable().optional(),
1564
- results: z50.array(PublishSchema)
1580
+ var PaginatedPublishListSchema = z51.object({
1581
+ count: z51.int(),
1582
+ page: z51.int(),
1583
+ pages: z51.int(),
1584
+ page_size: z51.int(),
1585
+ has_next: z51.boolean(),
1586
+ has_previous: z51.boolean(),
1587
+ next_page: z51.int().nullable().optional(),
1588
+ previous_page: z51.int().nullable().optional(),
1589
+ results: z51.array(PublishSchema)
1565
1590
  });
1566
1591
 
1567
1592
  // src/generated/cfg_centrifugo/_utils/schemas/PublishTestRequestRequest.schema.ts
1568
- import { z as z51 } from "zod";
1569
- var PublishTestRequestRequestSchema = z51.object({
1570
- channel: z51.string(),
1571
- data: z51.record(z51.string(), z51.any()),
1572
- wait_for_ack: z51.boolean().optional(),
1573
- ack_timeout: z51.int().min(1).max(60).optional()
1593
+ import { z as z52 } from "zod";
1594
+ var PublishTestRequestRequestSchema = z52.object({
1595
+ channel: z52.string(),
1596
+ data: z52.record(z52.string(), z52.any()),
1597
+ wait_for_ack: z52.boolean().optional(),
1598
+ ack_timeout: z52.int().min(1).max(60).optional()
1574
1599
  });
1575
1600
 
1576
1601
  // src/generated/cfg_centrifugo/_utils/schemas/PublishTestResponse.schema.ts
1577
- import { z as z52 } from "zod";
1578
- var PublishTestResponseSchema = z52.object({
1579
- success: z52.boolean(),
1580
- message_id: z52.string(),
1581
- channel: z52.string(),
1582
- acks_received: z52.int().optional(),
1583
- delivered: z52.boolean().optional(),
1584
- error: z52.string().nullable().optional()
1602
+ import { z as z53 } from "zod";
1603
+ var PublishTestResponseSchema = z53.object({
1604
+ success: z53.boolean(),
1605
+ message_id: z53.string(),
1606
+ channel: z53.string(),
1607
+ acks_received: z53.int().optional(),
1608
+ delivered: z53.boolean().optional(),
1609
+ error: z53.string().nullable().optional()
1585
1610
  });
1586
1611
 
1587
1612
  // src/generated/cfg_centrifugo/_utils/schemas/TimelineItem.schema.ts
1588
- import { z as z53 } from "zod";
1589
- var TimelineItemSchema = z53.object({
1590
- timestamp: z53.string(),
1591
- count: z53.int(),
1592
- successful: z53.int(),
1593
- failed: z53.int(),
1594
- timeout: z53.int()
1613
+ import { z as z54 } from "zod";
1614
+ var TimelineItemSchema = z54.object({
1615
+ timestamp: z54.string(),
1616
+ count: z54.int(),
1617
+ successful: z54.int(),
1618
+ failed: z54.int(),
1619
+ timeout: z54.int()
1595
1620
  });
1596
1621
 
1597
1622
  // src/generated/cfg_centrifugo/_utils/schemas/TimelineResponse.schema.ts
1598
- import { z as z54 } from "zod";
1599
- var TimelineResponseSchema = z54.object({
1600
- timeline: z54.array(TimelineItemSchema),
1601
- period_hours: z54.int(),
1602
- interval: z54.string()
1623
+ import { z as z55 } from "zod";
1624
+ var TimelineResponseSchema = z55.object({
1625
+ timeline: z55.array(TimelineItemSchema),
1626
+ period_hours: z55.int(),
1627
+ interval: z55.string()
1603
1628
  });
1604
1629
 
1605
1630
  // src/generated/cfg_centrifugo/_utils/fetchers/centrifugo__centrifugo_admin_api.ts
@@ -1772,40 +1797,40 @@ var defaultLogger3 = new APILogger3();
1772
1797
  import pRetry3, { AbortError as AbortError3 } from "p-retry";
1773
1798
 
1774
1799
  // src/generated/cfg_webpush/_utils/schemas/SendPushRequestRequest.schema.ts
1775
- import { z as z55 } from "zod";
1776
- var SendPushRequestRequestSchema = z55.object({
1777
- title: z55.string().min(1).max(255),
1778
- body: z55.string().min(1),
1779
- icon: z55.union([z55.url(), z55.literal("")]).nullable().optional(),
1780
- url: z55.union([z55.url(), z55.literal("")]).nullable().optional()
1800
+ import { z as z56 } from "zod";
1801
+ var SendPushRequestRequestSchema = z56.object({
1802
+ title: z56.string().min(1).max(255),
1803
+ body: z56.string().min(1),
1804
+ icon: z56.union([z56.url(), z56.literal("")]).nullable().optional(),
1805
+ url: z56.union([z56.url(), z56.literal("")]).nullable().optional()
1781
1806
  });
1782
1807
 
1783
1808
  // src/generated/cfg_webpush/_utils/schemas/SendPushResponse.schema.ts
1784
- import { z as z56 } from "zod";
1785
- var SendPushResponseSchema = z56.object({
1786
- success: z56.boolean(),
1787
- sent_to: z56.int()
1809
+ import { z as z57 } from "zod";
1810
+ var SendPushResponseSchema = z57.object({
1811
+ success: z57.boolean(),
1812
+ sent_to: z57.int()
1788
1813
  });
1789
1814
 
1790
1815
  // src/generated/cfg_webpush/_utils/schemas/SubscribeRequestRequest.schema.ts
1791
- import { z as z57 } from "zod";
1792
- var SubscribeRequestRequestSchema = z57.object({
1793
- endpoint: z57.union([z57.url(), z57.literal("")]),
1794
- keys: z57.record(z57.string(), z57.string().min(1))
1816
+ import { z as z58 } from "zod";
1817
+ var SubscribeRequestRequestSchema = z58.object({
1818
+ endpoint: z58.union([z58.url(), z58.literal("")]),
1819
+ keys: z58.record(z58.string(), z58.string().min(1))
1795
1820
  });
1796
1821
 
1797
1822
  // src/generated/cfg_webpush/_utils/schemas/SubscribeResponse.schema.ts
1798
- import { z as z58 } from "zod";
1799
- var SubscribeResponseSchema = z58.object({
1800
- success: z58.boolean(),
1801
- subscription_id: z58.int(),
1802
- created: z58.boolean()
1823
+ import { z as z59 } from "zod";
1824
+ var SubscribeResponseSchema = z59.object({
1825
+ success: z59.boolean(),
1826
+ subscription_id: z59.int(),
1827
+ created: z59.boolean()
1803
1828
  });
1804
1829
 
1805
1830
  // src/generated/cfg_webpush/_utils/schemas/VapidPublicKeyResponse.schema.ts
1806
- import { z as z59 } from "zod";
1807
- var VapidPublicKeyResponseSchema = z59.object({
1808
- publicKey: z59.string()
1831
+ import { z as z60 } from "zod";
1832
+ var VapidPublicKeyResponseSchema = z60.object({
1833
+ publicKey: z60.string()
1809
1834
  });
1810
1835
 
1811
1836
  // src/generated/cfg_webpush/_utils/fetchers/webpush__web_push.ts
@@ -1867,20 +1892,10 @@ async function refreshAccessToken() {
1867
1892
  onTokenRefreshed(null);
1868
1893
  return null;
1869
1894
  }
1870
- const response = await fetch("/api/accounts/token/refresh/", {
1871
- method: "POST",
1872
- headers: {
1873
- "Content-Type": "application/json"
1874
- },
1875
- body: JSON.stringify({ refresh: refreshToken })
1895
+ const result = await api.auth.accountsTokenRefreshCreate({
1896
+ refresh: refreshToken
1876
1897
  });
1877
- if (!response.ok) {
1878
- authLogger.error("Token refresh failed with status:", response.status);
1879
- onTokenRefreshed(null);
1880
- return null;
1881
- }
1882
- const data = await response.json();
1883
- const newAccessToken = data.access;
1898
+ const newAccessToken = result.access;
1884
1899
  if (!newAccessToken) {
1885
1900
  authLogger.error("Token refresh response missing access token");
1886
1901
  onTokenRefreshed(null);