@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/index.cjs
CHANGED
|
@@ -351,7 +351,7 @@ var Accounts = class {
|
|
|
351
351
|
this.client = client;
|
|
352
352
|
}
|
|
353
353
|
/**
|
|
354
|
-
* Request OTP code to email
|
|
354
|
+
* Request OTP code to email.
|
|
355
355
|
*/
|
|
356
356
|
async otpRequestCreate(data) {
|
|
357
357
|
const response = await this.client.request("POST", "/cfg/accounts/otp/request/", { body: data });
|
|
@@ -1084,18 +1084,12 @@ var MemoryStorageAdapter = class {
|
|
|
1084
1084
|
// src/_api/generated/cfg_accounts/enums.ts
|
|
1085
1085
|
var enums_exports = {};
|
|
1086
1086
|
__export(enums_exports, {
|
|
1087
|
-
OAuthConnectionProvider: () => OAuthConnectionProvider
|
|
1088
|
-
OTPRequestRequestChannel: () => OTPRequestRequestChannel
|
|
1087
|
+
OAuthConnectionProvider: () => OAuthConnectionProvider
|
|
1089
1088
|
});
|
|
1090
1089
|
var OAuthConnectionProvider = /* @__PURE__ */ ((OAuthConnectionProvider2) => {
|
|
1091
1090
|
OAuthConnectionProvider2["GITHUB"] = "github";
|
|
1092
1091
|
return OAuthConnectionProvider2;
|
|
1093
1092
|
})(OAuthConnectionProvider || {});
|
|
1094
|
-
var OTPRequestRequestChannel = /* @__PURE__ */ ((OTPRequestRequestChannel2) => {
|
|
1095
|
-
OTPRequestRequestChannel2["EMAIL"] = "email";
|
|
1096
|
-
OTPRequestRequestChannel2["PHONE"] = "phone";
|
|
1097
|
-
return OTPRequestRequestChannel2;
|
|
1098
|
-
})(OTPRequestRequestChannel || {});
|
|
1099
1093
|
|
|
1100
1094
|
// src/_api/generated/cfg_accounts/_utils/schemas/index.ts
|
|
1101
1095
|
var schemas_exports = {};
|
|
@@ -1215,14 +1209,15 @@ var OAuthTokenResponseSchema = import_zod11.z.object({
|
|
|
1215
1209
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPErrorResponse.schema.ts
|
|
1216
1210
|
var import_zod12 = require("zod");
|
|
1217
1211
|
var OTPErrorResponseSchema = import_zod12.z.object({
|
|
1218
|
-
error: import_zod12.z.string()
|
|
1212
|
+
error: import_zod12.z.string(),
|
|
1213
|
+
error_code: import_zod12.z.string().nullable().optional(),
|
|
1214
|
+
retry_after: import_zod12.z.number().int().nullable().optional()
|
|
1219
1215
|
});
|
|
1220
1216
|
|
|
1221
1217
|
// src/_api/generated/cfg_accounts/_utils/schemas/OTPRequestRequest.schema.ts
|
|
1222
1218
|
var import_zod13 = require("zod");
|
|
1223
1219
|
var OTPRequestRequestSchema = import_zod13.z.object({
|
|
1224
1220
|
identifier: import_zod13.z.string().min(1),
|
|
1225
|
-
channel: import_zod13.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
1226
1221
|
source_url: import_zod13.z.string().optional()
|
|
1227
1222
|
});
|
|
1228
1223
|
|
|
@@ -1237,7 +1232,6 @@ var import_zod15 = require("zod");
|
|
|
1237
1232
|
var OTPVerifyRequestSchema = import_zod15.z.object({
|
|
1238
1233
|
identifier: import_zod15.z.string().min(1),
|
|
1239
1234
|
otp: import_zod15.z.string().min(6).max(6),
|
|
1240
|
-
channel: import_zod15.z.nativeEnum(OTPRequestRequestChannel).optional(),
|
|
1241
1235
|
source_url: import_zod15.z.string().optional()
|
|
1242
1236
|
});
|
|
1243
1237
|
|