@fonoster/common 0.9.23 → 0.9.30

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
- // Optional code for multi-factor authentication
293
- string verification_code = 3;
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
- verificationCode: z.ZodOptional<z.ZodString>;
51
+ twoFactorCode: z.ZodOptional<z.ZodString>;
52
52
  }, "strip", z.ZodTypeAny, {
53
53
  username?: string;
54
54
  password?: string;
55
- verificationCode?: string;
55
+ twoFactorCode?: string;
56
56
  }, {
57
57
  username?: string;
58
58
  password?: string;
59
- verificationCode?: string;
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
- verificationCode: zod_1.z.string().optional()
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.string().url().max(255, { message: "Invalid avatar URL" }).optional()
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.23",
3
+ "version": "0.9.30",
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",
@@ -18,7 +18,7 @@
18
18
  "clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo"
19
19
  },
20
20
  "dependencies": {
21
- "@fonoster/logger": "^0.9.22",
21
+ "@fonoster/logger": "^0.9.30",
22
22
  "@grpc/grpc-js": "~1.10.6",
23
23
  "@grpc/proto-loader": "^0.7.12",
24
24
  "@influxdata/influxdb-client": "^1.35.0",
@@ -49,5 +49,5 @@
49
49
  "devDependencies": {
50
50
  "@types/nodemailer": "^6.4.14"
51
51
  },
52
- "gitHead": "32d7a9e95172b4e6e10cc549aec6bc5894f09ee7"
52
+ "gitHead": "620549f395f1207b0ee7a33aaee232e5498cf6d5"
53
53
  }