@nomalism-com/types 0.43.74 → 0.43.75

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.
@@ -47,6 +47,11 @@ export interface IMarkAllClientReadUnreadRequest {
47
47
  chat_document_header_id: string;
48
48
  client_read: boolean;
49
49
  }
50
+ export interface ITranslateRequest {
51
+ chat_id: string;
52
+ target_language_id: string;
53
+ message: string;
54
+ }
50
55
  export interface IRepository {
51
56
  findByOwnerId(params: IShared.IFindByIdRequest): Promise<IFindActiveByOwnerIdResponse>;
52
57
  create(data: ICreateRequest): Promise<Chat>;
@@ -56,5 +61,6 @@ export interface IRepository {
56
61
  markAllAsUnread(params: IShared.IFindByIdRequest): Promise<void>;
57
62
  publicMarkAllClientReadUnread(params: IMarkAllClientReadUnreadRequest): Promise<void>;
58
63
  resendLast(params: IShared.IFindByIdRequest): Promise<void>;
64
+ translate(data: ITranslateRequest): Promise<string>;
59
65
  }
60
66
  export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -143,12 +143,11 @@ export type Country = {
143
143
  export type Language = {
144
144
  id: string;
145
145
  name: string;
146
+ native_name: string;
147
+ iso_code: string;
148
+ short_list: boolean;
146
149
  created_at: Date;
147
150
  updated_at: Date;
148
- created_by: string;
149
- updated_by: string;
150
- origin_id: string | null;
151
- external_id: string | null;
152
151
  };
153
152
  /**
154
153
  * Model Clients
@@ -11,6 +11,7 @@ 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
15
  export { messages };
15
16
  type CreatedAt = 'created_at';
16
17
  type UpdatedAt = 'updated_at';
@@ -295,11 +296,7 @@ export type IBrokerTopicPayload = {
295
296
  email_subject?: string;
296
297
  created_by: string;
297
298
  };
298
- [IBrokerTopic.translate_chat_message]: {
299
- chat_id: string;
300
- target_language_id: string;
301
- message: string;
302
- };
299
+ [IBrokerTopic.translate_chat_message]: ITranslateRequest;
303
300
  [IBrokerTopic.create_site_proposal]: ProjectInfo;
304
301
  [IBrokerTopic.verification_email]: {
305
302
  email: string;
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.43.74",
4
+ "version": "0.43.75",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",