@djangocfg/api 2.1.226 → 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/hooks.cjs
CHANGED
|
@@ -228,7 +228,7 @@ var Accounts = class {
|
|
|
228
228
|
this.client = client;
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
231
|
-
* Request OTP code to email
|
|
231
|
+
* Request OTP code to email.
|
|
232
232
|
*/
|
|
233
233
|
async otpRequestCreate(data) {
|
|
234
234
|
const response = await this.client.request("POST", "/cfg/accounts/otp/request/", { body: data });
|
|
@@ -873,11 +873,6 @@ var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
|
|
|
873
873
|
OAuthConnectionProvider2["GITHUB"] = "github";
|
|
874
874
|
return OAuthConnectionProvider2;
|
|
875
875
|
})(OAuthConnectionProvider || {});
|
|
876
|
-
var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
|
|
877
|
-
OTPRequestRequestChannel2["EMAIL"] = "email";
|
|
878
|
-
OTPRequestRequestChannel2["PHONE"] = "phone";
|
|
879
|
-
return OTPRequestRequestChannel2;
|
|
880
|
-
})(OTPRequestRequestChannel || {});
|
|
881
876
|
|
|
882
877
|
// src/_api/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
|
|
883
878
|
var import_zod2 = require("zod");
|
|
@@ -971,14 +966,15 @@ var OAuthTokenResponseSchema = import_zod12.z.object({
|
|
|
971
966
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
|
|
972
967
|
var import_zod13 = require("zod");
|
|
973
968
|
var OTPErrorResponseSchema = import_zod13.z.object({
|
|
974
|
-
error: import_zod13.z.string()
|
|
969
|
+
error: import_zod13.z.string(),
|
|
970
|
+
error_code: import_zod13.z.string().nullable().optional(),
|
|
971
|
+
retry_after: import_zod13.z.number().int().nullable().optional()
|
|
975
972
|
});
|
|
976
973
|
|
|
977
974
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
|
|
978
975
|
var import_zod14 = require("zod");
|
|
979
976
|
var OTPRequestRequestSchema = import_zod14.z.object({
|
|
980
977
|
identifier: import_zod14.z.string().min(1),
|
|
981
|
-
channel: import_zod14.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
982
978
|
source_url: import_zod14.z.string().optional()
|
|
983
979
|
});
|
|
984
980
|
|
|
@@ -993,7 +989,6 @@ var import_zod16 = require("zod");
|
|
|
993
989
|
var OTPVerifyRequestSchema = import_zod16.z.object({
|
|
994
990
|
identifier: import_zod16.z.string().min(1),
|
|
995
991
|
otp: import_zod16.z.string().min(6).max(6),
|
|
996
|
-
channel: import_zod16.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
997
992
|
source_url: import_zod16.z.string().optional()
|
|
998
993
|
});
|
|
999
994
|
|