@djangocfg/api 2.1.540 → 2.1.542
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/README.md +1 -2
- package/dist/auth.cjs +99 -111
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +0 -22
- package/dist/auth.d.ts +0 -22
- package/dist/auth.mjs +99 -111
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +3 -99
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +4 -136
- package/dist/clients.d.ts +4 -136
- package/dist/clients.mjs +3 -99
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +2 -4
- package/dist/hooks.d.ts +2 -4
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +3 -100
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -338
- package/dist/index.d.ts +8 -338
- package/dist/index.mjs +3 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsApiKeyRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthConnectionsList.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOauthProvidersRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpConsentPolicyRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfileRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_accounts/openapi.json +0 -45
- package/src/_api/generated/_cfg_accounts/schemas/User.ts +0 -2
- package/src/_api/generated/_cfg_accounts/schemas/index.ts +0 -1
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpBackupCodesRetrieve.ts +8 -2
- package/src/_api/generated/_cfg_totp/hooks/useCfgTotpDevicesRetrieve.ts +8 -2
- package/src/_api/generated/index.ts +1 -5
- package/src/_api/generated/openapi.json +0 -135
- package/src/_api/generated/sdk.gen.ts +1 -20
- package/src/_api/generated/types.gen.ts +0 -79
- package/src/_api/index.ts +1 -1
- package/src/clients.ts +2 -4
- package/src/index.ts +0 -2
- package/src/log-control.ts +1 -1
- package/src/server.ts +0 -4
- package/src/_api/generated/_cfg_accounts/schemas/CentrifugoToken.ts +0 -14
- package/src/_api/generated/_cfg_centrifugo/api.ts +0 -87
- package/src/_api/generated/_cfg_centrifugo/hooks/index.ts +0 -4
- package/src/_api/generated/_cfg_centrifugo/hooks/useCfgCentrifugoAuthTokenRetrieve.ts +0 -74
- package/src/_api/generated/_cfg_centrifugo/index.ts +0 -29
- package/src/_api/generated/_cfg_centrifugo/openapi.json +0 -136
- package/src/_api/generated/_cfg_centrifugo/schemas/ConnectionTokenResponse.ts +0 -14
- package/src/_api/generated/_cfg_centrifugo/schemas/index.ts +0 -4
- package/src/_api/generated/_cfg_centrifugo/sdk.gen.ts +0 -5
- package/src/_api/generated/_cfg_centrifugo/types.gen.ts +0 -5
package/dist/auth.d.cts
CHANGED
|
@@ -24,27 +24,6 @@ type SessionSnapshot = {
|
|
|
24
24
|
accessExpiresAt: number | null;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Nested serializer for Centrifugo WebSocket connection token.
|
|
29
|
-
*/
|
|
30
|
-
type CentrifugoToken = {
|
|
31
|
-
/**
|
|
32
|
-
* JWT token for Centrifugo WebSocket connection
|
|
33
|
-
*/
|
|
34
|
-
token: string;
|
|
35
|
-
/**
|
|
36
|
-
* Centrifugo WebSocket URL
|
|
37
|
-
*/
|
|
38
|
-
centrifugo_url: string;
|
|
39
|
-
/**
|
|
40
|
-
* Token expiration time (ISO 8601)
|
|
41
|
-
*/
|
|
42
|
-
expires_at: string;
|
|
43
|
-
/**
|
|
44
|
-
* List of allowed channels for this user
|
|
45
|
-
*/
|
|
46
|
-
channels: Array<string>;
|
|
47
|
-
};
|
|
48
27
|
/**
|
|
49
28
|
* Serializer for updating user profile.
|
|
50
29
|
*/
|
|
@@ -211,7 +190,6 @@ type User = {
|
|
|
211
190
|
readonly date_joined: string;
|
|
212
191
|
readonly last_login: string | null;
|
|
213
192
|
readonly unanswered_messages_count: number;
|
|
214
|
-
readonly centrifugo: CentrifugoToken | null;
|
|
215
193
|
readonly api_key: string | null;
|
|
216
194
|
};
|
|
217
195
|
/**
|
package/dist/auth.d.ts
CHANGED
|
@@ -24,27 +24,6 @@ type SessionSnapshot = {
|
|
|
24
24
|
accessExpiresAt: number | null;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* Nested serializer for Centrifugo WebSocket connection token.
|
|
29
|
-
*/
|
|
30
|
-
type CentrifugoToken = {
|
|
31
|
-
/**
|
|
32
|
-
* JWT token for Centrifugo WebSocket connection
|
|
33
|
-
*/
|
|
34
|
-
token: string;
|
|
35
|
-
/**
|
|
36
|
-
* Centrifugo WebSocket URL
|
|
37
|
-
*/
|
|
38
|
-
centrifugo_url: string;
|
|
39
|
-
/**
|
|
40
|
-
* Token expiration time (ISO 8601)
|
|
41
|
-
*/
|
|
42
|
-
expires_at: string;
|
|
43
|
-
/**
|
|
44
|
-
* List of allowed channels for this user
|
|
45
|
-
*/
|
|
46
|
-
channels: Array<string>;
|
|
47
|
-
};
|
|
48
27
|
/**
|
|
49
28
|
* Serializer for updating user profile.
|
|
50
29
|
*/
|
|
@@ -211,7 +190,6 @@ type User = {
|
|
|
211
190
|
readonly date_joined: string;
|
|
212
191
|
readonly last_login: string | null;
|
|
213
192
|
readonly unanswered_messages_count: number;
|
|
214
|
-
readonly centrifugo: CentrifugoToken | null;
|
|
215
193
|
readonly api_key: string | null;
|
|
216
194
|
};
|
|
217
195
|
/**
|
package/dist/auth.mjs
CHANGED
|
@@ -3982,53 +3982,41 @@ __name(useCfgAccountsOtpRequestCreate, "useCfgAccountsOtpRequestCreate");
|
|
|
3982
3982
|
import useSWRMutation8 from "swr/mutation";
|
|
3983
3983
|
|
|
3984
3984
|
// src/_api/generated/_cfg_accounts/schemas/OTPVerifyResponse.ts
|
|
3985
|
-
import { z as z19 } from "zod";
|
|
3986
|
-
|
|
3987
|
-
// src/_api/generated/_cfg_accounts/schemas/User.ts
|
|
3988
3985
|
import { z as z18 } from "zod";
|
|
3989
3986
|
|
|
3990
|
-
// src/_api/generated/_cfg_accounts/schemas/CentrifugoToken.ts
|
|
3991
|
-
import { z as z17 } from "zod";
|
|
3992
|
-
var CentrifugoTokenSchema = z17.object({
|
|
3993
|
-
token: z17.string(),
|
|
3994
|
-
centrifugo_url: z17.string(),
|
|
3995
|
-
expires_at: z17.string().datetime({ offset: true }),
|
|
3996
|
-
channels: z17.array(z17.string())
|
|
3997
|
-
});
|
|
3998
|
-
|
|
3999
3987
|
// src/_api/generated/_cfg_accounts/schemas/User.ts
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
api_key:
|
|
3988
|
+
import { z as z17 } from "zod";
|
|
3989
|
+
var UserSchema = z17.object({
|
|
3990
|
+
id: z17.number().int(),
|
|
3991
|
+
email: z17.email(),
|
|
3992
|
+
first_name: z17.string().max(50).nullable().optional(),
|
|
3993
|
+
last_name: z17.string().max(50).nullable().optional(),
|
|
3994
|
+
full_name: z17.string(),
|
|
3995
|
+
initials: z17.string(),
|
|
3996
|
+
display_username: z17.string(),
|
|
3997
|
+
company: z17.string().max(100).nullable().optional(),
|
|
3998
|
+
phone: z17.string().max(20).nullable().optional(),
|
|
3999
|
+
position: z17.string().max(100).nullable().optional(),
|
|
4000
|
+
language: z17.string().max(10).nullable().optional(),
|
|
4001
|
+
timezone: z17.string().max(64).nullable().optional(),
|
|
4002
|
+
avatar: z17.string().nullable(),
|
|
4003
|
+
is_staff: z17.boolean(),
|
|
4004
|
+
is_superuser: z17.boolean(),
|
|
4005
|
+
date_joined: z17.string().datetime({ offset: true }),
|
|
4006
|
+
last_login: z17.string().datetime({ offset: true }).nullable(),
|
|
4007
|
+
unanswered_messages_count: z17.number().int().default(0),
|
|
4008
|
+
api_key: z17.string().nullable()
|
|
4021
4009
|
});
|
|
4022
4010
|
|
|
4023
4011
|
// src/_api/generated/_cfg_accounts/schemas/OTPVerifyResponse.ts
|
|
4024
|
-
var OTPVerifyResponseSchema =
|
|
4025
|
-
requires_2fa:
|
|
4026
|
-
session_id:
|
|
4027
|
-
refresh:
|
|
4028
|
-
access:
|
|
4012
|
+
var OTPVerifyResponseSchema = z18.object({
|
|
4013
|
+
requires_2fa: z18.boolean().default(false).optional(),
|
|
4014
|
+
session_id: z18.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(),
|
|
4015
|
+
refresh: z18.string().nullable().optional(),
|
|
4016
|
+
access: z18.string().nullable().optional(),
|
|
4029
4017
|
user: UserSchema.nullable().optional(),
|
|
4030
|
-
should_prompt_2fa:
|
|
4031
|
-
persistent_session:
|
|
4018
|
+
should_prompt_2fa: z18.boolean().optional(),
|
|
4019
|
+
persistent_session: z18.boolean().optional()
|
|
4032
4020
|
});
|
|
4033
4021
|
|
|
4034
4022
|
// src/_api/generated/_cfg_accounts/hooks/useCfgAccountsOtpVerifyCreate.ts
|
|
@@ -4130,10 +4118,10 @@ __name(useCfgAccountsProfileAvatarCreate, "useCfgAccountsProfileAvatarCreate");
|
|
|
4130
4118
|
import useSWRMutation10 from "swr/mutation";
|
|
4131
4119
|
|
|
4132
4120
|
// src/_api/generated/_cfg_accounts/schemas/AccountDeleteResponse.ts
|
|
4133
|
-
import { z as
|
|
4134
|
-
var AccountDeleteResponseSchema =
|
|
4135
|
-
success:
|
|
4136
|
-
message:
|
|
4121
|
+
import { z as z19 } from "zod";
|
|
4122
|
+
var AccountDeleteResponseSchema = z19.object({
|
|
4123
|
+
success: z19.boolean(),
|
|
4124
|
+
message: z19.string()
|
|
4137
4125
|
});
|
|
4138
4126
|
|
|
4139
4127
|
// src/_api/generated/_cfg_accounts/hooks/useCfgAccountsProfilePartialPartialUpdate.ts
|
|
@@ -4248,117 +4236,117 @@ import useSWRMutation15 from "swr/mutation";
|
|
|
4248
4236
|
import useSWRMutation16 from "swr/mutation";
|
|
4249
4237
|
|
|
4250
4238
|
// src/_api/generated/_cfg_accounts/schemas/TokenRefresh.ts
|
|
4251
|
-
import { z as
|
|
4252
|
-
var TokenRefreshSchema =
|
|
4253
|
-
access:
|
|
4254
|
-
refresh:
|
|
4239
|
+
import { z as z20 } from "zod";
|
|
4240
|
+
var TokenRefreshSchema = z20.object({
|
|
4241
|
+
access: z20.string(),
|
|
4242
|
+
refresh: z20.string()
|
|
4255
4243
|
});
|
|
4256
4244
|
|
|
4257
4245
|
// src/_api/generated/_cfg_accounts/schemas/APIKeyRequest.ts
|
|
4258
|
-
import { z as
|
|
4259
|
-
var APIKeyRequestSchema =
|
|
4260
|
-
key:
|
|
4261
|
-
reissued_at:
|
|
4262
|
-
created_at:
|
|
4246
|
+
import { z as z21 } from "zod";
|
|
4247
|
+
var APIKeyRequestSchema = z21.object({
|
|
4248
|
+
key: z21.string().min(1),
|
|
4249
|
+
reissued_at: z21.string().datetime({ offset: true }).nullable(),
|
|
4250
|
+
created_at: z21.string().datetime({ offset: true })
|
|
4263
4251
|
});
|
|
4264
4252
|
|
|
4265
4253
|
// src/_api/generated/_cfg_accounts/schemas/APIKeyTestRequest.ts
|
|
4266
|
-
import { z as
|
|
4267
|
-
var APIKeyTestRequestSchema =
|
|
4268
|
-
key:
|
|
4254
|
+
import { z as z22 } from "zod";
|
|
4255
|
+
var APIKeyTestRequestSchema = z22.object({
|
|
4256
|
+
key: z22.string().min(1)
|
|
4269
4257
|
});
|
|
4270
4258
|
|
|
4271
4259
|
// src/_api/generated/_cfg_accounts/schemas/CfgUserUpdateRequest.ts
|
|
4272
|
-
import { z as
|
|
4273
|
-
var CfgUserUpdateRequestSchema =
|
|
4274
|
-
first_name:
|
|
4275
|
-
last_name:
|
|
4276
|
-
company:
|
|
4277
|
-
phone:
|
|
4278
|
-
position:
|
|
4279
|
-
language:
|
|
4280
|
-
timezone:
|
|
4260
|
+
import { z as z23 } from "zod";
|
|
4261
|
+
var CfgUserUpdateRequestSchema = z23.object({
|
|
4262
|
+
first_name: z23.string().max(50).optional(),
|
|
4263
|
+
last_name: z23.string().max(50).optional(),
|
|
4264
|
+
company: z23.string().max(100).optional(),
|
|
4265
|
+
phone: z23.string().max(20).optional(),
|
|
4266
|
+
position: z23.string().max(100).optional(),
|
|
4267
|
+
language: z23.string().max(10).optional(),
|
|
4268
|
+
timezone: z23.string().max(64).optional()
|
|
4281
4269
|
});
|
|
4282
4270
|
|
|
4283
4271
|
// src/_api/generated/_cfg_accounts/schemas/OAuthAuthorizeRequestRequest.ts
|
|
4284
|
-
import { z as
|
|
4285
|
-
var OAuthAuthorizeRequestRequestSchema =
|
|
4286
|
-
redirect_uri:
|
|
4287
|
-
source_url:
|
|
4272
|
+
import { z as z24 } from "zod";
|
|
4273
|
+
var OAuthAuthorizeRequestRequestSchema = z24.object({
|
|
4274
|
+
redirect_uri: z24.string().optional(),
|
|
4275
|
+
source_url: z24.string().optional()
|
|
4288
4276
|
});
|
|
4289
4277
|
|
|
4290
4278
|
// src/_api/generated/_cfg_accounts/schemas/OAuthCallbackRequestRequest.ts
|
|
4291
|
-
import { z as
|
|
4292
|
-
var OAuthCallbackRequestRequestSchema =
|
|
4293
|
-
code:
|
|
4294
|
-
state:
|
|
4295
|
-
redirect_uri:
|
|
4296
|
-
remember_me:
|
|
4279
|
+
import { z as z25 } from "zod";
|
|
4280
|
+
var OAuthCallbackRequestRequestSchema = z25.object({
|
|
4281
|
+
code: z25.string().min(10).max(500),
|
|
4282
|
+
state: z25.string().min(20).max(100),
|
|
4283
|
+
redirect_uri: z25.string().optional(),
|
|
4284
|
+
remember_me: z25.boolean().default(false).optional()
|
|
4297
4285
|
});
|
|
4298
4286
|
|
|
4299
4287
|
// src/_api/generated/_cfg_accounts/schemas/OAuthDisconnectRequestRequest.ts
|
|
4300
|
-
import { z as
|
|
4301
|
-
var OAuthDisconnectRequestRequestSchema =
|
|
4288
|
+
import { z as z26 } from "zod";
|
|
4289
|
+
var OAuthDisconnectRequestRequestSchema = z26.object({
|
|
4302
4290
|
provider: OAuthProviderEnumSchema
|
|
4303
4291
|
});
|
|
4304
4292
|
|
|
4305
4293
|
// src/_api/generated/_cfg_accounts/schemas/OAuthError.ts
|
|
4294
|
+
import { z as z27 } from "zod";
|
|
4295
|
+
var OAuthErrorSchema = z27.object({
|
|
4296
|
+
error: z27.string(),
|
|
4297
|
+
error_description: z27.string().optional()
|
|
4298
|
+
});
|
|
4299
|
+
|
|
4300
|
+
// src/_api/generated/_cfg_accounts/schemas/OTPErrorResponse.ts
|
|
4306
4301
|
import { z as z28 } from "zod";
|
|
4307
|
-
var
|
|
4302
|
+
var OTPErrorResponseSchema = z28.object({
|
|
4308
4303
|
error: z28.string(),
|
|
4309
|
-
|
|
4304
|
+
error_code: z28.string().nullable().optional(),
|
|
4305
|
+
retry_after: z28.number().int().nullable().optional()
|
|
4310
4306
|
});
|
|
4311
4307
|
|
|
4312
|
-
// src/_api/generated/_cfg_accounts/schemas/
|
|
4308
|
+
// src/_api/generated/_cfg_accounts/schemas/OTPRequestRequest.ts
|
|
4313
4309
|
import { z as z29 } from "zod";
|
|
4314
|
-
var
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4310
|
+
var OTPRequestRequestSchema = z29.object({
|
|
4311
|
+
identifier: z29.string().min(1),
|
|
4312
|
+
source_url: z29.string().optional(),
|
|
4313
|
+
marketing_consent: z29.boolean().nullable().optional(),
|
|
4314
|
+
consent_disclosure_version: z29.string().max(64).optional()
|
|
4318
4315
|
});
|
|
4319
4316
|
|
|
4320
|
-
// src/_api/generated/_cfg_accounts/schemas/
|
|
4317
|
+
// src/_api/generated/_cfg_accounts/schemas/OTPVerifyRequest.ts
|
|
4321
4318
|
import { z as z30 } from "zod";
|
|
4322
|
-
var
|
|
4319
|
+
var OTPVerifyRequestSchema = z30.object({
|
|
4323
4320
|
identifier: z30.string().min(1),
|
|
4321
|
+
otp: z30.string().min(4).max(4),
|
|
4324
4322
|
source_url: z30.string().optional(),
|
|
4325
|
-
|
|
4326
|
-
consent_disclosure_version: z30.string().max(64).optional()
|
|
4323
|
+
remember_me: z30.boolean().default(false).optional()
|
|
4327
4324
|
});
|
|
4328
4325
|
|
|
4329
|
-
// src/_api/generated/_cfg_accounts/schemas/
|
|
4326
|
+
// src/_api/generated/_cfg_accounts/schemas/PatchedCfgUserUpdateRequest.ts
|
|
4330
4327
|
import { z as z31 } from "zod";
|
|
4331
|
-
var
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4328
|
+
var PatchedCfgUserUpdateRequestSchema = z31.object({
|
|
4329
|
+
first_name: z31.string().max(50).optional(),
|
|
4330
|
+
last_name: z31.string().max(50).optional(),
|
|
4331
|
+
company: z31.string().max(100).optional(),
|
|
4332
|
+
phone: z31.string().max(20).optional(),
|
|
4333
|
+
position: z31.string().max(100).optional(),
|
|
4334
|
+
language: z31.string().max(10).optional(),
|
|
4335
|
+
timezone: z31.string().max(64).optional()
|
|
4336
4336
|
});
|
|
4337
4337
|
|
|
4338
|
-
// src/_api/generated/_cfg_accounts/schemas/
|
|
4338
|
+
// src/_api/generated/_cfg_accounts/schemas/TokenBlacklistRequest.ts
|
|
4339
4339
|
import { z as z32 } from "zod";
|
|
4340
|
-
var
|
|
4341
|
-
|
|
4342
|
-
last_name: z32.string().max(50).optional(),
|
|
4343
|
-
company: z32.string().max(100).optional(),
|
|
4344
|
-
phone: z32.string().max(20).optional(),
|
|
4345
|
-
position: z32.string().max(100).optional(),
|
|
4346
|
-
language: z32.string().max(10).optional(),
|
|
4347
|
-
timezone: z32.string().max(64).optional()
|
|
4340
|
+
var TokenBlacklistRequestSchema = z32.object({
|
|
4341
|
+
refresh: z32.string().min(1)
|
|
4348
4342
|
});
|
|
4349
4343
|
|
|
4350
|
-
// src/_api/generated/_cfg_accounts/schemas/
|
|
4344
|
+
// src/_api/generated/_cfg_accounts/schemas/TokenRefreshRequest.ts
|
|
4351
4345
|
import { z as z33 } from "zod";
|
|
4352
|
-
var
|
|
4346
|
+
var TokenRefreshRequestSchema = z33.object({
|
|
4353
4347
|
refresh: z33.string().min(1)
|
|
4354
4348
|
});
|
|
4355
4349
|
|
|
4356
|
-
// src/_api/generated/_cfg_accounts/schemas/TokenRefreshRequest.ts
|
|
4357
|
-
import { z as z34 } from "zod";
|
|
4358
|
-
var TokenRefreshRequestSchema = z34.object({
|
|
4359
|
-
refresh: z34.string().min(1)
|
|
4360
|
-
});
|
|
4361
|
-
|
|
4362
4350
|
// src/auth/context/AccountsContext.tsx
|
|
4363
4351
|
import { jsx } from "react/jsx-runtime";
|
|
4364
4352
|
function hasApiOrigin() {
|