connectfy-shared 0.0.120 → 0.0.122

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
@@ -9510,6 +9510,7 @@ __export(index_exports, {
9510
9510
  deleteAccountMessage: () => deleteAccountMessage,
9511
9511
  emailNotFoundMessage: () => emailNotFoundMessage,
9512
9512
  emitWithContext: () => emitWithContext,
9513
+ emitWithContextTcp: () => emitWithContextTcp,
9513
9514
  encryptPayload: () => encryptPayload,
9514
9515
  enumTransform: () => enumTransform,
9515
9516
  forgotPasswordMessage: () => forgotPasswordMessage,
@@ -9966,6 +9967,10 @@ var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
9966
9967
  NotificationStatus2["Unread"] = "unread";
9967
9968
  NotificationStatus2["Read"] = "read";
9968
9969
  NotificationStatus2["Archived"] = "archived";
9970
+ NotificationStatus2["Pending"] = "pending";
9971
+ NotificationStatus2["Accepted"] = "accepted";
9972
+ NotificationStatus2["Declined"] = "declined";
9973
+ NotificationStatus2["Cancelled"] = "cancelled";
9969
9974
  return NotificationStatus2;
9970
9975
  })(NotificationStatus || {});
9971
9976
  var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
@@ -11497,6 +11502,19 @@ async function sendWithContext({
11497
11502
  };
11498
11503
  return await (0, import_rxjs2.lastValueFrom)(client.send(endpoint, enrichedPayload));
11499
11504
  }
