@djangocfg/api 2.1.227 → 2.1.228
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 +8 -9
- package/dist/auth-server.cjs +4 -9
- package/dist/auth-server.cjs.map +1 -1
- package/dist/auth-server.mjs +4 -9
- package/dist/auth-server.mjs.map +1 -1
- package/dist/auth.cjs +120 -158
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +120 -177
- package/dist/auth.d.ts +120 -177
- package/dist/auth.mjs +149 -191
- package/dist/auth.mjs.map +1 -1
- package/dist/clients.cjs +5 -11
- package/dist/clients.cjs.map +1 -1
- package/dist/clients.d.cts +218 -219
- package/dist/clients.d.ts +218 -219
- package/dist/clients.mjs +5 -11
- package/dist/clients.mjs.map +1 -1
- package/dist/hooks.cjs +4 -9
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.cts +70 -91
- package/dist/hooks.d.ts +70 -91
- package/dist/hooks.mjs +4 -9
- package/dist/hooks.mjs.map +1 -1
- package/dist/index.cjs +5 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +116 -106
- package/dist/index.d.ts +116 -106
- package/dist/index.mjs +5 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts +24 -2
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts +0 -2
- package/src/_api/generated/cfg_accounts/_utils/schemas/OTPVerifyRequest.schema.ts +0 -2
- package/src/_api/generated/cfg_accounts/accounts/client.ts +1 -1
- package/src/_api/generated/cfg_accounts/accounts/models.ts +25 -26
- package/src/_api/generated/cfg_accounts/accounts__auth/models.ts +5 -5
- package/src/_api/generated/cfg_accounts/accounts__oauth/models.ts +42 -42
- package/src/_api/generated/cfg_accounts/accounts__user_profile/models.ts +23 -23
- package/src/_api/generated/cfg_accounts/enums.ts +0 -10
- package/src/_api/generated/cfg_accounts/schema.json +31 -25
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_admin_api/models.ts +57 -57
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_monitoring/models.ts +24 -24
- package/src/_api/generated/cfg_centrifugo/centrifugo__centrifugo_testing/models.ts +14 -14
- package/src/_api/generated/cfg_totp/totp__backup_codes/models.ts +14 -14
- package/src/_api/generated/cfg_totp/totp__totp_setup/models.ts +10 -10
- package/src/_api/generated/cfg_totp/totp__totp_verification/models.ts +8 -8
- package/src/auth/context/AccountsContext.tsx +6 -2
- package/src/auth/context/AuthContext.tsx +32 -39
- package/src/auth/context/types.ts +5 -9
- package/src/auth/hooks/index.ts +1 -1
- package/src/auth/hooks/useAuthForm.ts +42 -75
- package/src/auth/hooks/useAuthFormState.ts +35 -6
- package/src/auth/hooks/useAuthValidation.ts +5 -65
- package/src/auth/hooks/useTwoFactor.ts +17 -2
- package/src/auth/types/form.ts +25 -70
- package/src/auth/types/index.ts +2 -6
package/dist/auth-server.mjs
CHANGED
|
@@ -186,7 +186,7 @@ var Accounts = class {
|
|
|
186
186
|
this.client = client;
|
|
187
187
|
}
|
|
188
188
|
/**
|
|
189
|
-
* Request OTP code to email
|
|
189
|
+
* Request OTP code to email.
|
|
190
190
|
*/
|
|
191
191
|
async otpRequestCreate(data) {
|
|
192
192
|
const response = await this.client.request("POST", "/cfg/accounts/otp/request/", { body: data });
|
|
@@ -831,11 +831,6 @@ var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
|
|
|
831
831
|
OAuthConnectionProvider2["GITHUB"] = "github";
|
|
832
832
|
return OAuthConnectionProvider2;
|
|
833
833
|
})(OAuthConnectionProvider || {});
|
|
834
|
-
var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
|
|
835
|
-
OTPRequestRequestChannel2["EMAIL"] = "email";
|
|
836
|
-
OTPRequestRequestChannel2["PHONE"] = "phone";
|
|
837
|
-
return OTPRequestRequestChannel2;
|
|
838
|
-
})(OTPRequestRequestChannel || {});
|
|
839
834
|
|
|
840
835
|
// src/_api/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
|
|
841
836
|
import { z } from "zod";
|
|
@@ -929,14 +924,15 @@ var OAuthTokenResponseSchema = z11.object({
|
|
|
929
924
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
|
|
930
925
|
import { z as z12 } from "zod";
|
|
931
926
|
var OTPErrorResponseSchema = z12.object({
|
|
932
|
-
error: z12.string()
|
|
927
|
+
error: z12.string(),
|
|
928
|
+
error_code: z12.string().nullable().optional(),
|
|
929
|
+
retry_after: z12.number().int().nullable().optional()
|
|
933
930
|
});
|
|
934
931
|
|
|
935
932
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
|
|
936
933
|
import { z as z13 } from "zod";
|
|
937
934
|
var OTPRequestRequestSchema = z13.object({
|
|
938
935
|
identifier: z13.string().min(1),
|
|
939
|
-
channel: z13.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
940
936
|
source_url: z13.string().optional()
|
|
941
937
|
});
|
|
942
938
|
|
|
@@ -951,7 +947,6 @@ import { z as z15 } from "zod";
|
|
|
951
947
|
var OTPVerifyRequestSchema = z15.object({
|
|
952
948
|
identifier: z15.string().min(1),
|
|
953
949
|
otp: z15.string().min(6).max(6),
|
|
954
|
-
channel: z15.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
955
950
|
source_url: z15.string().optional()
|
|
956
951
|
});
|
|
957
952
|
|