connectfy-shared 0.0.92 → 0.0.94

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/dist/index.cjs CHANGED
@@ -9509,6 +9509,7 @@ __export(index_exports, {
9509
9509
  sendWithContext: () => sendWithContext,
9510
9510
  signupVerifyMessage: () => signupVerifyMessage,
9511
9511
  stringTransform: () => stringTransform,
9512
+ twoFactorVerifyMessage: () => twoFactorVerifyMessage,
9512
9513
  upperCaseTranform: () => upperCaseTranform,
9513
9514
  validationMessage: () => validationMessage,
9514
9515
  verifyYourselfMessage: () => verifyYourselfMessage
@@ -10533,6 +10534,51 @@ var changeEmailMessage = (token, lang = "en" /* EN */) => {
10533
10534
  </html>
10534
10535
  `;
10535
10536
  };
10537
+ var twoFactorVerifyMessage = (firstName, lastName, verifyCode, lang = "en" /* EN */) => {
10538
+ const team = i18n_default.t("email_messages.two_factor.team", { lng: lang });
10539
+ const warning = i18n_default.t("email_messages.two_factor.warning", { lng: lang });
10540
+ const support = i18n_default.t("email_messages.two_factor.support", { lng: lang });
10541
+ const subject = i18n_default.t("email_messages.two_factor.subject", { lng: lang });
10542
+ const greeting = i18n_default.t("email_messages.two_factor.greeting", { lng: lang });
10543
+ const instruction = i18n_default.t("email_messages.two_factor.instruction", {
10544
+ lng: lang
10545
+ });
10546
+ const signature = i18n_default.t("email_messages.two_factor.signature", {
10547
+ lng: lang
10548
+ });
10549
+ return `
10550
+ <html>
10551
+ <body style="font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6; color: #334155; background-color: #f8fafc; padding: 20px;">
10552
+ <div style="max-width: 500px; margin: 0 auto; background: #ffffff; padding: 32px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);">
10553
+ <div style="text-align: center; margin-bottom: 24px;">
10554
+ <h2 style="color: #1e293b; margin: 0; font-size: 24px;">${subject}</h2>
10555
+ </div>
10556
+ <p style="font-size: 16px;">${greeting} <strong>${firstName} ${lastName}</strong>,</p>
10557
+ <p style="font-size: 15px; color: #64748b;">${instruction}</p>
10558
+
10559
+ <div style="text-align: center; margin: 32px 0;">
10560
+ <div style="display: inline-block; letter-spacing: 8px; font-size: 36px; font-weight: 800; color: #16a34a; background: #f0fdf4; padding: 16px 32px; border-radius: 12px; border: 2px dashed #bbf7d0;">
10561
+ ${verifyCode}
10562
+ </div>
10563
+ </div>
10564
+
10565
+ <div style="background: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px; margin-bottom: 24px;">
10566
+ <p style="font-size: 13px; color: #92400e; margin: 0;">${warning}</p>
10567
+ </div>
10568
+
10569
+ <p style="font-size: 14px; color: #64748b;">${support}
10570
+ <a href="${supportMailLink}" style="color: #2ecc71; text-decoration: none; font-weight: 500;">${supportMail}</a>.
10571
+ </p>
10572
+
10573
+ <hr style="border: 0; border-top: 1px solid #e2e8f0; margin: 24px 0;" />
10574
+
10575
+ <p style="font-size: 13px; color: #94a3b8; margin: 0;">${signature}</p>
10576
+ <p style="font-size: 14px; font-weight: bold; color: #1e293b; margin: 4px 0 0 0;">${team}</p>
10577
+ </div>
10578
+ </body>
10579
+ </html>
10580
+ `;
10581
+ };
10536
10582
 
10537
10583
  // src/decorators/server/field-validator/field-transformer.registry.ts
10538
10584
  var import_class_transformer = require("class-transformer");
@@ -11583,6 +11629,7 @@ var BaseRepository = class {
11583
11629
  sendWithContext,
11584
11630
  signupVerifyMessage,
11585
11631
  stringTransform,
11632
+ twoFactorVerifyMessage,
11586
11633
  upperCaseTranform,
11587
11634
  validationMessage,
11588
11635
  verifyYourselfMessage
package/dist/index.d.cts CHANGED
@@ -509,6 +509,7 @@ declare const deleteAccountMessage: (deleteToken: string, lang?: LANGUAGE) => st
509
509
  declare const accountDeletedMessage: (restoreToken: string, lang?: LANGUAGE) => string;
510
510
  declare const verifyYourselfMessage: (firstName: string, lastName: string, verifyCode: string, lang?: LANGUAGE) => string;
511
511
  declare const changeEmailMessage: (token: string, lang?: LANGUAGE) => string;
512
+ declare const twoFactorVerifyMessage: (firstName: string, lastName: string, verifyCode: string, lang?: LANGUAGE) => string;
512
513
 
513
514
  type TransformFactory = (opts: FieldValidatorOptions) => PropertyDecorator;
514
515
  declare const FIELD_TRANSFORMER_REGISTRY: Record<FIELD_TYPE, TransformFactory>;
@@ -774,4 +775,4 @@ declare abstract class BaseRepository<TDocument extends Document, TInterface ext
774
775
  count(query: Record<string, any>): Promise<number>;
775
776
  }
776
777
 
777
- export { AllExceptionsFilter, BROWSER_TYPE, BaseException, BaseFindDto, BaseRemoveAllDto, BaseRemoveDto, BaseRepository, CACHE_KEYS, CHECK_UNIQUE_FIELD, CLS_KEYS, COLLECTIONS, COUNTRIES, DATE_FORMAT, DELETE_REASON, DELETE_REASON_CODE, DEVICE_TYPE, EXPIRE_DATES, ExceptionMessages, FIELD_TRANSFORMER_REGISTRY, FIELD_TYPE, FIELD_VALIDATOR_REGISTRY, FORGOT_PASSWORD_IDENTIFIER_TYPE, FRIENDSHIP_STATUS, FieldValidator, type FieldValidatorOptions, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IEmitWithContextClientParams, type IEnumFieldOptions, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, REDIS_KEYS, REDUCER_PATH, RESOURCE, ROLE, SOCIAL_LINK_PLATFORM, STARTUP_PAGE, TAG_TYPES, THEME, TIME_DIFFERENCE_TYPE, TIME_FORMAT, TOKEN_TYPE, TWO_FACTOR_ACTION, USER_STATUS, VALIDATION_TYPE, accountDeletedMessage, arrayTransform, booleanTransform, changeEmailMessage, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, signupVerifyMessage, stringTransform, upperCaseTranform, validationMessage, verifyYourselfMessage };
778
+ export { AllExceptionsFilter, BROWSER_TYPE, BaseException, BaseFindDto, BaseRemoveAllDto, BaseRemoveDto, BaseRepository, CACHE_KEYS, CHECK_UNIQUE_FIELD, CLS_KEYS, COLLECTIONS, COUNTRIES, DATE_FORMAT, DELETE_REASON, DELETE_REASON_CODE, DEVICE_TYPE, EXPIRE_DATES, ExceptionMessages, FIELD_TRANSFORMER_REGISTRY, FIELD_TYPE, FIELD_VALIDATOR_REGISTRY, FORGOT_PASSWORD_IDENTIFIER_TYPE, FRIENDSHIP_STATUS, FieldValidator, type FieldValidatorOptions, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IEmitWithContextClientParams, type IEnumFieldOptions, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, REDIS_KEYS, REDUCER_PATH, RESOURCE, ROLE, SOCIAL_LINK_PLATFORM, STARTUP_PAGE, TAG_TYPES, THEME, TIME_DIFFERENCE_TYPE, TIME_FORMAT, TOKEN_TYPE, TWO_FACTOR_ACTION, USER_STATUS, VALIDATION_TYPE, accountDeletedMessage, arrayTransform, booleanTransform, changeEmailMessage, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, signupVerifyMessage, stringTransform, twoFactorVerifyMessage, upperCaseTranform, validationMessage, verifyYourselfMessage };
package/dist/index.d.ts CHANGED
@@ -509,6 +509,7 @@ declare const deleteAccountMessage: (deleteToken: string, lang?: LANGUAGE) => st
509
509
  declare const accountDeletedMessage: (restoreToken: string, lang?: LANGUAGE) => string;
510
510
  declare const verifyYourselfMessage: (firstName: string, lastName: string, verifyCode: string, lang?: LANGUAGE) => string;
511
511
  declare const changeEmailMessage: (token: string, lang?: LANGUAGE) => string;
512
+ declare const twoFactorVerifyMessage: (firstName: string, lastName: string, verifyCode: string, lang?: LANGUAGE) => string;
512
513
 
513
514
  type TransformFactory = (opts: FieldValidatorOptions) => PropertyDecorator;
514
515
  declare const FIELD_TRANSFORMER_REGISTRY: Record<FIELD_TYPE, TransformFactory>;
@@ -774,4 +775,4 @@ declare abstract class BaseRepository<TDocument extends Document, TInterface ext
774
775
  count(query: Record<string, any>): Promise<number>;
775
776
  }
776
777
 
777
- export { AllExceptionsFilter, BROWSER_TYPE, BaseException, BaseFindDto, BaseRemoveAllDto, BaseRemoveDto, BaseRepository, CACHE_KEYS, CHECK_UNIQUE_FIELD, CLS_KEYS, COLLECTIONS, COUNTRIES, DATE_FORMAT, DELETE_REASON, DELETE_REASON_CODE, DEVICE_TYPE, EXPIRE_DATES, ExceptionMessages, FIELD_TRANSFORMER_REGISTRY, FIELD_TYPE, FIELD_VALIDATOR_REGISTRY, FORGOT_PASSWORD_IDENTIFIER_TYPE, FRIENDSHIP_STATUS, FieldValidator, type FieldValidatorOptions, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IEmitWithContextClientParams, type IEnumFieldOptions, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, REDIS_KEYS, REDUCER_PATH, RESOURCE, ROLE, SOCIAL_LINK_PLATFORM, STARTUP_PAGE, TAG_TYPES, THEME, TIME_DIFFERENCE_TYPE, TIME_FORMAT, TOKEN_TYPE, TWO_FACTOR_ACTION, USER_STATUS, VALIDATION_TYPE, accountDeletedMessage, arrayTransform, booleanTransform, changeEmailMessage, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, signupVerifyMessage, stringTransform, upperCaseTranform, validationMessage, verifyYourselfMessage };
778
+ export { AllExceptionsFilter, BROWSER_TYPE, BaseException, BaseFindDto, BaseRemoveAllDto, BaseRemoveDto, BaseRepository, CACHE_KEYS, CHECK_UNIQUE_FIELD, CLS_KEYS, COLLECTIONS, COUNTRIES, DATE_FORMAT, DELETE_REASON, DELETE_REASON_CODE, DEVICE_TYPE, EXPIRE_DATES, ExceptionMessages, FIELD_TRANSFORMER_REGISTRY, FIELD_TYPE, FIELD_VALIDATOR_REGISTRY, FORGOT_PASSWORD_IDENTIFIER_TYPE, FRIENDSHIP_STATUS, FieldValidator, type FieldValidatorOptions, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IEmitWithContextClientParams, type IEnumFieldOptions, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, REDIS_KEYS, REDUCER_PATH, RESOURCE, ROLE, SOCIAL_LINK_PLATFORM, STARTUP_PAGE, TAG_TYPES, THEME, TIME_DIFFERENCE_TYPE, TIME_FORMAT, TOKEN_TYPE, TWO_FACTOR_ACTION, USER_STATUS, VALIDATION_TYPE, accountDeletedMessage, arrayTransform, booleanTransform, changeEmailMessage, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, signupVerifyMessage, stringTransform, twoFactorVerifyMessage, upperCaseTranform, validationMessage, verifyYourselfMessage };
package/dist/index.mjs CHANGED
@@ -10447,6 +10447,51 @@ var changeEmailMessage = (token, lang = "en" /* EN */) => {
10447
10447
  </html>
10448
10448
  `;
10449
10449
  };
10450
+ var twoFactorVerifyMessage = (firstName, lastName, verifyCode, lang = "en" /* EN */) => {
10451
+ const team = i18n_default.t("email_messages.two_factor.team", { lng: lang });
10452
+ const warning = i18n_default.t("email_messages.two_factor.warning", { lng: lang });
10453
+ const support = i18n_default.t("email_messages.two_factor.support", { lng: lang });
10454
+ const subject = i18n_default.t("email_messages.two_factor.subject", { lng: lang });
10455
+ const greeting = i18n_default.t("email_messages.two_factor.greeting", { lng: lang });
10456
+ const instruction = i18n_default.t("email_messages.two_factor.instruction", {
10457
+ lng: lang
10458
+ });
10459
+ const signature = i18n_default.t("email_messages.two_factor.signature", {
10460
+ lng: lang
10461
+ });
10462
+ return `
10463
+ <html>
10464
+ <body style="font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6; color: #334155; background-color: #f8fafc; padding: 20px;">
10465
+ <div style="max-width: 500px; margin: 0 auto; background: #ffffff; padding: 32px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);">
10466
+ <div style="text-align: center; margin-bottom: 24px;">
10467
+ <h2 style="color: #1e293b; margin: 0; font-size: 24px;">${subject}</h2>
10468
+ </div>
10469
+ <p style="font-size: 16px;">${greeting} <strong>${firstName} ${lastName}</strong>,</p>
10470
+ <p style="font-size: 15px; color: #64748b;">${instruction}</p>
10471
+
10472
+ <div style="text-align: center; margin: 32px 0;">
10473
+ <div style="display: inline-block; letter-spacing: 8px; font-size: 36px; font-weight: 800; color: #16a34a; background: #f0fdf4; padding: 16px 32px; border-radius: 12px; border: 2px dashed #bbf7d0;">
10474
+ ${verifyCode}
10475
+ </div>
10476
+ </div>
10477
+
10478
+ <div style="background: #fffbeb; border-left: 4px solid #f59e0b; padding: 12px; margin-bottom: 24px;">
10479
+ <p style="font-size: 13px; color: #92400e; margin: 0;">${warning}</p>
10480
+ </div>
10481
+
10482
+ <p style="font-size: 14px; color: #64748b;">${support}
10483
+ <a href="${supportMailLink}" style="color: #2ecc71; text-decoration: none; font-weight: 500;">${supportMail}</a>.
10484
+ </p>
10485
+
10486
+ <hr style="border: 0; border-top: 1px solid #e2e8f0; margin: 24px 0;" />
10487
+
10488
+ <p style="font-size: 13px; color: #94a3b8; margin: 0;">${signature}</p>
10489
+ <p style="font-size: 14px; font-weight: bold; color: #1e293b; margin: 4px 0 0 0;">${team}</p>
10490
+ </div>
10491
+ </body>
10492
+ </html>
10493
+ `;
10494
+ };
10450
10495
 
10451
10496
  // src/decorators/server/field-validator/field-transformer.registry.ts
10452
10497
  import { Transform } from "class-transformer";
@@ -11538,6 +11583,7 @@ export {
11538
11583
  sendWithContext,
11539
11584
  signupVerifyMessage,
11540
11585
  stringTransform,
11586
+ twoFactorVerifyMessage,
11541
11587
  upperCaseTranform,
11542
11588
  validationMessage,
11543
11589
  verifyYourselfMessage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectfy-shared",
3
- "version": "0.0.92",
3
+ "version": "0.0.94",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {