connectfy-shared 0.0.119 → 0.0.121
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 +21 -6
- package/dist/index.d.cts +11 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.mjs +20 -6
- package/package.json +1 -1
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,
|
|
@@ -9954,12 +9955,12 @@ var FriendshipRequestType = /* @__PURE__ */ ((FriendshipRequestType2) => {
|
|
|
9954
9955
|
return FriendshipRequestType2;
|
|
9955
9956
|
})(FriendshipRequestType || {});
|
|
9956
9957
|
var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
9957
|
-
NotificationType2["FRIENDSHIP_REQUEST_SENT"] = "
|
|
9958
|
-
NotificationType2["FRIENDSHIP_REQUEST_ACCEPTED"] = "
|
|
9959
|
-
NotificationType2["FRIENDSHIP_REQUEST_DECLINED"] = "
|
|
9960
|
-
NotificationType2["NEW_MESSAGE"] = "
|
|
9961
|
-
NotificationType2["SYSTEM_ALERT"] = "
|
|
9962
|
-
NotificationType2["ACCOUNT_WARNING"] = "
|
|
9958
|
+
NotificationType2["FRIENDSHIP_REQUEST_SENT"] = "friendship_request_sent";
|
|
9959
|
+
NotificationType2["FRIENDSHIP_REQUEST_ACCEPTED"] = "friendship_request_accepted";
|
|
9960
|
+
NotificationType2["FRIENDSHIP_REQUEST_DECLINED"] = "friendship_request_declined";
|
|
9961
|
+
NotificationType2["NEW_MESSAGE"] = "message_new";
|
|
9962
|
+
NotificationType2["SYSTEM_ALERT"] = "system_alert";
|
|
9963
|
+
NotificationType2["ACCOUNT_WARNING"] = "account_warning";
|
|
9963
9964
|
return NotificationType2;
|
|
9964
9965
|
})(NotificationType || {});
|
|
9965
9966
|
var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
|
|
@@ -11497,6 +11498,19 @@ async function sendWithContext({
|
|
|
11497
11498
|
};
|
|
11498
11499
|
return await (0, import_rxjs2.lastValueFrom)(client.send(endpoint, enrichedPayload));
|
|
11499
11500
|
}
|
|
11501
|
+
async function emitWithContextTcp({
|
|
11502
|
+
client,
|
|
11503
|
+
endpoint,
|
|
11504
|
+
payload = {}
|
|
11505
|
+
}) {
|
|
11506
|
+
const cls = import_nestjs_cls2.ClsServiceManager.getClsService();
|
|
11507
|
+
const user = cls?.get("user") || null;
|
|
11508
|
+
const enrichedPayload = {
|
|
11509
|
+
...payload,
|
|
11510
|
+
_loggedUser: user
|
|
11511
|
+
};
|
|
11512
|
+
client.emit(endpoint, enrichedPayload);
|
|
11513
|
+
}
|
|
11500
11514
|
function emitWithContext({
|
|
11501
11515
|
client,
|
|
11502
11516
|
topic,
|
|
@@ -11795,6 +11809,7 @@ var BaseRepository = class {
|
|
|
11795
11809
|
deleteAccountMessage,
|
|
11796
11810
|
emailNotFoundMessage,
|
|
11797
11811
|
emitWithContext,
|
|
11812
|
+
emitWithContextTcp,
|
|
11798
11813
|
encryptPayload,
|
|
11799
11814
|
enumTransform,
|
|
11800
11815
|
forgotPasswordMessage,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RpcException,
|
|
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';
|
|
@@ -385,12 +385,12 @@ declare enum FriendshipRequestType {
|
|
|
385
385
|
Sent = "Sent"
|
|
386
386
|
}
|
|
387
387
|
declare enum NotificationType {
|
|
388
|
-
FRIENDSHIP_REQUEST_SENT = "
|
|
389
|
-
FRIENDSHIP_REQUEST_ACCEPTED = "
|
|
390
|
-
FRIENDSHIP_REQUEST_DECLINED = "
|
|
391
|
-
NEW_MESSAGE = "
|
|
392
|
-
SYSTEM_ALERT = "
|
|
393
|
-
ACCOUNT_WARNING = "
|
|
388
|
+
FRIENDSHIP_REQUEST_SENT = "friendship_request_sent",
|
|
389
|
+
FRIENDSHIP_REQUEST_ACCEPTED = "friendship_request_accepted",
|
|
390
|
+
FRIENDSHIP_REQUEST_DECLINED = "friendship_request_declined",
|
|
391
|
+
NEW_MESSAGE = "message_new",
|
|
392
|
+
SYSTEM_ALERT = "system_alert",
|
|
393
|
+
ACCOUNT_WARNING = "account_warning"
|
|
394
394
|
}
|
|
395
395
|
declare enum NotificationStatus {
|
|
396
396
|
Unread = "unread",
|
|
@@ -428,6 +428,8 @@ interface ISendWithContextClientParams {
|
|
|
428
428
|
endpoint: string;
|
|
429
429
|
payload?: any;
|
|
430
430
|
}
|
|
431
|
+
interface IEmitTcpWithContextClientParams extends ISendWithContextClientParams {
|
|
432
|
+
}
|
|
431
433
|
interface IEmitWithContextClientParams {
|
|
432
434
|
client: ClientKafka;
|
|
433
435
|
cls?: ClsService;
|
|
@@ -642,6 +644,7 @@ declare function encryptPayload(plaintext: string, base64Key: string): string;
|
|
|
642
644
|
declare function decryptPayload(payload: string, base64Key: string): string;
|
|
643
645
|
|
|
644
646
|
declare function sendWithContext<TResponse = any>({ client, endpoint, payload, }: ISendWithContextClientParams): Promise<TResponse>;
|
|
647
|
+
declare function emitWithContextTcp({ client, endpoint, payload, }: IEmitTcpWithContextClientParams): Promise<void>;
|
|
645
648
|
declare function emitWithContext({ client, topic, payload, }: IEmitWithContextClientParams): rxjs.Observable<any>;
|
|
646
649
|
|
|
647
650
|
declare function commitKafkaOffset(context: KafkaContext): Promise<void>;
|
|
@@ -851,4 +854,4 @@ declare abstract class BaseRepository<TDocument extends Document<any, any, any>,
|
|
|
851
854
|
aggregate<R = any>(pipeline: PipelineStage[]): Promise<R[]>;
|
|
852
855
|
}
|
|
853
856
|
|
|
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 };
|
|
857
|
+
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,
|
|
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';
|
|
@@ -385,12 +385,12 @@ declare enum FriendshipRequestType {
|
|
|
385
385
|
Sent = "Sent"
|
|
386
386
|
}
|
|
387
387
|
declare enum NotificationType {
|
|
388
|
-
FRIENDSHIP_REQUEST_SENT = "
|
|
389
|
-
FRIENDSHIP_REQUEST_ACCEPTED = "
|
|
390
|
-
FRIENDSHIP_REQUEST_DECLINED = "
|
|
391
|
-
NEW_MESSAGE = "
|
|
392
|
-
SYSTEM_ALERT = "
|
|
393
|
-
ACCOUNT_WARNING = "
|
|
388
|
+
FRIENDSHIP_REQUEST_SENT = "friendship_request_sent",
|
|
389
|
+
FRIENDSHIP_REQUEST_ACCEPTED = "friendship_request_accepted",
|
|
390
|
+
FRIENDSHIP_REQUEST_DECLINED = "friendship_request_declined",
|
|
391
|
+
NEW_MESSAGE = "message_new",
|
|
392
|
+
SYSTEM_ALERT = "system_alert",
|
|
393
|
+
ACCOUNT_WARNING = "account_warning"
|
|
394
394
|
}
|
|
395
395
|
declare enum NotificationStatus {
|
|
396
396
|
Unread = "unread",
|
|
@@ -428,6 +428,8 @@ interface ISendWithContextClientParams {
|
|
|
428
428
|
endpoint: string;
|
|
429
429
|
payload?: any;
|
|
430
430
|
}
|
|
431
|
+
interface IEmitTcpWithContextClientParams extends ISendWithContextClientParams {
|
|
432
|
+
}
|
|
431
433
|
interface IEmitWithContextClientParams {
|
|
432
434
|
client: ClientKafka;
|
|
433
435
|
cls?: ClsService;
|
|
@@ -642,6 +644,7 @@ declare function encryptPayload(plaintext: string, base64Key: string): string;
|
|
|
642
644
|
declare function decryptPayload(payload: string, base64Key: string): string;
|
|
643
645
|
|
|
644
646
|
declare function sendWithContext<TResponse = any>({ client, endpoint, payload, }: ISendWithContextClientParams): Promise<TResponse>;
|
|
647
|
+
declare function emitWithContextTcp({ client, endpoint, payload, }: IEmitTcpWithContextClientParams): Promise<void>;
|
|
645
648
|
declare function emitWithContext({ client, topic, payload, }: IEmitWithContextClientParams): rxjs.Observable<any>;
|
|
646
649
|
|
|
647
650
|
declare function commitKafkaOffset(context: KafkaContext): Promise<void>;
|
|
@@ -851,4 +854,4 @@ declare abstract class BaseRepository<TDocument extends Document<any, any, any>,
|
|
|
851
854
|
aggregate<R = any>(pipeline: PipelineStage[]): Promise<R[]>;
|
|
852
855
|
}
|
|
853
856
|
|
|
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 };
|
|
857
|
+
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
|
@@ -9854,12 +9854,12 @@ var FriendshipRequestType = /* @__PURE__ */ ((FriendshipRequestType2) => {
|
|
|
9854
9854
|
return FriendshipRequestType2;
|
|
9855
9855
|
})(FriendshipRequestType || {});
|
|
9856
9856
|
var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
9857
|
-
NotificationType2["FRIENDSHIP_REQUEST_SENT"] = "
|
|
9858
|
-
NotificationType2["FRIENDSHIP_REQUEST_ACCEPTED"] = "
|
|
9859
|
-
NotificationType2["FRIENDSHIP_REQUEST_DECLINED"] = "
|
|
9860
|
-
NotificationType2["NEW_MESSAGE"] = "
|
|
9861
|
-
NotificationType2["SYSTEM_ALERT"] = "
|
|
9862
|
-
NotificationType2["ACCOUNT_WARNING"] = "
|
|
9857
|
+
NotificationType2["FRIENDSHIP_REQUEST_SENT"] = "friendship_request_sent";
|
|
9858
|
+
NotificationType2["FRIENDSHIP_REQUEST_ACCEPTED"] = "friendship_request_accepted";
|
|
9859
|
+
NotificationType2["FRIENDSHIP_REQUEST_DECLINED"] = "friendship_request_declined";
|
|
9860
|
+
NotificationType2["NEW_MESSAGE"] = "message_new";
|
|
9861
|
+
NotificationType2["SYSTEM_ALERT"] = "system_alert";
|
|
9862
|
+
NotificationType2["ACCOUNT_WARNING"] = "account_warning";
|
|
9863
9863
|
return NotificationType2;
|
|
9864
9864
|
})(NotificationType || {});
|
|
9865
9865
|
var NotificationStatus = /* @__PURE__ */ ((NotificationStatus2) => {
|
|
@@ -11439,6 +11439,19 @@ async function sendWithContext({
|
|
|
11439
11439
|
};
|
|
11440
11440
|
return await (0, import_rxjs2.lastValueFrom)(client.send(endpoint, enrichedPayload));
|
|
11441
11441
|
}
|
|
11442
|
+
async function emitWithContextTcp({
|
|
11443
|
+
client,
|
|
11444
|
+
endpoint,
|
|
11445
|
+
payload = {}
|
|
11446
|
+
}) {
|
|
11447
|
+
const cls = ClsServiceManager2.getClsService();
|
|
11448
|
+
const user = cls?.get("user") || null;
|
|
11449
|
+
const enrichedPayload = {
|
|
11450
|
+
...payload,
|
|
11451
|
+
_loggedUser: user
|
|
11452
|
+
};
|
|
11453
|
+
client.emit(endpoint, enrichedPayload);
|
|
11454
|
+
}
|
|
11442
11455
|
function emitWithContext({
|
|
11443
11456
|
client,
|
|
11444
11457
|
topic,
|
|
@@ -11736,6 +11749,7 @@ export {
|
|
|
11736
11749
|
deleteAccountMessage,
|
|
11737
11750
|
emailNotFoundMessage,
|
|
11738
11751
|
emitWithContext,
|
|
11752
|
+
emitWithContextTcp,
|
|
11739
11753
|
encryptPayload,
|
|
11740
11754
|
enumTransform,
|
|
11741
11755
|
forgotPasswordMessage,
|