@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/clients.cjs
CHANGED
|
@@ -263,7 +263,7 @@ var Accounts = class {
|
|
|
263
263
|
this.client = client;
|
|
264
264
|
}
|
|
265
265
|
/**
|
|
266
|
-
* Request OTP code to email
|
|
266
|
+
* Request OTP code to email.
|
|
267
267
|
*/
|
|
268
268
|
async otpRequestCreate(data) {
|
|
269
269
|
const response = await this.client.request("POST", "/cfg/accounts/otp/request/", { body: data });
|
|
@@ -906,18 +906,12 @@ var LocalStorageAdapter = class {
|
|
|
906
906
|
// src/_api/generated/cfg_accounts/enums.ts
|
|
907
907
|
var enums_exports = {};
|
|
908
908
|
__export(enums_exports, {
|
|
909
|
-
OAuthConnectionProvider: () => OAuthConnectionProvider
|
|
910
|
-
OTPRequestRequestChannel: () => OTPRequestRequestChannel
|
|
909
|
+
OAuthConnectionProvider: () => OAuthConnectionProvider
|
|
911
910
|
});
|
|
912
911
|
var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
|
|
913
912
|
OAuthConnectionProvider2["GITHUB"] = "github";
|
|
914
913
|
return OAuthConnectionProvider2;
|
|
915
914
|
})(OAuthConnectionProvider || {});
|
|
916
|
-
var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
|
|
917
|
-
OTPRequestRequestChannel2["EMAIL"] = "email";
|
|
918
|
-
OTPRequestRequestChannel2["PHONE"] = "phone";
|
|
919
|
-
return OTPRequestRequestChannel2;
|
|
920
|
-
})(OTPRequestRequestChannel || {});
|
|
921
915
|
|
|
922
916
|
// src/_api/generated/cfg_accounts/_utils/schemas/AccountDeleteResponse.schema.ts
|
|
923
917
|
var import_zod = require("zod");
|
|
@@ -1011,14 +1005,15 @@ var OAuthTokenResponseSchema = import_zod11.z.object({
|
|
|
1011
1005
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
|
|
1012
1006
|
var import_zod12 = require("zod");
|
|
1013
1007
|
var OTPErrorResponseSchema = import_zod12.z.object({
|
|
1014
|
-
error: import_zod12.z.string()
|
|
1008
|
+
error: import_zod12.z.string(),
|
|
1009
|
+
error_code: import_zod12.z.string().nullable().optional(),
|
|
1010
|
+
retry_after: import_zod12.z.number().int().nullable().optional()
|
|
1015
1011
|
});
|
|
1016
1012
|
|
|
1017
1013
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
|
|
1018
1014
|
var import_zod13 = require("zod");
|
|
1019
1015
|
var OTPRequestRequestSchema = import_zod13.z.object({
|
|
1020
1016
|
identifier: import_zod13.z.string().min(1),
|
|
1021
|
-
channel: import_zod13.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
1022
1017
|
source_url: import_zod13.z.string().optional()
|
|
1023
1018
|
});
|
|
1024
1019
|
|
|
@@ -1033,7 +1028,6 @@ var import_zod15 = require("zod");
|
|
|
1033
1028
|
var OTPVerifyRequestSchema = import_zod15.z.object({
|
|
1034
1029
|
identifier: import_zod15.z.string().min(1),
|
|
1035
1030
|
otp: import_zod15.z.string().min(6).max(6),
|
|
1036
|
-
channel: import_zod15.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
1037
1031
|
source_url: import_zod15.z.string().optional()
|
|
1038
1032
|
});
|
|
1039
1033
|
|