@nomalism-com/types 0.45.5 → 0.45.7
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 +4 -3
- package/dist/index.js +4 -3
- package/dist/shared/interface.d.ts +60 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -455,6 +455,8 @@ var IUserSendEmailDocumentTemplateEnum = {
|
|
|
455
455
|
var IUserSendEmailDocumentTemplateTypes = Object.keys(IUserSendEmailDocumentTemplateEnum);
|
|
456
456
|
var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
|
|
457
457
|
IBrokerTopic2["tickets_change"] = "tickets_change";
|
|
458
|
+
IBrokerTopic2["push_notification"] = "push_notification";
|
|
459
|
+
IBrokerTopic2["portal_subscriber_events"] = "portal_subscriber_events";
|
|
458
460
|
IBrokerTopic2["user_send_email_password"] = "user_send_email_password";
|
|
459
461
|
IBrokerTopic2["grant_access"] = "grant_access";
|
|
460
462
|
IBrokerTopic2["remove_access"] = "remove_access";
|
|
@@ -474,12 +476,11 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
|
|
|
474
476
|
IBrokerTopic2["dispatch_chat_message"] = "dispatch_chat_message";
|
|
475
477
|
IBrokerTopic2["send_espera_info_cliente_messages"] = "send_espera_info_cliente_messages";
|
|
476
478
|
IBrokerTopic2["send_email_client_survey"] = "send_email_client_survey";
|
|
477
|
-
IBrokerTopic2["persona_lang_change"] = "persona_lang_change";
|
|
478
|
-
IBrokerTopic2["translate_chat_message"] = "translate_chat_message";
|
|
479
479
|
IBrokerTopic2["perform_task"] = "perform_task";
|
|
480
480
|
IBrokerTopic2["create_site_proposal"] = "create_site_proposal";
|
|
481
|
+
IBrokerTopic2["translate_chat_message"] = "translate_chat_message";
|
|
481
482
|
IBrokerTopic2["persona_updated"] = "persona_updated";
|
|
482
|
-
IBrokerTopic2["
|
|
483
|
+
IBrokerTopic2["persona_lang_change"] = "persona_lang_change";
|
|
483
484
|
IBrokerTopic2["error_log"] = "error_log";
|
|
484
485
|
IBrokerTopic2["kafka_log"] = "kafka_log";
|
|
485
486
|
IBrokerTopic2["express_log"] = "express_log";
|
package/dist/index.js
CHANGED
|
@@ -455,6 +455,8 @@ var IUserSendEmailDocumentTemplateEnum = {
|
|
|
455
455
|
var IUserSendEmailDocumentTemplateTypes = Object.keys(IUserSendEmailDocumentTemplateEnum);
|
|
456
456
|
var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
|
|
457
457
|
IBrokerTopic2["tickets_change"] = "tickets_change";
|
|
458
|
+
IBrokerTopic2["push_notification"] = "push_notification";
|
|
459
|
+
IBrokerTopic2["portal_subscriber_events"] = "portal_subscriber_events";
|
|
458
460
|
IBrokerTopic2["user_send_email_password"] = "user_send_email_password";
|
|
459
461
|
IBrokerTopic2["grant_access"] = "grant_access";
|
|
460
462
|
IBrokerTopic2["remove_access"] = "remove_access";
|
|
@@ -474,12 +476,11 @@ var IBrokerTopic = /* @__PURE__ */ ((IBrokerTopic2) => {
|
|
|
474
476
|
IBrokerTopic2["dispatch_chat_message"] = "dispatch_chat_message";
|
|
475
477
|
IBrokerTopic2["send_espera_info_cliente_messages"] = "send_espera_info_cliente_messages";
|
|
476
478
|
IBrokerTopic2["send_email_client_survey"] = "send_email_client_survey";
|
|
477
|
-
IBrokerTopic2["persona_lang_change"] = "persona_lang_change";
|
|
478
|
-
IBrokerTopic2["translate_chat_message"] = "translate_chat_message";
|
|
479
479
|
IBrokerTopic2["perform_task"] = "perform_task";
|
|
480
480
|
IBrokerTopic2["create_site_proposal"] = "create_site_proposal";
|
|
481
|
+
IBrokerTopic2["translate_chat_message"] = "translate_chat_message";
|
|
481
482
|
IBrokerTopic2["persona_updated"] = "persona_updated";
|
|
482
|
-
IBrokerTopic2["
|
|
483
|
+
IBrokerTopic2["persona_lang_change"] = "persona_lang_change";
|
|
483
484
|
IBrokerTopic2["error_log"] = "error_log";
|
|
484
485
|
IBrokerTopic2["kafka_log"] = "kafka_log";
|
|
485
486
|
IBrokerTopic2["express_log"] = "express_log";
|
|
@@ -11,7 +11,8 @@ import type { File } from './entities/stock';
|
|
|
11
11
|
import type { ProjectInfo } from './entities/integration';
|
|
12
12
|
import type { IAttachment } from '../modules/supply/externalDocumentHeader/interface';
|
|
13
13
|
import type { Persona } from './entities/user';
|
|
14
|
-
import type { ITranslateRequest } from '../modules/stock/chat/interfaces';
|
|
14
|
+
import type { IChatBalloon, ITranslateRequest } from '../modules/stock/chat/interfaces';
|
|
15
|
+
import type { IPublicDocument, IPublicFindBySubscriberId, ITags } from '../modules/ui/portal/interface';
|
|
15
16
|
export { messages };
|
|
16
17
|
type CreatedAt = 'created_at';
|
|
17
18
|
type UpdatedAt = 'updated_at';
|
|
@@ -133,8 +134,60 @@ export declare const IUserSendEmailDocumentTemplateEnum: {
|
|
|
133
134
|
};
|
|
134
135
|
export type IUserSendEmailDocumentTemplate = (typeof IUserSendEmailDocumentTemplateEnum)[keyof typeof IUserSendEmailDocumentTemplateEnum];
|
|
135
136
|
export declare const IUserSendEmailDocumentTemplateTypes: string[];
|
|
137
|
+
export interface ChatTranslationUpdatedEvent {
|
|
138
|
+
type: 'chat.translation.updated';
|
|
139
|
+
chat_id: string;
|
|
140
|
+
translation: string;
|
|
141
|
+
target_language_id: string;
|
|
142
|
+
}
|
|
143
|
+
export interface ChatMessageCreatedEvent {
|
|
144
|
+
type: 'chat.message.created';
|
|
145
|
+
balloon: IChatBalloon;
|
|
146
|
+
}
|
|
147
|
+
export interface ChatMessageUpdatedEvent {
|
|
148
|
+
type: 'chat.message.updated';
|
|
149
|
+
chat_id: string;
|
|
150
|
+
patch: Partial<NonNullable<IChatBalloon['chat']>>;
|
|
151
|
+
}
|
|
152
|
+
export interface ChatMessageDeletedEvent {
|
|
153
|
+
type: 'chat.message.deleted';
|
|
154
|
+
chat_id: string;
|
|
155
|
+
}
|
|
156
|
+
export interface ChatFileDeletedEvent {
|
|
157
|
+
type: 'chat.file.deleted';
|
|
158
|
+
file_id: string;
|
|
159
|
+
}
|
|
160
|
+
export interface ChatReadStateUpdatedEvent {
|
|
161
|
+
type: 'chat.read_state.updated';
|
|
162
|
+
chat_document_header_id: string;
|
|
163
|
+
client_read: boolean;
|
|
164
|
+
chat_id?: string;
|
|
165
|
+
file_id?: string;
|
|
166
|
+
}
|
|
167
|
+
export interface ChatTagsUpdatedEvent {
|
|
168
|
+
type: 'chat.tags.updated';
|
|
169
|
+
chat_document_header_id: string;
|
|
170
|
+
tags: ITags[];
|
|
171
|
+
}
|
|
172
|
+
export interface PersonaUpdatedEvent {
|
|
173
|
+
type: 'persona.updated';
|
|
174
|
+
persona: NonNullable<IPublicFindBySubscriberId['persona']>;
|
|
175
|
+
}
|
|
176
|
+
export interface DocumentUpdatedEvent {
|
|
177
|
+
type: 'document.updated';
|
|
178
|
+
document: IPublicDocument;
|
|
179
|
+
}
|
|
180
|
+
export interface PingEvent {
|
|
181
|
+
type: 'ping';
|
|
182
|
+
}
|
|
183
|
+
export interface PongEvent {
|
|
184
|
+
type: 'pong';
|
|
185
|
+
}
|
|
186
|
+
export type ChatSocketEvent = ChatTranslationUpdatedEvent | ChatMessageCreatedEvent | ChatMessageUpdatedEvent | ChatMessageDeletedEvent | ChatFileDeletedEvent | ChatReadStateUpdatedEvent | ChatTagsUpdatedEvent | PersonaUpdatedEvent | DocumentUpdatedEvent | PingEvent | PongEvent;
|
|
136
187
|
export declare enum IBrokerTopic {
|
|
137
188
|
tickets_change = "tickets_change",
|
|
189
|
+
push_notification = "push_notification",
|
|
190
|
+
portal_subscriber_events = "portal_subscriber_events",
|
|
138
191
|
user_send_email_password = "user_send_email_password",
|
|
139
192
|
grant_access = "grant_access",
|
|
140
193
|
remove_access = "remove_access",
|
|
@@ -154,12 +207,11 @@ export declare enum IBrokerTopic {
|
|
|
154
207
|
dispatch_chat_message = "dispatch_chat_message",
|
|
155
208
|
send_espera_info_cliente_messages = "send_espera_info_cliente_messages",
|
|
156
209
|
send_email_client_survey = "send_email_client_survey",
|
|
157
|
-
persona_lang_change = "persona_lang_change",
|
|
158
|
-
translate_chat_message = "translate_chat_message",
|
|
159
210
|
perform_task = "perform_task",
|
|
160
211
|
create_site_proposal = "create_site_proposal",
|
|
212
|
+
translate_chat_message = "translate_chat_message",
|
|
161
213
|
persona_updated = "persona_updated",
|
|
162
|
-
|
|
214
|
+
persona_lang_change = "persona_lang_change",
|
|
163
215
|
error_log = "error_log",
|
|
164
216
|
kafka_log = "kafka_log",
|
|
165
217
|
express_log = "express_log",
|
|
@@ -388,6 +440,10 @@ export type IBrokerTopicPayload = {
|
|
|
388
440
|
country_name: string | null;
|
|
389
441
|
reason_for_exemption: string | null;
|
|
390
442
|
};
|
|
443
|
+
[IBrokerTopic.portal_subscriber_events]: {
|
|
444
|
+
target_subscriber_ids: string[];
|
|
445
|
+
event: ChatSocketEvent;
|
|
446
|
+
};
|
|
391
447
|
};
|
|
392
448
|
export interface IBrokerMessage<T extends IBrokerTopic = IBrokerTopic> {
|
|
393
449
|
topic: T;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.45.
|
|
4
|
+
"version": "0.45.7",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|