@fonoster/common 0.9.23 → 0.9.24
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.
|
@@ -289,8 +289,8 @@ message ApiKey {
|
|
|
289
289
|
message ExchangeCredentialsRequest {
|
|
290
290
|
string username = 1;
|
|
291
291
|
string password = 2;
|
|
292
|
-
//
|
|
293
|
-
string
|
|
292
|
+
// Required only if the 2FA feature flag is enabled
|
|
293
|
+
string two_factor_code = 3;
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
message ExchangeCredentialsResponse {
|
|
@@ -48,15 +48,15 @@ declare const exchangeApiKeysRequestSchema: z.ZodObject<{
|
|
|
48
48
|
declare const exchangeCredentialsRequestSchema: z.ZodObject<{
|
|
49
49
|
username: z.ZodString;
|
|
50
50
|
password: z.ZodString;
|
|
51
|
-
|
|
51
|
+
twoFactorCode: z.ZodOptional<z.ZodString>;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
53
|
username?: string;
|
|
54
54
|
password?: string;
|
|
55
|
-
|
|
55
|
+
twoFactorCode?: string;
|
|
56
56
|
}, {
|
|
57
57
|
username?: string;
|
|
58
58
|
password?: string;
|
|
59
|
-
|
|
59
|
+
twoFactorCode?: string;
|
|
60
60
|
}>;
|
|
61
61
|
declare const exchangeOauth2RequestSchema: z.ZodObject<{
|
|
62
62
|
provider: z.ZodDefault<z.ZodEnum<["GITHUB"]>>;
|
|
@@ -172,13 +172,13 @@ declare const verifyCodeRequestSchema: z.ZodObject<{
|
|
|
172
172
|
}, "strip", z.ZodTypeAny, {
|
|
173
173
|
value?: string;
|
|
174
174
|
username?: string;
|
|
175
|
-
verificationCode?: string;
|
|
176
175
|
contactType?: "EMAIL" | "PHONE";
|
|
176
|
+
verificationCode?: string;
|
|
177
177
|
}, {
|
|
178
178
|
value?: string;
|
|
179
179
|
username?: string;
|
|
180
|
-
verificationCode?: string;
|
|
181
180
|
contactType?: "EMAIL" | "PHONE";
|
|
181
|
+
verificationCode?: string;
|
|
182
182
|
}>;
|
|
183
183
|
declare const sendResetPasswordCodeRequestSchema: z.ZodObject<{
|
|
184
184
|
username: z.ZodString;
|
|
@@ -54,7 +54,7 @@ const exchangeCredentialsRequestSchema = zod_1.z.object({
|
|
|
54
54
|
.string()
|
|
55
55
|
.email({ message: "Invalid username. Must be an email address" }),
|
|
56
56
|
password: zod_1.z.string(),
|
|
57
|
-
|
|
57
|
+
twoFactorCode: zod_1.z.string().optional()
|
|
58
58
|
});
|
|
59
59
|
exports.exchangeCredentialsRequestSchema = exchangeCredentialsRequestSchema;
|
|
60
60
|
const exchangeOauth2RequestSchema = zod_1.z.object({
|
|
@@ -70,7 +70,11 @@ const createUserRequestSchema = zod_1.z.object({
|
|
|
70
70
|
name: zod_1.z.string().max(50, { message: MAX_NAME_MESSAGE }),
|
|
71
71
|
email: zod_1.z.string().email({ message: EMAIL_MESSAGE }),
|
|
72
72
|
password: zod_1.z.string().min(8, { message: PASSWORD_MESSAGE }).max(100),
|
|
73
|
-
avatar: zod_1.z
|
|
73
|
+
avatar: zod_1.z
|
|
74
|
+
.string()
|
|
75
|
+
.url()
|
|
76
|
+
.max(255, { message: "Invalid avatar URL" })
|
|
77
|
+
.optional()
|
|
74
78
|
});
|
|
75
79
|
exports.createUserRequestSchema = createUserRequestSchema;
|
|
76
80
|
const createUserWithOauth2CodeRequestSchema = zod_1.z.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonoster/common",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.24",
|
|
4
4
|
"description": "Common library for Fonoster projects",
|
|
5
5
|
"author": "Pedro Sanders <psanders@fonoster.com>",
|
|
6
6
|
"homepage": "https://github.com/fonoster/fonoster#readme",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/nodemailer": "^6.4.14"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "a6e16d9b8af8594e57d8b385b936cc2508546de1"
|
|
53
53
|
}
|