11505
+ async function emitWithContextTcp({
11506
+ client,
11507
+ endpoint,
11508
+ payload = {}
11509
+ }) {
11510
+ const cls = import_nestjs_cls2.ClsServiceManager.getClsService();
11511
+ const user = cls?.get("user") || null;
11512
+ const enrichedPayload = {
11513
+ ...payload,
11514
+ _loggedUser: user
11515
+ };
11516
+ client.emit(endpoint, enrichedPayload);
11517
+ }
11500
11518
  function emitWithContext({
11501
11519
  client,
11502
11520
  topic,
@@ -11795,6 +11813,7 @@ var BaseRepository = class {
11795
11813
  deleteAccountMessage,
11796
11814
  emailNotFoundMessage,
11797
11815
  emitWithContext,
11816
+ emitWithContextTcp,
11798
11817
  encryptPayload,
11799
11818
  enumTransform,
11800
11819
  forgotPasswordMessage,
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { RpcException, ClientKafka, ClientProxy, KafkaContext } from '@nestjs/microservices';
1
+ import { RpcException, ClientProxy, ClientKafka, KafkaContext } from '@nestjs/microservices';
2
2
  import { PopulateOptions, Document, Model, PipelineStage } from 'mongoose';
3
3
  import { ClsService } from 'nestjs-cls';
4
4
  import { ValidationArguments, ValidationOptions, IsIpVersion, IsNumberOptions } from 'class-validator';
@@ -395,7 +395,11 @@ declare enum NotificationType {
395
395
  declare enum NotificationStatus {
396
396
  Unread = "unread",
397
397
  Read = "read",
398
- Archived = "archived"
398
+ Archived = "archived",
399
+ Pending = "pending",
400
+ Accepted = "accepted",
401
+ Declined = "declined",
402
+ Cancelled = "cancelled"
399
403
  }
400
404
  declare enum NotificationChannel {
401
405
  InApp = "in_app",
@@ -428,6 +432,8 @@ interface ISendWithContextClientParams {
428
432
  endpoint: string;
429
433
  payload?: any;
430
434
  }
435
+ interface IEmitTcpWithContextClientParams extends ISendWithContextClientParams {
436
+ }
431
437
  interface IEmitWithContextClientParams {
432
438
  client: ClientKafka;
433
439
  cls?: ClsService;
@@ -642,6 +648,7 @@ declare function encryptPayload(plaintext: string, base64Key: string): string;
642
648
  declare function decryptPayload(payload: string, base64Key: string): string;
643
649
 
644
650
  declare function sendWithContext<TResponse = any>({ client, endpoint, payload, }: ISendWithContextClientParams): Promise<TResponse>;
651
+ declare function emitWithContextTcp({ client, endpoint, payload, }: IEmitTcpWithContextClientParams): Promise<void>;
645
652
  declare function emitWithContext({ client, topic, payload, }: IEmitWithContextClientParams): rxjs.Observable<any>;
646
653
 
647
654
  declare function commitKafkaOffset(context: KafkaContext): Promise<void>;
@@ -708,7 +715,6 @@ interface INotificationSettings {
708
715
  notificationContentMode: NOTIFICATION_CONTENT_MODE;
709
716
  sendMessageSound: boolean;
710
717
  receiveMessageSound: boolean;
711
- notificationSound: boolean;
712
718
  privateMessageSound: boolean;
713
719
  groupMessageSound: boolean;
714
720
  systemNotificationSound: boolean;
@@ -851,4 +857,4 @@ declare abstract class BaseRepository<TDocument extends Document<any, any, any>,
851
857
  aggregate<R = any>(pipeline: PipelineStage[]): Promise<R[]>;
852
858
  }
853
859
 
854
- export { AllExceptionsFilter, AvatarFormats, 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, FieldValidator, type FieldValidatorOptions, FileOwnerModule, FileUploadTopic, FriendshipRequestType, FriendshipStatus, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IAvatar, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IDefaultAvatar, type IEmitWithContextClientParams, type IEnumFieldOptions, type IFindAllResponse, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, MODULE_TO_TOPIC_MAP, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, NotificationChannel, NotificationResource, NotificationStatus, NotificationType, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, ProfilePhotoUpdateAction, Push_DELIVERY_STATUS, 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, commitKafkaOffset, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, shouldShowField, signupVerifyMessage, stringTransform, twoFactorVerifyMessage, upperCaseTranform, validationMessage, verifyYourselfMessage };
860
+ export { AllExceptionsFilter, AvatarFormats, 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, FieldValidator, type FieldValidatorOptions, FileOwnerModule, FileUploadTopic, FriendshipRequestType, FriendshipStatus, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IAvatar, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IDefaultAvatar, type IEmitTcpWithContextClientParams, type IEmitWithContextClientParams, type IEnumFieldOptions, type IFindAllResponse, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, MODULE_TO_TOPIC_MAP, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, NotificationChannel, NotificationResource, NotificationStatus, NotificationType, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, ProfilePhotoUpdateAction, Push_DELIVERY_STATUS, 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, commitKafkaOffset, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, emitWithContextTcp, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, shouldShowField, signupVerifyMessage, stringTransform, twoFactorVerifyMessage, upperCaseTranform, validationMessage, verifyYourselfMessage };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RpcException, ClientKafka, ClientProxy, KafkaContext } from '@nestjs/microservices';
1
+ import { RpcException, ClientProxy, ClientKafka, KafkaContext } from '@nestjs/microservices';
2
2
  import { PopulateOptions, Document, Model, PipelineStage } from 'mongoose';
3
3
  import { ClsService } from 'nestjs-cls';
4
4
  import { ValidationArguments, ValidationOptions, IsIpVersion, IsNumberOptions } from 'class-validator';
@@ -395,7 +395,11 @@ declare enum NotificationType {
395
395
  declare enum NotificationStatus {
396
396
  Unread = "unread",
397
397
  Read = "read",
398
- Archived = "archived"
398
+ Archived = "archived",
399
+ Pending = "pending",
400
+ Accepted = "accepted",
401
+ Declined = "declined",
402
+ Cancelled = "cancelled"
399
403
  }
400
404
  declare enum NotificationChannel {
401
405
  InApp = "in_app",
@@ -428,6 +432,8 @@ interface ISendWithContextClientParams {
428
432
  endpoint: string;
429
433
  payload?: any;
430
434
  }
435
+ interface IEmitTcpWithContextClientParams extends ISendWithContextClientParams {
436
+ }
431
437
  interface IEmitWithContextClientParams {
432
438
  client: ClientKafka;
433
439
  cls?: ClsService;
@@ -642,6 +648,7 @@ declare function encryptPayload(plaintext: string, base64Key: string): string;
642
648
  declare function decryptPayload(payload: string, base64Key: string): string;
643
649
 
644
650
  declare function sendWithContext<TResponse = any>({ client, endpoint, payload, }: ISendWithContextClientParams): Promise<TResponse>;
651
+ declare function emitWithContextTcp({ client, endpoint, payload, }: IEmitTcpWithContextClientParams): Promise<void>;
645
652
  declare function emitWithContext({ client, topic, payload, }: IEmitWithContextClientParams): rxjs.Observable<any>;
646
653
 
647
654
  declare function commitKafkaOffset(context: KafkaContext): Promise<void>;
@@ -708,7 +715,6 @@ interface INotificationSettings {
708
715
  notificationContentMode: NOTIFICATION_CONTENT_MODE;
709
716
  sendMessageSound: boolean;
710
717
  receiveMessageSound: boolean;
711
- notificationSound: boolean;
712
718
  privateMessageSound: boolean;
713
719
  groupMessageSound: boolean;
714
720
  systemNotificationSound: boolean;
@@ -851,4 +857,4 @@ declare abstract class BaseRepository<TDocument extends Document<any, any, any>,
851
857
  aggregate<R = any>(pipeline: PipelineStage[]): Promise<R[]>;
852
858
  }
853
859
 
854
- export { AllExceptionsFilter, AvatarFormats, 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, FieldValidator, type FieldValidatorOptions, FileOwnerModule, FileUploadTopic, FriendshipRequestType, FriendshipStatus, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IAvatar, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IDefaultAvatar, type IEmitWithContextClientParams, type IEnumFieldOptions, type IFindAllResponse, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, MODULE_TO_TOPIC_MAP, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, NotificationChannel, NotificationResource, NotificationStatus, NotificationType, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, ProfilePhotoUpdateAction, Push_DELIVERY_STATUS, 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, commitKafkaOffset, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, shouldShowField, signupVerifyMessage, stringTransform, twoFactorVerifyMessage, upperCaseTranform, validationMessage, verifyYourselfMessage };
860
+ export { AllExceptionsFilter, AvatarFormats, 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, FieldValidator, type FieldValidatorOptions, FileOwnerModule, FileUploadTopic, FriendshipRequestType, FriendshipStatus, GENDER, GOOGLE_AUTH_LOGIN_TYPE, HttpStatus, type IAccount, type IArrayFieldOptions, type IAvatar, type IBaseFieldOptions, type IBaseRepositoryInterface, type IBaseRepositoryOptions, type IBaseRepositoryRemoveOptions, type IBaseRepositoryUpdateOptions, type IBooleanFieldOptions, type ICountry, IDENTIFIER_TYPE, type IDateFieldOptions, type IDefaultAvatar, type IEmitTcpWithContextClientParams, type IEmitWithContextClientParams, type IEnumFieldOptions, type IFindAllResponse, type IGeneralSettings, type ILoggedUser, type INotificationSettings, type INumberFieldOptions, type IObjectFieldOptions, type IPhoneNumber, type IPrivacySettings, type IRemoveAllResponse, type IResponse, type IReturnedUser, type ISendWithContextClientParams, type IStringFieldOptions, type ITimeZone, type IValidateMessageOptions, LANGUAGE, LOCAL_STORAGE_KEYS, MICROSERVICE_NAMES, MODULE_TO_TOPIC_MAP, NOTIFICATION_CONTENT_MODE, NOTIFICATION_SOUND_MODE, NotificationChannel, NotificationResource, NotificationStatus, NotificationType, OS_TYPE, PHONE_NUMBER_ACTION, PRIVACY_SETTINGS_CHOICE, PROVIDER, PopulateOption, ProfilePhotoUpdateAction, Push_DELIVERY_STATUS, 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, commitKafkaOffset, dateTransform, decryptPayload, deleteAccountMessage, emailNotFoundMessage, emitWithContext, emitWithContextTcp, encryptPayload, enumTransform, forgotPasswordMessage, getLang, googleSignInMessage, lowerCaseTranform, numberTransform, objectTransform, sendWithContext, shouldShowField, signupVerifyMessage, stringTransform, twoFactorVerifyMessage, upperCaseTranform, validationMessage, verifyYourselfMessage };
package/dist/index.mjs CHANGED
@@ -9866,6 +9866,10 @@ var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
9866
9866
  NotificationStatus2["Unread"] = "unread";
9867
9867
  NotificationStatus2["Read"] = "read";
9868
9868
  NotificationStatus2["Archived"] = "archived";
9869
+ NotificationStatus2["Pending"] = "pending";
9870
+ NotificationStatus2["Accepted"] = "accepted";
9871
+ NotificationStatus2["Declined"] = "declined";
9872
+ NotificationStatus2["Cancelled"] = "cancelled";
9869
9873
  return NotificationStatus2;
9870
9874
  })(NotificationStatus || {});
9871
9875
  var NotificationChannel = /* @__PURE__ */ ((NotificationChannel2) => {
@@ -11439,6 +11443,19 @@ async function sendWithContext({
11439
11443
  };
11440
11444
  return await (0, import_rxjs2.lastValueFrom)(client.send(endpoint, enrichedPayload));
11441
11445
  }
11446
+ async function emitWithContextTcp({
11447
+ client,
11448
+ endpoint,
11449
+ payload = {}
11450
+ }) {
11451
+ const cls = ClsServiceManager2.getClsService();
11452
+ const user = cls?.get("user") || null;
11453
+ const enrichedPayload = {
11454
+ ...payload,
11455
+ _loggedUser: user
11456
+ };
11457
+ client.emit(endpoint, enrichedPayload);
11458
+ }
11442
11459
  function emitWithContext({
11443
11460
  client,
11444
11461
  topic,
@@ -11736,6 +11753,7 @@ export {
11736
11753
  deleteAccountMessage,
11737
11754
  emailNotFoundMessage,
11738
11755
  emitWithContext,
11756
+ emitWithContextTcp,
11739
11757
  encryptPayload,
11740
11758
  enumTransform,
11741
11759
  forgotPasswordMessage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "connectfy-shared",
3
- "version": "0.0.120",
3
+ "version": "0.0.122",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {