@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.
- package/dist/auth-server.cjs +335 -320
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +335 -320
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +464 -394
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +1 -1
- package/dist/auth.d.ts +1 -1
- package/dist/auth.mjs +464 -394
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +460 -383
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +26 -6
- package/dist/clients.d.ts +26 -6
- package/dist/clients.mjs +460 -383
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +130 -105
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +24 -4
- package/dist/hooks.d.ts +24 -4
- package/dist/hooks.mjs +130 -105
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +373 -311
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -8
- package/dist/index.d.ts +54 -8
- package/dist/index.mjs +373 -311
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/auth/context/AccountsContext.tsx +3 -3
- package/src/auth/hooks/useTokenRefresh.ts +4 -10
- package/src/auth/middlewares/tokenRefresh.ts +4 -15
- package/src/generated/cfg_accounts/CLAUDE.md +2 -9
- package/src/generated/cfg_accounts/_utils/fetchers/accounts__user_profile.ts +2 -1
- package/src/generated/cfg_accounts/_utils/hooks/accounts__user_profile.ts +2 -1
- package/src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts +15 -0
- package/src/generated/cfg_accounts/_utils/schemas/index.ts +1 -0
- package/src/generated/cfg_accounts/accounts/models.ts +0 -1
- package/src/generated/cfg_accounts/accounts__user_profile/client.ts +4 -2
- package/src/generated/cfg_accounts/accounts__user_profile/models.ts +9 -1
- package/src/generated/cfg_accounts/client.ts +18 -0
- package/src/generated/cfg_accounts/index.ts +3 -1
- package/src/generated/cfg_accounts/schema.json +2 -2
- package/src/generated/cfg_centrifugo/CLAUDE.md +1 -8
- package/src/generated/cfg_centrifugo/client.ts +18 -0
- package/src/generated/cfg_centrifugo/index.ts +3 -1
- package/src/generated/cfg_totp/CLAUDE.md +1 -8
- package/src/generated/cfg_totp/client.ts +18 -0
- package/src/generated/cfg_totp/index.ts +3 -1
- package/src/generated/cfg_totp/totp/models.ts +2 -0
- package/src/generated/cfg_webpush/CLAUDE.md +1 -8
- package/src/generated/cfg_webpush/client.ts +18 -0
- package/src/generated/cfg_webpush/index.ts +3 -1
package/dist/auth-server.mjs
CHANGED
|
@@ -119,7 +119,9 @@ var UserProfile = class {
|
|
|
119
119
|
* multipart/form-data with 'avatar' field.
|
|
120
120
|
*/
|
|
121
121
|
async accountsProfileAvatarCreate(data) {
|
|
122
|
-
const
|
|
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/
|
|
845
|
+
// src/generated/cfg_accounts/_utils/schemas/CfgAccountsProfileAvatarCreateRequest.schema.ts
|
|
829
846
|
import { z as z2 } from "zod";
|
|
830
|
-
var
|
|
831
|
-
|
|
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/
|
|
851
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeRequestRequest.schema.ts
|
|
836
852
|
import { z as z3 } from "zod";
|
|
837
|
-
var
|
|
838
|
-
|
|
839
|
-
|
|
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/
|
|
858
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthAuthorizeResponse.schema.ts
|
|
843
859
|
import { z as z4 } from "zod";
|
|
844
|
-
var
|
|
845
|
-
|
|
846
|
-
state: z4.string()
|
|
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/
|
|
865
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthCallbackRequestRequest.schema.ts
|
|
851
866
|
import { z as z5 } from "zod";
|
|
852
|
-
var
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
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/
|
|
873
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthConnection.schema.ts
|
|
864
874
|
import { z as z6 } from "zod";
|
|
865
|
-
var
|
|
866
|
-
|
|
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/
|
|
886
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthDisconnectRequestRequest.schema.ts
|
|
870
887
|
import { z as z7 } from "zod";
|
|
871
|
-
var
|
|
872
|
-
|
|
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/
|
|
892
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthError.schema.ts
|
|
877
893
|
import { z as z8 } from "zod";
|
|
878
|
-
var
|
|
879
|
-
|
|
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/
|
|
899
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthProvidersResponse.schema.ts
|
|
883
900
|
import { z as z9 } from "zod";
|
|
884
|
-
var
|
|
885
|
-
|
|
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/
|
|
905
|
+
// src/generated/cfg_accounts/_utils/schemas/OAuthTokenResponse.schema.ts
|
|
896
906
|
import { z as z10 } from "zod";
|
|
897
|
-
var
|
|
898
|
-
|
|
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/
|
|
918
|
+
// src/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
|
|
902
919
|
import { z as z11 } from "zod";
|
|
903
|
-
var
|
|
904
|
-
|
|
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/
|
|
924
|
+
// src/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
|
|
910
925
|
import { z as z12 } from "zod";
|
|
911
|
-
var
|
|
912
|
-
|
|
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/
|
|
932
|
+
// src/generated/cfg_accounts/_utils/schemas/OTPRequestResponse.schema.ts
|
|
916
933
|
import { z as z13 } from "zod";
|
|
917
|
-
var
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
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
|
|
948
|
+
import { z as z16 } from "zod";
|
|
926
949
|
|
|
927
950
|
// src/generated/cfg_accounts/_utils/schemas/User.schema.ts
|
|
928
|
-
import { z as
|
|
929
|
-
var UserSchema =
|
|
930
|
-
id:
|
|
931
|
-
email:
|
|
932
|
-
first_name:
|
|
933
|
-
last_name:
|
|
934
|
-
full_name:
|
|
935
|
-
initials:
|
|
936
|
-
display_username:
|
|
937
|
-
company:
|
|
938
|
-
phone:
|
|
939
|
-
position:
|
|
940
|
-
avatar:
|
|
941
|
-
is_staff:
|
|
942
|
-
is_superuser:
|
|
943
|
-
date_joined:
|
|
944
|
-
last_login:
|
|
945
|
-
unanswered_messages_count:
|
|
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 =
|
|
951
|
-
requires_2fa:
|
|
952
|
-
session_id:
|
|
953
|
-
refresh:
|
|
954
|
-
access:
|
|
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:
|
|
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
|
|
961
|
-
var PatchedUserProfileUpdateRequestSchema =
|
|
962
|
-
first_name:
|
|
963
|
-
last_name:
|
|
964
|
-
company:
|
|
965
|
-
phone:
|
|
966
|
-
position:
|
|
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
|
|
971
|
-
var TokenRefreshSchema =
|
|
972
|
-
access:
|
|
973
|
-
refresh:
|
|
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
|
|
978
|
-
var TokenRefreshRequestSchema =
|
|
979
|
-
refresh:
|
|
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
|
|
984
|
-
var UserProfileUpdateRequestSchema =
|
|
985
|
-
first_name:
|
|
986
|
-
last_name:
|
|
987
|
-
company:
|
|
988
|
-
phone:
|
|
989
|
-
position:
|
|
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
|
|
1290
|
-
var CentrifugoChannelInfoSchema =
|
|
1291
|
-
num_clients:
|
|
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
|
|
1296
|
-
var CentrifugoChannelsRequestRequestSchema =
|
|
1297
|
-
pattern:
|
|
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
|
|
1326
|
+
import { z as z25 } from "zod";
|
|
1302
1327
|
|
|
1303
1328
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoChannelsResult.schema.ts
|
|
1304
|
-
import { z as
|
|
1305
|
-
var CentrifugoChannelsResultSchema =
|
|
1306
|
-
channels:
|
|
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
|
|
1311
|
-
var CentrifugoErrorSchema =
|
|
1312
|
-
code:
|
|
1313
|
-
message:
|
|
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 =
|
|
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
|
|
1324
|
-
var CentrifugoClientInfoSchema =
|
|
1325
|
-
user:
|
|
1326
|
-
client:
|
|
1327
|
-
conn_info:
|
|
1328
|
-
chan_info:
|
|
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
|
|
1333
|
-
var CentrifugoHealthCheckSchema =
|
|
1334
|
-
status:
|
|
1335
|
-
wrapper_url:
|
|
1336
|
-
has_api_key:
|
|
1337
|
-
timestamp:
|
|
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
|
|
1366
|
+
import { z as z29 } from "zod";
|
|
1342
1367
|
|
|
1343
1368
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoStreamPosition.schema.ts
|
|
1344
|
-
import { z as
|
|
1345
|
-
var CentrifugoStreamPositionSchema =
|
|
1346
|
-
offset:
|
|
1347
|
-
epoch:
|
|
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 =
|
|
1352
|
-
channel:
|
|
1353
|
-
limit:
|
|
1376
|
+
var CentrifugoHistoryRequestRequestSchema = z29.object({
|
|
1377
|
+
channel: z29.string(),
|
|
1378
|
+
limit: z29.int().nullable().optional(),
|
|
1354
1379
|
since: CentrifugoStreamPositionSchema.optional(),
|
|
1355
|
-
reverse:
|
|
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
|
|
1384
|
+
import { z as z32 } from "zod";
|
|
1360
1385
|
|
|
1361
1386
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoHistoryResult.schema.ts
|
|
1362
|
-
import { z as
|
|
1387
|
+
import { z as z31 } from "zod";
|
|
1363
1388
|
|
|
1364
1389
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPublication.schema.ts
|
|
1365
|
-
import { z as
|
|
1366
|
-
var CentrifugoPublicationSchema =
|
|
1367
|
-
data:
|
|
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:
|
|
1370
|
-
tags:
|
|
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 =
|
|
1375
|
-
publications:
|
|
1376
|
-
epoch:
|
|
1377
|
-
offset:
|
|
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 =
|
|
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
|
|
1412
|
+
import { z as z37 } from "zod";
|
|
1388
1413
|
|
|
1389
1414
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoInfoResult.schema.ts
|
|
1390
|
-
import { z as
|
|
1415
|
+
import { z as z36 } from "zod";
|
|
1391
1416
|
|
|
1392
1417
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoNodeInfo.schema.ts
|
|
1393
|
-
import { z as
|
|
1418
|
+
import { z as z35 } from "zod";
|
|
1394
1419
|
|
|
1395
1420
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoMetrics.schema.ts
|
|
1396
|
-
import { z as
|
|
1397
|
-
var CentrifugoMetricsSchema =
|
|
1398
|
-
interval:
|
|
1399
|
-
items:
|
|
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
|
|
1404
|
-
var CentrifugoProcessSchema =
|
|
1405
|
-
cpu:
|
|
1406
|
-
rss:
|
|
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 =
|
|
1411
|
-
uid:
|
|
1412
|
-
name:
|
|
1413
|
-
version:
|
|
1414
|
-
num_clients:
|
|
1415
|
-
num_users:
|
|
1416
|
-
num_channels:
|
|
1417
|
-
uptime:
|
|
1418
|
-
num_subs:
|
|
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 =
|
|
1425
|
-
nodes:
|
|
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 =
|
|
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
|
|
1436
|
-
var CentrifugoOverviewStatsSchema =
|
|
1437
|
-
total:
|
|
1438
|
-
successful:
|
|
1439
|
-
failed:
|
|
1440
|
-
timeout:
|
|
1441
|
-
success_rate:
|
|
1442
|
-
avg_duration_ms:
|
|
1443
|
-
avg_acks_received:
|
|
1444
|
-
period_hours:
|
|
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
|
|
1449
|
-
var CentrifugoPresenceRequestRequestSchema =
|
|
1450
|
-
channel:
|
|
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
|
|
1479
|
+
import { z as z41 } from "zod";
|
|
1455
1480
|
|
|
1456
1481
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceResult.schema.ts
|
|
1457
|
-
import { z as
|
|
1458
|
-
var CentrifugoPresenceResultSchema =
|
|
1459
|
-
presence:
|
|
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 =
|
|
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
|
|
1470
|
-
var CentrifugoPresenceStatsRequestRequestSchema =
|
|
1471
|
-
channel:
|
|
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
|
|
1500
|
+
import { z as z44 } from "zod";
|
|
1476
1501
|
|
|
1477
1502
|
// src/generated/cfg_centrifugo/_utils/schemas/CentrifugoPresenceStatsResult.schema.ts
|
|
1478
|
-
import { z as
|
|
1479
|
-
var CentrifugoPresenceStatsResultSchema =
|
|
1480
|
-
num_clients:
|
|
1481
|
-
num_users:
|
|
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 =
|
|
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
|
|
1516
|
+
import { z as z46 } from "zod";
|
|
1492
1517
|
|
|
1493
1518
|
// src/generated/cfg_centrifugo/_utils/schemas/ChannelStats.schema.ts
|
|
1494
|
-
import { z as
|
|
1495
|
-
var ChannelStatsSchema =
|
|
1496
|
-
channel:
|
|
1497
|
-
total:
|
|
1498
|
-
successful:
|
|
1499
|
-
failed:
|
|
1500
|
-
avg_duration_ms:
|
|
1501
|
-
avg_acks:
|
|
1502
|
-
last_activity_at:
|
|
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 =
|
|
1507
|
-
channels:
|
|
1508
|
-
total_channels:
|
|
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
|
|
1513
|
-
var ConnectionTokenResponseSchema =
|
|
1514
|
-
token:
|
|
1515
|
-
centrifugo_url:
|
|
1516
|
-
expires_at:
|
|
1517
|
-
channels:
|
|
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
|
|
1522
|
-
var ManualAckRequestRequestSchema =
|
|
1523
|
-
message_id:
|
|
1524
|
-
client_id:
|
|
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
|
|
1529
|
-
var ManualAckResponseSchema =
|
|
1530
|
-
success:
|
|
1531
|
-
message_id:
|
|
1532
|
-
error:
|
|
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
|
|
1561
|
+
import { z as z51 } from "zod";
|
|
1537
1562
|
|
|
1538
1563
|
// src/generated/cfg_centrifugo/_utils/schemas/Publish.schema.ts
|
|
1539
|
-
import { z as
|
|
1540
|
-
var PublishSchema =
|
|
1541
|
-
message_id:
|
|
1542
|
-
channel:
|
|
1543
|
-
status:
|
|
1544
|
-
wait_for_ack:
|
|
1545
|
-
acks_received:
|
|
1546
|
-
acks_expected:
|
|
1547
|
-
duration_ms:
|
|
1548
|
-
created_at:
|
|
1549
|
-
completed_at:
|
|
1550
|
-
error_code:
|
|
1551
|
-
error_message:
|
|
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 =
|
|
1556
|
-
count:
|
|
1557
|
-
page:
|
|
1558
|
-
pages:
|
|
1559
|
-
page_size:
|
|
1560
|
-
has_next:
|
|
1561
|
-
has_previous:
|
|
1562
|
-
next_page:
|
|
1563
|
-
previous_page:
|
|
1564
|
-
results:
|
|
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
|
|
1569
|
-
var PublishTestRequestRequestSchema =
|
|
1570
|
-
channel:
|
|
1571
|
-
data:
|
|
1572
|
-
wait_for_ack:
|
|
1573
|
-
ack_timeout:
|
|
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
|
|
1578
|
-
var PublishTestResponseSchema =
|
|
1579
|
-
success:
|
|
1580
|
-
message_id:
|
|
1581
|
-
channel:
|
|
1582
|
-
acks_received:
|
|
1583
|
-
delivered:
|
|
1584
|
-
error:
|
|
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
|
|
1589
|
-
var TimelineItemSchema =
|
|
1590
|
-
timestamp:
|
|
1591
|
-
count:
|
|
1592
|
-
successful:
|
|
1593
|
-
failed:
|
|
1594
|
-
timeout:
|
|
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
|
|
1599
|
-
var TimelineResponseSchema =
|
|
1600
|
-
timeline:
|
|
1601
|
-
period_hours:
|
|
1602
|
-
interval:
|
|
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
|
|
1776
|
-
var SendPushRequestRequestSchema =
|
|
1777
|
-
title:
|
|
1778
|
-
body:
|
|
1779
|
-
icon:
|
|
1780
|
-
url:
|
|
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
|
|
1785
|
-
var SendPushResponseSchema =
|
|
1786
|
-
success:
|
|
1787
|
-
sent_to:
|
|
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
|
|
1792
|
-
var SubscribeRequestRequestSchema =
|
|
1793
|
-
endpoint:
|
|
1794
|
-
keys:
|
|
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
|
|
1799
|
-
var SubscribeResponseSchema =
|
|
1800
|
-
success:
|
|
1801
|
-
subscription_id:
|
|
1802
|
-
created:
|
|
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
|
|
1807
|
-
var VapidPublicKeyResponseSchema =
|
|
1808
|
-
publicKey:
|
|
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
|
|
1871
|
-
|
|
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
|
-
|
|
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);
|